mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 12:27:37 -02:30
Job detail page
Fixed key sorting. Turns out reverse() doesn't sort keys in reverse, it just reverses them. To sort in reverse: sort().reverse(). Ugh. Fixed JS liting issues for dashboard stuff.
This commit is contained in:
@@ -947,7 +947,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
|||||||
newKeys = [],
|
newKeys = [],
|
||||||
plays = JSON.parse(JSON.stringify(scope.jobData.plays)),
|
plays = JSON.parse(JSON.stringify(scope.jobData.plays)),
|
||||||
keys = Object.keys(plays);
|
keys = Object.keys(plays);
|
||||||
keys.reverse();
|
keys.sort().reverse();
|
||||||
for (idx=0; idx < scope.playsMaxRows && idx < keys.length; idx++) {
|
for (idx=0; idx < scope.playsMaxRows && idx < keys.length; idx++) {
|
||||||
newKeys.push(keys[idx]);
|
newKeys.push(keys[idx]);
|
||||||
}
|
}
|
||||||
@@ -973,7 +973,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
|||||||
if (scope.activePlay) {
|
if (scope.activePlay) {
|
||||||
tasks = JSON.parse(JSON.stringify(scope.jobData.plays[scope.activePlay].tasks));
|
tasks = JSON.parse(JSON.stringify(scope.jobData.plays[scope.activePlay].tasks));
|
||||||
keys = Object.keys(tasks);
|
keys = Object.keys(tasks);
|
||||||
keys.reverse();
|
keys.sort().reverse();
|
||||||
newKeys = [];
|
newKeys = [];
|
||||||
for (idx=0; result.length < scope.tasksMaxRows && idx < keys.length; idx++) {
|
for (idx=0; result.length < scope.tasksMaxRows && idx < keys.length; idx++) {
|
||||||
newKeys.push(keys[idx]);
|
newKeys.push(keys[idx]);
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ angular.module('HostGraphWidget', ['RestServices', 'Utilities'])
|
|||||||
|
|
||||||
|
|
||||||
html = "<div class=\"graph-container\">\n";
|
html = "<div class=\"graph-container\">\n";
|
||||||
html +="<div class=\"row\">\n";
|
html +="<div class=\"row\">\n";
|
||||||
html += "<div class=\"h6 col-lg-12 text-center\">Hosts vs License Agreement</div>\n";
|
html += "<div class=\"h6 col-lg-12 text-center\">Hosts vs License Agreement</div>\n";
|
||||||
html += "<div class=\"host-count-graph\"><svg></svg></div>\n";
|
html += "<div class=\"host-count-graph\"><svg></svg></div>\n";
|
||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
|
|
||||||
function makeHostCountGraph(){
|
function makeHostCountGraph(){
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities'])
|
|||||||
html, element;
|
html, element;
|
||||||
|
|
||||||
html = "<div class=\"graph-container\">\n";
|
html = "<div class=\"graph-container\">\n";
|
||||||
html +="<div class=\"row\">\n";
|
html +="<div class=\"row\">\n";
|
||||||
html += "<div class=\"h6 col-lg-12 text-center\">Job Status</div>\n";
|
html += "<div class=\"h6 col-lg-12 text-center\">Job Status</div>\n";
|
||||||
html += "<div class=\"job-status-graph\"><svg></svg></div>\n";
|
html += "<div class=\"job-status-graph\"><svg></svg></div>\n";
|
||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities'])
|
|||||||
element.html(html);
|
element.html(html);
|
||||||
$compile(element)(scope);
|
$compile(element)(scope);
|
||||||
makeJobStatusGraph();
|
makeJobStatusGraph();
|
||||||
scope.$emit('WidgetLoaded');
|
scope.$emit('WidgetLoaded');
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user