Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 52E95200BB0 for ; Sun, 30 Oct 2016 21:21:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 51800160B05; Sun, 30 Oct 2016 20:21:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2D8A0160B04 for ; Sun, 30 Oct 2016 21:21:29 +0100 (CET) Received: (qmail 83830 invoked by uid 500); 30 Oct 2016 20:21:16 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 82573 invoked by uid 99); 30 Oct 2016 20:21:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Oct 2016 20:21:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8FC91E2F01; Sun, 30 Oct 2016 20:21:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wangda@apache.org To: common-commits@hadoop.apache.org Date: Sun, 30 Oct 2016 20:21:40 -0000 Message-Id: In-Reply-To: <9c0745f01f31436ab63f6b0e5de6a34f@git.apache.org> References: <9c0745f01f31436ab63f6b0e5de6a34f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [27/50] [abbrv] hadoop git commit: YARN-5321. [YARN-3368] Add resource usage for application by node managers (Wangda Tan via Sunil G) YARN-5320. [YARN-3368] Add resource usage by applications and queues to cluster overview page (Wangda Tan via Sunil G) archived-at: Sun, 30 Oct 2016 20:21:31 -0000 http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js index ff49403..b945451 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js @@ -20,7 +20,9 @@ import Ember from 'ember'; export default Ember.Route.extend({ model() { - var apps = this.store.findAll('yarn-app'); - return apps; + return Ember.RSVP.hash({ + apps: this.store.findAll('yarn-app'), + clusterMetrics: this.store.findAll('ClusterMetric'), + }); } }); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps/apps.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps/apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps/apps.js new file mode 100644 index 0000000..8719170 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps/apps.js @@ -0,0 +1,22 @@ +/** + * 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 Ember from 'ember'; + +export default Ember.Route.extend({ +}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps/services.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps/services.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps/services.js new file mode 100644 index 0000000..8719170 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps/services.js @@ -0,0 +1,22 @@ +/** + * 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 Ember from 'ember'; + +export default Ember.Route.extend({ +}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js index 6e57388..64a1b3e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js @@ -22,6 +22,7 @@ export default Ember.Route.extend({ model(param) { // Fetches data from both NM and RM. RM is queried to get node usage info. return Ember.RSVP.hash({ + nodeInfo: { id: param.node_id, addr: param.node_addr }, node: this.store.findRecord('yarn-node', param.node_addr), rmNode: this.store.findRecord('yarn-rm-node', param.node_id) }); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.js index 5c46630..5639369 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.js @@ -20,6 +20,9 @@ import Ember from 'ember'; export default Ember.Route.extend({ model() { - return this.store.findAll('yarn-rm-node'); + return Ember.RSVP.hash({ + nodes: this.store.findAll('yarn-rm-node'), + clusterMetrics: this.store.findAll('ClusterMetric'), + }); } }); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes/heatmap.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes/heatmap.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes/heatmap.js new file mode 100644 index 0000000..8719170 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes/heatmap.js @@ -0,0 +1,22 @@ +/** + * 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 Ember from 'ember'; + +export default Ember.Route.extend({ +}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes/table.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes/table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes/table.js new file mode 100644 index 0000000..38ae5d1 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes/table.js @@ -0,0 +1,22 @@ +/** + * 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 Ember from 'ember'; + +export default Ember.Route.extend({ +}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue-apps.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue-apps.js new file mode 100644 index 0000000..dff4ee9 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue-apps.js @@ -0,0 +1,36 @@ +/** + * 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 Ember from 'ember'; + +export default Ember.Route.extend({ + model(param) { + return Ember.RSVP.hash({ + selected : param.queue_name, + queues: this.store.findAll('yarn-queue'), + selectedQueue : undefined, + apps: undefined, // apps of selected queue + }); + }, + + afterModel(model) { + var store = this.store; + model.selectedQueue = this.store.peekRecord('yarn-queue', model.selected); + model.apps = store.findAll('yarn-app'); + } +}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues.js new file mode 100644 index 0000000..06ceafb --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues.js @@ -0,0 +1,38 @@ +/** + * 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 Ember from 'ember'; + +export default Ember.Route.extend({ + model(param) { + return Ember.RSVP.hash({ + selected : param.queue_name, + queues: this.store.findAll('yarn-queue'), + selectedQueue : undefined, + apps: undefined, // apps of selected queue + }); + }, + + afterModel(model) { + model.selectedQueue = this.store.peekRecord('yarn-queue', model.selected); + model.apps = this.store.findAll('yarn-app'); + model.apps.forEach(function(o) { + console.log(o); + }) + } +}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js index 4c542c4..3de377a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js @@ -40,7 +40,8 @@ export default DS.JSONAPISerializer.extend({ nodeId: payload.nodeId, hosts: payload.host, state: payload.appAttemptState, - logsLink: payload.logsLink + logsLink: payload.logsLink, + appAttemptId: payload.appAttemptId } }; @@ -59,12 +60,16 @@ export default DS.JSONAPISerializer.extend({ // return expected is { data: [ {}, {} ] } var normalizedArrayResponse = {}; - // payload has apps : { app: [ {},{},{} ] } - // need some error handling for ex apps or app may not be defined. - normalizedArrayResponse.data = payload.appAttempts.appAttempt.map(singleApp => { - return this.internalNormalizeSingleResponse(store, primaryModelClass, - singleApp, singleApp.id, requestType); - }, this); + if (payload.appAttempts && payload.appAttempts.appAttempt) { + // payload has apps : { app: [ {},{},{} ] } + // need some error handling for ex apps or app may not be defined. + normalizedArrayResponse.data = payload.appAttempts.appAttempt.map(singleApp => { + return this.internalNormalizeSingleResponse(store, primaryModelClass, + singleApp, singleApp.id, requestType); + }, this); + } else { + normalizedArrayResponse.data = []; + } return normalizedArrayResponse; } }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js index ba8c1f4..427c3d8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js @@ -39,6 +39,7 @@ export default DS.JSONAPISerializer.extend({ finishedTime: Converter.timeStampToDate(payload.finishedTime), finalStatus: payload.finalStatus, progress: payload.progress, + applicationType: payload.applicationType, diagnostics: payload.diagnostics, amContainerLogs: payload.amContainerLogs, amHostHttpAddress: payload.amHostHttpAddress, @@ -54,7 +55,10 @@ export default DS.JSONAPISerializer.extend({ preemptedResourceMB: payload.preemptedResourceMB, preemptedResourceVCores: payload.preemptedResourceVCores, numNonAMContainerPreempted: payload.numNonAMContainerPreempted, - numAMContainerPreempted: payload.numAMContainerPreempted + numAMContainerPreempted: payload.numAMContainerPreempted, + clusterUsagePercentage: payload.clusterUsagePercentage, + queueUsagePercentage: payload.queueUsagePercentage, + currentAppAttemptId: payload.currentAppAttemptId } }; @@ -75,7 +79,7 @@ export default DS.JSONAPISerializer.extend({ // payload has apps : { app: [ {},{},{} ] } // need some error handling for ex apps or app may not be defined. - if(payload.apps) { + if(payload.apps && payload.apps.app) { normalizedArrayResponse.data = payload.apps.app.map(singleApp => { return this.internalNormalizeSingleResponse(store, primaryModelClass, singleApp, singleApp.id, requestType); http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js index e051396..b9b923d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js @@ -57,13 +57,19 @@ export default DS.JSONAPISerializer.extend({ var normalizedArrayResponse = {}; if (payload && payload.container) { - // payload has apps : { app: [ {},{},{} ] } - // need some error handling for ex apps or app may not be defined. - normalizedArrayResponse.data = payload.container.map(singleContainer => { - return this.internalNormalizeSingleResponse(store, primaryModelClass, - singleContainer, singleContainer.id, requestType); - }, this); - return normalizedArrayResponse; + if (Array.isArray(payload.container)) { + // payload has apps : { app: [ {},{},{} ] } + // need some error handling for ex apps or app may not be defined. + normalizedArrayResponse.data = payload.container.map(singleContainer => { + return this.internalNormalizeSingleResponse(store, primaryModelClass, + singleContainer, singleContainer.id, requestType); + }, this); + } else { + normalizedArrayResponse.data = [this.internalNormalizeSingleResponse( + store, primaryModelClass, payload.container, payload.container.id, + requestType)]; + } + return normalizedArrayResponse; } else { normalizedArrayResponse.data = []; } http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css ---------------------------------------------------------------------- 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 e2d09dc..409aa15 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 @@ -16,11 +16,20 @@ * limitations under the License. */ +body, html, body > .ember-view { + height: 100%; + overflow: visible; + color: @text-color; +} +body, html { + min-width: 1024px; +} + /* Over all style */ text { - font: 12px sans-serif; + font: 16px sans-serif; } text.small { @@ -35,6 +44,7 @@ html, body width: 100%; } + /* queue's style (left banner of queues) */ @@ -45,14 +55,30 @@ text.queue { fill : gray; } -path.queue { - stroke: gray; - fill: none; +text.heatmap-cell { + font: 14px sans-serif; + font-weight: bold; + text-anchor: middle; + fill: Azure; + text-align: center; +} + +text.heatmap-cell-notselected { + font: 14px sans-serif; + font-weight: bold; + text-anchor: middle; + fill: Silver; + text-align: center; } -circle.queue { - r: 10; - fill: Steelblue; +text.heatmap-rack { + font: 20px sans-serif; + fill: DimGray; +} + +path.queue { + stroke: "red"; + fill: none; } /* @@ -76,24 +102,21 @@ text.chart-title { fill: Gray; } -text.donut-highlight-text { - font-size: 20px; +text.donut-highlight-text, text.donut-highlight-sub { + font-size: 15px; font-family: sans-serif; text-anchor: middle; fill: Gray; vertical-align: middle; } -rect.chart-frame { - fill: none; - stroke: gray; - stroke-dasharray: 10,10; +text.donut-highlight-sub { + font-size: 23px; + margin-top: 10px; } -line.chart-leftbanner { - stroke-width: 2; - stroke: gray; - stroke-dasharray: 10,10; +rect.chart-frame { + fill: none; } text.bar-chart-text { @@ -106,9 +129,8 @@ text.bar-chart-text { div.tooltip { position: absolute; text-align: center; - /*height: 28px;*/ - padding: 2px; - font: 12px sans-serif; + padding: 2px; + font: 24px sans-serif; background: lightsteelblue; border: 0px; border-radius: 8px; @@ -135,6 +157,19 @@ table.dataTable thead .sorting_desc_disabled { background-image: url("/assets/images/datatables/sort_desc_disabled.png"); } +.add-ellipsis { + overflow: hidden; + text-overflow: ellipsis; +} + +.breadcrumb { + padding-bottom: 3px; +} + +.navbar-default .navbar-nav > li > a { + color: #337ab7; +} + /* * Queue selector */ @@ -158,6 +193,70 @@ table.dataTable thead .sorting_desc_disabled { stroke-width: 2px; } +.lr-margin { + margin: 0px 30px; +} + +.footer { + background-color: @white; + color: @text-color; + + padding: 10px 0px; + margin: 0px; + + border-top: 1px lightgrey solid; + + font-size: .9em; +} + +.table { + margin-bottom: 0px; + border: none; + + overflow: hidden; +} + +.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { + border: none !important; +} + +.dataTables_wrapper .table { + border: 1px solid lightgrey; + border-bottom: 1px solid lightgrey !important; + border-radious: 5px; +} + +.dataTables_wrapper .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { + border: 1px solid lightgrey; +} + +td { + padding: 8px 15px 8px 15px !important; +} + +.footer-frame { + height: 60px; +} +.footer { + height: 40px; +} + +.footer-pusher { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -40px; // Must be same as footer & footer-frame +} + +.panel-default .container-fluid { + margin-top: -45px !important; + margin-bottom: -10px !important; +} + +.panel-heading { + font-weight: bold; +} + .hadoop-brand-image { margin-top: -10px; width: auto; http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs ---------------------------------------------------------------------- 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 03b2c4a..7783db4 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 @@ -16,47 +16,70 @@ * limitations under the License. }} - + +
+ {{outlet}} +
+ +
+
+
-{{outlet}} + + + http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs index 2094092..fa90799 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs @@ -16,59 +16,137 @@ * limitations under the License. }} -
-
- {{donut-chart data=model.firstObject.getFinishedAppsDataForDonutChart - title="Finished Apps" - showLabels=true - parentId="finishedapps-donut-chart" - ratio=0.55 - maxHeight=350}} -
- -
- {{donut-chart data=model.firstObject.getRunningAppsDataForDonutChart - title="Running Apps" - showLabels=true - parentId="runningapps-donut-chart" - ratio=0.55 - maxHeight=350}} -
+
+ {{em-breadcrumbs items=breadcrumbs}}
-
+{{#if model}} -
-
- {{donut-chart data=model.firstObject.getNodesDataForDonutChart - title="Node Managers" - showLabels=true - parentId="nodes-donut-chart" - ratio=0.55 - maxHeight=350}} -
-
+
+
+
+
+
+ Cluster Resource Usage By Applications +
+
+ {{app-usage-donut-chart data=model.apps + showLabels=true + parentId="appusage-donut-chart" + ratio=0.6 + maxHeight=400}} +
+
+
+ +
+
+
+ Cluster Resource Usage By Leaf Queues +
+
+ {{queue-usage-donut-chart data=model.queues + showLabels=true + parentId="queueusage-donut-chart" + ratio=0.6 + maxHeight=400}} +
+
+
+
+
-
+
+
+
+
+ Finished Apps +
+
+ {{donut-chart data=model.clusterMetrics.firstObject.getFinishedAppsDataForDonutChart + showLabels=true + parentId="finishedapps-donut-chart" + ratio=0.6 + maxHeight=350 + colorTargets="good warn error"}} +
+
+
-
-
- {{donut-chart data=model.firstObject.getMemoryDataForDonutChart - title="Resource - Memory" - showLabels=true - parentId="mem-donut-chart" - ratio=0.55 - maxHeight=350}} +
+
+
+ Running Apps +
+
+ {{donut-chart data=model.clusterMetrics.firstObject.getRunningAppsDataForDonutChart + showLabels=true + parentId="runningapps-donut-chart" + ratio=0.6 + maxHeight=350 + colorTargets="warn good"}} +
+
+
+ +
+
+
+ Node Managers +
+
+ {{donut-chart data=model.clusterMetrics.firstObject.getNodesDataForDonutChart + showLabels=true + parentId="nodes-donut-chart" + ratio=0.6 + maxHeight=350 + colorTargets="good error warn"}} +
+
+
-
- {{donut-chart data=model.firstObject.getVCoreDataForDonutChart - title="Resource - VCores" - showLabels=true - parentId="vcore-donut-chart" - ratio=0.6 - maxHeight=350}} +
+
+ +
+
+
+ Resource - Memory +
+
+ {{donut-chart data=model.clusterMetrics.firstObject.getMemoryDataForDonutChart + showLabels=true + parentId="mem-donut-chart" + ratio=0.6 + maxHeight=350 + colorTargets="good" + colorTargetReverse=true + type="memory"}} +
+
+
+ +
+
+
+ Resource - VCores +
+
+ {{donut-chart data=model.clusterMetrics.firstObject.getVCoreDataForDonutChart + showLabels=true + parentId="vcore-donut-chart" + ratio=0.6 + maxHeight=350 + colorTargets="good" + colorTargetReverse=true}} +
+
+
+{{/if}} + + {{outlet}} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs index 0788d9c..a036a0c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs @@ -20,6 +20,7 @@ Application ID + Application Type Name User Queue @@ -30,13 +31,15 @@ Finished Time Priority Progress - + %Cluster + {{#if arr}} {{#each arr as |app|}} {{app.id}} + {{app.applicationType}} {{app.appName}} {{app.user}} {{app.queue}} @@ -53,11 +56,13 @@
+ {{app.clusterUsagePercentage}} {{/each}} {{else}} {{app.id}} + {{app.applicationType}} {{app.appName}} {{app.user}} {{app.queue}} @@ -74,7 +79,8 @@
- + {{app.clusterUsagePercentage}} + {{/if}} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/7190ddf6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs index 1e07e89..d2486c9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs @@ -19,7 +19,7 @@
-

Node Manager
({{node-name nodeId}})

+

Node Manager