From 2dc447b8d6be8eb83c3ab9862eb4133a8f82df54 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 17 Dec 2019 22:16:02 -0500 Subject: [PATCH 01/10] wfrun2vue - migrate load logic into Vue stub. --- .../components/Workflow/Run/WorkflowRun.vue | 53 +++++++++++++++++++ .../scripts/entry/analysis/AnalysisRouter.js | 27 +++------- .../scripts/mvc/tool/tool-form-composite.js | 13 ++--- 3 files changed, 65 insertions(+), 28 deletions(-) create mode 100644 client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue diff --git a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue new file mode 100644 index 00000000000..ebc847a7480 --- /dev/null +++ b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue @@ -0,0 +1,53 @@ + + + diff --git a/client/galaxy/scripts/entry/analysis/AnalysisRouter.js b/client/galaxy/scripts/entry/analysis/AnalysisRouter.js index 7cec09f614d..b110e99c372 100644 --- a/client/galaxy/scripts/entry/analysis/AnalysisRouter.js +++ b/client/galaxy/scripts/entry/analysis/AnalysisRouter.js @@ -31,13 +31,11 @@ import WorkflowList from "components/Workflow/WorkflowList.vue"; import HistoryImport from "components/HistoryImport.vue"; import HistoryView from "components/HistoryView.vue"; import WorkflowInvocationReport from "components/WorkflowInvocationReport.vue"; +import WorkflowRun from "components/Workflow/Run/WorkflowRun.vue"; import RecentInvocations from "components/User/RecentInvocations.vue"; import HistoryList from "mvc/history/history-list"; import PluginList from "components/PluginList.vue"; -import ToolFormComposite from "mvc/tool/tool-form-composite"; import QueryStringParsing from "utils/query-string-parsing"; -import Utils from "utils/utils"; -import Ui from "mvc/ui/ui-misc"; import DatasetError from "mvc/dataset/dataset-error"; import DatasetEditAttributes from "mvc/dataset/dataset-edit-attributes"; import Citations from "components/Citations.vue"; @@ -94,9 +92,12 @@ export const getAnalysisRouter = Galaxy => return (Galaxy.user && Galaxy.user.id) || this.require_login.indexOf(name) == -1; }, - _display_vue_helper: function(component, propsData = {}) { + _display_vue_helper: function(component, propsData = {}, active_tab = null) { const instance = Vue.extend(component); const container = document.createElement("div"); + if (active_tab) { + container.active_tab = active_tab; + } this.page.display(container); new instance({ store, propsData }).$mount(container); }, @@ -406,21 +407,7 @@ export const getAnalysisRouter = Galaxy => /** load workflow by its url in run mode */ _loadWorkflow: function() { - Utils.get({ - url: `${getAppRoot()}api/workflows/${Utils.getQueryString("id")}/download?style=run`, - success: response => { - this.page.display(new ToolFormComposite.View(_.extend(response, { active_tab: "workflow" }))); - }, - error: response => { - const error_msg = response.err_msg || "Error occurred while loading the resource."; - const options = { - message: error_msg, - status: "danger", - persistent: true, - active_tab: "workflow" - }; - this.page.display(new Ui.Message(options)); - } - }); + const workflowId = QueryStringParsing.get("id"); + this._display_vue_helper(WorkflowRun, { workflowId: workflowId }, "workflow"); } }); diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index f1f97d78a79..c2a36b64e04 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -25,14 +25,11 @@ var View = Backbone.View.extend({ if (options && options.active_tab) { this.active_tab = options.active_tab; } - this.setElement( - $("
") - .addClass("ui-form-composite") - .append((this.$message = $("
").addClass("mb-4"))) - .append((this.$header = $("
"))) - .append((this.$steps = $("
"))) - ); - $("body").append(this.$el); + const $el = $(options.el); + $el.addClass("ui-form-composite") + .append((this.$message = $("
").addClass("mb-4"))) + .append((this.$header = $("
"))) + .append((this.$steps = $("
"))); this._configure(); this.render(); }, From 698e1272e1e1b55a3bcc52824159c864dd9ebae5 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 17 Dec 2019 22:40:43 -0500 Subject: [PATCH 02/10] wfrun2vue - migrate main div construction to Vue. --- .../scripts/components/Workflow/Run/WorkflowRun.vue | 11 +++++++---- client/galaxy/scripts/mvc/tool/tool-form-composite.js | 11 ++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue index ebc847a7480..f0f565923a6 100644 --- a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue +++ b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue @@ -7,7 +7,11 @@
-
+
+
+
+
+
@@ -40,9 +44,8 @@ export default { .then(response => { this.loading = false; this.$nextTick(() => { - const formEl = this.$refs["workflow-run-form"]; - console.log(this.$refs); - const view = new ToolFormComposite.View(_.extend(response.data, { el: formEl })); + const el = this.$refs["run"]; + const view = new ToolFormComposite.View(_.extend(response.data, { el })); }); }) .catch(response => { diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index c2a36b64e04..9de41ee1475 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -25,11 +25,12 @@ var View = Backbone.View.extend({ if (options && options.active_tab) { this.active_tab = options.active_tab; } - const $el = $(options.el); - $el.addClass("ui-form-composite") - .append((this.$message = $("
").addClass("mb-4"))) - .append((this.$header = $("
"))) - .append((this.$steps = $("
"))); + // refactor message, header, and 'run' response handling out into WorkflowRun + // so only steps needs to be passed in as the target element. + this.setElement(options.el); + this.$message = this.$el.find(".ui-form-composite-messages"); + this.$header = this.$el.find(".ui-form-composite-header"); + this.$steps = this.$el.find(".ui-form-composite-steps"); this._configure(); this.render(); }, From 66ed393467134dd85ff1e1cfcd2390559fd18630 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 17 Dec 2019 22:55:39 -0500 Subject: [PATCH 03/10] wfrun2vue - refactor wf messages to Vue & b-alerts --- .../components/Workflow/Run/WorkflowRun.vue | 24 ++++++++++++-- .../scripts/mvc/tool/tool-form-composite.js | 32 +------------------ 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue index f0f565923a6..046af321c12 100644 --- a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue +++ b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue @@ -8,7 +8,19 @@
-
+
+ + Some tools in this workflow may have changed since it was last saved or some errors were found. + The workflow may still run, but any new options will have default values. Please review the + messages below to make a decision about whether the changes will affect your analysis. + + + Some tools are being executed with different versions compared to those available when this + workflow was last saved because the other versions are not or no longer available on this Galaxy + instance. To upgrade your workflow and dismiss this message simply edit the workflow and re-save + it. + +
@@ -17,6 +29,7 @@ diff --git a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue index 046af321c12..c59260dd360 100644 --- a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue +++ b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue @@ -21,7 +21,21 @@ it.
-
+ +
+ Workflow: {{ workflowName }} + + +
@@ -32,6 +46,7 @@ import _ from "underscore"; import axios from "axios"; +import WaitButton from "components/WaitButton"; import LoadingSpan from "components/LoadingSpan"; import { getAppRoot } from "onload"; import ToolFormComposite from "mvc/tool/tool-form-composite"; @@ -39,7 +54,8 @@ import { errorMessageAsString } from "utils/simple-error"; export default { components: { - LoadingSpan + LoadingSpan, + WaitButton }, props: { workflowId: { type: String } @@ -49,7 +65,12 @@ export default { error: false, loading: true, hasUpgradeMessages: false, - hasStepVersionChanges: false + hasStepVersionChanges: false, + workflowName: "", + runForm: null, + runButtonEnabled: true, + runButtonWaitText: "", + runButtonPercentage: -1 }; }, created() { @@ -60,15 +81,27 @@ export default { const runData = response.data; this.hasUpgradeMessages = runData.has_upgrade_messages; this.hasStepVersionChanges = runData.step_version_changes && runData.step_version_changes.length > 0; + this.workflowName = runData.name; this.loading = false; this.$nextTick(() => { const el = this.$refs["run"]; - new ToolFormComposite.View(_.extend(runData, { el })); + const formProps = { el, setRunButtonStatus: this.setRunButtonStatus }; + this.runForm = new ToolFormComposite.View(_.extend(runData, formProps)); }); }) .catch(response => { this.error = errorMessageAsString(response); }); - } + }, + methods: { + execute() { + this.runForm.execute(); + }, + setRunButtonStatus(enabled, waitText, percentage) { + this.runButtonEnabled = enabled; + this.runButtonWaitText = waitText; + this.runButtonPercentage = percentage; + } + }, }; diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index b1461192621..536825596a8 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -7,7 +7,6 @@ import { getGalaxyInstance } from "app"; import _l from "utils/localization"; import Utils from "utils/utils"; import Deferred from "utils/deferred"; -import Ui from "mvc/ui/ui-misc"; import Form from "mvc/form/form-view"; import FormData from "mvc/form/form-data"; import ToolFormBase from "mvc/tool/tool-form-base"; @@ -25,10 +24,10 @@ var View = Backbone.View.extend({ if (options && options.active_tab) { this.active_tab = options.active_tab; } - // TODO: refactor header, and 'run' response handling out into WorkflowRun + this.setRunButtonStatus = options.setRunButtonStatus; + // TODO: refactor 'run' response handling out into WorkflowRun // so only steps needs to be passed in as the target element. this.setElement(options.el); - this.$header = this.$el.find(".ui-form-composite-header"); this.$steps = this.$el.find(".ui-form-composite-steps"); this._configure(); this.render(); @@ -205,7 +204,6 @@ var View = Backbone.View.extend({ render: function() { var self = this; this.deferred.reset(); - this._renderHeader(); this._renderParameters(); this._renderHistory(); this._renderUseCachedJob(); @@ -215,25 +213,6 @@ var View = Backbone.View.extend({ }); }, - /** Render header */ - _renderHeader: function() { - var self = this; - this.execute_btn = new Ui.Button({ - id: "run-workflow", - icon: "fa-check", - title: _l("Run workflow"), - cls: "btn btn-primary", - onclick: function() { - self._execute(); - } - }); - this.$header - .addClass("h4") - .empty() - .append(`Workflow: ${this.model.get("name")}`) - .append(this.execute_btn.$el); - }, - /** Render workflow parameters */ _renderParameters: function() { var self = this; @@ -432,11 +411,8 @@ var View = Backbone.View.extend({ } form.portlet[!self.show_progress ? "enable" : "disable"](); if (self.show_progress) { - self.execute_btn.model.set({ - wait: true, - wait_text: "Preparing...", - percentage: ((step.index + 1) * 100.0) / self.steps.length - }); + const percentage = ((step.index + 1) * 100.0) / self.steps.length; + this.setRunButtonStatus(false, "Preparing...", percentage); } Galaxy.emit.debug("tool-form-composite::initialize()", `${step.index} : Workflow step state ready.`, step); window.setTimeout(() => { @@ -516,14 +492,13 @@ var View = Backbone.View.extend({ }, /** Build remaining steps */ - _execute: function() { - var self = this; + execute: function() { this.show_progress = true; this._enabled(false); this.deferred.execute(promise => { window.setTimeout(() => { promise.resolve(); - self._submit(); + this._submit(); }, 0); }); }, @@ -656,11 +631,7 @@ var View = Backbone.View.extend({ /** Set enabled/disabled state */ _enabled: function(enabled) { - this.execute_btn.model.set({ - wait: !enabled, - wait_text: "Sending...", - percentage: -1 - }); + this.setRunButtonStatus(enabled, "Sending...", -1); if (this.wp_form) { this.wp_form.portlet[enabled ? "enable" : "disable"](); } From 0653fc829a783b6f5c69861bfdc3454c6b5d4d74 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 18 Dec 2019 10:57:35 -0500 Subject: [PATCH 05/10] wfrun2vue - migrate success handling to a new Vue component. --- .../components/Workflow/Run/WorkflowRun.vue | 17 ++- .../Workflow/Run/WorkflowRunSuccess.vue | 110 ++++++++++++++++++ .../scripts/mvc/tool/tool-form-composite.js | 87 ++------------ 3 files changed, 132 insertions(+), 82 deletions(-) create mode 100644 client/galaxy/scripts/components/Workflow/Run/WorkflowRunSuccess.vue diff --git a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue index c59260dd360..2459e76a4d7 100644 --- a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue +++ b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue @@ -6,6 +6,7 @@ +
@@ -48,6 +49,7 @@ import axios from "axios"; import WaitButton from "components/WaitButton"; import LoadingSpan from "components/LoadingSpan"; +import WorkflowRunSuccess from "./WorkflowRunSuccess"; import { getAppRoot } from "onload"; import ToolFormComposite from "mvc/tool/tool-form-composite"; import { errorMessageAsString } from "utils/simple-error"; @@ -55,7 +57,8 @@ import { errorMessageAsString } from "utils/simple-error"; export default { components: { LoadingSpan, - WaitButton + WaitButton, + WorkflowRunSuccess }, props: { workflowId: { type: String } @@ -70,7 +73,8 @@ export default { runForm: null, runButtonEnabled: true, runButtonWaitText: "", - runButtonPercentage: -1 + runButtonPercentage: -1, + invocations: null }; }, created() { @@ -85,7 +89,11 @@ export default { this.loading = false; this.$nextTick(() => { const el = this.$refs["run"]; - const formProps = { el, setRunButtonStatus: this.setRunButtonStatus }; + const formProps = { + el, + setRunButtonStatus: this.setRunButtonStatus, + handleInvocations: this.handleInvocations + }; this.runForm = new ToolFormComposite.View(_.extend(runData, formProps)); }); }) @@ -101,6 +109,9 @@ export default { this.runButtonEnabled = enabled; this.runButtonWaitText = waitText; this.runButtonPercentage = percentage; + }, + handleInvocations(invocations) { + this.invocations = invocations; } }, }; diff --git a/client/galaxy/scripts/components/Workflow/Run/WorkflowRunSuccess.vue b/client/galaxy/scripts/components/Workflow/Run/WorkflowRunSuccess.vue new file mode 100644 index 00000000000..cdea21e003a --- /dev/null +++ b/client/galaxy/scripts/components/Workflow/Run/WorkflowRunSuccess.vue @@ -0,0 +1,110 @@ + + + diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index 536825596a8..fea72f9cab0 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -11,9 +11,7 @@ import Form from "mvc/form/form-view"; import FormData from "mvc/form/form-data"; import ToolFormBase from "mvc/tool/tool-form-base"; import Modal from "mvc/ui/ui-modal"; -import Webhooks from "mvc/webhooks"; import WorkflowIcons from "mvc/workflow/workflow-icons"; -import { mountWorkflowInvocationState } from "components/WorkflowInvocationState"; var View = Backbone.View.extend({ initialize: function(options) { @@ -25,6 +23,7 @@ var View = Backbone.View.extend({ this.active_tab = options.active_tab; } this.setRunButtonStatus = options.setRunButtonStatus; + this.handleInvocations = options.handleInvocations; // TODO: refactor 'run' response handling out into WorkflowRun // so only steps needs to be passed in as the target element. this.setElement(options.el); @@ -472,25 +471,6 @@ var View = Backbone.View.extend({ } }, - /** Refresh the history after job submission while form is shown */ - _refreshHistory: function() { - const Galaxy = getGalaxyInstance(); - var self = this; - var history = Galaxy && Galaxy.currHistoryPanel && Galaxy.currHistoryPanel.model; - if (this._refresh_history) { - window.clearTimeout(this._refresh_history); - } - if (history) { - history.refresh().success(() => { - if (history.numOfUnfinishedShownContents() === 0) { - self._refresh_history = window.setTimeout(() => { - self._refreshHistory(); - }, history.UPDATE_DELAY); - } - }); - } - }, - /** Build remaining steps */ execute: function() { this.show_progress = true; @@ -571,22 +551,16 @@ var View = Backbone.View.extend({ type: "POST", url: `${getAppRoot()}api/workflows/${this.model.id}/invocations`, data: job_def, - success: function(response) { + success: response => { Galaxy.emit.debug("tool-form-composite::submit", "Submission successful.", response); - self.$el.children().hide(); - self.$el.append(self._templateSuccess(response)); - mountWorkflowInvocationState(); - // Show Webhook if job is running if ($.isArray(response) && response.length > 0) { - self.$el.append($("
", { id: "webhook-view" })); - new Webhooks.WebhookView({ - type: "workflow", - toolId: job_def.tool_id, - toolVersion: job_def.tool_version - }); + this.handleInvocations(response); + } else { + // Probably handle this up a layer in + this.$el.append( + this._templateError(response, "Invalid success response. No invocations found.") + ); } - - self._refreshHistory(); }, error: function(response) { Galaxy.emit.debug("tool-form-composite::submit", "Submission failed.", response); @@ -658,51 +632,6 @@ var View = Backbone.View.extend({ }, /** Templates */ - _templateSuccess: function(response) { - const Galaxy = getGalaxyInstance(); - if ($.isArray(response) && response.length > 0) { - let timesExecuted = ""; - // 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."; - const 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 = ` - ${response.length} times`; - if (newHistoryTarget) { - destinationBlurb = `This workflow will generate results in multiple histories. You can observe progress in the history multi-view.`; - } - } 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. Switch to that history now.`; - } - let success = ` -
-
-

- Successfully invoked workflow ${Utils.sanitize(this.model.get("name"))}${timesExecuted}. -

-

- ${destinationBlurb} -

-
`; - for (const invocation of response) { - success += `
`; - } - success += "
"; - return $(success); - } else { - return this._templateError(response, "Invalid success response. No invocations found."); - } - }, - _templateError: function(response, err_msg) { return $("
") .addClass("errormessagelarge") From a5d8bf7af85216569d4010b251641ea572633087 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 18 Dec 2019 12:45:19 -0500 Subject: [PATCH 06/10] wfrun2vue - rework error handling so run outer div unneeded in composite form --- .../components/Workflow/Run/WorkflowRun.vue | 2 +- .../scripts/mvc/tool/tool-form-composite.js | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue index 2459e76a4d7..24a073e543d 100644 --- a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue +++ b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue @@ -113,6 +113,6 @@ export default { handleInvocations(invocations) { this.invocations = invocations; } - }, + } }; diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index fea72f9cab0..c12466561ba 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -556,10 +556,7 @@ var View = Backbone.View.extend({ if ($.isArray(response) && response.length > 0) { this.handleInvocations(response); } else { - // Probably handle this up a layer in - this.$el.append( - this._templateError(response, "Invalid success response. No invocations found.") - ); + this.submissionErrorModal(job_def, response); } }, error: function(response) { @@ -580,15 +577,7 @@ var View = Backbone.View.extend({ } } if (!input_found) { - self.modal.show({ - title: _l("Workflow submission failed"), - body: self._templateError(job_def, response && response.err_msg), - buttons: { - Close: function() { - self.modal.hide(); - } - } - }); + this.submissionErrorModal(job_def, response); } }, complete: function() { @@ -631,6 +620,18 @@ var View = Backbone.View.extend({ return true; }, + submissionErrorModal: function(job_def, response) { + this.modal.show({ + title: _l("Workflow submission failed"), + body: this._templateError(job_def, response && response.err_msg), + buttons: { + Close: () => { + this.modal.hide(); + } + } + }); + }, + /** Templates */ _templateError: function(response, err_msg) { return $("
") From 0cca968ae01485a78b71fec24b1328c004afd0d1 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 18 Dec 2019 12:54:32 -0500 Subject: [PATCH 07/10] wfrun2vue - tighter cohesion between Vue divs and Backbone divs. Basically now Vue only sends through what was previously called $steps in the View. Vue doesn't touch steps and View doesn't touch anything above it now. Better abstractions! --- .../components/Workflow/Run/WorkflowRun.vue | 8 ++++---- .../scripts/mvc/tool/tool-form-composite.js | 15 ++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue index 24a073e543d..f9474a022ff 100644 --- a/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue +++ b/client/galaxy/scripts/components/Workflow/Run/WorkflowRun.vue @@ -9,7 +9,7 @@
-
+
Some tools in this workflow may have changed since it was last saved or some errors were found. The workflow may still run, but any new options will have default values. Please review the @@ -23,7 +23,7 @@
-
+
Workflow: {{ workflowName }}
-
+
@@ -88,7 +88,7 @@ export default { this.workflowName = runData.name; this.loading = false; this.$nextTick(() => { - const el = this.$refs["run"]; + const el = this.$refs["form"]; const formProps = { el, setRunButtonStatus: this.setRunButtonStatus, diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index c12466561ba..09c093b51f9 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -24,10 +24,7 @@ var View = Backbone.View.extend({ } this.setRunButtonStatus = options.setRunButtonStatus; this.handleInvocations = options.handleInvocations; - // TODO: refactor 'run' response handling out into WorkflowRun - // so only steps needs to be passed in as the target element. this.setElement(options.el); - this.$steps = this.$el.find(".ui-form-composite-steps"); this._configure(); this.render(); }, @@ -229,7 +226,7 @@ var View = Backbone.View.extend({ }); } }); - this._append(this.$steps.empty(), this.wp_form.$el); + this._append(this.$el.empty(), this.wp_form.$el); } }, @@ -265,7 +262,7 @@ var View = Backbone.View.extend({ } ] }); - this._append(this.$steps, this.history_form.$el); + this._append(this.$el, this.history_form.$el); }, /** Render Workflow Options */ @@ -277,7 +274,7 @@ var View = Backbone.View.extend({ title: "Workflow Resource Options", inputs: this.model.get("workflow_resource_parameters") }); - this._append(this.$steps, this.workflow_resource_parameters_form.$el); + this._append(this.$el, this.workflow_resource_parameters_form.$el); } }, @@ -311,7 +308,7 @@ var View = Backbone.View.extend({ } ] }); - this._append(this.$steps, this.job_options_form.$el); + this._append(this.$el, this.job_options_form.$el); } }, @@ -321,7 +318,7 @@ var View = Backbone.View.extend({ var self = this; var form = null; this.deferred.execute(promise => { - self.$steps.addClass("ui-steps"); + self.$el.addClass("ui-steps"); if (step.step_type == "tool") { step.postchange = function(process, form) { var current_state = { @@ -404,7 +401,7 @@ var View = Backbone.View.extend({ } } self.forms[step.index] = form; - self._append(self.$steps, form.$el); + self._append(self.$el, form.$el); if (step.needs_refresh) { self._refreshStep(step); } From 1dfc49ac21772fd489b602166d007d3ce3ca36f1 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 3 Jan 2020 11:42:33 -0500 Subject: [PATCH 08/10] Swap ternary operator to computed property in WaitButton component... ... per PR review comments (xref https://github.com/galaxyproject/galaxy/pull/9151/files/4fcfb7687b588819ccd0e4f0744947878fa79f72#diff-e9010db0a7029e12adf451f933077fdb ) --- client/galaxy/scripts/components/WaitButton.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/client/galaxy/scripts/components/WaitButton.vue b/client/galaxy/scripts/components/WaitButton.vue index 1db7bea4934..884c01bd52d 100644 --- a/client/galaxy/scripts/components/WaitButton.vue +++ b/client/galaxy/scripts/components/WaitButton.vue @@ -1,11 +1,6 @@ /** Button variant with waiting and progress tracking. */