1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Job detail page

When UpdateDOM is enabled, the CPU melts. Experimenting with ways to updated the DOM without it being sucha drain.
This commit is contained in:
Chris Houseknecht 2014-06-19 23:04:04 -04:00
parent 0f435eb42c
commit 346595854c
2 changed files with 12 additions and 8 deletions

View File

@ -25,10 +25,10 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log,
scope.tasks = [];
scope.hostResults = [];
scope.hostResultsMaxRows = 75;
scope.hostSummariesMaxRows = 75;
scope.tasksMaxRows = 75;
scope.playsMaxRows = 75;
scope.hostResultsMaxRows = 25;
scope.hostSummariesMaxRows = 25;
scope.tasksMaxRows = 25;
scope.playsMaxRows = 25;
scope.search_all_tasks = [];
scope.search_all_plays = [];

View File

@ -960,6 +960,10 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
keys;
if (scope.activePlay) {
keys = Object.keys(scope.jobData.plays[scope.activePlay].tasks);
keys.reverse();
if (keys.length > scope.tasksMaxRows + 1) {
keys.splice(0, keys.length - (scope.taskMaxRows + 1));
}
keys.sort();
while (idx < keys.length && idx < scope.tasksMaxRows) {
result.push(scope.jobData.plays[scope.activePlay].tasks[keys[idx]]);
@ -1006,11 +1010,11 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
DrawPlays({ scope: scope });
DrawTasks({ scope: scope });
DrawHostResults({ scope: scope });
// DrawHostResults({ scope: scope });
if (scope.host_summary.total > 0) {
DrawGraph({ scope: scope, resize: true });
}
//if (scope.host_summary.total > 0) {
// DrawGraph({ scope: scope, resize: true });
//}
};
}])