Changed inventory sycn inventory adn groups total count to look for new fields. Same with sycn status projects total.

This commit is contained in:
Chris Houseknecht 2013-11-21 19:40:49 +00:00
parent ba645f947e
commit fb446ef040
2 changed files with 8 additions and 3 deletions

View File

@ -49,14 +49,15 @@ angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities'])
}
html += makeRow({ label: 'Inventories',
count: [(dashboard.inventories && dashboard.inventories.total) ? dashboard.inventories.total : 0],
count: [(dashboard.inventories && dashboard.inventories.total_with_inventory_source) ?
dashboard.inventories.total_with_inventory_source : '?'],
fail: [(dashboard.inventories && dashboard.inventories.inventory_failed) ? dashboard.inventories.inventory_failed : 0],
link: '/#/inventories/?has_inventory_sources=true',
fail_link: '/#/inventories/?inventory_sources_with_failures=true'
});
html += makeRow({ label: 'Groups',
count: [(dashboard.groups && dashboard.groups.total) ? dashboard.groups.total : 0],
count: [(dashboard.groups && dashboard.groups.total_with_inventory_source) ? dashboard.groups.total_with_inventory_source : '?'],
fail: [(dashboard.groups && dashboard.groups.inventory_failed) ? dashboard.groups.inventory_failed : 0],
link: '/#/home/groups/?has_external_source=true',
fail_link: '/#/home/groups/?status=failed'

View File

@ -47,9 +47,13 @@ angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities'])
return html;
}
var tot = 0;
for (var type in dashboard.scm_types) {
tot += dashboard.scm_types[type].total;
}
html += makeRow({ label: 'Projects',
link: '/#/projects',
count: [(dashboard.projects && dashboard.projects.total) ? dashboard.projects.total : 0],
count: tot,
fail: [(dashboard.projects && dashboard.projects.failed) ? dashboard.projects.failed : 0],
fail_link: '/#/projects/?status=failed'
});