Repository: tez Updated Branches: refs/heads/master decb4191b -> 87aac1270
Tez UI: Equip basic-ember-table's cell level loading for all use cases in all DAGs table (Sreenath Somarajapuram via pramachandran) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/87aac127 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/87aac127 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/87aac127 Branch: refs/heads/master Commit: 87aac1270eb12b801ba326d5f53ba054c62ed58c Parents: decb419 Author: Prakash Ramachandran <[email protected]> Authored: Tue Apr 21 16:38:13 2015 +0530 Committer: Prakash Ramachandran <[email protected]> Committed: Tue Apr 21 16:39:01 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 1 + tez-ui/src/main/webapp/app/scripts/app.js | 1 + .../scripts/components/basic-table/cell-view.js | 20 +++++++------- .../components/basic-table/basic-cell.hbs | 6 ++++- .../basic-table/bounded-basic-cell.hbs | 27 +++++++++++++++++++ .../components/basic-table/linked-cell.hbs | 16 +++++++---- .../components/basic-table/logs-cell.hbs | 28 +++++++++----------- .../components/basic-table/pagination-view.hbs | 10 ++++--- .../components/basic-table/status-cell.hbs | 20 +++++++------- .../basic-table/task-actions-cell.hbs | 12 ++++----- .../basic-table/vertex-configurations-cell.hbs | 14 +++++----- 11 files changed, 96 insertions(+), 59 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index bd9ff6d..4ba2f2f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ INCOMPATIBLE CHANGES TEZ-1993. Implement a pluggable InputSizeEstimator for grouping fairly ALL CHANGES: + TEZ-2344. Tez UI: Equip basic-ember-table's cell level loading for all use cases in all DAGs table TEZ-2313. Regression in handling obsolete events in ShuffleScheduler. TEZ-2212. Notify components on DAG completion. TEZ-2328. Add tez.runtime.sorter.class & rename tez.runtime.sort.threads http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/scripts/app.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/app.js b/tez-ui/src/main/webapp/app/scripts/app.js index 1d8036d..37aa563 100644 --- a/tez-ui/src/main/webapp/app/scripts/app.js +++ b/tez-ui/src/main/webapp/app/scripts/app.js @@ -80,6 +80,7 @@ App.ready = function () { }, }); + App.DagVertexAdapter = App.VertexAdapter = App.ApplicationAdapter.extend({ _setInputs: function (store, data) { var dagId = Ember.get(data, 'primaryfilters.TEZ_DAG_ID.0'), http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/scripts/components/basic-table/cell-view.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/components/basic-table/cell-view.js b/tez-ui/src/main/webapp/app/scripts/components/basic-table/cell-view.js index 4d50cf1..1506577 100644 --- a/tez-ui/src/main/webapp/app/scripts/components/basic-table/cell-view.js +++ b/tez-ui/src/main/webapp/app/scripts/components/basic-table/cell-view.js @@ -16,28 +16,28 @@ * limitations under the License. */ -var ObjectPromiseController = Ember.ObjectController.extend(Ember.PromiseProxyMixin), - naCellContent = { - toString: function (){ - return 'Not available!'; - }, - _notAvailable: true - }; +var ObjectPromiseController = Ember.ObjectController.extend(Ember.PromiseProxyMixin); App.BasicTableComponent.CellView = Ember.View.extend({ templateName: 'components/basic-table/basic-cell', classNames: ['cell-content'], + _normalizeContent: function (content) { + return content && typeof content == 'object' ? content : { + displayText: content + }; + }, + cellContent: function () { var cellContent = this.get('column').getCellContent(this.get('row')); if(cellContent && $.isFunction(cellContent.then)) { - cellContent = ObjectPromiseController.create({ - promise: cellContent + return ObjectPromiseController.create({ + promise: cellContent.then(this._normalizeContent) }); } - return cellContent || naCellContent; + return this._normalizeContent(cellContent); }.property('row', 'column') }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/templates/components/basic-table/basic-cell.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/basic-cell.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/basic-cell.hbs index 370637b..e7ea6b7 100644 --- a/tez-ui/src/main/webapp/app/templates/components/basic-table/basic-cell.hbs +++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/basic-cell.hbs @@ -16,4 +16,8 @@ * limitations under the License. }} -{{unbound view.cellContent}} \ No newline at end of file +{{#unbound unless view.cellContent.displayText}} + <span class="message">Not Available!</span> +{{else}} + {{unbound view.cellContent.displayText}} +{{/unbound}} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/templates/components/basic-table/bounded-basic-cell.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/bounded-basic-cell.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/bounded-basic-cell.hbs new file mode 100644 index 0000000..6fcbe60 --- /dev/null +++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/bounded-basic-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 view.cellContent.isPending}} + <i class="waiting"></i> +{{else}} + {{#if view.cellContent.displayText}} + {{view.cellContent.displayText}} + {{else}} + <span class="message">Not Available!</span> + {{/if}} +{{/if}} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/templates/components/basic-table/linked-cell.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/linked-cell.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/linked-cell.hbs index 3297ad7..5800b6e 100644 --- a/tez-ui/src/main/webapp/app/templates/components/basic-table/linked-cell.hbs +++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/linked-cell.hbs @@ -16,10 +16,16 @@ * limitations under the License. }} -{{#if view.cellContent._notAvailable}} - {{view.cellContent}} +{{#if view.cellContent.isPending}} + <i class="waiting"></i> {{else}} - {{#link-to view.cellContent.linkTo view.cellContent.entityId}} + {{#if view.cellContent.linkTo}} + {{#link-to view.cellContent.linkTo view.cellContent.entityId}} + {{view.cellContent.displayText}} + {{/link-to}} + {{else}}{{#if view.cellContent.displayText}} {{view.cellContent.displayText}} - {{/link-to}} -{{/if}} \ No newline at end of file + {{else}} + <span class="message">Not Available!</span> + {{/if}}{{/if}} +{{/if}} http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs index 092b6ee..a4ab4a1 100644 --- a/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs +++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs @@ -16,20 +16,16 @@ * limitations under the License. }} -<span class="ember-table-content"> - {{#if view.cellContent.isPending}} - <i class="waiting absolute"></i> - {{else}} - {{#if view.cellContent._notAvailable}} - {{view.cellContent}} - {{else}} - {{#if view.cellContent.viewUrl}} - <a target="_blank" href="//{{unbound view.cellContent.viewUrl}}">View</a> - - {{/if}} - {{#if view.cellContent.downloadUrl}} - <a target="_blank" href="{{unbound view.cellContent.downloadUrl}}?start=0" download type="application/octet-stream">Download</a> - {{/if}} - {{/if}} +{{#if view.cellContent.isPending}} + <i class="waiting"></i> +{{else}} + {{#if view.cellContent.viewUrl}} + <a target="_blank" href="//{{unbound view.cellContent.viewUrl}}">View</a> + {{/if}} -</span> + {{#if view.cellContent.downloadUrl}} + <a target="_blank" href="{{unbound view.cellContent.downloadUrl}}?start=0" download type="application/octet-stream">Download</a> + {{else}}{{#unless view.cellContent.viewUrl}} + <span class="message">Not Available!</span> + {{/unless}}{{/if}} +{{/if}} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/templates/components/basic-table/pagination-view.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/pagination-view.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/pagination-view.hbs index 808fe9d..22ee22b 100644 --- a/tez-ui/src/main/webapp/app/templates/components/basic-table/pagination-view.hbs +++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/pagination-view.hbs @@ -18,16 +18,18 @@ <ul class="page-list"> <li {{bind-attr class="view.atFirst::clickable"}} {{action 'changePage' 1}}> - First page + First </li> {{#each page in view._possiblePages}} <li {{bind-attr class="page.isCurrent:is-current:clickable"}} {{action 'changePage' page.pageNum}}> {{page.pageNum}} </li> {{/each}} - <li {{bind-attr class="view.atLast::clickable"}} {{action 'changePage' view.totalPages}}> - Last page - {{view.totalPages}} - </li> + {{#unless view.hideLast}} + <li {{bind-attr class="view.atLast::clickable"}} {{action 'changePage' view.totalPages}}> + Last - {{view.totalPages}} + </li> + {{/unless}} </ul> <div class='row-select'> <div>Rows</div> http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/templates/components/basic-table/status-cell.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/status-cell.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/status-cell.hbs index a7caa35..7ff73ee 100644 --- a/tez-ui/src/main/webapp/app/templates/components/basic-table/status-cell.hbs +++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/status-cell.hbs @@ -16,14 +16,16 @@ * limitations under the License. }} -{{#if view.cellContent._notAvailable}} - {{view.cellContent}} +{{#if view.cellContent.isPending}} + <i class="waiting"></i> {{else}} - <span class="ember-table-content"> + {{#if view.cellContent.status}} <i {{bind-attr class=":task-status view.cellContent.statusIcon"}}></i> - {{view.cellContent.status}} - {{#if view.cellContent.progress}} - {{bs-badge content=view.cellContent.progress}} - {{/if}} - </span> -{{/if}} \ No newline at end of file + <span class="status-msg">{{view.cellContent.status}}</span> + {{/if}} + {{#if view.cellContent.progress}} + {{bs-badge content=view.cellContent.progress}} + {{else}}{{#unless view.cellContent.status}} + <span class="message">Not Available!</span> + {{/unless}}{{/if}} +{{/if}} http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/templates/components/basic-table/task-actions-cell.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/task-actions-cell.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/task-actions-cell.hbs index b914b82..e671cf3 100644 --- a/tez-ui/src/main/webapp/app/templates/components/basic-table/task-actions-cell.hbs +++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/task-actions-cell.hbs @@ -16,11 +16,9 @@ * limitations under the License. }} -{{#if view.cellContent._notAvailable}} - {{view.cellContent}} +{{#if view.cellContent.displayText}} + {{#link-to "task.counters" view.cellContent.displayText}}counters{{/link-to}} + {{#link-to "task.attempts" view.cellContent.displayText}}attempts{{/link-to}} {{else}} - <span class="ember-table-content"> - {{#link-to "task.counters" view.cellContent}}counters{{/link-to}} - {{#link-to "task.attempts" view.cellContent}}attempts{{/link-to}} - </span> -{{/if}} \ No newline at end of file + <span class="message">Not Available!</span> +{{/if}} http://git-wip-us.apache.org/repos/asf/tez/blob/87aac127/tez-ui/src/main/webapp/app/templates/components/basic-table/vertex-configurations-cell.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/vertex-configurations-cell.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/vertex-configurations-cell.hbs index 17fb7e3..85f9eb1 100644 --- a/tez-ui/src/main/webapp/app/templates/components/basic-table/vertex-configurations-cell.hbs +++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/vertex-configurations-cell.hbs @@ -16,16 +16,16 @@ * limitations under the License. }} -{{#if view.cellContent._notAvailable}} - {{view.cellContent}} +{{#if view.cellContent.isPending}} + <i class="waiting"></i> {{else}} {{#if view.cellContent.linkToAdditionals}} - {{#link-to 'vertex.additionals' view.cellContent.vertexId class='ember-table-content'}}View sources & sinks{{/link-to}} + {{#link-to 'vertex.additionals' view.cellContent.vertexId}}View sources & sinks{{/link-to}} {{else}}{{#if view.cellContent.inputId}} - {{#link-to 'input.configs' view.cellContent.vertexId view.cellContent.inputId class='ember-table-content'}}View source configs{{/link-to}} + {{#link-to 'input.configs' view.cellContent.vertexId view.cellContent.inputId}}View source configs{{/link-to}} {{else}}{{#if view.cellContent.outputId}} - {{#link-to 'output.configs' view.cellContent.vertexId view.cellContent.outputId class='ember-table-content'}}View sink configs{{/link-to}} + {{#link-to 'output.configs' view.cellContent.vertexId view.cellContent.outputId}}View sink configs{{/link-to}} {{else}} - <span class='ember-table-content'>No source or sink</span> + <span class="message">Not Available!</span> {{/if}}{{/if}}{{/if}} -{{/if}} \ No newline at end of file +{{/if}}
