From 61164d7efcc4358c036bb39523dfd6a9ca1f72ca Mon Sep 17 00:00:00 2001 From: Vasudevan Srinivasan Krishnamoorthy Date: Thu, 26 Oct 2017 12:45:17 +0530 Subject: [PATCH 1/6] Renders cluster info on application footer --- .../src/main/webapp/app/routes/application.js | 13 +++++++++++-- .../src/main/webapp/app/templates/application.hbs | 9 +++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js index 1fd11e66fb5..33a741a443c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js @@ -17,8 +17,13 @@ */ import Ember from 'ember'; +import AbstractRoute from './abstract'; + +export default AbstractRoute.extend({ + model() { + return this.store.findAll('ClusterInfo', {reload: true}); + }, -export default Ember.Route.extend({ actions: { /** * Base error handler for the application. @@ -35,5 +40,9 @@ export default Ember.Route.extend({ this.intermediateTransitionTo('/error'); } } - } + }, + + unloadAll: function() { + this.store.unloadAll('ClusterInfo'); + }, }); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs index 1ac53bf5e7b..5142b54e46a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs @@ -80,8 +80,8 @@
- -
-
- +
+
v{{model.firstObject.hadoopVersion}} -
Started on: {{date-formatter model.firstObject.startedOn}}
+
Started at {{date-formatter model.firstObject.startedOn}}
-- 2.13.5 (Apple Git-94) From 76321cee192d7aae381b09f4064bde5177244e97 Mon Sep 17 00:00:00 2001 From: Vasudevan Srinivasan Krishnamoorthy Date: Fri, 27 Oct 2017 15:53:30 +0530 Subject: [PATCH 4/6] adds licence on new files --- .../webapp/tests/unit/helpers/date-formatter-test.js | 18 ++++++++++++++++++ .../src/main/webapp/tests/unit/helpers/lower-test.js | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/helpers/date-formatter-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/helpers/date-formatter-test.js index 83c56ee3d22..27232817793 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/helpers/date-formatter-test.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/helpers/date-formatter-test.js @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { dateFormatter } from '../../../helpers/date-formatter'; import { module, test } from 'qunit'; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/helpers/lower-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/helpers/lower-test.js index 1bd685e6b52..044a9626d0d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/helpers/lower-test.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/helpers/lower-test.js @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { lower } from '../../../helpers/lower'; import { module, test } from 'qunit'; -- 2.13.5 (Apple Git-94) From b23d12f275fbd9bc10404eda90f02057bd5ff5f3 Mon Sep 17 00:00:00 2001 From: Vasudevan Srinivasan Krishnamoorthy Date: Fri, 27 Oct 2017 15:56:13 +0530 Subject: [PATCH 5/6] Adds other app states to the state --- .../hadoop-yarn-ui/src/main/webapp/app/initializers/jquery.js | 2 +- .../hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/jquery.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/jquery.js index e49b684e267..9633cbcdedd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/jquery.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/jquery.js @@ -32,4 +32,4 @@ export function initialize(/* application */) { export default { name: 'jquery', initialize -}; \ No newline at end of file +}; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css index cba6b946911..ba35da06150 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css @@ -433,15 +433,19 @@ div.attempt-info-panel table > tbody > tr > td:last-of-type { border-color: #43b135; background-color: #60cea5; } -.yarn-cluster-status i.failed { +.yarn-cluster-status i.stopped { border-color: #b04b4e; background-color: #ef6162; } -.yarn-cluster-status i.suspended { +.yarn-cluster-status i.inited{ border-color: #1c95c0; background-color: #26bbf0; } +.yarn-cluster-status i.notinited { + border-color: #dca41b; + background-color: #ffbc0b; +} .yarn-cluster-info { display: flex; margin-left: auto -- 2.13.5 (Apple Git-94) From 132b506754c3fd68dd81dc7e775d3e405bfebcfd Mon Sep 17 00:00:00 2001 From: Vasudevan Srinivasan Krishnamoorthy Date: Fri, 27 Oct 2017 16:33:03 +0530 Subject: [PATCH 6/6] Moves status nex to hadoop version --- .../hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css | 7 +++---- .../hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css index ba35da06150..20f92c28441 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css @@ -421,12 +421,12 @@ div.attempt-info-panel table > tbody > tr > td:last-of-type { .yarn-cluster-status i { display: inline-block; - width: 15px; - height: 15px; + width: 12px; + height: 12px; border-radius: 10px; border: 1px solid; margin: 3px; - vertical-align: middle; + vertical-align: bottom; } .yarn-cluster-status i.started { @@ -442,7 +442,6 @@ div.attempt-info-panel table > tbody > tr > td:last-of-type { background-color: #26bbf0; } .yarn-cluster-status i.notinited { - border-color: #dca41b; background-color: #ffbc0b; } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs index afdfc7a2394..f1338ae19c1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs @@ -92,11 +92,11 @@
-
- -
v{{model.firstObject.hadoopVersion}} + + +
Started at {{date-formatter model.firstObject.startedOn}}
-- 2.13.5 (Apple Git-94)