From 2c326088ae3401453a56fa0f4edfd8df5ed4a924 Mon Sep 17 00:00:00 2001 From: Sunil G Date: Tue, 6 Feb 2018 15:32:09 +0530 Subject: [PATCH] =?UTF-8?q?YARN-7850.=20[UI2]=20Log=20Aggregation=20status?= =?UTF-8?q?=20to=20be=20displayed=20in=20Application=20Page.=20Contributed?= =?UTF-8?q?=20by=20Gergely=20Nov=C3=A1k.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/webapp/app/models/yarn-app.js | 18 +++++++++++++++++- .../main/webapp/app/routes/yarn-app/logs.js | 3 ++- .../webapp/app/templates/yarn-app/logs.hbs | 4 ++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js index 7e3050f5f8..5d0f23b1e3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js @@ -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") }); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app/logs.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app/logs.js index 883750366f..99e4cff093 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app/logs.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app/logs.js @@ -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) }); }, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/logs.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/logs.hbs index 53173b4fab..a190def7e9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/logs.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/logs.hbs @@ -23,6 +23,10 @@ Logs {{collapsible-panel targetId="logFilesCollapsablePanel"}}
+   + + {{model.app.logAggregationStatus}} + {{#if _isLoadingTopPanel}}
Loading...