From 77eee0151bb1081122c671c47e6dc632f93f5ca0 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 9 Feb 2023 14:05:47 -0500 Subject: [PATCH] Overhaul workflow success to calculate target histories better --- .../Workflow/Run/WorkflowRunSuccess.vue | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/client/src/components/Workflow/Run/WorkflowRunSuccess.vue b/client/src/components/Workflow/Run/WorkflowRunSuccess.vue index 00e207ab0dc..2713c1fa584 100644 --- a/client/src/components/Workflow/Run/WorkflowRunSuccess.vue +++ b/client/src/components/Workflow/Run/WorkflowRunSuccess.vue @@ -2,16 +2,17 @@

- Successfully invoked workflow {{ workflowName }} - {{ timesExecuted }} times. + Successfully invoked workflow {{ workflowName }} + - {{ timesExecuted }} times.

-

+ +

This workflow will generate results in multiple histories. You can observe progress in the - history multi-view. + history multi-view.

This workflow will generate results in a new history. - Switch to that history now. + Switch to that history now.

You can check the status of queued jobs and view the resulting data the History panel.

@@ -53,12 +54,22 @@ export default { multipleInvocations() { return this.timesExecuted > 1; }, - historyTarget() { - if (this.multipleInvocations) { - return `${getAppRoot()}histories/view_multiple`; - } else { - return `${getAppRoot()}history/switch_to_history?hist_id=${this.invocations[0].history_id}`; - } + multipleHistoryTargets() { + return this.targetHistories.length > 1; + }, + targetHistories() { + return this.invocations.reduce((histories, invocation) => { + if (invocation.history_id && !histories.includes(invocation.history_id)) { + histories.push(invocation.history_id); + } + return histories; + }, []); + }, + multiHistoryView() { + return `${getAppRoot()}histories/view_multiple`; + }, + newHistoryTarget() { + return `${getAppRoot()}history/switch_to_history?hist_id=${this.invocations[0].history_id}`; }, wasNewHistoryTarget() { if (this.invocations.length < 1) {