Skip to content

Commit 1354959

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

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ui/src/utils/plugins.js

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

9090
// Ensure we refresh on the same / parent page
9191
const currentPage = this.$router.currentRoute.path
92+
const fromDeployVM = options.originalPage === '/deployVirtualMachine' && (currentPage === '/vm' || currentPage.startsWith('/vm/'))
9293
const samePage = options.originalPage === currentPage || options.originalPage.startsWith(currentPage + '/')
93-
if (samePage && (!action || !('isFetchData' in action) || (action.isFetchData))) {
94+
if (fromDeployVM || (samePage && (!action || !('isFetchData' in action) || (action.isFetchData)))) {
9495
eventBus.$emit('async-job-complete', action)
9596
}
9697
successMethod(result)
@@ -124,8 +125,9 @@ export const pollJobPlugin = {
124125

125126
// Ensure we refresh on the same / parent page
126127
const currentPage = this.$router.currentRoute.path
128+
const fromDeployVM = options.originalPage === '/deployVirtualMachine' && (currentPage === '/vm' || currentPage.startsWith('/vm/'))
127129
const samePage = options.originalPage === currentPage || options.originalPage.startsWith(currentPage + '/')
128-
if (samePage && (!action || !('isFetchData' in action) || (action.isFetchData))) {
130+
if (fromDeployVM || (samePage && (!action || !('isFetchData' in action) || (action.isFetchData)))) {
129131
eventBus.$emit('async-job-complete', action)
130132
}
131133
errorMethod(result)

0 commit comments

Comments
 (0)