diff --git a/.gitignore b/.gitignore index 724162d770e..817556f92dc 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,6 @@ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/dist hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tmp yarnregistry.pdf patchprocess/ + + +.history/ \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/em-table-simple-status-cell.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/em-table-simple-status-cell.js new file mode 100644 index 00000000000..af8b605eeb0 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/em-table-simple-status-cell.js @@ -0,0 +1,31 @@ +/** + * 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.Component.extend({ + content: null, + + classNames: ["em-table-simple-status-cell"], + + statusName: Ember.computed("content", function () { + var status = this.get("content"); + + return status.toLowerCase().capitalize(); + }), +}); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js index 8a34f1a2715..05bfad455e1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js @@ -34,7 +34,8 @@ export default Ember.Controller.extend({ headerTitle: 'Application ID', contentPath: 'id', cellComponentName: 'em-table-linked-cell', - minWidth: "250px", + minWidth: "280px", + facetType: null, getCellContent: function(row) { return { displayText: row.id, @@ -45,30 +46,33 @@ export default Ember.Controller.extend({ id: 'appType', headerTitle: 'Application Type', contentPath: 'applicationType', + facetType: null, }, { id: 'appName', headerTitle: 'Application Name', contentPath: 'appName', + facetType: null, }, { id: 'appUsr', headerTitle: 'User', contentPath: 'user', minWidth: "50px" + }, { + id: 'state', + headerTitle: 'State', + contentPath: 'state', + cellComponentName: 'em-table-simple-status-cell', + minWidth: "50px" }, { id: 'queue', headerTitle: 'Queue', contentPath: 'queue', - }, { - id: 'state', - headerTitle: 'State', - contentPath: 'state', - cellComponentName: 'em-table-status-cell', - minWidth: "50px" }, { id: 'progress', headerTitle: 'Progress', contentPath: 'progress', cellComponentName: 'em-table-progress-cell', + facetType: null, cellDefinition: { valueMax: 100 } @@ -76,10 +80,12 @@ export default Ember.Controller.extend({ id: 'stTime', headerTitle: 'Start Time', contentPath: 'startTime', + facetType: null, }, { id: 'elTime', headerTitle: 'Elapsed Time', contentPath: 'elapsedTime', + facetType: null, cellDefinition: { type: "duration" } @@ -87,6 +93,7 @@ export default Ember.Controller.extend({ id: 'finishTime', headerTitle: 'Finished Time', contentPath: 'validatedFinishedTs', + facetType: null, observePath: true }, { id: 'priority', @@ -108,6 +115,7 @@ export default Ember.Controller.extend({ headerTitle: 'Service Name', contentPath: 'appName', minWidth: "200px", + facetType: null, cellComponentName: 'em-table-linked-cell', getCellContent: function(row) { return { @@ -119,22 +127,25 @@ export default Ember.Controller.extend({ id: 'appId', headerTitle: 'Application ID', contentPath: 'id', + facetType: null, minWidth: "250px" }, { id: 'state', headerTitle: 'State', contentPath: 'state', - cellComponentName: 'em-table-status-cell', + cellComponentName: 'em-table-simple-status-cell', minWidth: "50px" }, { id: 'cluster', headerTitle: '%Cluster', contentPath: 'clusterUsagePercentage', + facetType: null, observePath: true }, { id: 'elTime', headerTitle: 'Elapsed Time', contentPath: 'elapsedTime', + facetType: null, cellDefinition: { type: "duration" }, @@ -143,6 +154,7 @@ export default Ember.Controller.extend({ id: 'appUsr', headerTitle: 'User', contentPath: 'user', + facetType: null, minWidth: "50px" }, { id: 'queue', @@ -152,10 +164,12 @@ export default Ember.Controller.extend({ id: 'stTime', headerTitle: 'Started Time', contentPath: 'startTime', + facetType: null, }, { id: 'finishTime', headerTitle: 'Finished Time', contentPath: 'validatedFinishedTs', + facetType: null, observePath: true }); return ColumnDef.make(colums); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js index fffaf17b05b..bfd62995b4a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js @@ -22,7 +22,10 @@ import AppTableController from '../app-table-columns'; export default AppTableController.extend({ queryParams: ['searchText', 'sortColumnId', 'sortOrder', 'pageNum', 'rowCount'], - tableDefinition: TableDefinition.create(), + tableDefinition: TableDefinition.create({ + enableFaceting: true, + rowCount: 25 + }), searchText: Ember.computed.alias('tableDefinition.searchText'), sortColumnId: Ember.computed.alias('tableDefinition.sortColumnId'), sortOrder: Ember.computed.alias('tableDefinition.sortOrder'), diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-services.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-services.js index a2c80f72a9d..e0ee4a5ea2e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-services.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-services.js @@ -24,7 +24,9 @@ export default AppTableController.extend({ queryParams: ['searchText', 'sortColumnId', 'sortOrder', 'pageNum', 'rowCount'], tableDefinition: TableDefinition.create({ sortColumnId: 'stTime', - sortOrder: 'desc' + sortOrder: 'desc', + rowCount: 25, + enableFaceting: true }), searchText: Ember.computed.alias('tableDefinition.searchText'), sortColumnId: Ember.computed.alias('tableDefinition.sortColumnId'), 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 3d20827aa6b..04c484b3279 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 @@ -19,7 +19,6 @@ body, html, body > .ember-view { height: 100%; overflow: visible; - color: @text-color; background: #f6f6f8; font-family: "Open Sans","Helvetica Neue", sans-serif!important; } @@ -419,29 +418,44 @@ div.attempt-info-panel table > tbody > tr > td:last-of-type { display: inline-block; } -.yarn-cluster-status i { +.yarn-cluster-status i, +.em-table-simple-status-cell i{ display: inline-block; + border-radius: 100%; + border: 1px solid; +} + +.yarn-cluster-status i { width: 12px; height: 12px; - border-radius: 10px; - border: 1px solid; margin: 3px; vertical-align: bottom; } -.yarn-cluster-status i.started { +.em-table-simple-status-cell i { + width: 10px; + height: 10px; + margin: 3px 3px 3px 0; + vertical-align: text-bottom; +} + +.yarn-cluster-status i.started, +.em-table-simple-status-cell i.finished { border-color: #43b135; background-color: #60cea5; } -.yarn-cluster-status i.stopped { +.yarn-cluster-status i.stopped, +.em-table-simple-status-cell i.killed { border-color: #b04b4e; background-color: #ef6162; } -.yarn-cluster-status i.inited{ +.yarn-cluster-status i.inited, +.em-table-simple-status-cell i.running { border-color: #1c95c0; background-color: #26bbf0; } -.yarn-cluster-status i.notinited { +.yarn-cluster-status i.notinited, +.em-table-simple-status-cell i.accepted { border-color: #dca41b; background-color: #ffbc0b; } @@ -630,3 +644,74 @@ div.service-action-mask img { left: 45% !important; z-index: 9999; } + +.yarn-applications-container .table-panel-left .em-table-facet-panel { + width: 240px; + margin-right: 15px; + padding: 0 0 15px 0; + background: none; + border: none; + border-radius: 0; +} + +.yarn-applications-container .table-panel-left .em-table-facet-panel .field-list > li .em-table-facet-panel-values{ + margin-top: 0px; + margin-bottom: -4px; + background: #fff; + border: 1px solid #d5d5d5; +} + +.yarn-applications-container .table-panel-left .em-table-facet-panel .field-name { + background-color: #f7f7f7; + border-bottom: 1px solid #d5d5d5; + padding: 10px 15px; +} + +.yarn-applications-container .table-panel-left .em-table-facet-panel .all-button { + right: 5px !important; +} + +.yarn-applications-container .table-panel-left .em-table-facet-panel .field-name::before { + margin-right: 5px; +} + +.yarn-applications-container .table-panel-left .em-table-facet-panel .value-list { + padding: 0 10px; +} + +.yarn-applications-container .table-panel-left .em-table-facet-panel .filter-box { + padding: 5px; + margin: 5px 0; +} + +.yarn-applications-container .table-panel-left .em-table-facet-panel .more-less { + padding: 5px 0; +} + +.yarn-applications-container .table-panel-left .em-table-facet-panel .field-list { + padding-top: 0px; +} + +.yarn-applications-container .em-table .table-column .table-header-cell { + padding: 7.5px 0 7.5px 7.5px; +} + +.yarn-applications-container .ember-view.table-cell { + padding: 10px 15px; + height: auto; +} + +.yarn-applications-container .resize-column { + position: absolute; + right: -14px; + display: inline-block; + padding: 10px 0; + top: -36px; + font-size: 42px; + line-height: 2em; +} + +.em-table .table-column .table-header-cell { + background-color: #f7f7f7; + border-bottom: 1px solid #d5d5d5; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/em-table-simple-status-cell.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/em-table-simple-status-cell.hbs new file mode 100644 index 00000000000..1897069ffbb --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/em-table-simple-status-cell.hbs @@ -0,0 +1,27 @@ +{{! + * 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. +}} + + +{{#if content}} + + + {{statusName}} + +{{else}} + +{{/if}} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs index 00701d90798..ccadb7c6e91 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs @@ -18,68 +18,8 @@ {{breadcrumb-bar breadcrumbs=breadcrumbs}} -