Skip to content

Commit

Permalink
Clarify/reuse new history target logic, fix links to avoid redundant …
Browse files Browse the repository at this point in the history
…slash on root
  • Loading branch information
dannon committed May 30, 2018
1 parent 5845d64 commit 6c9953c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions client/galaxy/scripts/mvc/tool/tool-form-composite.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,22 +720,25 @@ var View = Backbone.View.extend({
// Default destination blurb, used for a single execution, same history.
let destinationBlurb =
"You can check the status of queued jobs and view the resulting data by refreshing the History pane, if this has not already happened automatically.";
let newHistoryTarget =
(response[0].history_id &&
Galaxy.currHistoryPanel &&
Galaxy.currHistoryPanel.model.id != response[0].history_id) ||
false;
if (response.length > 1) {
// Executed more than one time, build blurb but skip history link.
timesExecuted = `<em> - ${response.length} times</em>`;
destinationBlurb = `This workflow will generate results in multiple histories. You can observe progress in the <a href="${
Galaxy.root
}/history/view_multiple">history multi-view</a>.`;
} else if (
response[0].history_id &&
Galaxy.currHistoryPanel &&
Galaxy.currHistoryPanel.model.id != response[0].history_id
) {
if (newHistoryTarget) {
destinationBlurb = `This workflow will generate results in multiple histories. You can observe progress in the <a href="${
Galaxy.root
}history/view_multiple">history multi-view</a>.`;
}
} else if (newHistoryTarget) {
// Single execution, with a destination other than the
// current history. Present a link.
destinationBlurb = `This workflow will generate results in a new history. <a href="${
Galaxy.root
}/history/switch_to_history?hist_id=${response[0].history_id}">Switch to that history now</a>.`;
}history/switch_to_history?hist_id=${response[0].history_id}">Switch to that history now</a>.`;
}
return $(`
<div class="donemessagelarge">
Expand Down

0 comments on commit 6c9953c

Please sign in to comment.