mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-14 17:42:24 +01:00
Sockets: new UI flow
-Removes socket display from the main infra. dashboard and onto a separate page. This is due to performance issues with the API calls that query each hypervisor's socket data. -Convert socket display to a list view, for simplicity/consistency.
This commit is contained in:
parent
c090a2df7a
commit
16bb286729
15
ui/index.jsp
15
ui/index.jsp
@ -1110,7 +1110,7 @@
|
||||
view-all-title="<fmt:message key="label.system.vms"/>"
|
||||
view-all-target="systemVms"><fmt:message key="label.view.all"/></span>
|
||||
</li>
|
||||
<li class="block last virtual-routers">
|
||||
<li class="block virtual-routers">
|
||||
<span class="header"><fmt:message key="label.virtual.routers"/></span>
|
||||
<span class="icon"> </span>
|
||||
<span class="overview total" data-item="virtualRouterCount"></span>
|
||||
@ -1118,12 +1118,15 @@
|
||||
view-all-title="<fmt:message key="label.virtual.routers"/>"
|
||||
view-all-target="virtualRouters"><fmt:message key="label.view.all"/></span>
|
||||
</li>
|
||||
<li class="block sockets">
|
||||
<span class="header"><fmt:message key="label.sockets"/></span>
|
||||
<span class="icon"> </span>
|
||||
<span class="overview total" data-item="socketCount"></span>
|
||||
<span class="button view-all sockets"
|
||||
view-all-title="<fmt:message key="label.sockets"/>"
|
||||
view-all-target="sockets"><fmt:message key="label.view.all"/></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="socket-info">
|
||||
<div class="title"><fmt:message key="label.hypervisors"/></div>
|
||||
<ul></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -387,6 +387,7 @@
|
||||
var hypervisors = json.listhypervisorsresponse.hypervisor;
|
||||
|
||||
complete($.extend(data, {
|
||||
socketCount: 0,
|
||||
socketInfo: $(hypervisors).map(function(index, hypervisor) {
|
||||
return {
|
||||
name: hypervisor.name,
|
||||
@ -7131,6 +7132,35 @@
|
||||
}
|
||||
});
|
||||
|
||||
return listView;
|
||||
},
|
||||
|
||||
sockets: function() {
|
||||
var listView = {
|
||||
id: 'sockets',
|
||||
fields: {
|
||||
hypervisor: { label: 'label.hypervisor' },
|
||||
sockets: { label: 'label.sockets' },
|
||||
hosts: { label: 'label.hosts' }
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('listHypervisors'),
|
||||
success: function(json) {
|
||||
args.response.success({
|
||||
data: $(json.listhypervisorsresponse.hypervisor).map(function(index, hypervisor) {
|
||||
return {
|
||||
hypervisor: hypervisor.name,
|
||||
sockets: 0,
|
||||
hosts: 0
|
||||
};
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return listView;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user