mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Event viewer
Fixed issue that occurred while launching event viewer from host event viewer. For a given host event on the host event viewer dialog, click the status link. The event viewer dialog failed to appear if there was only a single event.
This commit is contained in:
parent
69dc0a10ca
commit
a2ddeb1f22
@ -155,14 +155,20 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
|
||||
scope.removeEventReady = scope.$on('EventReady', function(e, data) {
|
||||
var btns;
|
||||
scope.events = data;
|
||||
// find and show the selected event
|
||||
data.every(function(row, idx) {
|
||||
if (parseInt(row.id,10) === parseInt(event_id,10)) {
|
||||
current_event = idx;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
if (event_id) {
|
||||
// find and show the selected event
|
||||
data.every(function(row, idx) {
|
||||
if (parseInt(row.id,10) === parseInt(event_id,10)) {
|
||||
current_event = idx;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
else {
|
||||
current_event = 0;
|
||||
}
|
||||
showEvent(current_event);
|
||||
|
||||
btns = [];
|
||||
@ -248,8 +254,11 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
|
||||
});
|
||||
});
|
||||
|
||||
url += (/\/$/.test(url)) ? '?' : '&';
|
||||
url += (parent_id) ? 'parent=' + parent_id + '&page_size=50&order_by=id' : 'page_size=50&order_by=id';
|
||||
|
||||
GetEvent({
|
||||
url: url + '?parent=' + parent_id + '&page_size=50&order_by=id',
|
||||
url: url,
|
||||
scope: scope
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user