From 97d5e3c1f1aada7ce7502462bbb3728d196ef159 Mon Sep 17 00:00:00 2001 From: Dipanshu Gupta Date: Fri, 21 Jun 2024 14:51:44 +0530 Subject: [PATCH] Pipeline system.ClassificationMetrics artifacts provide a uri but have no source in storage --- .../pipelines/content/artifacts/ArtifactUriLink.tsx | 7 +++++-- .../pipelineRun/artifacts/ArtifactNodeDetails.tsx | 2 +- .../taskDetails/TaskDetailsInputOutput.tsx | 2 +- .../artifacts/ArtifactDetails/ArtifactOverviewDetails.tsx | 2 +- .../global/experiments/artifacts/ArtifactsTable.tsx | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/concepts/pipelines/content/artifacts/ArtifactUriLink.tsx b/frontend/src/concepts/pipelines/content/artifacts/ArtifactUriLink.tsx index 6a2c9b1fa4..894e2d599f 100644 --- a/frontend/src/concepts/pipelines/content/artifacts/ArtifactUriLink.tsx +++ b/frontend/src/concepts/pipelines/content/artifacts/ArtifactUriLink.tsx @@ -14,16 +14,19 @@ import { usePipelinesAPI } from '~/concepts/pipelines/context'; import { useIsAreaAvailable, SupportedArea } from '~/concepts/areas'; import { MAX_STORAGE_OBJECT_SIZE, fetchStorageObjectSize } from '~/services/storageService'; import { bytesAsRoundedGiB } from '~/utilities/number'; +import { ArtifactType } from '~/concepts/pipelines/kfTypes'; import { extractS3UriComponents, getArtifactUrlFromUri } from './utils'; interface ArtifactUriLinkProps { uri: string; + type: string; } -export const ArtifactUriLink: React.FC = ({ uri }) => { +export const ArtifactUriLink: React.FC = ({ uri, type }) => { const { namespace } = usePipelinesAPI(); const isS3EndpointAvailable = useIsAreaAvailable(SupportedArea.S3_ENDPOINT).status; const [size, setSize] = React.useState(null); + const isClassificationMetrics = type === ArtifactType.CLASSIFICATION_METRICS; const url = React.useMemo(() => { if (!uri || !isS3EndpointAvailable) { @@ -41,7 +44,7 @@ export const ArtifactUriLink: React.FC = ({ uri }) => { return getArtifactUrlFromUri(uri, namespace); }, [isS3EndpointAvailable, namespace, uri]); - if (!url) { + if (!url || isClassificationMetrics) { return uri; } diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/artifacts/ArtifactNodeDetails.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/artifacts/ArtifactNodeDetails.tsx index 676b3733de..8ec39e35e9 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/artifacts/ArtifactNodeDetails.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/artifacts/ArtifactNodeDetails.tsx @@ -88,7 +88,7 @@ export const ArtifactNodeDetails: React.FC = ({ {artifactName} - + diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsInputOutput.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsInputOutput.tsx index 53b4890d44..67ef8c9c89 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsInputOutput.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsInputOutput.tsx @@ -27,7 +27,7 @@ const TaskDetailsInputOutput: React.FC = ({ if (artifact) { return { label: artifactInputOutput.label, - value: , + value: , }; } diff --git a/frontend/src/pages/pipelines/global/experiments/artifacts/ArtifactDetails/ArtifactOverviewDetails.tsx b/frontend/src/pages/pipelines/global/experiments/artifacts/ArtifactDetails/ArtifactOverviewDetails.tsx index 4cc242a507..aa6f49ac22 100644 --- a/frontend/src/pages/pipelines/global/experiments/artifacts/ArtifactDetails/ArtifactOverviewDetails.tsx +++ b/frontend/src/pages/pipelines/global/experiments/artifacts/ArtifactDetails/ArtifactOverviewDetails.tsx @@ -34,7 +34,7 @@ export const ArtifactOverviewDetails: React.FC = ( <> URI - + )} diff --git a/frontend/src/pages/pipelines/global/experiments/artifacts/ArtifactsTable.tsx b/frontend/src/pages/pipelines/global/experiments/artifacts/ArtifactsTable.tsx index 4285892466..49ca53034f 100644 --- a/frontend/src/pages/pipelines/global/experiments/artifacts/ArtifactsTable.tsx +++ b/frontend/src/pages/pipelines/global/experiments/artifacts/ArtifactsTable.tsx @@ -151,7 +151,7 @@ export const ArtifactsTable: React.FC = ({ {artifact.id} {artifact.type} - +