cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/4.3 to 5c4caf0
Date Fri, 10 Jan 2014 23:57:27 GMT
Updated Branches:
  refs/heads/4.3 1f9ad23ba -> 5c4caf0b9


CLOUDSTACK-5492: UI > Routers > Group by zone/pod/cluster/account > (1) fix a bug
that requiresUpgrade wrongly showed"No" when it should show "Yes".
(2) detailView > add new field "Total of Virtual Routers that require upgrade".


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

Branch: refs/heads/4.3
Commit: 5c4caf0b9973a7e2000589511d5f86cb2b8a7823
Parents: 1f9ad23
Author: Jessica Wang <jessicawang@apache.org>
Authored: Fri Jan 10 15:57:08 2014 -0800
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Fri Jan 10 15:57:18 2014 -0800

----------------------------------------------------------------------
 ui/scripts/system.js | 74 +++++++++++++++++++++++++++++++++++++----------
 1 file changed, 59 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5c4caf0b/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 60cb700..0c4f45d 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8280,6 +8280,9 @@
                                             			return 'No';
                                             		}
                                             	}
+                                            },                                          
 
+                                            numberOfRouterRequiresUpgrade: {
+                                            	label: 'Total of Virtual Routers that require
upgrade'
                                             }
                                         }],  
                                         dataProvider: function(args) {                  
                      
@@ -8403,6 +8406,9 @@
                                                         return 'No';
                                                     }
                                                 }
+                                            },                                          
 
+                                            numberOfRouterRequiresUpgrade: {
+                                            	label: 'Total of Virtual Routers that require
upgrade'
                                             },
                                             zonename: {
                                             	label: 'label.zone'
@@ -8529,6 +8535,9 @@
                                                         return 'No';
                                                     }
                                                 }
+                                            },                                          
 
+                                            numberOfRouterRequiresUpgrade: {
+                                            	label: 'Total of Virtual Routers that require
upgrade'
                                             },
                                             podname: {
                                             	label: 'label.pod'
@@ -8607,12 +8616,20 @@
                                                         pagesize: pageSize //global variable
                                                     },
                                                     async: false,
