mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 22:46:01 -03:30
AC-525 Found and fixed inconsistencies and bugs in links from Inventories->Hosts to Jobs. Changed Job->Hosts to Job->Summaries so that it works or is consistent with Host->All summaries title. When viewing Host->All summaries disable the breadcrumb drop-down menu. Made breadcrumbs work after browser refresh.
This commit is contained in:
@@ -109,10 +109,10 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
return html;
|
||||
}
|
||||
|
||||
if (scope.RemovePostRefresh) {
|
||||
scope.RemovePostRefresh();
|
||||
if (scope.PostRefreshRemove) {
|
||||
scope.PostRefreshRemove();
|
||||
}
|
||||
scope.RemovePostRefresh = scope.$on('PostRefresh', function() {
|
||||
scope.PostRefreshRemove = scope.$on('PostRefresh', function() {
|
||||
// Initialize the parent levels
|
||||
var set = scope[list.name];
|
||||
var cDate;
|
||||
@@ -189,8 +189,9 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
}
|
||||
|
||||
scope.refresh = function() {
|
||||
scope.expand = true;
|
||||
scope.search(list.iterator);
|
||||
scope['jobSearchSpin'] = true;
|
||||
scope['jobLoading'] = true;
|
||||
Refresh({ scope: scope, set: 'jobevents', iterator: 'jobevent', url: scope['current_url'] });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobHostList,
|
||||
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||
ClearScope, ProcessErrors, GetBasePath)
|
||||
ClearScope, ProcessErrors, GetBasePath, Refresh)
|
||||
{
|
||||
ClearScope('htmlTemplate');
|
||||
var list = JobHostList;
|
||||
@@ -31,7 +31,7 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
|
||||
var scope = view.inject(list, { mode: 'edit' });
|
||||
|
||||
scope.selected = [];
|
||||
|
||||
|
||||
// control enable/disable/show of job specific view elements
|
||||
if (base == 'hosts') {
|
||||
scope.job_id = null;
|
||||
@@ -41,7 +41,7 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
|
||||
scope.job_id = $routeParams.id;
|
||||
scope.host_id = null;
|
||||
}
|
||||
|
||||
|
||||
// After a refresh, populate any needed summary field values on each row
|
||||
if (scope.PostRefreshRemove) {
|
||||
scope.PostRefreshRemove();
|
||||
@@ -51,7 +51,7 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
|
||||
scope.jobhosts[i].host_name = scope.jobhosts[i].summary_fields.host.name;
|
||||
scope.jobhosts[i].status = (scope.jobhosts[i].failed) ? 'error' : 'success';
|
||||
}
|
||||
if (scope.host_id == null) {
|
||||
if (scope.job_id !== null && scope.job_id !== undefined && scope.job_id !== '') {
|
||||
// need job_status so we can show/hide refresh button
|
||||
Rest.setUrl(GetBasePath('jobs') + scope.job_id);
|
||||
Rest.get()
|
||||
@@ -81,7 +81,6 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
|
||||
}
|
||||
|
||||
scope.search(list.iterator);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
scope.showEvents = function(host_name, last_job) {
|
||||
@@ -103,12 +102,16 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
|
||||
}
|
||||
|
||||
scope.refresh = function() {
|
||||
scope.search(list.iterator);
|
||||
if (scope.host_id == null) {
|
||||
scope['jobSearchSpin'] = true;
|
||||
scope['jobLoading'] = true;
|
||||
Refresh({ scope: scope, set: 'jobhosts', iterator: 'jobhost', url: scope['current_url'] });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
JobHostSummaryList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobHostList',
|
||||
'GenerateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||
'ProcessErrors','GetBasePath'
|
||||
'ProcessErrors', 'GetBasePath', 'Refresh'
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user