cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [28/51] [abbrv] git commit: updated refs/heads/portablepublicip to e7b2fb2
Date Sat, 11 May 2013 09:10:19 GMT
CLOUDSTACK-2120: mixed zone management - UI: count total number of Primary Storages, Secondary
Storages based on selected option in zone type dropdown on top menu.


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

Branch: refs/heads/portablepublicip
Commit: f883b0f90489348b287b5425a83d6517c0ba092a
Parents: 880f98c
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu Apr 25 14:24:44 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu Apr 25 14:25:34 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f883b0f9/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 312d5f4..fea7669 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -269,29 +269,40 @@
           },
 
           primaryStorageCount: function(data) {
+            var data2 = {
+              page: 1,
+              pagesize: 1  //specifying pagesize as 1 because we don't need any embedded
objects to be returned here. The only thing we need from API response is "count" property.
+            };
+            if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length
> 0) { //Basic type or Advanced type
+              $.extend(data2, {
+                zonetype: cloudStack.context.zoneType
+              });
+            }   
             $.ajax({
               url: createURL('listStoragePools'),
-	      data: {
-		page: 1,
-		pagesize: 1  //specifying pagesize as 1 because we don't need any embedded objects to be
returned here. The only thing we need from API response is "count" property.
-	      },
+	            data: data2,
               success: function(json) {                
-		dataFns.secondaryStorageCount($.extend(data, {
-                  primaryStorageCount: json.liststoragepoolsresponse.count ?
-                    json.liststoragepoolsresponse.count : 0
+		            dataFns.secondaryStorageCount($.extend(data, {
+                  primaryStorageCount: json.liststoragepoolsresponse.count ? json.liststoragepoolsresponse.count
: 0
                 }));		
               }
             });
           },
 
           secondaryStorageCount: function(data) {
+            var data2 = {
+              type: 'SecondaryStorage',
+              page: 1,
+              pagesize: 1  //specifying pagesize as 1 because we don't need any embedded
objects to be returned here. The only thing we need from API response is "count" property.
+            };
+            if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length
> 0) { //Basic type or Advanced type
+              $.extend(data2, {
+                zonetype: cloudStack.context.zoneType
+              });
+            }  
             $.ajax({
               url: createURL('listHosts'),
-              data: {
-                type: 'SecondaryStorage',
-								page: 1,
-								pagesize: 1  //specifying pagesize as 1 because we don't need any embedded objects
to be returned here. The only thing we need from API response is "count" property.
-              },
+              data: data2,
               success: function(json) {
                 dataFns.systemVmCount($.extend(data, {
                   secondaryStorageCount: json.listhostsresponse.count ?


Mime
View raw message