You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/03/10 05:55:46 UTC

[GitHub] [cloudstack] utchoang opened a new pull request #4782: UI: Refactor async job polling codebase-wide

utchoang opened a new pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782


   ### Description
   Related #4762
   This PR to enhance asynchronous job exploration and improve load performance
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   BEFORE:
   ![image](https://user-images.githubusercontent.com/13766648/110583117-c633d180-819f-11eb-93a8-46021932f7f0.png)
   AFTER:
   ![image](https://user-images.githubusercontent.com/13766648/95283623-72d2f580-0886-11eb-98a4-4820b99a47d1.png)
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r672047525



##########
File path: ui/src/views/infra/network/providers/AddPaloAltoFirewall.vue
##########
@@ -366,17 +366,9 @@ export default {
           }
           params.id = this.nsp.id
           const jobId = await this.addPaloAltoFirewall(params)
-          if (jobId) {
-            await this.$store.dispatch('AddAsyncJob', {
-              title: this.$t(this.action.label),
-              jobid: jobId,
-              description: this.$t(this.nsp.name),
-              status: 'progress'
-            })
-            await this.parentPollActionCompletion(jobId, this.action)
-          }
-          this.loading = false
+          await this.parentPollActionCompletion(jobId, this.action, this.$t(this.nsp.name))

Review comment:
       Ditto ^^

##########
File path: ui/src/views/infra/network/providers/AddSrxFirewall.vue
##########
@@ -311,17 +311,9 @@ export default {
           }
           params.id = this.nsp.id
           const jobId = await this.addSrxFirewall(params)
-          if (jobId) {
-            await this.$store.dispatch('AddAsyncJob', {
-              title: this.$t(this.action.label),
-              jobid: jobId,
-              description: this.$t(this.nsp.name),
-              status: 'progress'
-            })
-            await this.parentPollActionCompletion(jobId, this.action)
-          }
-          this.loading = false
+          await this.parentPollActionCompletion(jobId, this.action, this.$t(this.nsp.name))

Review comment:
       Ditto ^^




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670975053



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -912,43 +917,45 @@ export default {
             for (const params of paramsList) {
               var resourceName = itemsNameMap[params.id]
               // Using a method for this since it's an async call and don't want wrong prarms to be passed
-              this.callGroupApi(params, resourceName)
+              this.promises.push(this.callGroupApi(params, resourceName))
             }
             this.$message.info({
               content: this.$t(this.currentAction.label),
               key: this.currentAction.label,
               duration: 3
             })
-            setTimeout(() => {
+            Promise.all(this.promises).finally(() => {
               this.actionLoading = false
               this.closeAction()

Review comment:
       The form can be closed after submitting it rather than waiting for all the group actions to complete. Once this is fixed, LGTM




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-881322227


   @blueorangutan ui


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882247063


   @blueorangutan ui


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670176766



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -1044,15 +1051,17 @@ export default {
           args = [action.api, params]
         }
         api(...args).then(json => {
-          hasJobId = this.handleResponse(json, resourceName, action)
-          if ((action.icon === 'delete' || ['archiveEvents', 'archiveAlerts', 'unmanageVirtualMachine'].includes(action.api)) && this.dataView) {
-            this.$router.go(-1)
-          } else {
-            if (!hasJobId) {
-              this.fetchData()
+          this.handleResponse(json, resourceName, action).then(jobId => {
+            hasJobId = jobId
+            if ((action.icon === 'delete' || ['archiveEvents', 'archiveAlerts', 'unmanageVirtualMachine'].includes(action.api)) && this.dataView) {
+              this.$router.go(-1)
+            } else {
+              if (!hasJobId) {
+                this.fetchData()
+              }
             }
-          }
-          this.closeAction()
+            this.closeAction()
+          })

Review comment:
       `this.closeAction()` needs to be out of the handleResponse.then clause else it prevents any form from closing unless the async job is completed




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-880314700


   @blueorangutan ui


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez edited a comment on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez edited a comment on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-866889420


   Hi @utchoang can you please resolve the conflicts?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882484286


   Thanks @davidjumani @utchoang 


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-881329717


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/4782 (SL-JID-368)


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670194934



##########
File path: ui/src/views/network/InternalLBAssignVmForm.vue
##########
@@ -210,17 +210,10 @@ export default {
         this.$pollJob({
           jobId: response.assigntoloadbalancerruleresponse.jobid,
           successMessage: `${this.$t('message.success.assigned.vms')} ${this.$t('label.to')} ${this.resource.name}`,
-          successMethod: () => {

Review comment:
       isFetchData: true ? So the page reloads after assigning a VM ?




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-881177880


   @blueorangutan ui


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882249057


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/4782 (SL-JID-378)


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882165306


   Thanks @davidjumani for testing
   @utchoang one concern raised by @davidjumani, I've seen the network providers addition has been refactored as well, were you able to test them?


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670974432



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -912,43 +917,45 @@ export default {
             for (const params of paramsList) {
               var resourceName = itemsNameMap[params.id]
               // Using a method for this since it's an async call and don't want wrong prarms to be passed
-              this.callGroupApi(params, resourceName)
+              this.promises.push(this.callGroupApi(params, resourceName))
             }
             this.$message.info({
               content: this.$t(this.currentAction.label),
               key: this.currentAction.label,
               duration: 3
             })
-            setTimeout(() => {
+            Promise.all(this.promises).finally(() => {

Review comment:
       The form can be closed after submitting it rather than waiting for all the group actions to complete




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670395592



##########
File path: ui/src/views/project/AddAccountOrUserToProject.vue
##########
@@ -271,7 +271,6 @@ export default {
             loadingMessage: `Adding Account: ${params.account} to project...`,
             catchMessage: 'Error encountered while fetching async job result'
           })
-          this.$emit('refresh-data')

Review comment:
       isFetchData: true ? Page needs to be refreshed after adding an account / user




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-810035384


   @utchoang this looks like a major codebase-wide feature change, I'm moving to 4.16/master. Thanks.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882316771


   @blueorangutan ui


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882484286


   Thanks @davidjumani @utchoang 


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670206503



##########
File path: ui/src/views/network/VpnDetails.vue
##########
@@ -130,13 +130,11 @@ export default {
               duration: 0
             })
             this.fetchData()
-            this.parentFetchData()

Review comment:
       @davidjumani same https://github.com/apache/cloudstack/pull/4782#discussion_r670202511




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-881322695


   @utchoang a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-880316441


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/4782 (SL-JID-359)


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-879768287


   @blueorangutan ui


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-879771377


   UI build: :heavy_multiplication_x:
    (SL-JID-358)


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670194934



##########
File path: ui/src/views/network/InternalLBAssignVmForm.vue
##########
@@ -210,17 +210,10 @@ export default {
         this.$pollJob({
           jobId: response.assigntoloadbalancerruleresponse.jobid,
           successMessage: `${this.$t('message.success.assigned.vms')} ${this.$t('label.to')} ${this.resource.name}`,
-          successMethod: () => {

Review comment:
       isFetchData: true ? So the page reloads after assigning a VM




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670396561



##########
File path: ui/src/views/storage/AttachVolume.vue
##########
@@ -114,16 +113,10 @@ export default {
           id: this.resource.id,
           virtualmachineid: values.virtualmachineid
         }).then(response => {
-          this.$store.dispatch('AddAsyncJob', {
-            title: this.$t('label.action.attach.disk'),
-            jobid: response.attachvolumeresponse.jobid,
-            status: 'progress'
-          })
           this.$pollJob({
             jobId: response.attachvolumeresponse.jobid,
-            successMethod: () => {
-              this.parentFetchData()
-            },
+            title: this.$t('label.action.attach.disk'),
+            description: this.resource.id,

Review comment:
       Page needs to be reloaded after attaching the volume




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-866889420


   Hi @utchoang can you please resolve the conflicts and target the PR to the `main` branch?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882307973


   Tested the Network Providers, the async job calls work fine, @utchoang Can you close the add network providers forms after submitting it rather than waiting for the async jobs to complete


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-796583361


   @utchoang a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. [S]


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670206319



##########
File path: ui/src/views/offering/ImportBackupOffering.vue
##########
@@ -186,15 +185,9 @@ export default {
           if (jobId) {
             this.$pollJob({
               jobId,
+              title: title,
+              description: values.name,
               successMethod: result => {
-                const successDescription = result.jobresult.backupoffering.name

Review comment:
       Refresh after adding an offering




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-880314848


   @utchoang a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882247455


   @utchoang a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r672044304



##########
File path: ui/src/views/infra/network/providers/AddNetscalerLoadBalancer.vue
##########
@@ -277,17 +277,9 @@ export default {
           }
           params.id = this.nsp.id
           const jobId = await this.addNetscalerLoadBalancer(params)
-          if (jobId) {
-            await this.$store.dispatch('AddAsyncJob', {
-              title: this.$t(this.action.label),
-              jobid: jobId,
-              description: this.$t(this.nsp.name),
-              status: 'progress'
-            })
-            await this.parentPollActionCompletion(jobId, this.action)
-          }
-          this.loading = false
+          await this.parentPollActionCompletion(jobId, this.action, this.$t(this.nsp.name))

Review comment:
       Ditto ^^




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670206503



##########
File path: ui/src/views/network/VpnDetails.vue
##########
@@ -130,13 +130,11 @@ export default {
               duration: 0
             })
             this.fetchData()
-            this.parentFetchData()

Review comment:
       @davidjumani same https://github.com/apache/cloudstack/pull/4782#discussion_r670206261




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670974432



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -912,43 +917,45 @@ export default {
             for (const params of paramsList) {
               var resourceName = itemsNameMap[params.id]
               // Using a method for this since it's an async call and don't want wrong prarms to be passed
-              this.callGroupApi(params, resourceName)
+              this.promises.push(this.callGroupApi(params, resourceName))
             }
             this.$message.info({
               content: this.$t(this.currentAction.label),
               key: this.currentAction.label,
               duration: 3
             })
-            setTimeout(() => {
+            Promise.all(this.promises).finally(() => {

Review comment:
       The form can be closed after submitting it rather than waiting for all the group actions to complete. Once this is fixed, LGTM




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882319853


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/4782 (SL-JID-381)


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-880427628


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/4782 (SL-JID-362)


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670191257



##########
File path: ui/src/views/network/IngressEgressRuleConfigure.vue
##########
@@ -293,12 +293,10 @@ export default {
             : response.authorizesecuritygroupegressresponse.jobid,
           successMessage: this.$t('message.success.add.rule'),
           successMethod: () => {
-            this.parentFetchData()

Review comment:
       `this.parentFetchData()` is needed here and in the subsequent methods sine it has to reload the page when a rule is added / deleted




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882484286


   Thanks @davidjumani @utchoang 


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-881178107


   @davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-880425760


   @davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670202511



##########
File path: ui/src/views/network/IngressEgressRuleConfigure.vue
##########
@@ -293,12 +293,10 @@ export default {
             : response.authorizesecuritygroupegressresponse.jobid,
           successMessage: this.$t('message.success.add.rule'),
           successMethod: () => {
-            this.parentFetchData()

Review comment:
       @davidjumani Not necessary because to avoid repeated `fetchData()` event I just allow utils/plugins.js which will send event to autogenView to execute it after job finish




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang closed pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang closed pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-796586346


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/4782 (SL-JID-20)


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670205724



##########
File path: ui/src/views/network/VpnDetails.vue
##########
@@ -130,13 +130,11 @@ export default {
               duration: 0
             })
             this.fetchData()
-            this.parentFetchData()

Review comment:
       Might need a refresh after enabling / disabling the VPN




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882203911


   @blueorangutan ui


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez merged pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782


   


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez merged pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782


   


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670397323



##########
File path: ui/src/views/storage/CreateVolume.vue
##########
@@ -156,24 +156,13 @@ export default {
         api('createVolume', values).then(response => {
           this.$pollJob({
             jobId: response.createvolumeresponse.jobid,
+            title: this.$t('message.success.create.volume'),
+            description: values.name,
             successMessage: this.$t('message.success.create.volume'),
-            successMethod: () => {
-              this.$store.dispatch('AddAsyncJob', {
-                title: this.$t('message.success.create.volume'),
-                jobid: response.createvolumeresponse.jobid,
-                description: values.name,
-                status: 'progress'
-              })
-              this.$emit('refresh-data')
-            },
             errorMessage: this.$t('message.create.volume.failed'),
-            errorMethod: () => {
-              this.$emit('refresh-data')
-            },
             loadingMessage: this.$t('message.create.volume.processing'),
             catchMessage: this.$t('error.fetching.async.job.result')
           })
-          this.$emit('refresh-data')

Review comment:
       Refresh after creating a volume




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670176766



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -1044,15 +1051,17 @@ export default {
           args = [action.api, params]
         }
         api(...args).then(json => {
-          hasJobId = this.handleResponse(json, resourceName, action)
-          if ((action.icon === 'delete' || ['archiveEvents', 'archiveAlerts', 'unmanageVirtualMachine'].includes(action.api)) && this.dataView) {
-            this.$router.go(-1)
-          } else {
-            if (!hasJobId) {
-              this.fetchData()
+          this.handleResponse(json, resourceName, action).then(jobId => {
+            hasJobId = jobId
+            if ((action.icon === 'delete' || ['archiveEvents', 'archiveAlerts', 'unmanageVirtualMachine'].includes(action.api)) && this.dataView) {
+              this.$router.go(-1)
+            } else {
+              if (!hasJobId) {
+                this.fetchData()
+              }
             }
-          }
-          this.closeAction()
+            this.closeAction()
+          })

Review comment:
       `this.closeAction()` needs to be out of the then clause else it prevents any form from closing unless the async job is completed




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez merged pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782


   


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882207101


   UI build: :heavy_multiplication_x:
    (SL-JID-377)


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-881179634


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/4782 (SL-JID-367)


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-880425184


   @blueorangutan ui


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882317386


   @utchoang a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r672047429



##########
File path: ui/src/views/infra/network/providers/AddNiciraNvpDevice.vue
##########
@@ -154,17 +154,9 @@ export default {
           }
           params.id = this.nsp.id
           const jobId = await this.addNiciraNvpDevice(params)
-          if (jobId) {
-            await this.$store.dispatch('AddAsyncJob', {
-              title: this.$t(this.action.label),
-              jobid: jobId,
-              description: this.$t(this.nsp.name),
-              status: 'progress'
-            })
-            await this.parentPollActionCompletion(jobId, this.action)
-          }
-          this.loading = false
+          await this.parentPollActionCompletion(jobId, this.action, this.$t(this.nsp.name))

Review comment:
       Ditto ^^




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r672043594



##########
File path: ui/src/views/infra/network/providers/AddF5LoadBalancer.vue
##########
@@ -242,17 +242,9 @@ export default {
           }
           params.id = this.nsp.id
           const jobId = await this.addF5LoadBalancer(params)
-          if (jobId) {
-            await this.$store.dispatch('AddAsyncJob', {
-              title: this.$t(this.action.label),
-              jobid: jobId,
-              description: this.$t(this.nsp.name),
-              status: 'progress'
-            })
-            await this.parentPollActionCompletion(jobId, this.action)
-          }
-          this.loading = false
+          await this.parentPollActionCompletion(jobId, this.action, this.$t(this.nsp.name))

Review comment:
       Don't need to wait for the job to be completed, can close the form once submitted




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882204199


   @davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-882207625


   @utchoang 
   ```
   /jenkins/workspace/acs-ui-builder/ui/src/views/infra/network/providers/AddNetscalerLoadBalancer.vue
     295:17  error  'jobId' is assigned a value but never used  no-unused-vars
   ```


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-880642508


   @utchoang Had to clear the cache, my bad


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on a change in pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670206261



##########
File path: ui/src/views/network/InternalLBAssignVmForm.vue
##########
@@ -210,17 +210,10 @@ export default {
         this.$pollJob({
           jobId: response.assigntoloadbalancerruleresponse.jobid,
           successMessage: `${this.$t('message.success.assigned.vms')} ${this.$t('label.to')} ${this.resource.name}`,
-          successMethod: () => {

Review comment:
       With condition `if (!action || !('isFetchData' in action) || (action.isFetchData))` in `utils/plugins.js`, even if isFetchData: true is not set, it will still be called after the polljob finish.




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-879768795


   @shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on pull request #4782: UI: Refactor async job polling codebase-wide

Posted by GitBox <gi...@apache.org>.
utchoang commented on pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#issuecomment-796583155


   @blueorangutan ui


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org