Job detail page

If host_summaries summary_fields.host does not exist, consider host deleted and use <deleted host> for the name. Also, added endless scroll to play list.
This commit is contained in:
Chris Houseknecht
2014-07-02 19:23:33 -04:00
parent 803f0b6d12
commit 9c3d315bc7
2 changed files with 94 additions and 9 deletions

View File

@@ -832,9 +832,16 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
Rest.get()
.success(function(data) {
data.results.forEach(function(event) {
var name;
if (event.summary_fields.host && event.summary_fields.host.name) {
name = event.summary_fields.host.name;
}
else {
name = "<deleted host>";
}
scope.hosts.push({
id: event.host,
name: event.summary_fields.host.name,
name: name,
ok: event.ok,
changed: event.changed,
unreachable: event.dark,
@@ -842,7 +849,6 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
status: (event.failed) ? 'failed' : 'successful'
});
});
//$('#hosts-summary-table').mCustomScrollbar("update");
if (callback) {
scope.$emit(callback);
}