From 85e53a9d52d771a72cd763995a0fe6449f6000e9 Mon Sep 17 00:00:00 2001 From: jschoi Date: Wed, 22 Oct 2025 19:40:38 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?api=20=EB=B6=99=EC=97=AC=20=EB=86=93=EA=B8=B0=EB=A7=8C=20?= =?UTF-8?q?=ED=96=88=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/service/management/MinioService.ts | 9 +++++++++ .../templates/run/executions/ViewComponent.vue | 15 +++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 src/components/service/management/MinioService.ts diff --git a/src/components/service/management/MinioService.ts b/src/components/service/management/MinioService.ts new file mode 100644 index 0000000..e34f9e0 --- /dev/null +++ b/src/components/service/management/MinioService.ts @@ -0,0 +1,9 @@ +import { request } from "@/components/service/index"; +export const MinioService = { + download(objectName: string) { + return request.get("/api/minio/download", { + params: { objectName, type: "type2" }, + responseType: "blob", + }); + }, +}; diff --git a/src/components/templates/run/executions/ViewComponent.vue b/src/components/templates/run/executions/ViewComponent.vue index 9ff3235..0c98cb6 100644 --- a/src/components/templates/run/executions/ViewComponent.vue +++ b/src/components/templates/run/executions/ViewComponent.vue @@ -13,6 +13,7 @@ import { import Plotly from "plotly.js-dist-min"; import CompareRunsDialog from "@/components/atoms/organisms/CompareRunDialog.vue"; import DeploymentDialog from "@/components/atoms/organisms/DeploymentDialog.vue"; +import { MinioService } from "@/components/service/management/MinioService"; /* ========= Constants & Types ========= */ const AUTH_KEY = "external-auth"; const externalToken = computed(() => externalAuth.value?.token ?? ""); @@ -254,11 +255,17 @@ function buildArtifactUri(fullPath: string) { runs.value[0]?.info?.experiment_id || ""; const runId = runDetail.value?.info?.run_id || selectedRunId.value || ""; - return `/${expId}/${runId}/artifacts/${fullPath}`; + return `${expId}/${runId}/artifacts/${fullPath}`; } -function onClickArtifact(fullPath: string) { - const uri = buildArtifactUri(fullPath); - console.log("[MLflow Artifact URI]", uri); +async function onClickArtifact(fullPath: string) { + const objectName = buildArtifactUri(fullPath); // expId/runId/artifacts/... + try { + artifactsLoading.value = true; + const res = await MinioService.download(objectName); + // blob 다운로드 처리... + } finally { + artifactsLoading.value = false; + } } /* ========= Fetchers ========= */