mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
Dashboard
Renabled the breadcrumb option on list-generator. To have breadcrumbs automagically appear on a page pass breadCrumbs:true.
This commit is contained in:
parent
6528a91860
commit
a7c0c362c3
@ -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 });
|
||||
|
||||
});
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ angular.module('DashboardCountsWidget', ['RestServices', 'Utilities'])
|
||||
|
||||
html = "<div id=\"count-container\" class=\"count-container row\">\n";
|
||||
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/home/hosts>" + dashboard.hosts.total+"</a><br><h6>Hosts</h6></div>\n";
|
||||
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/home/hosts id=\"failed-hosts\">"+dashboard.hosts.failed+"</a><br><h6>Failed Hosts</h6></div>\n";
|
||||
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=\"/#/home/hosts/?has_active_failures=true\" id=\"failed-hosts\">"+dashboard.hosts.failed+"</a><br><h6>Failed Hosts</h6></div>\n";
|
||||
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/inventories>"+dashboard.inventories.total+"</a><br><h6>Inventories</h6></div>\n";
|
||||
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/inventories/?inventory_sources_with_failures id=\"failed-inventories\">"+dashboard.inventories.inventory_failed+"</a><br><h6>Inventory Sync Failures</h6></div>\n";
|
||||
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/projects>"+dashboard.projects.total+"</a><br><h6>Projects</h6></div>\n";
|
||||
@ -116,13 +116,13 @@ angular.module('DashboardCountsWidget', ['RestServices', 'Utilities'])
|
||||
element.html(html);
|
||||
$compile(element)(scope);
|
||||
if(dashboard.hosts.failed>0 ){
|
||||
$('#failed-hosts').html("<a style=\"color:#aa0000\" href=/#/home/hosts id=\"failed-hosts\">"+dashboard.hosts.failed+"</a>");
|
||||
$('#failed-hosts').html("<a style=\"color:#aa0000\" href=\"/#/home/hosts/?has_active_failures=true\" id=\"failed-hosts\">"+dashboard.hosts.failed+"</a>");
|
||||
}
|
||||
if(dashboard.inventories.inventory_failed>0 ){
|
||||
$('#failed-inventories').html("<a style=\"color:#aa0000\" href=/#/inventories/?inventory_sources_with_failures id=\"failed-inventories\">"+dashboard.inventories.inventory_failed+"</a>");
|
||||
}
|
||||
if(dashboard.projects.failed>0 ){
|
||||
$('#failed-projects').html("<a style=\"color:#aa0000\" href=/#/projects id=\"failed-projects\">"+dashboard.projects.failed+"</a>");
|
||||
$('#failed-projects').html("<a style=\"color:#aa0000\" href=\"/#/projects/?status=failed\" id=\"failed-projects\">"+dashboard.projects.failed+"</a>");
|
||||
}
|
||||
scope.$emit('WidgetLoaded');
|
||||
|
||||
|
||||
@ -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 += "</li>\n</ul>\n</div>\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 += "<div class=\"alert alert-info alert-block\">\n";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user