tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-2031. Tez UI: horizontal scrollbars do not appear in tables, causing them to look truncated. (Sreenath Somarajapuram via hitesh)
Date Thu, 12 Feb 2015 19:25:05 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.6 3f81c8715 -> 78cd5222f


TEZ-2031. Tez UI: horizontal scrollbars do not appear in tables, causing them to look truncated.
(Sreenath Somarajapuram via hitesh)

(cherry picked from commit bc6a490df579761dfb765fd3eaed718bf94922bc)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/78cd5222
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/78cd5222
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/78cd5222

Branch: refs/heads/branch-0.6
Commit: 78cd5222f7e5a9e865f5736a7d6153c7a9fc5523
Parents: 3f81c87
Author: Hitesh Shah <hitesh@apache.org>
Authored: Thu Feb 12 11:24:00 2015 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Thu Feb 12 11:24:58 2015 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../app/scripts/components/extended-table.js    | 25 ++++++++++++++++++++
 tez-ui/src/main/webapp/app/styles/main.less     | 12 +++++++++-
 3 files changed, 37 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/78cd5222/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d1a2a07..0624fdf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2031. Tez UI: horizontal scrollbars do not appear in tables, causing them to look truncated.

   TEZ-2073. SimpleHistoryLoggingService cannot be read by log aggregation (umask)
   TEZ-2078. Tez UI: Task logs url use in-progress url causing various errors.
   TEZ-2077. Tez UI: No diagnostics on Task Attempt Details page if task attempt failed. 

http://git-wip-us.apache.org/repos/asf/tez/blob/78cd5222/tez-ui/src/main/webapp/app/scripts/components/extended-table.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/components/extended-table.js b/tez-ui/src/main/webapp/app/scripts/components/extended-table.js
index 0999176..dd72935 100644
--- a/tez-ui/src/main/webapp/app/scripts/components/extended-table.js
+++ b/tez-ui/src/main/webapp/app/scripts/components/extended-table.js
@@ -18,6 +18,14 @@
 
 App.ExTable = Ember.Namespace.create();
 
+Ember.Table.BodyTableContainer.reopen({
+  width: Ember.computed.alias('tableComponent._tableContainerWidth'),
+  didInsertElement: function () {
+    this._super();
+    this.$().unbind();
+  }
+});
+
 App.ExTable.FilterTextField = Em.TextField.extend({
 	classNames: ['filter'],
   classNameBindings: ['isPopulated','isInputDirty:input-dirty'],
@@ -161,12 +169,19 @@ App.ExTable.ColumnDefinition = Ember.Table.ColumnDefinition.extend({
 App.ExTable.TableComponent = Ember.Table.EmberTableComponent.extend({
 	layoutName: 'components/extended-table/extable',
 	filters: {},
+	styleBindings: ['height', 'width'],
 	hasFilter: true,
 	minFilterHeight: 30, //TODO: less changes
 
   enableContentSelection: false,
   selectionMode: 'none',
 
+  width: function () {
+    return Math.max(this.get('_width'), this._getTotalWidth(this.get('tableColumns')));
+  }.property('tableColumns', '_tableColumnsWidth', '_width'),
+
+  _tableContainerWidth: Ember.computed.alias('width'),
+
   actions: {
     filterUpdated: function(columnDef, value) {
       var filterID = columnDef.get('filterID');
@@ -177,6 +192,13 @@ App.ExTable.TableComponent = Ember.Table.EmberTableComponent.extend({
     },
   },
 
+  updateLayout: function () {
+    if ((this.get('_state') || this.get('state')) !== 'inDOM') {
+      return;
+    }
+    return this.doForceFillColumns();
+  },
+
   doForceFillColumns: function() {
     var additionWidthPerColumn, availableContentWidth, columnsToResize, contentWidth, fixedColumnsWidth,
remainingWidth, tableColumns, totalWidth;
     totalWidth = this.get('_width');
@@ -189,6 +211,9 @@ App.ExTable.TableComponent = Ember.Table.EmberTableComponent.extend({
     remainingWidth = availableContentWidth - contentWidth;
     columnsToResize = tableColumns.filterProperty('canAutoResize');
 
+    if(totalWidth < contentWidth) {
+      return [];
+    }
     additionWidthPerColumn = Math.floor(remainingWidth / columnsToResize.length);
     if(availableContentWidth <= this._getTotalWidth(tableColumns, 'minWidth')) {
       return columnsToResize;

http://git-wip-us.apache.org/repos/asf/tez/blob/78cd5222/tez-ui/src/main/webapp/app/styles/main.less
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/styles/main.less b/tez-ui/src/main/webapp/app/styles/main.less
index 37251cc..2730af6 100644
--- a/tez-ui/src/main/webapp/app/styles/main.less
+++ b/tez-ui/src/main/webapp/app/styles/main.less
@@ -455,7 +455,17 @@ div.indent {
 }
 
 .table-container {
-  min-height: 380px;
+  min-height: 100px;
+  width: 100%;
+  overflow: auto;
+  border-right: 1px solid @border-lite;
+  border-left: 1px solid @border-lite;
+  .ember-table-table-block {
+    overflow: visible !important;
+  }
+  .ember-table-scroll-container {
+    display: none;
+  }
 }
 
 .input-dirty {


Mime
View raw message