YARN-7850. [UI2] Log Aggregation status to be displayed in Application Page. Contributed by Gergely Novák.

This commit is contained in:
Sunil G 2018-02-06 15:32:09 +05:30
parent 87429affce
commit 2c326088ae
3 changed files with 23 additions and 2 deletions

View File

@ -127,5 +127,21 @@ export default DS.Model.extend({
}
return "label label-" + style;
}.property("finalStatus")
}.property("finalStatus"),
logAggregationStatusStyle: function() {
const logAggregationStatus = this.get("logAggregationStatus");
var style = "";
if (logAggregationStatus === "FAILED" ||
logAggregationStatus === "TIME_OUT") {
style = "danger";
} else if (logAggregationStatus === "RUNNING_WITH_FAILURE") {
style = "warning";
} else if (logAggregationStatus === "SUCCEEDED") {
style = "success";
} else {
style = "default";
}
return "label label-" + style;
}.property("logAggregationStatus")
});

View File

@ -30,7 +30,8 @@ export default AbstractRoute.extend(AppAttemptMixin, {
serviceName: service,
attempts: this.fetchAttemptListFromRMorATS(app_id, this.store).catch(function() {
return [];
})
}),
app: this.fetchAppInfoFromRMorATS(app_id, this.store)
});
},

View File

@ -23,6 +23,10 @@
Logs {{collapsible-panel targetId="logFilesCollapsablePanel"}}
</div>
<div class="panel-body" id="logFilesCollapsablePanel">
<label>Log aggregation status:</label>&nbsp;
<span class={{model.app.logAggregationStatusStyle}}>
{{model.app.logAggregationStatus}}
</span>
{{#if _isLoadingTopPanel}}
<div class="text-center" style="z-index: 100; position: absolute; left: 46%;">
<img src="assets/images/spinner.gif" alt="Loading...">