1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-05 05:51:21 +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 }); { 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']) { if (base == 'hosts' && $routeParams['host_name']) {
// Make the host name appear in breadcrumbs // Make the host name appear in breadcrumbs
LoadBreadCrumbs({ path: '/hosts/' + scope['host_id'], title: $routeParams['host_name'] }); LoadBreadCrumbs({ path: '/hosts/' + scope['host_id'], title: $routeParams['host_name'] });

View File

@ -33,7 +33,7 @@ angular.module('InventoryHelper', [ 'RestServices', 'Utilities', 'OrganizationLi
var treeData = var treeData =
[{ [{
data: { data: {
title: inventory_name + ' Inventory' title: inventory_name + ' Inventory Groups'
}, },
attr: { attr: {
type: 'inventory', type: 'inventory',
@ -163,7 +163,6 @@ angular.module('InventoryHelper', [ 'RestServices', 'Utilities', 'OrganizationLi
// Force root node styling changes // Force root node styling changes
$('#inventory-node ins').first().remove(); $('#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 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'); scope.$emit('treeLoaded');
}); });

View File

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

View File

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

View File

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

View File

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