-                                                    success: function (json) {          
                                       
+                                                    success: function (json) {     
                                                         if (json.listroutersresponse.count
!= undefined) {
                                                             accountObjs[i].routerCount =
json.listroutersresponse.count;
                                                             var routerCountFromAllPages =
json.listroutersresponse.count;                                                          
 
                                                             var routerCountFromFirstPageToCurrentPage
= json.listroutersresponse.router.length;
-                                                            var routerRequiresUpgrade = 0;
                                                           
+                                                            var routerRequiresUpgrade = 0;
       
+                                                            
+                                                            var items = json.listroutersresponse.router;
+                	                            			for (var k = 0; k < items.length; k++)
{    	                                                    				
+                	                            				if (items[k].requiresupgrade) {
+                	                            					routerRequiresUpgrade++;
+                	                            				}
+                	                            			}  
+                                                            
                                                             var callListApiWithPage = function
() {                                                            
                                                                 $.ajax({
                                                                     url: createURL('listRouters'),
@@ -8627,11 +8644,11 @@
                                                                     success: function (json)
{                                                                       
                                                                         routerCountFromFirstPageToCurrentPage
+= json.listroutersresponse.router.length;
                                                                         var items = json.listroutersresponse.router;
-                                                                        for (var i = 0; i
< items.length; i++) {
-                                                                            if (items[i].requiresupgrade)
{
-                                                                                routerRequiresUpgrade++;
-                                                                            }
-                                                                        }
+                            	                            			for (var k = 0; k < items.length;
k++) {    	                                                    				
+                            	                            				if (items[k].requiresupgrade)
{
+                            	                            					routerRequiresUpgrade++;
+                            	                            				}
+                            	                            			}  
                                                                         if (routerCountFromFirstPageToCurrentPage
< routerCountFromAllPages) {
                                                                             currentPage++;
                                                                             callListApiWithPage();
@@ -8719,6 +8736,9 @@
                                                         return 'No';
                                                     }
                                                 }
+                                            },                                          
 
+                                            numberOfRouterRequiresUpgrade: {
+                                            	label: 'Total of Virtual Routers that require
upgrade'
                                             }
                                         }],
                                         dataProvider: function (args) {                 
                      	
@@ -8739,6 +8759,14 @@
                                                         var routerCountFromAllPages = json.listroutersresponse.count;
                                                       
                                                         var routerCountFromFirstPageToCurrentPage
= json.listroutersresponse.router.length;
                                                         var routerRequiresUpgrade = 0;
+                                                        
+                                                        var items = json.listroutersresponse.router;
+            	                            			for (var k = 0; k < items.length; k++) { 
  	                                                    				
+            	                            				if (items[k].requiresupgrade) {
+            	                            					routerRequiresUpgrade++;
+            	                            				}
+            	                            			}  
+                                                        
                                                         var callListApiWithPage = function
() {                                                        	
                                                             $.ajax({
                                                                 url: createURL('listRouters'),
@@ -8753,11 +8781,11 @@
                                                                 success: function (json)
{
                                                                     routerCountFromFirstPageToCurrentPage
+= json.listroutersresponse.router.length;
                                                                     var items = json.listroutersresponse.router;
-                                                                    for (var i = 0; i <
items.length; i++) {
-                                                                        if (items[i].requiresupgrade)
{
-                                                                            routerRequiresUpgrade++;
-                                                                        }
-                                                                    }
+                        	                            			for (var k = 0; k < items.length;
k++) {    	                                                    				
+                        	                            				if (items[k].requiresupgrade) {
+                        	                            					routerRequiresUpgrade++;
+                        	                            				}
+                        	                            			}  
                                                                     if (routerCountFromFirstPageToCurrentPage
< routerCountFromAllPages) {
                                                                         currentPage++;
                                                                         callListApiWithPage();
@@ -8770,10 +8798,11 @@
                                                             callListApiWithPage();
                                                         }
                                                         args.context.routerGroupByAccount[0].routerRequiresUpgrade
= routerRequiresUpgrade;
-
+                                                        args.context.routerGroupByAccount[0].numberOfRouterRequiresUpgrade
= routerRequiresUpgrade;
                                                     } else {
                                                         args.context.routerGroupByAccount[0].routerCount
= 0;
                                                         args.context.routerGroupByAccount[0].routerRequiresUpgrade
= 0;
+                                                        args.context.routerGroupByAccount[0].numberOfRouterRequiresUpgrade
= 0;
                                                     }
                                                 }
                                             });
@@ -17984,6 +18013,13 @@
                 	var routerCountFromFirstPageToCurrentPage = json.listroutersresponse.router.length;
 
                 	var routerRequiresUpgrade = 0;    
                 	
+                	var items = json.listroutersresponse.router;
+        			for (var k = 0; k < items.length; k++) {    	                             
                      				
+        				if (items[k].requiresupgrade) {
+        					routerRequiresUpgrade++;
+        				}
+        			}   
+                	
                 	$.ajax({
                 		url: createURL('listRouters'),
                         data: $.extend({}, listRoutersData, {
@@ -17996,7 +18032,14 @@
                         		routerCountFromAllPages += json.listroutersresponse.count;    
                         		groupbyObj.routerCount = routerCountFromAllPages;
                         		
-                            	routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length;
     	        	                                                		
+                            	routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length;

+                            	
+                            	var items = json.listroutersresponse.router;
+                    			for (var k = 0; k < items.length; k++) {    	                 
                                  				
+                    				if (items[k].requiresupgrade) {
+                    					routerRequiresUpgrade++;
+                    				}
+                    			}   
                         	} else {
                         		groupbyObj.routerCount = routerCountFromAllPages;
                         	}
@@ -18059,10 +18102,11 @@
         			}  
                 	
                 	groupbyObj.routerRequiresUpgrade = routerRequiresUpgrade;
-            		
+                	groupbyObj.numberOfRouterRequiresUpgrade = routerRequiresUpgrade;
             	} else {
             		groupbyObj.routerCount = 0;
             		groupbyObj.routerRequiresUpgrade = 0;
+            		groupbyObj.numberOfRouterRequiresUpgrade = 0;
             	}    	                                            		                       
                        
             }
         });    	


Mime
View raw message