diff --git a/client/src/api/jobs.ts b/client/src/api/jobs.ts index 661d412d2849..31e9801ddfdd 100644 --- a/client/src/api/jobs.ts +++ b/client/src/api/jobs.ts @@ -2,5 +2,8 @@ import { type components } from "@/api/schema"; export type JobDestinationParams = components["schemas"]["JobDestinationParams"]; export type ShowFullJobResponse = components["schemas"]["ShowFullJobResponse"]; +export type JobBaseModel = components["schemas"]["JobBaseModel"]; export type JobDetails = components["schemas"]["ShowFullJobResponse"] | components["schemas"]["EncodedJobDetails"]; export type JobInputSummary = components["schemas"]["JobInputSummary"]; +export type JobDisplayParametersSummary = components["schemas"]["JobDisplayParametersSummary"]; +export type JobMetric = components["schemas"]["JobMetric"]; diff --git a/client/src/components/Grid/GridInvocation.vue b/client/src/components/Grid/GridInvocation.vue index d8997096096f..847127cfa0b7 100644 --- a/client/src/components/Grid/GridInvocation.vue +++ b/client/src/components/Grid/GridInvocation.vue @@ -2,7 +2,9 @@ import { storeToRefs } from "pinia"; import { computed } from "vue"; +import type { WorkflowInvocation } from "@/api/invocations"; import invocationsGridConfig from "@/components/Grid/configs/invocations"; +import invocationsBatchConfig from "@/components/Grid/configs/invocationsBatch"; import invocationsHistoryGridConfig from "@/components/Grid/configs/invocationsHistory"; import invocationsWorkflowGridConfig from "@/components/Grid/configs/invocationsWorkflow"; import { useUserStore } from "@/stores/userStore"; @@ -19,6 +21,7 @@ interface Props { headerMessage?: string; ownerGrid?: boolean; filteredFor?: { type: "History" | "StoredWorkflow"; id: string; name: string }; + invocationsList?: WorkflowInvocation[]; } const props = withDefaults(defineProps(), { @@ -26,12 +29,14 @@ const props = withDefaults(defineProps(), { headerMessage: "", ownerGrid: true, filteredFor: undefined, + invocationsList: undefined, }); const { currentUser } = storeToRefs(useUserStore()); const forStoredWorkflow = computed(() => props.filteredFor?.type === "StoredWorkflow"); const forHistory = computed(() => props.filteredFor?.type === "History"); +const forBatch = computed(() => !!props.invocationsList?.length); const effectiveNoInvocationsMessage = computed(() => { let message = props.noInvocationsMessage; @@ -51,6 +56,9 @@ const effectiveTitle = computed(() => { }); const extraProps = computed(() => { + if (forBatch.value) { + return Object.fromEntries(props.invocationsList.map((invocation) => [invocation.id, invocation])); + } const params: { workflow_id?: string; history_id?: string; @@ -72,7 +80,9 @@ const extraProps = computed(() => { }); let gridConfig: GridConfig; -if (forStoredWorkflow.value) { +if (forBatch.value) { + gridConfig = invocationsBatchConfig; +} else if (forStoredWorkflow.value) { gridConfig = invocationsWorkflowGridConfig; } else if (forHistory.value) { gridConfig = invocationsHistoryGridConfig; @@ -97,9 +107,9 @@ function refreshTable() { :grid-message="props.headerMessage" :no-data-message="effectiveNoInvocationsMessage" :extra-props="extraProps" - :embedded="forStoredWorkflow || forHistory"> + :embedded="forStoredWorkflow || forHistory || forBatch">