You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/05/31 05:53:47 UTC
[cloudstack-primate] branch master updated: utils: hide loading
message on async job failure
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new 247e0bd utils: hide loading message on async job failure
247e0bd is described below
commit 247e0bd949f9208994ef8573d08b570a84a5211e
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Sun May 31 11:13:54 2020 +0530
utils: hide loading message on async job failure
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
src/components/header/HeaderNotice.vue | 1 +
src/utils/plugins.js | 18 ++++++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/components/header/HeaderNotice.vue b/src/components/header/HeaderNotice.vue
index e8a1289..897c88c 100644
--- a/src/components/header/HeaderNotice.vue
+++ b/src/components/header/HeaderNotice.vue
@@ -105,6 +105,7 @@ export default {
this.$notification.error({
message: this.jobs[i].title,
description: this.jobs[i].description,
+ key: this.jobs[i].jobid,
duration: 0
})
}
diff --git a/src/utils/plugins.js b/src/utils/plugins.js
index be84393..388270e 100644
--- a/src/utils/plugins.js
+++ b/src/utils/plugins.js
@@ -66,9 +66,23 @@ export const pollJobPlugin = {
})
successMethod(result)
} else if (result.jobstatus === 2) {
+ message.error({
+ content: errorMessage,
+ key: jobId,
+ duration: 1
+ })
+ var title = errorMessage
+ if (action && action.label) {
+ title = i18n.t(action.label)
+ }
+ var desc = result.jobresult.errortext
+ if (name) {
+ desc = `(${name}) ${desc}`
+ }
notification.error({
- message: errorMessage,
- description: result.jobresult.errortext,
+ message: title,
+ description: desc,
+ key: jobId,
duration: 0
})
errorMethod(result)