Skip to content

Commit b85d5e4

Browse files
authored
ui: Fix groupaction for nw cleanup and Notify when groupaction fails (apache#6333)
1 parent 87a402c commit b85d5e4

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

ui/src/config/section/network.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ export default {
114114
label: 'label.restart.network',
115115
message: 'message.restart.network',
116116
dataView: true,
117-
args: (record) => {
117+
args: (record, store, isGroupAction) => {
118118
var fields = []
119-
if (record.vpcid == null) {
119+
if (isGroupAction || record.vpcid == null) {
120120
fields.push('cleanup')
121121
}
122122
fields.push('livepatch')

ui/src/utils/plugins.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,23 +133,25 @@ export const pollJobPlugin = {
133133
if (name) {
134134
desc = `(${name}) ${desc}`
135135
}
136+
let onClose = () => {}
136137
if (!bulkAction) {
137138
let countNotify = store.getters.countNotify
138139
countNotify++
139140
store.commit('SET_COUNT_NOTIFY', countNotify)
140-
notification.error({
141-
top: '65px',
142-
message: errMessage,
143-
description: desc,
144-
key: jobId,
145-
duration: 0,
146-
onClose: () => {
147-
let countNotify = store.getters.countNotify
148-
countNotify > 0 ? countNotify-- : countNotify = 0
149-
store.commit('SET_COUNT_NOTIFY', countNotify)
150-
}
151-
})
141+
onClose = () => {
142+
let countNotify = store.getters.countNotify
143+
countNotify > 0 ? countNotify-- : countNotify = 0
144+
store.commit('SET_COUNT_NOTIFY', countNotify)
145+
}
152146
}
147+
notification.error({
148+
top: '65px',
149+
message: errMessage,
150+
description: desc,
151+
key: jobId,
152+
duration: 0,
153+
onClose: onClose
154+
})
153155
store.dispatch('AddHeaderNotice', {
154156
key: jobId,
155157
title,

0 commit comments

Comments
 (0)