mirror of https://github.com/apache/cloudstack.git
new UI - resources page - add cluster under each pod node in the tree.
This commit is contained in:
parent
85c25acf4b
commit
e43608c02f
|
|
@ -3337,7 +3337,7 @@ a:hover.search_button {
|
|||
}
|
||||
|
||||
.zonetree_secondlevel_selected {
|
||||
width:475px;
|
||||
width:455px;
|
||||
height:25px;
|
||||
float:left;
|
||||
margin:0 0 5px 55px;
|
||||
|
|
@ -3363,6 +3363,24 @@ a:hover.search_button {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
.zonetree_forthlevel {
|
||||
width:345px;
|
||||
height:25px;
|
||||
float:left;
|
||||
margin:0 0 5px 110px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.zonetree_forthlevel_selected {
|
||||
width:345px;
|
||||
height:25px;
|
||||
float:left;
|
||||
margin:0 0 5px 110px;
|
||||
background:#eaf3f5 repeat top left;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.zonetree_closedarrows {
|
||||
width:12px;
|
||||
height:14px;
|
||||
|
|
@ -3417,6 +3435,36 @@ a:hover.search_button {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
.zonetree_clustericon {
|
||||
width:22px;
|
||||
height:18px;
|
||||
float:left;
|
||||
background:url(../images/zone_clustericon.png) no-repeat top left;
|
||||
font-weight:bold;
|
||||
margin:3px 0 0 5px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.zonetree_hosticon {
|
||||
width:22px;
|
||||
height:18px;
|
||||
float:left;
|
||||
background:url(../images/zone_hosticon.png) no-repeat top left;
|
||||
font-weight:bold;
|
||||
margin:3px 0 0 5px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.zonetree_primarystorageicon {
|
||||
width:22px;
|
||||
height:18px;
|
||||
float:left;
|
||||
background:url(../images/zone__primarystorageicon.png) no-repeat top left;
|
||||
font-weight:bold;
|
||||
margin:3px 0 0 5px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.zonetree_links {
|
||||
width:auto;
|
||||
height:auto;
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
|
|
@ -315,8 +315,12 @@
|
|||
<p>Pod:<div class="zonetree_links" id="pod_name">Name of the Pod</div></p>
|
||||
</div>
|
||||
<div id="pod_content">
|
||||
<!--
|
||||
<div id="directip_ranges_container">
|
||||
</div>
|
||||
-->
|
||||
<div id="clusters_container">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -333,3 +337,49 @@
|
|||
</div>
|
||||
<!-- SystemVM Template (end) -->
|
||||
|
||||
<!-- Cluster Template (begin) -->
|
||||
<div id="cluster_template" style="display:none">
|
||||
<div class="adding_loading" style="height:25px;display:none" id="loading_container">
|
||||
<div class="adding_animation"></div>
|
||||
<div class="adding_text">Adding a cluster … </div>
|
||||
</div>
|
||||
<div id="row_container">
|
||||
<div class="zonetree_thirdlevel">
|
||||
<div class="zonetree_clustericon"></div>
|
||||
<p>Cluster:<div class="zonetree_links" id="cluster_name">(Name of the Cluster)</div></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Cluster Template (end) -->
|
||||
|
||||
<!-- Host Template (begin) -->
|
||||
<div id="host_template" style="display:none">
|
||||
<div class="adding_loading" style="height:25px;display:none" id="loading_container">
|
||||
<div class="adding_animation"></div>
|
||||
<div class="adding_text">Adding a host … </div>
|
||||
</div>
|
||||
<div id="row_container">
|
||||
<div class="zonetree_forthlevel">
|
||||
<div class="zonetree_hosticon"></div>
|
||||
<p>Host:<div class="zonetree_links" id="host_name">(Name of the Host)</div></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Host Template (end) -->
|
||||
|
||||
<!-- Primary Storage Template (begin) -->
|
||||
<div id="primary_storage_template" style="display:none">
|
||||
<div class="adding_loading" style="height:25px;display:none" id="loading_container">
|
||||
<div class="adding_animation"></div>
|
||||
<div class="adding_text">Adding a primary storage … </div>
|
||||
</div>
|
||||
<div id="row_container">
|
||||
<div class="zonetree_forthlevel">
|
||||
<div class="zonetree_primarystorageicon"></div>
|
||||
<p>Primary Storage:<div class="zonetree_links" id="primary_storage_name">(Name of the Primary Storage)</div></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Primary Storage Template (end) -->
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ function afterLoadResourceJSP() {
|
|||
var forceLogout = true; // We force a logout only if the user has first added a POD for the very first time
|
||||
$("#midmenu_container").append($("#zonetree").clone().attr("id", "zonetree1").show());
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listZones&available=true&response=json"+maxPageSize),
|
||||
$.ajax({
|
||||
data: createURL("command=listZones&available=true"+maxPageSize),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var items = json.listzonesresponse.zone;
|
||||
|
|
@ -42,7 +42,7 @@ function afterLoadResourceJSP() {
|
|||
template.find("#zone_name").data("vlan", json.vlan);
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listPods&zoneid="+zoneid+"&response=json"),
|
||||
data: createURL("command=listPods&zoneid="+zoneid+maxPageSize),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var items = json.listpodsresponse.pod;
|
||||
|
|
@ -59,7 +59,7 @@ function afterLoadResourceJSP() {
|
|||
});
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listSystemVms&zoneid="+zoneid+"&response=json"),
|
||||
data: createURL("command=listSystemVms&zoneid="+zoneid+maxPageSize),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var items = json.listsystemvmsresponse.systemvm;
|
||||
|
|
@ -74,18 +74,7 @@ function afterLoadResourceJSP() {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getIpRange(startip, endip) {
|
||||
var ipRange = "";
|
||||
if (startip != null && startip.length > 0) {
|
||||
ipRange = startip;
|
||||
}
|
||||
if (endip != null && endip.length > 0) {
|
||||
ipRange = ipRange + "-" + endip;
|
||||
}
|
||||
return ipRange;
|
||||
}
|
||||
|
||||
|
||||
function podJSONToTemplate(json, template) {
|
||||
var ipRange = getIpRange(json.startip, json.endip);
|
||||
template.data("id", json.id).data("name", json.name);
|
||||
|
|
@ -98,9 +87,25 @@ function afterLoadResourceJSP() {
|
|||
podName.data("startip", json.startip);
|
||||
podName.data("endip", json.endip);
|
||||
podName.data("ipRange", ipRange);
|
||||
podName.data("gateway", json.gateway);
|
||||
podName.data("gateway", json.gateway);
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listClusters&podid="+json.id+maxPageSize),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var items = json.listclustersresponse.cluster;
|
||||
var container = template.find("#clusters_container").empty();
|
||||
if (items != null && items.length > 0) {
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
var clusterTemplate = $("#cluster_template").clone(true).attr("id", "cluster_"+items[i].id);
|
||||
clusterJSONToTemplate(items[i], clusterTemplate);
|
||||
container.append(clusterTemplate.show());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function systemvmJSONToTemplate(json, template) {
|
||||
template.data("id", json.id).data("name", json.name);
|
||||
|
||||
|
|
@ -115,6 +120,12 @@ function afterLoadResourceJSP() {
|
|||
systeymvmName.data("gateway", json.gateway);
|
||||
systeymvmName.data("created", json.created);
|
||||
systeymvmName.data("state", json.state);
|
||||
}
|
||||
|
||||
function clusterJSONToTemplate(json, template) {
|
||||
template.data("id", json.id).data("name", fromdb(json.name));
|
||||
|
||||
var systeymvmName = template.find("#cluster_name").text(fromdb(json.name));
|
||||
}
|
||||
|
||||
$("#zone_template").bind("click", function(event) {
|
||||
|
|
@ -159,6 +170,17 @@ function afterLoadResourceJSP() {
|
|||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
function getIpRange(startip, endip) {
|
||||
var ipRange = "";
|
||||
if (startip != null && startip.length > 0) {
|
||||
ipRange = startip;
|
||||
}
|
||||
if (endip != null && endip.length > 0) {
|
||||
ipRange = ipRange + "-" + endip;
|
||||
}
|
||||
return ipRange;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue