1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 18:21:12 +03:00

Fixed broken things on Jobs-> Summary page.

This commit is contained in:
chouseknecht 2013-10-07 15:11:54 -04:00
parent 0604718953
commit 2c69041b2b
6 changed files with 32 additions and 8 deletions

View File

@ -87,6 +87,11 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
{ hdr: 'Error!', msg: 'Failed to get job status for job: ' + scope.job_id + '. GET status: ' + status });
});
}
else {
if ($routeParams['inventory']) {
scope.$emit('setHostLink', $routeParams['inventory']);
}
}
if (base == 'hosts' && $routeParams['host_name']) {
// Make the host name appear in breadcrumbs
LoadBreadCrumbs({ path: '/hosts/' + scope['host_id'], title: $routeParams['host_name'] });

View File

@ -33,7 +33,7 @@ angular.module('InventoryHelper', [ 'RestServices', 'Utilities', 'OrganizationLi
var treeData =
[{
data: {
title: inventory_name + ' Inventory'
title: inventory_name + ' Inventory Groups'
},
attr: {
type: 'inventory',
@ -163,7 +163,6 @@ angular.module('InventoryHelper', [ 'RestServices', 'Utilities', 'OrganizationLi
// Force root node styling changes
$('#inventory-node ins').first().remove();
$('#inventory-node a ins').first().css('background-image', 'none').append('<i class="icon-sitemap"></i>').css('margin-right','10px');
$('#inventory-node a').first().css('margin-bottom', '10px');
scope.$emit('treeLoaded');
});

View File

@ -61,6 +61,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
scope[iterator + 'SearchValue'] = '';
scope[iterator + 'SelectShow'] = false; // show/hide the Select
scope[iterator + 'HideSearchType'] = false;
scope[iterator + 'InputDisable'] = false;
var f = scope[iterator + 'SearchField']
if (list.fields[f].searchType && ( list.fields[f].searchType == 'boolean'
@ -87,7 +88,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
scope[iterator + 'SearchType'] = 'icontains';
if (list.fields[fld].searchType && list.fields[fld].searchType == 'gtzero') {
scope[iterator + "InputHide"] = true;
scope[iterator + "InputDisable"] = true;
}
else if (list.fields[fld].searchSingleValue){
// Query a specific attribute for one specific value

View File

@ -67,6 +67,14 @@ angular.module('JobHostDefinition', [])
searchType: 'boolean',
searchOptions: [{ name: "success", value: 0 }, { name: "error", value: 1 }]
},
failed: {
label: 'Job failed?',
searchSingleValue: true,
searchType: 'boolean',
searchValue: 'true',
searchOnly: true,
nosort: true
},
ok: {
label: 'Success',
searchable: false
@ -77,11 +85,15 @@ angular.module('JobHostDefinition', [])
},
failures: {
label: 'Failure',
searchable: true,
searchLabel: 'Contains failed events?',
searchType: 'gtzero'
},
dark: {
label: 'Unreachable',
searchable: false
searchable: true,
searchType: 'gtzero',
searchLabel: 'Contains unreachable hosts?'
},
skipped: {
label: 'Skipped',

View File

@ -694,8 +694,8 @@ select.field-mini-height {
}
.badge {
padding: 3px 4px;
font-size: 11px;
padding: 2px 3px 3px 4px;
font-size: 10px;
font-weight: normal;
line-height: 1;
}

View File

@ -507,8 +507,15 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
for ( var fld in form.fields) {
if (form.fields[fld].searchable == undefined || form.fields[fld].searchable == true) {
html += "<li><a href=\"\" ng-click=\"setSearchField('" + iterator + "','";
html += fld + "','" + form.fields[fld].label.replace(/\<br\>/g,' ') + "')\">"
+ form.fields[fld].label.replace(/\<br\>/g,' ') + "</a></li>\n";
html += fld + "','";
if (form.fields[fld].searchLabel) {
html += form.fields[fld].searchLabel + "')\">" +
form.fields[fld].searchLabel + "</a></li>\n";
}
else {
html += form.fields[fld].label.replace(/\<br\>/g,' ') + "')\">" +
form.fields[fld].label.replace(/\<br\>/g,' ') + "</a></li>\n";
}
}
}
html += "</ul>\n";