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:
Jared Tabor 2014-12-16 13:48:15 -05:00
parent cf5cd3fcdc
commit 956dfedb30
2 changed files with 5 additions and 1 deletions

View File

@ -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'
});
};

View File

@ -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,