diff --git a/ui/jsp/resource.jsp b/ui/jsp/resource.jsp index 813ad7292fd..ec73c0b7556 100644 --- a/ui/jsp/resource.jsp +++ b/ui/jsp/resource.jsp @@ -30,7 +30,7 @@
-

10

+

N

@@ -45,23 +45,24 @@
-

120

+

N

+
-

# of Cluster - Host

+

# of Host

-

15

+

N

@@ -72,13 +73,13 @@
-

# of Cluster - Primary Storage

+

# of Primary Storage

-

12

+

N

diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js index ea110d21e36..f87cf43df92 100644 --- a/ui/scripts/cloud.core.resource.js +++ b/ui/scripts/cloud.core.resource.js @@ -250,6 +250,52 @@ function afterLoadResourceJSP($midmenuItem1) { initUpdateConsoleCertButton($("#midmenu_add2_link")); initDialog("dialog_add_zone"); initDialog("dialog_update_cert", 450); + + $.ajax({ + data: createURL("command=listZones&available=true"), + dataType: "json", + success: function(json) { + var items = json.listzonesresponse.zone; + if (items != null) { + $("#zone_total").text(items.length.toString()); + } + } + }); + + $.ajax({ + data: createURL("command=listPods&available=true"), + dataType: "json", + success: function(json) { + var items = json.listpodsresponse.pod; + if (items != null) { + $("#pod_total").text(items.length.toString()); + } + } + }); + + $.ajax({ + data: createURL("command=listHosts&type=Routing"), + dataType: "json", + async: false, + success: function(json) { + var items = json.listhostsresponse.host; + if (items != null) { + $("#host_total").text(items.length.toString()); + } + } + }); + + $.ajax({ + data: createURL("command=listStoragePools"), + dataType: "json", + async: false, + success: function(json) { + var items = json.liststoragepoolsresponse.storagepool; + if (items != null) { + $("#primarystorage_total").text(items.length.toString()); + } + } + }); } function initUpdateConsoleCertButton($midMenuAddLink2) {