You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/04/29 15:13:55 UTC
[17/50] [abbrv] git commit: updated refs/heads/marvin_refactor to
7c439fe
CLOUDSTACK-2120: mixed zone management - UI: count total number of hosts 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/e8b6c7b3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e8b6c7b3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e8b6c7b3
Branch: refs/heads/marvin_refactor
Commit: e8b6c7b33da77fadef337168f43074802c1bf4d2
Parents: 5ce2890
Author: Jessica Wang <je...@apache.org>
Authored: Thu Apr 25 11:11:55 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Thu Apr 25 11:14:20 2013 -0700
----------------------------------------------------------------------
ui/scripts/system.js | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8b6c7b3/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 4692b61..312d5f4 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -246,13 +246,19 @@
},
hostCount: function(data) {
+ var data2= {
+ type: 'routing',
+ 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: 'routing',
- 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.primaryStorageCount($.extend(data, {
hostCount: json.listhostsresponse.count ?