Skip to content

Commit 2e50195

Browse files
committed
ui: Refresh page on deployvm result
1 parent b3dca8c commit 2e50195

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ui/src/utils/plugins.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ export const pollJobPlugin = {
8989

9090
// Ensure we refresh on the same / parent page
9191
const currentPage = this.$router.currentRoute.path
92+
console.log(currentPage)
93+
const fromDeployVM = options.originalPage === '/deployVirtualMachine' && (currentPage === '/vm' || currentPage.startsWith('/vm/'))
9294
const samePage = options.originalPage === currentPage || options.originalPage.startsWith(currentPage + '/')
93-
if (samePage && (!action || !('isFetchData' in action) || (action.isFetchData))) {
95+
if (fromDeployVM || (samePage && (!action || !('isFetchData' in action) || (action.isFetchData)))) {
9496
eventBus.$emit('async-job-complete', action)
9597
}
9698
successMethod(result)
@@ -124,8 +126,9 @@ export const pollJobPlugin = {
124126

125127
// Ensure we refresh on the same / parent page
126128
const currentPage = this.$router.currentRoute.path
129+
const fromDeployVM = options.originalPage === '/deployVirtualMachine' && (currentPage === '/vm' || currentPage.startsWith('/vm/'))
127130
const samePage = options.originalPage === currentPage || options.originalPage.startsWith(currentPage + '/')
128-
if (samePage && (!action || !('isFetchData' in action) || (action.isFetchData))) {
131+
if (fromDeployVM || (samePage && (!action || !('isFetchData' in action) || (action.isFetchData)))) {
129132
eventBus.$emit('async-job-complete', action)
130133
}
131134
errorMethod(result)

0 commit comments

Comments
 (0)