\n";
- html += "| " + label + " | \n";
- html += " 0) ? 'failed-column' : 'zero-column';
- html += " text-right\">";
- html += "" + fail + "";
- html += " | \n";
- html += "";
- html += "" + count + "";
- html += " |
\n";
- return html;
- }
-
- html += makeRow({
- label: 'Inventories',
- count: (dashboard.inventories && dashboard.inventories.total_with_inventory_source) ?
- dashboard.inventories.total_with_inventory_source : 0,
- 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'
- });
-
- group_total = 0;
- group_fail = 0;
- if (dashboard.inventory_sources) {
- for (src in dashboard.inventory_sources) {
- group_total += (dashboard.inventory_sources[src].total) ? dashboard.inventory_sources[src].total : 0;
- group_fail += (dashboard.inventory_sources[src].failed) ? dashboard.inventory_sources[src].failed : 0;
- }
- }
-
- html += makeRow({
- label: 'Groups',
- count: group_total,
- fail: group_fail,
- link: '/#/home/groups/?has_external_source=true',
- fail_link: '/#/home/groups/?status=failed'
- });
-
- // Each inventory source
- for (src in dashboard.inventory_sources) {
- if (dashboard.inventory_sources[src].total) {
- html += makeRow({
- label: dashboard.inventory_sources[src].label,
- count: (dashboard.inventory_sources[src].total) ? dashboard.inventory_sources[src].total : 0,
- fail: (dashboard.inventory_sources[src].failed) ? dashboard.inventory_sources[src].failed : 0,
- link: '/#/home/groups/?source=' + src,
- fail_link: '/#/home/groups/?status=failed&source=' + src
- });
- }
- }
-
- html += "