mirror of
https://github.com/ansible/awx.git
synced 2026-04-06 18:49:21 -02: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.setUrl(url);
|
||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function(data) {
|
.success(function(data) {
|
||||||
if (data.count > 0) {
|
if (data.results.length > 0) {
|
||||||
LoadHostSummary({
|
LoadHostSummary({
|
||||||
scope: scope,
|
scope: scope,
|
||||||
data: data.results[0].event_data
|
data: data.results[0].event_data
|
||||||
});
|
});
|
||||||
UpdateDOM({ scope: scope });
|
|
||||||
}
|
}
|
||||||
|
UpdateDOM({ scope: scope });
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
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]]);
|
result.push(scope.jobData.plays[keys[idx]]);
|
||||||
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++;
|
idx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scope.tasks = result;
|
setTimeout(function() {
|
||||||
|
scope.$apply(function() { scope.tasks = result; });
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user