This is an automated email from the ASF dual-hosted git repository.

nvazquez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new b85d5e491a ui: Fix groupaction for nw cleanup and Notify when 
groupaction fails (#6333)
b85d5e491a is described below

commit b85d5e491a158af7e4e9322a5152275b01d28a9c
Author: David Jumani <[email protected]>
AuthorDate: Thu Apr 28 17:51:43 2022 +0530

    ui: Fix groupaction for nw cleanup and Notify when groupaction fails (#6333)
---
 ui/src/config/section/network.js |  4 ++--
 ui/src/utils/plugins.js          | 26 ++++++++++++++------------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/ui/src/config/section/network.js b/ui/src/config/section/network.js
index 657a3f5ddb..03aa388b4a 100644
--- a/ui/src/config/section/network.js
+++ b/ui/src/config/section/network.js
@@ -114,9 +114,9 @@ export default {
           label: 'label.restart.network',
           message: 'message.restart.network',
           dataView: true,
-          args: (record) => {
+          args: (record, store, isGroupAction) => {
             var fields = []
-            if (record.vpcid == null) {
+            if (isGroupAction || record.vpcid == null) {
               fields.push('cleanup')
             }
             fields.push('livepatch')
diff --git a/ui/src/utils/plugins.js b/ui/src/utils/plugins.js
index 6a8cc1b5d2..63a0e609c5 100644
--- a/ui/src/utils/plugins.js
+++ b/ui/src/utils/plugins.js
@@ -133,23 +133,25 @@ export const pollJobPlugin = {
           if (name) {
             desc = `(${name}) ${desc}`
           }
+          let onClose = () => {}
           if (!bulkAction) {
             let countNotify = store.getters.countNotify
             countNotify++
             store.commit('SET_COUNT_NOTIFY', countNotify)
-            notification.error({
-              top: '65px',
-              message: errMessage,
-              description: desc,
-              key: jobId,
-              duration: 0,
-              onClose: () => {
-                let countNotify = store.getters.countNotify
-                countNotify > 0 ? countNotify-- : countNotify = 0
-                store.commit('SET_COUNT_NOTIFY', countNotify)
-              }
-            })
+            onClose = () => {
+              let countNotify = store.getters.countNotify
+              countNotify > 0 ? countNotify-- : countNotify = 0
+              store.commit('SET_COUNT_NOTIFY', countNotify)
+            }
           }
+          notification.error({
+            top: '65px',
+            message: errMessage,
+            description: desc,
+            key: jobId,
+            duration: 0,
+            onClose: onClose
+          })
           store.dispatch('AddHeaderNotice', {
             key: jobId,
             title,

Reply via email to