mirror of https://github.com/apache/cloudstack.git
ui: Fix async poll job (#5221)
This commit is contained in:
parent
61de48904c
commit
84e52c9263
|
|
@ -173,13 +173,9 @@ export default {
|
|||
} else {
|
||||
jobId = response.migratevirtualmachine.jobid
|
||||
}
|
||||
this.$store.dispatch('AddAsyncJob', {
|
||||
title: `${this.$t('label.migrating')} ${this.resource.name}`,
|
||||
jobid: jobId,
|
||||
description: this.resource.name,
|
||||
status: 'progress'
|
||||
})
|
||||
this.$pollJob({
|
||||
title: `${this.$t('label.migrating')} ${this.resource.name}`,
|
||||
description: this.resource.name,
|
||||
jobId: jobId,
|
||||
successMessage: `${this.$t('message.success.migrating')} ${this.resource.name}`,
|
||||
successMethod: () => {
|
||||
|
|
|
|||
|
|
@ -288,15 +288,10 @@ export default {
|
|||
this.loading = true
|
||||
api('deleteEgressFirewallRule', { id: rule.id }).then(response => {
|
||||
const jobId = response.deleteegressfirewallruleresponse.jobid
|
||||
this.$store.dispatch('AddAsyncJob', {
|
||||
title: this.$t('label.action.delete.egress.firewall'),
|
||||
jobid: jobId,
|
||||
description: rule.id,
|
||||
status: 'progress',
|
||||
bulkAction: this.selectedItems.length > 0 && this.showGroupActionModal
|
||||
})
|
||||
eventBus.$emit('update-job-details', jobId, null)
|
||||
this.$pollJob({
|
||||
title: this.$t('label.action.delete.egress.firewall'),
|
||||
description: rule.id,
|
||||
jobId: jobId,
|
||||
successMessage: this.$t('message.success.remove.egress.rule'),
|
||||
successMethod: () => {
|
||||
|
|
|
|||
|
|
@ -331,15 +331,10 @@ export default {
|
|||
this.loading = true
|
||||
api('deleteFirewallRule', { id: rule.id }).then(response => {
|
||||
const jobId = response.deletefirewallruleresponse.jobid
|
||||
this.$store.dispatch('AddAsyncJob', {
|
||||
title: this.$t('label.action.delete.firewall'),
|
||||
jobid: jobId,
|
||||
description: rule.id,
|
||||
status: 'progress',
|
||||
bulkAction: this.selectedItems.length > 0 && this.showGroupActionModal
|
||||
})
|
||||
eventBus.$emit('update-job-details', jobId, null)
|
||||
this.$pollJob({
|
||||
title: this.$t('label.action.delete.firewall'),
|
||||
description: rule.id,
|
||||
jobId: jobId,
|
||||
successMessage: this.$t('message.success.remove.firewall.rule'),
|
||||
successMethod: () => {
|
||||
|
|
|
|||
|
|
@ -389,15 +389,10 @@ export default {
|
|||
id: ip.id
|
||||
}).then(response => {
|
||||
const jobId = response.disassociateipaddressresponse.jobid
|
||||
this.$store.dispatch('AddAsyncJob', {
|
||||
title: this.$t('label.action.release.ip'),
|
||||
jobid: jobId,
|
||||
description: ip.id,
|
||||
status: 'progress',
|
||||
bulkAction: this.selectedItems.length > 0 && this.showGroupActionModal
|
||||
})
|
||||
eventBus.$emit('update-job-details', jobId, null)
|
||||
this.$pollJob({
|
||||
title: this.$t('label.action.release.ip'),
|
||||
description: ip.id,
|
||||
jobId: jobId,
|
||||
successMessage: this.$t('message.success.release.ip'),
|
||||
successMethod: () => {
|
||||
|
|
|
|||
|
|
@ -1023,15 +1023,10 @@ export default {
|
|||
id: rule.id
|
||||
}).then(response => {
|
||||
const jobId = response.deleteloadbalancerruleresponse.jobid
|
||||
this.$store.dispatch('AddAsyncJob', {
|
||||
title: this.$t('label.action.delete.load.balancer'),
|
||||
jobid: jobId,
|
||||
description: rule.id,
|
||||
status: 'progress',
|
||||
bulkAction: this.selectedItems.length > 0 && this.showGroupActionModal
|
||||
})
|
||||
eventBus.$emit('update-job-details', jobId, null)
|
||||
this.$pollJob({
|
||||
title: this.$t('label.action.delete.load.balancer'),
|
||||
description: rule.id,
|
||||
jobId: jobId,
|
||||
successMessage: this.$t('message.success.remove.rule'),
|
||||
successMethod: () => {
|
||||
|
|
|
|||
|
|
@ -523,15 +523,10 @@ export default {
|
|||
this.loading = true
|
||||
api('deletePortForwardingRule', { id: rule.id }).then(response => {
|
||||
const jobId = response.deleteportforwardingruleresponse.jobid
|
||||
this.$store.dispatch('AddAsyncJob', {
|
||||
title: this.$t('label.portforwarding.rule'),
|
||||
jobid: jobId,
|
||||
description: rule.id,
|
||||
status: 'progress',
|
||||
bulkAction: this.selectedItems.length > 0 && this.showGroupActionModal
|
||||
})
|
||||
eventBus.$emit('update-job-details', jobId, null)
|
||||
this.$pollJob({
|
||||
title: this.$t('label.portforwarding.rule'),
|
||||
description: rule.id,
|
||||
jobId: jobId,
|
||||
successMessage: this.$t('message.success.remove.port.forward'),
|
||||
successMethod: () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue