(null);
+
const tableHeader = [
{ label: "No", width: "5%", style: "word-break: keep-all;" },
- { label: "Workflow Name", width: "7%", style: "word-break: keep-all;" },
- { label: "Step Count", width: "7%", style: "word-break: keep-all;" },
- { label: "Config Progress", width: "7%", style: "word-break: keep-all;" },
- { label: "Kubeflow Status", width: "7%", style: "word-break: keep-all;" },
- { label: "Created DateTime", width: "7%", style: "word-break: keep-all;" },
- { label: "Action", width: "7%", style: "word-break: keep-all;" },
+ { label: "Workflow Name", width: "18%", style: "word-break: keep-all;" },
+ { label: "Description", width: "28%", style: "word-break: keep-all;" },
+ { label: "Version", width: "10%", style: "word-break: keep-all;" },
+ { label: "Kubeflow Status", width: "12%", style: "word-break: keep-all;" },
+ { label: "Created DateTime", width: "15%", style: "word-break: keep-all;" },
+ { label: "Action", width: "12%", style: "word-break: keep-all;" },
];
-
const searchOptions = [
{ label: "전체", value: "전체" as SearchType },
{ label: "제목", value: "제목" as SearchType },
@@ -77,14 +80,13 @@ const formatDateTime = (
const toRow = (w: any, no: number) => ({
no,
- name: w.workflowName,
- description: w.workflowDescription,
+ name: w.name,
+ description: w.description,
version: w.version,
- stepCount: w.stepCount,
- configProgress: w.configProgress,
kubeflowStatus: w.kubeflowStatus,
registDt: w.regDt,
deviceKey: w.id,
+ pipelineId: w.pipelineId ?? w.pipeline_id ?? "",
});
const fetchList = () => {
@@ -130,7 +132,7 @@ const fetchList = () => {
if (mapped === "TITLE") {
list = list.filter((w: any) =>
- String(w?.workflowName ?? "")
+ String(w?.name ?? "")
.toLowerCase()
.includes(kw),
);
@@ -279,6 +281,12 @@ const openDetailModal = (selectedItem: any) => {
};
const closeDetail = () => (openView.value = false);
+const closeRunModal = () => (isRunVisible.value = false);
+
+const openRunModal = (item: any) => {
+ selectedRun.value = item;
+ isRunVisible.value = true;
+};
const openModifyModal = (item: any) => {
data.value.selectedData = {
@@ -484,14 +492,14 @@ onMounted(() => {
{{ item.no }} |
{{ item.name }} |
-
{{ item.stepCount }} |
-
{{ item.configProgress }} |
+
{{ item.description }} |
+
{{ item.version }} |
{{ item.kubeflowStatus }} |
{{ formatDateTime(item.registDt) }} |
+
-
-
+
{
@close-modal="closeUploadModal"
/>
+
+
+
diff --git a/src/components/templates/workflow/ViewComponent.vue b/src/components/templates/workflow/ViewComponent.vue
index 4d481f4..dfe770f 100644
--- a/src/components/templates/workflow/ViewComponent.vue
+++ b/src/components/templates/workflow/ViewComponent.vue
@@ -10,32 +10,22 @@ const props = defineProps<{ id: number | string }>();
const emit = defineEmits<{ (e: "close"): void }>();
const activeTab = ref("details");
+
+// ----- Monaco Editor -----
const editorRef = ref(null);
let editorInstance: monaco.editor.IStandaloneCodeEditor | null = null;
+// 화면에 뿌릴 상세 데이터(요청 항목만)
const detail = ref({
- workflowName: "",
+ name: "",
version: "",
- workflowDescription: "",
- createdDate: "",
- createdId: "",
+ description: "",
+ kubeflowStatus: "",
+ namespace: "",
+ pipelineId: "",
+ regDt: "",
});
-const stepHeaders = [
- { title: "Order", key: "order", width: "10%", align: "center" },
- { title: "Step Name", key: "name", width: "40%", align: "center" },
- {
- title: "Component Type",
- key: "componentType",
- width: "30%",
- align: "center",
- },
- { title: "Status", key: "status", width: "20%", align: "center" },
-];
-const steps = ref<
- Array<{ order: number; name: string; componentType: string; status: string }>
->([]);
-
const defaultYaml = `# YAML not provided by server
apiVersion: argoproj.io/v1alpha1
kind: Workflow
@@ -51,30 +41,32 @@ spec:
args: ["echo hello"]
`;
-/** ===== 상세 조회 ===== */
+// 간단한 날짜 포맷터 (ISO/T 포함 모두 대응)
+function formatDateTime(raw?: string): string {
+ if (!raw) return "-";
+ const s = String(raw).replace("T", " ");
+ const m = s.match(/^(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2})/);
+ return m ? m[1] : s.slice(0, 19);
+}
+
+// ===== 상세 조회 =====
async function fetchDetail(id: number | string) {
try {
const res = await WorkflowService.view(Number(id));
- const d = res.data;
+ const d = res?.data ?? {};
- detail.value.workflowName = d.workflowName || "";
- detail.value.version = String(d.version || 1);
- detail.value.workflowDescription = d.workflowDescription || "";
- detail.value.createdDate = d.regDt || d.regDate || "-";
- detail.value.createdId = d.regUserId || "-";
-
- if (Array.isArray(d.steps)) {
- steps.value = d.steps.map((s: any, idx: number) => ({
- order: idx + 1,
- name: s.stepName || s.name || `Step ${idx + 1}`,
- componentType: s.componentType || s.type || "-",
- status: s.status || "Not Configured",
- }));
- } else {
- steps.value = [];
- }
+ // 백엔드 필드명(스네이크/카멜) 혼재 대비 매핑
+ detail.value = {
+ name: d.name ?? d.workflowName ?? "",
+ version: String(d.version ?? ""),
+ description: d.description ?? d.workflowDescription ?? "",
+ kubeflowStatus: d.kubeflow_status ?? d.kubeflowStatus ?? "",
+ namespace: d.namespace ?? "",
+ pipelineId: d.pipeline_id ?? d.pipelineId ?? "",
+ regDt: formatDateTime(d.reg_dt ?? d.regDt ?? d.regDate),
+ };
- // YAML 표시 (서버 필드 이름에 맞춰 하나라도 있으면 사용)
+ // YAML (있으면 보여주고, 없으면 기본 예시)
const yamlFromServer =
d.workflowYaml ||
d.yaml ||
@@ -86,11 +78,11 @@ async function fetchDetail(id: number | string) {
editorInstance.setValue(yamlFromServer || defaultYaml);
}
} catch (e) {
- console.error("[Child] view API failed:", e);
+ console.error("[Workflow Detail] view API failed:", e);
}
}
-/** ===== 마운트 & 변경 감지 ===== */
+// ===== 마운트 & 변경 감지 =====
onMounted(() => {
if (editorRef.value) {
editorInstance = monaco.editor.create(editorRef.value, {
@@ -105,7 +97,6 @@ onMounted(() => {
}
});
-// props.id가 바뀌면 재조회
watch(
() => props.id,
(val) => {
@@ -122,6 +113,22 @@ onBeforeUnmount(() => {
editorInstance = null;
}
});
+
+// ===== (나중 사용) Step 테이블 정의 =====
+const stepHeaders = [
+ { title: "Order", key: "order", width: "10%", align: "center" },
+ { title: "Step Name", key: "name", width: "40%", align: "center" },
+ {
+ title: "Component Type",
+ key: "componentType",
+ width: "30%",
+ align: "center",
+ },
+ { title: "Status", key: "status", width: "20%", align: "center" },
+];
+const steps = ref<
+ Array<{ order: number; name: string; componentType: string; status: string }>
+>([]);
@@ -156,37 +163,67 @@ onBeforeUnmount(() => {
Workflow Information
+
Workflow Name
- {{ detail.workflowName }}
+ {{ detail.name || "-" }}
Version
- {{ detail.version }}
+ {{ detail.version || "-" }}
+
+
Workflow Description
- {{ detail.workflowDescription }}
+ {{ detail.description || "-" }}
+
+
Created DateKubeflow Status
- {{ detail.createdDate }}
+ {{ detail.kubeflowStatus || "-" }}
+ Namespace
+ {{ detail.namespace || "-" }}
+
+
+
+
+
Created IDPipeline ID
- {{ detail.createdId }}
+ {{
+ detail.pipelineId || "-"
+ }}
+
+
+
+
+
+ Created Date
+ {{ detail.regDt || "-" }}
+
+
+
+ Back to List
+
+
-
+
@@ -253,10 +282,14 @@ onBeforeUnmount(() => {
min-height: 500px;
padding-bottom: 84px;
}
-
.back-to-list {
position: absolute;
right: 24px;
bottom: 24px;
}
+.text-truncate {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
|