cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [39/50] [abbrv] git commit: updated refs/heads/disk-cache to 99d67cb
Date Mon, 02 Sep 2013 20:05:25 GMT
CLOUDSTACK-2569: UI > Infrastructure > zone > physical network > VNMC provider
> fix a bug that queryAsyncJobResult API kept being called even after the async job was
finished.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ab91def1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ab91def1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ab91def1

Branch: refs/heads/disk-cache
Commit: ab91def10c22b9a19423ba91146b4262a3af9a53
Parents: 9bb0eda
Author: Jessica Wang <jessicawang@apache.org>
Authored: Fri Aug 2 14:21:15 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Fri Aug 2 14:39:41 2013 -0700

----------------------------------------------------------------------
 .../vnmcNetworkProvider/vnmcNetworkProvider.js  | 29 +++++---------------
 1 file changed, 7 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ab91def1/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
----------------------------------------------------------------------
diff --git a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
index 2e1e12e..f1d22d1 100644
--- a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
+++ b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
@@ -376,15 +376,14 @@
                                                 jobid: jid
                                             },
                                             success: function (json) {
-                                                var result = json.queryasyncjobresultresponse;
+                                                var result = json.queryasyncjobresultresponse;
                                               
                                                 if (result.jobstatus == 0) {
                                                     return; //Job has not completed
                                                 } else {
+                                                	clearInterval(enableVnmcProviderIntervalID);
                                                     if (result.jobstatus == 1) {
                                                         args.response.success({
-                                                            data: {
-                                                                state: 'Enabled'
-                                                            }
+                                                            data: result.jobresult.networkserviceprovider
                                                         });
                                                     } else if (result.jobstatus == 2) {
                                                         args.response.error(_s(result.jobresult.errortext));
@@ -419,13 +418,7 @@
                                 }
                             });
                         }
-                    },
-
-                    notification: {
-                        poll: function (args) {
-                            args.complete();
-                        }
-                    }
+                    }                    
                 },
 
                 disable: {
@@ -475,16 +468,14 @@
                                                 jobid: jid
                                             },
                                             success: function (json) {
-                                                var result = json.queryasyncjobresultresponse;
+                                                var result = json.queryasyncjobresultresponse;
                                            
                                                 if (result.jobstatus == 0) {
                                                     return; //Job has not completed
                                                 } else {
                                                     clearInterval(disableVnmcProviderIntervalID);
                                                     if (result.jobstatus == 1) {
                                                         args.response.success({
-                                                            data: {
-                                                                state: 'Disabled'
-                                                            }
+                                                            data: result.jobresult.networkserviceprovider
                                                         });
                                                     } else if (result.jobstatus == 2) {
                                                         args.response.error(_s(result.jobresult.errortext));
@@ -519,13 +510,7 @@
                                 }
                             });
                         }
-                    },
-
-                    notification: {
-                        poll: function (args) {
-                            args.complete();
-                        }
-                    }
+                    }                    
                 }
             },
             tabs: {


Mime
View raw message