File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 71257125 var listView = {
71267126 id: 'sockets',
71277127 fields: {
7128- hypervisor: { label: 'label.hypervisor' },
7129- sockets : { label: 'label.sockets ' },
7130- hosts : { label: 'label.hosts ' }
7128+ hypervisor: { label: 'label.hypervisor' },
7129+ hosts : { label: 'label.hosts ' },
7130+ sockets : { label: 'label.sockets ' }
71317131 },
71327132 dataProvider: function(args) {
71337133 $.ajax({
71347134 url: createURL('listHypervisors'),
71357135 success: function(json) {
71367136 args.response.success({
7137- data: $(json.listhypervisorsresponse.hypervisor).map(function(index, hypervisor) {
7137+ data: $(json.listhypervisorsresponse.hypervisor).map(function(index, hypervisor) {
7138+ var hostCount;
7139+ $.ajax({
7140+ url: createURL('listHosts'),
7141+ async: false,
7142+ data: {
7143+ hypervisortype: hypervisor.name
7144+ },
7145+ success: function(json) {
7146+ hostCount = json.listhostsresponse.count;
7147+ }
7148+ });
7149+
71387150 return {
71397151 hypervisor: hypervisor.name,
7140- sockets: 0 ,
7141- hosts : 0
7152+ hosts: hostCount ,
7153+ sockets : 0
71427154 };
71437155 })
71447156 });
You can’t perform that action at this time.
0 commit comments