mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Job detail page refactoration
Changed event viewer fields to match the order of field defined in event viewer form.
This commit is contained in:
parent
238c7093ed
commit
5b285aced9
@ -45,6 +45,10 @@ angular.module('EventsViewerFormDefinition', [])
|
||||
label: 'Arguments',
|
||||
section: 'Event'
|
||||
},
|
||||
item: {
|
||||
label: 'Item',
|
||||
section: 'Event'
|
||||
},
|
||||
rc: {
|
||||
label: 'Return Code',
|
||||
section: 'Results'
|
||||
|
||||
@ -196,14 +196,19 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
|
||||
html = '', e;
|
||||
|
||||
function parseJSON(obj) {
|
||||
var html = '', keys, found = false;
|
||||
var html = '', key, keys, found = false;
|
||||
if (typeof obj === "object") {
|
||||
html += "<table class=\"table eventviewer-status\">\n";
|
||||
html += "<tbody>\n";
|
||||
keys = Object.keys(obj).sort();
|
||||
keys = [];
|
||||
for (key in EventsViewerForm.fields) {
|
||||
if (EventsViewerForm.fields[key].section === section) {
|
||||
keys.push(key);
|
||||
}
|
||||
}
|
||||
keys.forEach(function(key) {
|
||||
var label;
|
||||
if (EventsViewerForm.fields[key] && EventsViewerForm.fields[key].section === section) {
|
||||
//if (EventsViewerForm.fields[key] && EventsViewerForm.fields[key].section === section) {
|
||||
label = EventsViewerForm.fields[key].label;
|
||||
if (Empty(obj[key])) {
|
||||
// exclude empty items
|
||||
@ -249,7 +254,7 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
|
||||
found = true;
|
||||
html += "<tr><td class=\"key\">" + label + ":</td><td class=\"nested-table\">\n" + parseJSON(obj[key]) + "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
//}
|
||||
});
|
||||
html += "</tbody>\n";
|
||||
html += "</table>\n";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user