diff --git a/src/components/RunCard.vue b/src/components/RunCard.vue index de239c55..7bb56cb8 100644 --- a/src/components/RunCard.vue +++ b/src/components/RunCard.vue @@ -316,6 +316,7 @@ +
{{ $t("components.RunCard.Results") }} @@ -369,6 +370,7 @@ export default { lineNumbers: false, foldGutter: true, gutters: ["CodeMirror-foldgutter"], + }, tab: null, client: [ @@ -500,15 +502,14 @@ export default { "schedule", this.scheduleDate + " " + this.scheduleTime + ":00" ); - } else { - formData.set("cron", this.cron.currentValue); + } else { + formData.set("cron", this.cron.currentValue); + } } - } - this.$toast(action + " " + command); - this.$http - .post("api/run/", formData) - .then((response) => { - let result = response.data; + this.$toast(action + " " + command) + this.loading = true + this.$http.post("api/run/", formData).then(response => { + let result = response.data // If we're expecting an async result, display a link to the minion's result. if (this.client_async && this.selected_client === "local") { let parser = new DOMParser(); @@ -535,11 +536,12 @@ export default { } result = new XMLSerializer().serializeToString(htmlRes); } - this.results = result + this.results; + this.loading = false + this.results = result + this.results + }).catch((error) => { + this.loading = false + this.$toast.error(error.response.data) }) - .catch((error) => { - this.$toast.error(error.response.data); - }); }, }, computed: { @@ -611,14 +613,42 @@ export default {