mirror of https://github.com/apache/cloudstack.git
resource page - add cluster total number.
This commit is contained in:
parent
dfecc1f448
commit
10fb37d90d
|
|
@ -53,6 +53,22 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dbrow odd" style="margin-top:10px; border:1px solid #CCC;">
|
||||
<div class="dbrow_cell" style="width: 64%; border: none; ">
|
||||
<div class="resource_titlebox">
|
||||
<h2><span> # of </span> Clusters</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dbrow_cell" style="width: 25%; border: none; background:#cacaca repeat top left; ">
|
||||
<div class="resources_totalbg">
|
||||
<p id="cluster_total">0</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dbrow_cell" style="width: 10%; border: none;">
|
||||
<div id="add_pod_shortcut" class="resadd_button" title="Add Cluster"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dbrow even" style="margin-top:10px; border:1px solid #CCC;">
|
||||
<div class="dbrow_cell" style="width: 64%; border: none;">
|
||||
<div class="resource_titlebox">
|
||||
|
|
|
|||
|
|
@ -883,6 +883,17 @@ function resourceCountTotal() {
|
|||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listClusters"),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var items = json.listclustersresponse.cluster;
|
||||
if (items != null) {
|
||||
$("#cluster_total").text(items.length.toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listHosts&type=Routing"),
|
||||
dataType: "json",
|
||||
|
|
|
|||
Loading…
Reference in New Issue