mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -03:30
Job detail page refactor
Exploring was to make the DOM update less CPU intensive.
This commit is contained in:
@@ -100,13 +100,13 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log,
|
||||
Rest.setUrl(url);
|
||||
Rest.get()
|
||||
.success(function(data) {
|
||||
if (data.count > 0) {
|
||||
if (data.results.length > 0) {
|
||||
LoadHostSummary({
|
||||
scope: scope,
|
||||
data: data.results[0].event_data
|
||||
});
|
||||
UpdateDOM({ scope: scope });
|
||||
}
|
||||
UpdateDOM({ scope: scope });
|
||||
})
|
||||
.error(function(data, status) {
|
||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
||||
|
||||
@@ -948,7 +948,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
result.push(scope.jobData.plays[keys[idx]]);
|
||||
idx++;
|
||||
}
|
||||
scope.plays = result;
|
||||
setTimeout(function() {
|
||||
scope.$apply(function() { scope.plays = result; });
|
||||
});
|
||||
};
|
||||
}])
|
||||
|
||||
@@ -970,7 +972,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
scope.tasks = result;
|
||||
setTimeout(function() {
|
||||
scope.$apply(function() { scope.tasks = result; });
|
||||
});
|
||||
};
|
||||
}])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user