davidjumani commented on a change in pull request #5219:
URL: https://github.com/apache/cloudstack/pull/5219#discussion_r678210427



##########
File path: ui/src/utils/plugins.js
##########
@@ -64,7 +64,7 @@ export const pollJobPlugin = {
         status: 'progress'
       })
 
-      options.originalPage = options.originalPage ? options.originalPage : 
this.$router.currentRoute.path
+      const originalPageOpts = originalPage || this.$router.currentRoute.path

Review comment:
       ```suggestion
         const originalPageOpts = options.originalPage || 
this.$router.currentRoute.path
   ```

##########
File path: ui/src/utils/plugins.js
##########
@@ -64,7 +64,7 @@ export const pollJobPlugin = {
         status: 'progress'
       })
 
-      options.originalPage = options.originalPage ? options.originalPage : 
this.$router.currentRoute.path
+      const originalPageOpts = originalPage || this.$router.currentRoute.path

Review comment:
       ```suggestion
         const originalPageOpts = options.originalPage || 
this.$router.currentRoute.path
   ```

##########
File path: ui/src/utils/plugins.js
##########
@@ -64,7 +64,7 @@ export const pollJobPlugin = {
         status: 'progress'
       })
 
-      options.originalPage = options.originalPage ? options.originalPage : 
this.$router.currentRoute.path
+      const originalPageOpts = originalPage || this.$router.currentRoute.path

Review comment:
       @utchoang It should remain `options.originalPage` since that is passed 
when calling the async job again
   
   ```suggestion
         options.originalPage = options.originalPage || 
this.$router.currentRoute.path
   ```

##########
File path: ui/src/utils/plugins.js
##########
@@ -90,7 +90,7 @@ export const pollJobPlugin = {
 
           // Ensure we refresh on the same / parent page
           const currentPage = this.$router.currentRoute.path
-          const samePage = originalPage === currentPage || 
originalPage.startsWith(currentPage + '/')
+          const samePage = originalPageOpts === currentPage || 
originalPageOpts.startsWith(currentPage + '/')

Review comment:
       ```suggestion
             const samePage = options.originalPage === currentPage || 
options.originalPage.startsWith(currentPage + '/')
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to