mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Job detail page refactor
Fixed host result sort order
This commit is contained in:
@@ -926,19 +926,16 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
|||||||
if (scope.activePlay && scope.activeTask) {
|
if (scope.activePlay && scope.activeTask) {
|
||||||
hostResults = JSON.parse(JSON.stringify(scope.jobData.plays[scope.activePlay].tasks[scope.activeTask].hostResults));
|
hostResults = JSON.parse(JSON.stringify(scope.jobData.plays[scope.activePlay].tasks[scope.activeTask].hostResults));
|
||||||
keys = Object.keys(hostResults);
|
keys = Object.keys(hostResults);
|
||||||
|
keys.sort(function(a,b) {
|
||||||
/*keys.sort(function(a,b) {
|
|
||||||
if (hostResults[a].name > hostResults[b].name)
|
if (hostResults[a].name > hostResults[b].name)
|
||||||
return 1;
|
|
||||||
if (hostResults[a].name < hostResults[b].name)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
if (hostResults[a].name < hostResults[b].name)
|
||||||
|
return 1;
|
||||||
// a must be equal to b
|
// a must be equal to b
|
||||||
return 0;
|
return 0;
|
||||||
});*/
|
});
|
||||||
keys.reverse();
|
|
||||||
|
|
||||||
while (idx < keys.length && idx < scope.hostResultsMaxRows) {
|
while (idx < keys.length && idx < scope.hostResultsMaxRows) {
|
||||||
result.push(hostResults[keys[idx]]);
|
result.unshift(hostResults[keys[idx]]);
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
angular.module('ListGenerator', ['GeneratorHelpers'])
|
angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||||
.factory('GenerateList', ['$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon',
|
.factory('GenerateList', ['$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon',
|
||||||
'Column', 'DropDown', 'NavigationLink', 'Button', 'SelectIcon', 'Breadcrumbs',
|
'Column', 'DropDown', 'NavigationLink', 'Button', 'SelectIcon',
|
||||||
function ($location, $compile, $rootScope, SearchWidget, PaginateWidget, Attr, Icon, Column, DropDown, NavigationLink,
|
function ($location, $compile, $rootScope, SearchWidget, PaginateWidget, Attr, Icon, Column, DropDown, NavigationLink,
|
||||||
Button, SelectIcon, Breadcrumbs) {
|
Button, SelectIcon) {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
setList: function (list) {
|
setList: function (list) {
|
||||||
|
|||||||
Reference in New Issue
Block a user