mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -03:30
Job detail job events
The job events modal was not being loaded because the data call to the API was not specifying which page of data to request.
This commit is contained in:
@@ -1004,6 +1004,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
|
||||
url: scope.job.related.job_events,
|
||||
parent_id: scope.selectedTask,
|
||||
event_id: id,
|
||||
index: this.$index,
|
||||
title: 'Host Event'
|
||||
});
|
||||
};
|
||||
|
||||
@@ -22,6 +22,8 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
|
||||
parent_id = params.parent_id,
|
||||
title = params.title, //optional
|
||||
scope = parent_scope.$new(true),
|
||||
index = params.index,
|
||||
page,
|
||||
current_event;
|
||||
|
||||
if (scope.removeShowNextEvent) {
|
||||
@@ -257,8 +259,9 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
|
||||
});
|
||||
});
|
||||
|
||||
page = (index) ? Math.ceil((index+1)/50) : 1;
|
||||
url += (/\/$/.test(url)) ? '?' : '&';
|
||||
url += (parent_id) ? 'parent=' + parent_id + '&page_size=50&order=host_name,counter' : 'page_size=50&order=host_name,counter';
|
||||
url += (parent_id) ? 'page='+page +'&parent=' + parent_id + '&page_size=50&order=host_name,counter' : 'page_size=50&order=host_name,counter';
|
||||
|
||||
GetEvent({
|
||||
url: url,
|
||||
|
||||
Reference in New Issue
Block a user