diff --git a/client/src/components/WorkflowInvocationState/WorkflowInvocationOverview.vue b/client/src/components/WorkflowInvocationState/WorkflowInvocationOverview.vue index 8964c378d440..95e32b52fa1c 100644 --- a/client/src/components/WorkflowInvocationState/WorkflowInvocationOverview.vue +++ b/client/src/components/WorkflowInvocationState/WorkflowInvocationOverview.vue @@ -7,6 +7,7 @@ import { getRootFromIndexLink } from "@/onload"; import { type Workflow } from "@/stores/workflowStore"; import { withPrefix } from "@/utils/redirect"; +import { type InvocationMessageResponseModel } from "./invocationMessageModel"; import { errorCount as jobStatesSummaryErrorCount, jobCount as jobStatesSummaryJobCount, @@ -39,6 +40,8 @@ interface Props { const props = defineProps(); +const invocationMessages = computed(() => (props.invocation?.messages as InvocationMessageResponseModel[]) || []); + const generatePdfTooltip = "Generate PDF report for this workflow invocation"; const invocationId = computed(() => props.invocation?.id); @@ -107,10 +110,6 @@ const invocationPdfLink = computed(() => { } }); -const hasMessages = computed(() => { - return props.invocation?.messages.length ? true : false; -}); - const stepStatesStr = computed(() => { return `${stepStates.value?.scheduled || 0} of ${stepCount.value} steps successfully scheduled.`; }); @@ -145,6 +144,7 @@ const jobStatesStr = computed(() => { const emit = defineEmits<{ (e: "invocation-cancelled"): void; + (e: "show-messages-tab"): void; }>(); function onCancel() { @@ -174,14 +174,13 @@ function onCancel() {
-
+
Generate PDF @@ -193,15 +192,20 @@ function onCancel() { note="Loading step state summary..." :loading="true" class="steps-progress" /> - + :invocation-message="invocationMessages[0]" + :invocation="invocation" /> + + Showing 1 out of {{ invocationMessages.length }} messages. Click here to view all messages. + + import { library } from "@fortawesome/fontawesome-svg-core"; -import { faArrowLeft, faClock, faEdit, faEye, faHdd, faPlay, faSitemap } from "@fortawesome/free-solid-svg-icons"; +import { + faArrowLeft, + faClock, + faEdit, + faExclamationCircle, + faEye, + faHdd, + faPlay, + faSitemap, +} from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { BAlert, BButton, BButtonGroup, BTab, BTabs } from "bootstrap-vue"; import { computed, onMounted, onUnmounted, ref, watch } from "vue"; @@ -12,6 +21,7 @@ import { useWorkflowStore, type Workflow } from "@/stores/workflowStore"; import localize from "@/utils/localization"; import { errorMessageAsString } from "@/utils/simple-error"; +import { type InvocationMessageResponseModel } from "./invocationMessageModel"; import { cancelWorkflowScheduling } from "./services"; import { isTerminal, jobCount, runningCount } from "./util"; @@ -21,6 +31,7 @@ import UtcDate from "../UtcDate.vue"; import InvocationReport from "../Workflow/InvocationReport.vue"; import WorkflowInvocationsCount from "../Workflow/WorkflowInvocationsCount.vue"; import WorkflowRunButton from "../Workflow/WorkflowRunButton.vue"; +import InvocationMessage from "./InvocationMessage.vue"; import WorkflowInvocationExportOptions from "./WorkflowInvocationExportOptions.vue"; import WorkflowInvocationInputOutputTabs from "./WorkflowInvocationInputOutputTabs.vue"; import WorkflowInvocationOverview from "./WorkflowInvocationOverview.vue"; @@ -66,6 +77,7 @@ watch( ); const invocationTabs = ref(); +const messagesTab = ref(false); const scrollableDiv = computed(() => invocationTabs.value?.$el.querySelector(".tab-content") as HTMLElement); const isScrollable = ref(false); useAnimationFrameResizeObserver(scrollableDiv, ({ clientSize, scrollSize }) => { @@ -104,6 +116,7 @@ const invocationStateSuccess = computed(() => { invocationAndJobTerminal.value ); }); +const invocationMessages = computed(() => (invocation.value?.messages as InvocationMessageResponseModel[]) || []); const workflowStore = useWorkflowStore(); @@ -245,7 +258,8 @@ function getWorkflowName() { :invocation-scheduling-terminal="invocationSchedulingTerminal" :job-states-summary="jobStatesSummary" :is-subworkflow="isSubworkflow" - @invocation-cancelled="cancelWorkflowSchedulingLocal" /> + @invocation-cancelled="cancelWorkflowSchedulingLocal" + @show-messages-tab="messagesTab = true" />