Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable workflow parameter switch for data inputs, augment form handling #9551

Merged
merged 11 commits into from Mar 30, 2020
3 changes: 3 additions & 0 deletions client/galaxy/scripts/components/Panels/ToolBoxWorkflow.vue
Expand Up @@ -77,12 +77,15 @@ export default {
},
workflows: {
type: Array,
required: true,
},
dataManagers: {
type: Array,
required: true,
},
moduleSections: {
type: Array,
required: true,
},
},
computed: {
Expand Down
Expand Up @@ -68,15 +68,19 @@ export default {
},
annotation: {
type: String,
default: "",
},
version: {
type: Number,
default: null,
},
versions: {
type: Array,
default: null,
},
parameters: {
type: Array,
default: null,
},
},
data() {
Expand Down
Expand Up @@ -6,11 +6,11 @@
</div>
</div>
<div class="unified-panel-body workflow-right">
<div v-if="canvas" class="m-1">
<div class="m-1" v-show="canvas">
guerler marked this conversation as resolved.
Show resolved Hide resolved
<slot name="attributes" />
<div id="right-content" class="right-content" />
</div>
<ReportHelp v-else />
<ReportHelp v-show="!canvas" />
</div>
</div>
</template>
Expand Down
17 changes: 13 additions & 4 deletions client/galaxy/scripts/components/Workflow/Editor/Index.vue
Expand Up @@ -4,8 +4,8 @@
<template v-slot:panel>
<ToolBoxWorkflow
:toolbox="toolbox"
:module-sections="module_sections"
:data-managers="data_managers"
:module-sections="moduleSections"
:data-managers="dataManagers"
:workflows="workflows"
@onInsertTool="onInsertTool"
@onInsertModule="onInsertModule"
Expand Down Expand Up @@ -110,30 +110,39 @@ export default {
props: {
id: {
type: String,
required: true,
},
version: {
type: Number,
required: true,
},
name: {
type: String,
required: true,
},
tags: {
type: Array,
required: true,
},
annotation: {
type: String,
required: true,
},
module_sections: {
moduleSections: {
type: Array,
required: true,
},
data_managers: {
dataManagers: {
type: Array,
required: true,
},
workflows: {
type: Array,
required: true,
},
toolbox: {
type: Array,
required: true,
},
},
data() {
Expand Down
2 changes: 2 additions & 0 deletions client/galaxy/scripts/components/Workflow/Editor/Node.vue
Expand Up @@ -46,6 +46,7 @@ export default {
props: {
id: {
type: String,
default: "",
},
title: {
type: String,
Expand All @@ -57,6 +58,7 @@ export default {
},
node: {
type: Object,
default: null,
},
},
computed: {
Expand Down
7 changes: 4 additions & 3 deletions client/galaxy/scripts/components/Workflow/Editor/utilities.js
Expand Up @@ -144,9 +144,9 @@ export function getWorkflowParameters(nodes) {
});
}
if (node.post_job_actions) {
Object.entries(node.post_job_actions).forEach(([k, pja]) => {
Object.values(node.post_job_actions).forEach((pja) => {
if (pja.action_arguments) {
Object.entries(pja.action_arguments).forEach(([k, action_argument]) => {
Object.values(pja.action_arguments).forEach((action_argument) => {
if (typeof action_argument === "string") {
const arg_matches = action_argument.match(parameter_re);
if (arg_matches) {
Expand Down Expand Up @@ -198,7 +198,8 @@ export function saveAs(workflow) {
window.location = `${getAppRoot()}workflow/editor?id=${id}`;
hide_modal();
})
.fail(() => {
.fail((err) => {
console.debug(err);
hide_modal();
alert("Saving this workflow failed. Please contact this site's administrator.");
});
Expand Down
6 changes: 3 additions & 3 deletions client/galaxy/scripts/mvc/tool/tool-form-base.js
Expand Up @@ -24,7 +24,7 @@ export default FormBase.extend({
FormBase.prototype.initialize.call(this, options);

// optional model update
this._update(this.model.get("initialmodel"));
this._update();

// listen to history panel
if (this.model.get("listen_to_history") && Galaxy.currHistoryPanel) {
Expand All @@ -39,9 +39,9 @@ export default FormBase.extend({
},

/** Allows tool form variation to update tool model */
_update: function (callback) {
_update: function () {
var self = this;
callback = callback || this.model.get("buildmodel");
var callback = this.model.get("buildmodel");
if (callback) {
this.deferred.reset();
this.deferred.execute((process) => {
Expand Down