Skip to content

Commit

Permalink
Merge pull request galaxyproject#15541 from dannon/fix-multiple-histo…
Browse files Browse the repository at this point in the history
…ry-target-logic

[23.0] Fix workflow success banner history target display
  • Loading branch information
mvdbeek authored Feb 10, 2023
2 parents cc272a9 + 77eee01 commit 45c0701
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions client/src/components/Workflow/Run/WorkflowRunSuccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
<div>
<div class="donemessagelarge">
<p>
Successfully invoked workflow <b>{{ workflowName }}</b
><em v-if="multipleInvocations"> - {{ timesExecuted }} times</em>.
Successfully invoked workflow <b>{{ workflowName }}</b>
<em v-if="multipleInvocations"> - {{ timesExecuted }} times</em>.
</p>
<p v-if="multipleInvocations">

<p v-if="multipleHistoryTargets">
This workflow will generate results in multiple histories. You can observe progress in the
<a :href="historyTarget">history multi-view</a>.
<a :href="multiHistoryView">history multi-view</a>.
</p>
<p v-else-if="wasNewHistoryTarget">
This workflow will generate results in a new history.
<a class="workflow-new-history-target-link" :href="historyTarget">Switch to that history now</a>.
<a class="workflow-new-history-target-link" :href="newHistoryTarget">Switch to that history now</a>.
</p>
<p v-else>You can check the status of queued jobs and view the resulting data the History panel.</p>
</div>
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 45c0701

Please sign in to comment.