Skip to content

Commit 16bb286

Browse files
committed
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.
1 parent c090a2d commit 16bb286

2 files changed

Lines changed: 39 additions & 6 deletions

File tree

‎ui/index.jsp‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,20 +1110,23 @@
11101110
view-all-title="<fmt:message key="label.system.vms"/>"
11111111
view-all-target="systemVms"><fmt:message key="label.view.all"/></span>
11121112
</li>
1113-
<li class="block last virtual-routers">
1113+
<li class="block virtual-routers">
11141114
<span class="header"><fmt:message key="label.virtual.routers"/></span>
11151115
<span class="icon">&nbsp;</span>
11161116
<span class="overview total" data-item="virtualRouterCount"></span>
11171117
<span class="button view-all hosts"
11181118
view-all-title="<fmt:message key="label.virtual.routers"/>"
11191119
view-all-target="virtualRouters"><fmt:message key="label.view.all"/></span>
11201120
</li>
1121+
<li class="block sockets">
1122+
<span class="header"><fmt:message key="label.sockets"/></span>
1123+
<span class="icon">&nbsp;</span>
1124+
<span class="overview total" data-item="socketCount"></span>
1125+
<span class="button view-all sockets"
1126+
view-all-title="<fmt:message key="label.sockets"/>"
1127+
view-all-target="sockets"><fmt:message key="label.view.all"/></span>
1128+
</li>
11211129
</ul>
1122-
1123-
<div class="socket-info">
1124-
<div class="title"><fmt:message key="label.hypervisors"/></div>
1125-
<ul></ul>
1126-
</div>
11271130
</div>
11281131
</div>
11291132

‎ui/scripts/system.js‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@
387387
var hypervisors = json.listhypervisorsresponse.hypervisor;
388388

389389
complete($.extend(data, {
390+
socketCount: 0,
390391
socketInfo: $(hypervisors).map(function(index, hypervisor) {
391392
return {
392393
name: hypervisor.name,
@@ -7131,6 +7132,35 @@
71317132
}
71327133
});
71337134

7135+
return listView;
7136+
},
7137+
7138+
sockets: function() {
7139+
var listView = {
7140+
id: 'sockets',
7141+
fields: {
7142+
hypervisor: { label: 'label.hypervisor' },
7143+
sockets: { label: 'label.sockets' },
7144+
hosts: { label: 'label.hosts' }
7145+
},
7146+
dataProvider: function(args) {
7147+
$.ajax({
7148+
url: createURL('listHypervisors'),
7149+
success: function(json) {
7150+
args.response.success({
7151+
data: $(json.listhypervisorsresponse.hypervisor).map(function(index, hypervisor) {
7152+
return {
7153+
hypervisor: hypervisor.name,
7154+
sockets: 0,
7155+
hosts: 0
7156+
};
7157+
})
7158+
});
7159+
}
7160+
});
7161+
}
7162+
};
7163+
71347164
return listView;
71357165
}
71367166
}

0 commit comments

Comments
 (0)