From a7c0c362c3d0cdb54f0f984cd636adaf9807eb9b Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Fri, 11 Jul 2014 14:05:07 -0400 Subject: [PATCH] Dashboard Renabled the breadcrumb option on list-generator. To have breadcrumbs automagically appear on a page pass breadCrumbs:true. --- awx/ui/static/js/controllers/Home.js | 4 ++-- awx/ui/static/js/widgets/DashboardCounts.js | 6 +++--- awx/ui/static/lib/ansible/list-generator.js | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index 5c84e22e42..b8b2138986 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -160,7 +160,7 @@ function HomeGroups($log, $scope, $filter, $compile, $location, $routeParams, Lo opt, PreviousSearchParams, io; - generator.inject(list, { mode: 'edit', scope: scope }); + generator.inject(list, { mode: 'edit', scope: scope, breadCrumbs: true }); function ellipsis(a) { if (a.length > 20) { @@ -601,7 +601,7 @@ function HomeHosts($scope, $location, $routeParams, HomeHostList, GenerateList, }); } - generator.inject(list, { mode: 'edit', scope: $scope }); + generator.inject(list, { mode: 'edit', scope: $scope, breadCrumbs: true }); }); diff --git a/awx/ui/static/js/widgets/DashboardCounts.js b/awx/ui/static/js/widgets/DashboardCounts.js index 80476ddae7..e600ddd74f 100644 --- a/awx/ui/static/js/widgets/DashboardCounts.js +++ b/awx/ui/static/js/widgets/DashboardCounts.js @@ -48,7 +48,7 @@ angular.module('DashboardCountsWidget', ['RestServices', 'Utilities']) html = "
\n"; html += "\n"; - html += "\n"; + html += "\n"; html += "\n"; html += "\n"; html += "\n"; @@ -116,13 +116,13 @@ angular.module('DashboardCountsWidget', ['RestServices', 'Utilities']) element.html(html); $compile(element)(scope); if(dashboard.hosts.failed>0 ){ - $('#failed-hosts').html(""+dashboard.hosts.failed+""); + $('#failed-hosts').html(""+dashboard.hosts.failed+""); } if(dashboard.inventories.inventory_failed>0 ){ $('#failed-inventories').html(""+dashboard.inventories.inventory_failed+""); } if(dashboard.projects.failed>0 ){ - $('#failed-projects').html(""+dashboard.projects.failed+""); + $('#failed-projects').html(""+dashboard.projects.failed+""); } scope.$emit('WidgetLoaded'); diff --git a/awx/ui/static/lib/ansible/list-generator.js b/awx/ui/static/lib/ansible/list-generator.js index 0795fcb35b..8f5d86fa71 100644 --- a/awx/ui/static/lib/ansible/list-generator.js +++ b/awx/ui/static/lib/ansible/list-generator.js @@ -11,9 +11,9 @@ angular.module('ListGenerator', ['GeneratorHelpers']) .factory('GenerateList', ['$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon', - 'Column', 'DropDown', 'NavigationLink', 'Button', 'SelectIcon', + 'Column', 'DropDown', 'NavigationLink', 'Button', 'SelectIcon', 'Breadcrumbs', function ($location, $compile, $rootScope, SearchWidget, PaginateWidget, Attr, Icon, Column, DropDown, NavigationLink, - Button, SelectIcon) { + Button, SelectIcon, Breadcrumbs) { return { setList: function (list) { @@ -146,12 +146,12 @@ angular.module('ListGenerator', ['GeneratorHelpers']) html += "\n\n
\n"; } //else if (options.mode !== 'lookup' && (options.breadCrumbs === undefined || options.breadCrumbs)) { - //Breadcrumbs - // html += Breadcrumbs({ - // list: list, - // mode: options.mode - // }); - //} + else if (options.breadCrumbs) { + html += Breadcrumbs({ + list: list, + mode: options.mode + }); + } if (options.mode === 'edit' && list.editInstructions) { html += "
\n";