From d02e4bed6d2e591a22aa6b8e23932cee74acf6ac Mon Sep 17 00:00:00 2001
From: Jim Johnson
Date: Mon, 10 May 2021 11:12:33 -0500
Subject: [PATCH 001/452] Add datatypes for Structural Materials Hexrd
application
Hexrd ( https://github.com/HEXRD/hexrd ) uses H5 and compressed numpy files .npz for data formats.
---
.../config/sample/datatypes_conf.xml.sample | 9 +
lib/galaxy/datatypes/binary.py | 210 ++++++++++++++++++
lib/galaxy/datatypes/test/hexrd.eta_ome.npz | Bin 0 -> 2121 bytes
lib/galaxy/datatypes/test/hexrd.images.npz | Bin 0 -> 4322 bytes
lib/galaxy/datatypes/test/hexrd.materials.h5 | Bin 0 -> 10712 bytes
5 files changed, 219 insertions(+)
create mode 100644 lib/galaxy/datatypes/test/hexrd.eta_ome.npz
create mode 100644 lib/galaxy/datatypes/test/hexrd.images.npz
create mode 100644 lib/galaxy/datatypes/test/hexrd.materials.h5
diff --git a/lib/galaxy/config/sample/datatypes_conf.xml.sample b/lib/galaxy/config/sample/datatypes_conf.xml.sample
index 48060f2f97d..726f811dd08 100644
--- a/lib/galaxy/config/sample/datatypes_conf.xml.sample
+++ b/lib/galaxy/config/sample/datatypes_conf.xml.sample
@@ -861,6 +861,11 @@
+
+
+
+
+
+
From c54e5fad403835ac68c6c41e6841658fc1189044 Mon Sep 17 00:00:00 2001
From: guerler
Date: Thu, 27 May 2021 12:42:43 -0400
Subject: [PATCH 007/452] Replace legacy tool form wrapper with Vue component
---
client/package.json | 1 +
client/src/components/Form/Form.vue | 81 +++-
client/src/components/Form/FormCardTool.vue | 2 +
client/src/components/Form/FormElement.vue | 11 +-
client/src/components/Tool/services.js | 39 ++
client/src/entry/analysis/AnalysisRouter.js | 4 +-
client/src/mvc/form/form-input.js | 4 +-
client/src/mvc/form/form-view.js | 2 +-
client/src/mvc/tool/tool-form.js | 472 --------------------
client/tests/qunit/tests/form_tests.js | 18 +-
client/yarn.lock | 12 +
11 files changed, 154 insertions(+), 492 deletions(-)
delete mode 100644 client/src/mvc/tool/tool-form.js
diff --git a/client/package.json b/client/package.json
index b0ef323b5aa..2faba245fb7 100644
--- a/client/package.json
+++ b/client/package.json
@@ -81,6 +81,7 @@
"vue-observe-visibility": "^1.0.0",
"vue-router": "^3.3.1",
"vue-rx": "^6.2.0",
+ "vue-scrollto": "^2.20.0",
"vuedraggable": "2.24.1",
"vueisotope": "^3.1.2",
"vuex": "^3.4.0",
diff --git a/client/src/components/Form/Form.vue b/client/src/components/Form/Form.vue
index 078671ffa80..a9bc63db550 100644
--- a/client/src/components/Form/Form.vue
+++ b/client/src/components/Form/Form.vue
@@ -3,6 +3,7 @@
diff --git a/client/src/components/Common/Webhook.vue b/client/src/components/Common/Webhook.vue
new file mode 100644
index 00000000000..72cdbceadb8
--- /dev/null
+++ b/client/src/components/Common/Webhook.vue
@@ -0,0 +1,27 @@
+
+
+
+
diff --git a/client/src/components/Form/Elements/FormBoolean.vue b/client/src/components/Form/Elements/FormBoolean.vue
new file mode 100644
index 00000000000..6e3b3366ee7
--- /dev/null
+++ b/client/src/components/Form/Elements/FormBoolean.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
diff --git a/client/src/components/Form/Elements/FormInput.test.js b/client/src/components/Form/Elements/FormInput.test.js
new file mode 100644
index 00000000000..ebe24aa5960
--- /dev/null
+++ b/client/src/components/Form/Elements/FormInput.test.js
@@ -0,0 +1,38 @@
+import { mount } from "@vue/test-utils";
+import { getLocalVue } from "jest/helpers";
+import FormInput from "./FormInput";
+
+jest.mock("app");
+
+const localVue = getLocalVue();
+
+describe("FormInput", () => {
+ let wrapper;
+
+ beforeEach(() => {
+ wrapper = mount(FormInput, {
+ propsData: {
+ id: "input",
+ value: "initial_value",
+ },
+ localVue,
+ });
+ });
+
+ it("check initial value and value change", async () => {
+ const input = wrapper.find("input");
+ expect(input.element.value).toBe("initial_value");
+ await input.setValue("new_value");
+ expect(input.element.value).toBe("new_value");
+ expect(wrapper.emitted().onChange[0][0]).toBe("new_value");
+ });
+
+ it("check switching to text area", async () => {
+ await wrapper.setProps({ area: true });
+ const input = wrapper.find("textarea");
+ expect(input.element.value).toBe("initial_value");
+ await input.setValue("new_value");
+ expect(input.element.value).toBe("new_value");
+ expect(wrapper.emitted().onChange[0][0]).toBe("new_value");
+ });
+});
diff --git a/client/src/components/Form/Elements/FormInput.vue b/client/src/components/Form/Elements/FormInput.vue
new file mode 100644
index 00000000000..ee344d00eb5
--- /dev/null
+++ b/client/src/components/Form/Elements/FormInput.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
diff --git a/client/src/components/Form/Elements/Input.test.js b/client/src/components/Form/Elements/Input.test.js
new file mode 100644
index 00000000000..ebe24aa5960
--- /dev/null
+++ b/client/src/components/Form/Elements/Input.test.js
@@ -0,0 +1,38 @@
+import { mount } from "@vue/test-utils";
+import { getLocalVue } from "jest/helpers";
+import FormInput from "./FormInput";
+
+jest.mock("app");
+
+const localVue = getLocalVue();
+
+describe("FormInput", () => {
+ let wrapper;
+
+ beforeEach(() => {
+ wrapper = mount(FormInput, {
+ propsData: {
+ id: "input",
+ value: "initial_value",
+ },
+ localVue,
+ });
+ });
+
+ it("check initial value and value change", async () => {
+ const input = wrapper.find("input");
+ expect(input.element.value).toBe("initial_value");
+ await input.setValue("new_value");
+ expect(input.element.value).toBe("new_value");
+ expect(wrapper.emitted().onChange[0][0]).toBe("new_value");
+ });
+
+ it("check switching to text area", async () => {
+ await wrapper.setProps({ area: true });
+ const input = wrapper.find("textarea");
+ expect(input.element.value).toBe("initial_value");
+ await input.setValue("new_value");
+ expect(input.element.value).toBe("new_value");
+ expect(wrapper.emitted().onChange[0][0]).toBe("new_value");
+ });
+});
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
new file mode 100644
index 00000000000..aa8d3f590c6
--- /dev/null
+++ b/client/src/components/Tool/ToolForm.vue
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+
+
+
+
+
+ The server could not complete the request. Please contact the Galaxy Team if this error persists.
+ {{ errorTitle | l }}
+
+
{{ errorContentPretty }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/src/components/Tool/ToolSuccess.vue b/client/src/components/Tool/ToolSuccess.vue
new file mode 100644
index 00000000000..eeb9e8e3ed6
--- /dev/null
+++ b/client/src/components/Tool/ToolSuccess.vue
@@ -0,0 +1,79 @@
+
+
+
+ Executed {{ toolName }} and successfully added {{ nJobsText }} to the queue.
+
+
The tool uses {{ nInputsText }}:
+
+
+ {{ item.hid }}: {{ item.name }}
+
+
+
It produces {{ nOutputsText }}:
+
+
+ {{ item.hid }}: {{ item.name }}
+
+
+
+ You can check the status of queued jobs and view the resulting data by refreshing the History panel. When
+ the job has been run the status will change from 'running' to 'finished' if completed successfully or
+ 'error' if problems were encountered.
+
+
+
+
+
diff --git a/client/src/components/Tool/utilities.js b/client/src/components/Tool/utilities.js
new file mode 100644
index 00000000000..db25be8f17e
--- /dev/null
+++ b/client/src/components/Tool/utilities.js
@@ -0,0 +1,13 @@
+import $ from "jquery";
+
+export function send(options, job_def) {
+ const $f = $("").attr({
+ action: options.action,
+ method: options.method,
+ enctype: options.enctype,
+ });
+ Object.entries(job_def.inputs).forEach(([value, key]) => {
+ $f.append($(" ").attr({ name: key, value: value }));
+ });
+ $f.hide().appendTo("body").submit().remove();
+}
From aa320638ea3ef8de7e38daa5cf92ae51011c48f3 Mon Sep 17 00:00:00 2001
From: guerler
Date: Thu, 27 May 2021 12:54:38 -0400
Subject: [PATCH 009/452] Fix webhook type parsing in webhook wrapper component
---
client/src/components/Common/Webhook.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/components/Common/Webhook.vue b/client/src/components/Common/Webhook.vue
index 72cdbceadb8..a3885849690 100644
--- a/client/src/components/Common/Webhook.vue
+++ b/client/src/components/Common/Webhook.vue
@@ -19,7 +19,7 @@ export default {
const el = this.$refs["webhook"];
new Webhooks.WebhookView({
el,
- type: "tool",
+ type: this.type,
toolId: this.toolId,
});
},
From ac866bf206b9430c0d1d4e6e72c547281eac3ad5 Mon Sep 17 00:00:00 2001
From: guerler
Date: Thu, 27 May 2021 13:35:21 -0400
Subject: [PATCH 010/452] Create parameters for tool request without jquery
---
client/src/components/Tool/services.js | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/client/src/components/Tool/services.js b/client/src/components/Tool/services.js
index d8a78e45779..58d7194037a 100644
--- a/client/src/components/Tool/services.js
+++ b/client/src/components/Tool/services.js
@@ -1,4 +1,3 @@
-import $ from "jquery";
import axios from "axios";
import { rethrowSimple } from "utils/simple-error";
import { getAppRoot } from "onload/loadConfig";
@@ -6,7 +5,7 @@ import { getGalaxyInstance } from "app";
/** Tools data request helper **/
export async function getTool(tool_id, tool_version, job_id) {
- const galaxy = getGalaxyInstance();
+ const Galaxy = getGalaxyInstance();
let url = "";
let data = {};
@@ -15,15 +14,15 @@ export async function getTool(tool_id, tool_version, job_id) {
url = `${getAppRoot()}api/jobs/${job_id}/build_for_rerun`;
} else {
url = `${getAppRoot()}api/tools/${tool_id}/build`;
- data = $.extend({}, galaxy.params);
+ data = Object.assign({}, Galaxy.params);
data["tool_id"] && delete data["tool_id"];
}
tool_version && (data["tool_version"] = tool_version);
// attach data to request url
- if (!$.isEmptyObject(data)) {
- url += url.indexOf("?") == -1 ? "?" : "&";
- url += $.param(data, true);
+ if (Object.entries(data).length != 0) {
+ const params = new URLSearchParams(data);
+ url = `${url}?${params.toString()}`;
}
// request tool data
From 076d1b155bf26ecf2e16ebe84753567d29ed7a55 Mon Sep 17 00:00:00 2001
From: guerler
Date: Thu, 27 May 2021 13:41:52 -0400
Subject: [PATCH 011/452] Fix tool dropdown selector in selenium navigation
---
client/src/components/Form/FormCardTool.vue | 3 +--
lib/galaxy/selenium/navigation.yml | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/client/src/components/Form/FormCardTool.vue b/client/src/components/Form/FormCardTool.vue
index 228e4ce6a98..c19d2c272b0 100644
--- a/client/src/components/Form/FormCardTool.vue
+++ b/client/src/components/Form/FormCardTool.vue
@@ -6,12 +6,11 @@
diff --git a/lib/galaxy/selenium/navigation.yml b/lib/galaxy/selenium/navigation.yml
index 547ad7d1a73..f22b87fb314 100644
--- a/lib/galaxy/selenium/navigation.yml
+++ b/lib/galaxy/selenium/navigation.yml
@@ -361,7 +361,7 @@ registration:
tool_form:
selectors:
- options: '#options [data-toggle="dropdown"]'
+ options: '.tool-dropdown'
execute: 'button#execute'
parameter_div: 'div.ui-form-element[tour_id="${parameter}"]'
parameter_textarea: 'div.ui-form-element[tour_id="${parameter}"] textarea'
From 21ff5238635c65115f0cd5f50431c9c888925049 Mon Sep 17 00:00:00 2001
From: guerler
Date: Thu, 27 May 2021 13:53:01 -0400
Subject: [PATCH 012/452] Rename tool card for consistency
---
.../components/{Form/FormCardTool.vue => Tool/ToolCard.vue} | 2 +-
client/src/components/Tool/ToolForm.vue | 6 +++---
client/src/components/Workflow/Editor/Forms/FormTool.vue | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
rename client/src/components/{Form/FormCardTool.vue => Tool/ToolCard.vue} (99%)
diff --git a/client/src/components/Form/FormCardTool.vue b/client/src/components/Tool/ToolCard.vue
similarity index 99%
rename from client/src/components/Form/FormCardTool.vue
rename to client/src/components/Tool/ToolCard.vue
index c19d2c272b0..ac756f73f31 100644
--- a/client/src/components/Form/FormCardTool.vue
+++ b/client/src/components/Tool/ToolCard.vue
@@ -106,7 +106,7 @@
From 857a7dbf274ab45851acad77fd5310c449abb763 Mon Sep 17 00:00:00 2001
From: guerler
Date: Fri, 4 Jun 2021 15:51:22 -0400
Subject: [PATCH 027/452] Remove default vue import from button component
---
client/src/components/Common/ButtonSpinner.vue | 1 -
1 file changed, 1 deletion(-)
diff --git a/client/src/components/Common/ButtonSpinner.vue b/client/src/components/Common/ButtonSpinner.vue
index a9f1d40109d..ed6ae7707c0 100644
--- a/client/src/components/Common/ButtonSpinner.vue
+++ b/client/src/components/Common/ButtonSpinner.vue
@@ -7,7 +7,6 @@
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index a1a5a875029..6432369a917 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -14,7 +14,7 @@
{{ errorContentPretty }}
-
+
{
+ updateTool(this.formConfig.id, this.currentVersion, this.formData).then((data) => {
this.formConfig = data;
});
},
From e1105576660e4c0c9327baf9ecaa3ec4e0db8a63 Mon Sep 17 00:00:00 2001
From: guerler
Date: Thu, 10 Jun 2021 16:44:54 -0400
Subject: [PATCH 030/452] Improve validation handling, in some cases the
backend does not properly validate tool inputs
---
client/src/components/Form/Form.vue | 33 ++++++++++++++-----------
client/src/components/Tool/ToolForm.vue | 13 +++++++++-
2 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/client/src/components/Form/Form.vue b/client/src/components/Form/Form.vue
index 5fadf091e78..09d42bd6f16 100644
--- a/client/src/components/Form/Form.vue
+++ b/client/src/components/Form/Form.vue
@@ -27,6 +27,10 @@ export default {
type: Boolean,
default: false,
},
+ validationScrollTo: {
+ type: Array,
+ default: null,
+ },
validationErrors: {
type: Object,
default: null,
@@ -45,22 +49,17 @@ export default {
id() {
this.onRender();
},
- validationErrors() {
- if (this.form) {
- this.form.trigger("reset");
- const matchedErrors = this.form.data.matchResponse(this.validationErrors);
- for (const input_id in matchedErrors) {
- this.form.highlight(input_id, matchedErrors[input_id]);
- break;
- }
- }
+ validationScrollTo() {
+ this.onHighlight(this.validationScrollTo);
},
validation() {
- if (this.form) {
- this.form.trigger("reset");
- if (this.validation) {
- this.form.highlight(this.validation[0], this.validation[1], true);
- }
+ this.onHighlight(this.validation, true);
+ this.$emit("onValidation", this.validation);
+ },
+ validationErrors() {
+ const matchedErrors = Object.entries(this.form.data.matchResponse(this.validationErrors));
+ if (matchedErrors.length > 0) {
+ this.onHighlight(matchedErrors[0]);
}
},
formConfig() {
@@ -146,6 +145,12 @@ export default {
this.onChange();
});
},
+ onHighlight(validation, silent = false) {
+ this.form.trigger("reset");
+ if (validation && validation.length == 2) {
+ this.form.highlight(validation[0], validation[1], silent);
+ }
+ },
},
};
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index 6432369a917..be0a1c50701 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -35,8 +35,10 @@
:id="formConfig.id"
:inputs="inputs"
:validation-errors="validationErrors"
+ :validation-scroll-to="validationScrollTo"
:form-config="formConfig"
@onChange="onChange"
+ @onValidation="onValidation"
/>
Date: Thu, 10 Jun 2021 19:47:48 -0400
Subject: [PATCH 031/452] Fix checkbox event parsing, add test case
---
.../Form/Elements/FormBoolean.test.js | 34 +++++++++++++++++++
.../components/Form/Elements/FormBoolean.vue | 2 +-
2 files changed, 35 insertions(+), 1 deletion(-)
create mode 100644 client/src/components/Form/Elements/FormBoolean.test.js
diff --git a/client/src/components/Form/Elements/FormBoolean.test.js b/client/src/components/Form/Elements/FormBoolean.test.js
new file mode 100644
index 00000000000..4198b752506
--- /dev/null
+++ b/client/src/components/Form/Elements/FormBoolean.test.js
@@ -0,0 +1,34 @@
+import { mount } from "@vue/test-utils";
+import { getLocalVue } from "jest/helpers";
+import FormBoolean from "./FormBoolean";
+import Vue from "vue";
+
+jest.mock("app");
+
+const localVue = getLocalVue();
+
+describe("FormBoolean", () => {
+ let wrapper;
+
+ beforeEach(() => {
+ wrapper = mount(FormBoolean, {
+ propsData: {
+ value: false,
+ },
+ localVue,
+ });
+ });
+
+ it("check initial value and value change", async () => {
+ const input = wrapper.find("input");
+ expect(wrapper.vm.currentValue).toBe(false);
+ wrapper.setProps({ value: true });
+ await Vue.nextTick();
+ expect(wrapper.vm.currentValue).toBe(true);
+ input.trigger("click");
+ expect(input.element.checked).toBe(false);
+ input.trigger("click");
+ expect(input.element.checked).toBe(true);
+ expect(wrapper.emitted().onChange[0][0]).toBe(true);
+ });
+});
diff --git a/client/src/components/Form/Elements/FormBoolean.vue b/client/src/components/Form/Elements/FormBoolean.vue
index d135c5d7f82..0d18aaa0076 100644
--- a/client/src/components/Form/Elements/FormBoolean.vue
+++ b/client/src/components/Form/Elements/FormBoolean.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index 61074740480..566c4808344 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -71,7 +71,13 @@
/>
-
+
@@ -166,6 +172,9 @@ export default {
toolName() {
return this.formConfig.name;
},
+ tooltip() {
+ return `Execute: ${this.formConfig.name} (${this.formConfig.version})`;
+ },
errorContentPretty() {
return JSON.stringify(this.errorContent, null, 4);
},
From 82e82d99c33b8f00626be31e583b30a328b5778a Mon Sep 17 00:00:00 2001
From: guerler
Date: Mon, 28 Jun 2021 11:30:11 -0400
Subject: [PATCH 044/452] Access url parameters for tool form without using
global galaxy object
---
client/src/components/Tool/services.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/client/src/components/Tool/services.js b/client/src/components/Tool/services.js
index ca718530fe6..651bb7c7a57 100644
--- a/client/src/components/Tool/services.js
+++ b/client/src/components/Tool/services.js
@@ -1,7 +1,6 @@
import axios from "axios";
import { rethrowSimple } from "utils/simple-error";
import { getAppRoot } from "onload/loadConfig";
-import { getGalaxyInstance } from "app";
export async function updateToolFormData(tool_id, tool_version, inputs) {
const current_state = {
@@ -20,7 +19,6 @@ export async function updateToolFormData(tool_id, tool_version, inputs) {
/** Tools data request helper **/
export async function getToolFormData(tool_id, tool_version, job_id, history_id) {
- const Galaxy = getGalaxyInstance();
let url = "";
let data = {};
@@ -29,8 +27,13 @@ export async function getToolFormData(tool_id, tool_version, job_id, history_id)
url = `${getAppRoot()}api/jobs/${job_id}/build_for_rerun`;
} else {
url = `${getAppRoot()}api/tools/${tool_id}/build`;
- data = Object.assign({}, Galaxy.params);
- data["tool_id"] && delete data["tool_id"];
+ const queryString = window.location.search;
+ const params = new URLSearchParams(queryString);
+ for (const [key, value] of params.entries()) {
+ if (key != "tool_id") {
+ data[key] = value;
+ }
+ }
}
history_id && (data["history_id"] = history_id);
tool_version && (data["tool_version"] = tool_version);
From 973806309779198084b5db1ccbe5fe4fec5e6584 Mon Sep 17 00:00:00 2001
From: Oleg Zharkov
Date: Mon, 28 Jun 2021 20:43:38 +0200
Subject: [PATCH 045/452] reduce a few custom events
---
.../components/Form/Elements/FormBoolean.vue | 23 +++++++----------
.../components/Form/Elements/FormInput.vue | 25 ++++++++-----------
client/src/components/Form/FormElement.vue | 21 ++++++++++------
client/src/components/Tool/ToolForm.vue | 11 +++-----
.../Workflow/Editor/Forms/FormDefault.vue | 4 +--
.../Workflow/Editor/Forms/FormTool.vue | 4 +--
6 files changed, 41 insertions(+), 47 deletions(-)
diff --git a/client/src/components/Form/Elements/FormBoolean.vue b/client/src/components/Form/Elements/FormBoolean.vue
index 0d18aaa0076..b926c2c3738 100644
--- a/client/src/components/Form/Elements/FormBoolean.vue
+++ b/client/src/components/Form/Elements/FormBoolean.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index 566c4808344..e6fcec4df10 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -49,7 +49,7 @@
help="Send an email notification when the job completes."
type="boolean"
value="false"
- @onChange="onChangeEmail"
+ v-model="email"
/>
@@ -201,7 +201,7 @@ export default {
},
methods: {
emailAllowed(config, user) {
- return config.server_mail_configured && !user.isAnonymous();
+ return config.server_mail_configured && !user.isAnonymous;
},
reuseAllowed(user) {
if (
@@ -232,9 +232,6 @@ export default {
onChangeVersion(newVersion) {
this.requestTool(newVersion);
},
- onChangeEmail(email) {
- this.email = email;
- },
onChangeRemap(remap) {
this.remap = remap ? this.job_id : null;
},
diff --git a/client/src/components/Workflow/Editor/Forms/FormDefault.vue b/client/src/components/Workflow/Editor/Forms/FormDefault.vue
index ac46cad7a6c..226b2a11a82 100644
--- a/client/src/components/Workflow/Editor/Forms/FormDefault.vue
+++ b/client/src/components/Workflow/Editor/Forms/FormDefault.vue
@@ -33,7 +33,7 @@
:value="node.label"
title="Label"
help="Add a step label."
- @onChange="onLabel"
+ @input="onLabel"
:error="errorLabel"
/>
diff --git a/client/src/components/Workflow/Editor/Forms/FormTool.vue b/client/src/components/Workflow/Editor/Forms/FormTool.vue
index 4f82fec5aed..70caeb2084d 100644
--- a/client/src/components/Workflow/Editor/Forms/FormTool.vue
+++ b/client/src/components/Workflow/Editor/Forms/FormTool.vue
@@ -18,7 +18,7 @@
:value="node.label"
title="Label"
help="Add a step label."
- @onChange="onLabel"
+ @input="onLabel"
:error="errorLabel"
/>
Date: Tue, 29 Jun 2021 14:36:53 -0400
Subject: [PATCH 046/452] Update client/src/components/Tool/ToolForm.vue
Co-authored-by: Oleg Zharkov
---
client/src/components/Tool/ToolForm.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index 566c4808344..fdea342ffc8 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -201,7 +201,7 @@ export default {
},
methods: {
emailAllowed(config, user) {
- return config.server_mail_configured && !user.isAnonymous();
+ return config.server_mail_configured && !user.isAnonymous;
},
reuseAllowed(user) {
if (
From 906e0df8bb0391e0fb46c17d6756c5293591305f Mon Sep 17 00:00:00 2001
From: guerler
Date: Tue, 29 Jun 2021 14:41:31 -0400
Subject: [PATCH 047/452] Adjust access to user preferences to differences
between user provider and user object
---
client/src/components/Tool/ToolForm.vue | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index fdea342ffc8..3daa9558605 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -205,11 +205,10 @@ export default {
},
reuseAllowed(user) {
if (
- user.attributes &&
- user.attributes.preferences &&
- "extra_user_preferences" in user.attributes.preferences
+ user.preferences &&
+ "extra_user_preferences" in user.preferences
) {
- const extra_user_preferences = JSON.parse(user.attributes.preferences.extra_user_preferences);
+ const extra_user_preferences = JSON.parse(user.preferences.extra_user_preferences);
const keyCached = "use_cached_job|use_cached_job_checkbox";
const hasCachedJobs = keyCached in extra_user_preferences;
return hasCachedJobs ? extra_user_preferences[keyCached] : false;
From ad69622049c7190b47b5966f087ca721f46035e9 Mon Sep 17 00:00:00 2001
From: Oleg Zharkov
Date: Wed, 30 Jun 2021 17:31:43 +0200
Subject: [PATCH 048/452] fix tests
---
client/src/components/Form/Elements/FormBoolean.test.js | 2 +-
client/src/components/Form/Elements/FormInput.test.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/src/components/Form/Elements/FormBoolean.test.js b/client/src/components/Form/Elements/FormBoolean.test.js
index 92f83734326..90149c2442c 100644
--- a/client/src/components/Form/Elements/FormBoolean.test.js
+++ b/client/src/components/Form/Elements/FormBoolean.test.js
@@ -27,6 +27,6 @@ describe("FormBoolean", () => {
expect(input.element.checked).toBe(false);
input.trigger("click");
expect(input.element.checked).toBe(true);
- expect(wrapper.emitted().onChange[0][0]).toBe(true);
+ expect(wrapper.emitted().input[0][0]).toBe(true);
});
});
diff --git a/client/src/components/Form/Elements/FormInput.test.js b/client/src/components/Form/Elements/FormInput.test.js
index ebe24aa5960..c9b7eb9247b 100644
--- a/client/src/components/Form/Elements/FormInput.test.js
+++ b/client/src/components/Form/Elements/FormInput.test.js
@@ -24,7 +24,7 @@ describe("FormInput", () => {
expect(input.element.value).toBe("initial_value");
await input.setValue("new_value");
expect(input.element.value).toBe("new_value");
- expect(wrapper.emitted().onChange[0][0]).toBe("new_value");
+ expect(wrapper.emitted().input[0][0]).toBe("new_value");
});
it("check switching to text area", async () => {
@@ -33,6 +33,6 @@ describe("FormInput", () => {
expect(input.element.value).toBe("initial_value");
await input.setValue("new_value");
expect(input.element.value).toBe("new_value");
- expect(wrapper.emitted().onChange[0][0]).toBe("new_value");
+ expect(wrapper.emitted().input[0][0]).toBe("new_value");
});
});
From 51ac6d512eba84fb1195ee55e6c902bf678226db Mon Sep 17 00:00:00 2001
From: Oleg Zharkov
Date: Wed, 30 Jun 2021 17:45:09 +0200
Subject: [PATCH 049/452] fix lint
---
client/src/components/Tool/ToolForm.vue | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index bdb52bd1501..68531edc9aa 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -204,10 +204,7 @@ export default {
return config.server_mail_configured && !user.isAnonymous;
},
reuseAllowed(user) {
- if (
- user.preferences &&
- "extra_user_preferences" in user.preferences
- ) {
+ if (user.preferences && "extra_user_preferences" in user.preferences) {
const extra_user_preferences = JSON.parse(user.preferences.extra_user_preferences);
const keyCached = "use_cached_job|use_cached_job_checkbox";
const hasCachedJobs = keyCached in extra_user_preferences;
From 9cf5e6e99f77e6967c941a754d2af64323e4c278 Mon Sep 17 00:00:00 2001
From: Oleg Zharkov
Date: Wed, 30 Jun 2021 17:45:27 +0200
Subject: [PATCH 050/452] fix prop type
---
client/src/components/Form/FormElement.vue | 2 +-
client/src/components/Tool/ToolForm.vue | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/client/src/components/Form/FormElement.vue b/client/src/components/Form/FormElement.vue
index ffd3d4d6711..bef60f11d36 100644
--- a/client/src/components/Form/FormElement.vue
+++ b/client/src/components/Form/FormElement.vue
@@ -27,7 +27,7 @@ export default {
required: true,
},
value: {
- type: String,
+ type: [String, Boolean],
default: "",
},
title: {
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index 68531edc9aa..1089a45adc7 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -48,7 +48,7 @@
title="Email notification"
help="Send an email notification when the job completes."
type="boolean"
- value="false"
+ :value="false"
v-model="email"
/>
From 6b8bbf99982b611e13a281fa1deaef379ea3f948 Mon Sep 17 00:00:00 2001
From: Oleg Zharkov
Date: Wed, 30 Jun 2021 19:24:26 +0200
Subject: [PATCH 051/452] validation
---
client/src/components/Form/FormDisplay.vue | 2 +-
client/src/components/Tool/ToolForm.vue | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/client/src/components/Form/FormDisplay.vue b/client/src/components/Form/FormDisplay.vue
index 09d42bd6f16..c86307d2778 100644
--- a/client/src/components/Form/FormDisplay.vue
+++ b/client/src/components/Form/FormDisplay.vue
@@ -54,7 +54,7 @@ export default {
},
validation() {
this.onHighlight(this.validation, true);
- this.$emit("onValidation", this.validation);
+ this.$emit("input", this.validation);
},
validationErrors() {
const matchedErrors = Object.entries(this.form.data.matchResponse(this.validationErrors));
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index 1089a45adc7..76c59c3ce28 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -40,7 +40,7 @@
:validation-scroll-to="validationScrollTo"
:form-config="formConfig"
@onChange="onChange"
- @onValidation="onValidation"
+ v-model="validationInternal"
/>
Date: Wed, 30 Jun 2021 15:36:06 -0400
Subject: [PATCH 052/452] This is a legacy option in the code path which allows
tools to submit the form data to an arbritrary url, this does not seemed to
be used anywhere
---
client/src/components/Tool/ToolForm.vue | 5 -----
client/src/components/Tool/utilities.js | 12 ------------
2 files changed, 17 deletions(-)
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index 76c59c3ce28..fe7e677f3e3 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -90,7 +90,6 @@ import Scroller from "vue-scrollto";
import { getAppRoot } from "onload/loadConfig";
import { getGalaxyInstance } from "app";
import { getToolFormData, updateToolFormData, submitJob } from "./services";
-import { send } from "./utilities";
import ToolCard from "./ToolCard";
import ButtonSpinner from "components/Common/ButtonSpinner";
import CurrentUser from "components/providers/CurrentUser";
@@ -261,10 +260,6 @@ export default {
tool_version: this.formConfig.version,
inputs: this.formData,
};
- if (this.formConfig.action !== `${getAppRoot()}tool_runner/index`) {
- send(options, jobDef);
- return;
- }
Galaxy.emit.debug("tool-form::submit()", "Validation complete.", jobDef);
submitJob(jobDef).then(
(jobResponse) => {
diff --git a/client/src/components/Tool/utilities.js b/client/src/components/Tool/utilities.js
index 0c8fb372b77..9a40fecd5b3 100644
--- a/client/src/components/Tool/utilities.js
+++ b/client/src/components/Tool/utilities.js
@@ -13,15 +13,3 @@ export function downloadTool(toolId) {
export function openLink(url) {
window.open(url);
}
-
-export function send(options, job_def) {
- const $f = $("").attr({
- action: options.action,
- method: options.method,
- enctype: options.enctype,
- });
- Object.entries(job_def.inputs).forEach(([value, key]) => {
- $f.append($(" ").attr({ name: key, value: value }));
- });
- $f.hide().appendTo("body").submit().remove();
-}
From 74ac9fec969fb8b5bf116e84394886d949b5691c Mon Sep 17 00:00:00 2001
From: guerler
Date: Wed, 30 Jun 2021 15:50:57 -0400
Subject: [PATCH 053/452] Fix linting, remove unused imports
---
client/src/components/Tool/ToolForm.vue | 2 --
client/src/components/Tool/services.js | 2 +-
client/src/components/Tool/utilities.js | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue
index fe7e677f3e3..1c0b73049cb 100644
--- a/client/src/components/Tool/ToolForm.vue
+++ b/client/src/components/Tool/ToolForm.vue
@@ -87,7 +87,6 @@
diff --git a/client/src/components/History/ContentOperations.vue b/client/src/components/History/ContentOperations.vue
index d1b66ef6216..a43ef2363cc 100644
--- a/client/src/components/History/ContentOperations.vue
+++ b/client/src/components/History/ContentOperations.vue
@@ -27,6 +27,7 @@