feat: 다운로드 api 붙여 놓기만 했음

main
jschoi 8 months ago
parent b73d3a509d
commit 85e53a9d52

@ -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",
});
},
};

@ -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}`;
}
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;
}
function onClickArtifact(fullPath: string) {
const uri = buildArtifactUri(fullPath);
console.log("[MLflow Artifact URI]", uri);
}
/* ========= Fetchers ========= */

Loading…
Cancel
Save