From fb446ef04095c2b69c689d3a2817930b8aa76556 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Thu, 21 Nov 2013 19:40:49 +0000 Subject: [PATCH] Changed inventory sycn inventory adn groups total count to look for new fields. Same with sycn status projects total. --- awx/ui/static/js/widgets/InventorySyncStatus.js | 5 +++-- awx/ui/static/js/widgets/SCMSyncStatus.js | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/awx/ui/static/js/widgets/InventorySyncStatus.js b/awx/ui/static/js/widgets/InventorySyncStatus.js index 5dcbf99bca..7c7c80e6a3 100644 --- a/awx/ui/static/js/widgets/InventorySyncStatus.js +++ b/awx/ui/static/js/widgets/InventorySyncStatus.js @@ -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' diff --git a/awx/ui/static/js/widgets/SCMSyncStatus.js b/awx/ui/static/js/widgets/SCMSyncStatus.js index 81506279c2..347114a824 100644 --- a/awx/ui/static/js/widgets/SCMSyncStatus.js +++ b/awx/ui/static/js/widgets/SCMSyncStatus.js @@ -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' });