From 400e8eb0809a0f3f674b79d82351ee85fc544fe8 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 8 Oct 2021 14:40:20 +0200 Subject: [PATCH 1/2] Show loading error in tool form Otherwise if the tool form fails to load it's not clear what went wrong and worse it looks like it is still loading. --- client/src/components/Tool/ToolForm.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue index f51789903c6..0afdb9c4742 100644 --- a/client/src/components/Tool/ToolForm.vue +++ b/client/src/components/Tool/ToolForm.vue @@ -3,6 +3,7 @@
+
@@ -152,6 +153,7 @@ export default { remapAllowed: false, errorTitle: null, errorContent: null, + messageShow: false, messageVariant: "", messageText: "", useCachedJobs: false, @@ -250,15 +252,20 @@ export default { .then((data) => { this.formConfig = data; this.remapAllowed = this.job_id && data.job_remap; - this.showLoading = false; this.showForm = true; if (newVersion) { this.messageVariant = "success"; this.messageText = `Now you are using '${data.name}' version ${data.version}, id '${data.id}'.`; } }) + .catch((error) => { + this.messageVariant = "danger"; + this.messageText = `Loading tool ${this.id} failed: ${error}`; + this.messageShow = true; + }) .finally(() => { this.disabled = false; + this.showLoading = false; }); }, onExecute(config, historyId) { From cacbeeea27fd0bbf530590aa772556e3df78e225 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 8 Oct 2021 20:25:11 +0200 Subject: [PATCH 2/2] Prevent duplicate alter messages in card and form --- client/src/components/Tool/ToolForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/components/Tool/ToolForm.vue b/client/src/components/Tool/ToolForm.vue index 0afdb9c4742..0a1ad81b0bb 100644 --- a/client/src/components/Tool/ToolForm.vue +++ b/client/src/components/Tool/ToolForm.vue @@ -253,6 +253,7 @@ export default { this.formConfig = data; this.remapAllowed = this.job_id && data.job_remap; this.showForm = true; + this.messageShow = false; if (newVersion) { this.messageVariant = "success"; this.messageText = `Now you are using '${data.name}' version ${data.version}, id '${data.id}'.`;