You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by sr...@apache.org on 2016/06/07 08:52:21 UTC

tez git commit: TEZ-3264. Tez UI: UI discrepancies (sree)

Repository: tez
Updated Branches:
  refs/heads/master eeb5fb31c -> a2d120b22


TEZ-3264. Tez UI: UI discrepancies (sree)


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

Branch: refs/heads/master
Commit: a2d120b225dac6a18a6b10e5e5cee82c8dfcfaba
Parents: eeb5fb3
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Tue Jun 7 14:23:15 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Tue Jun 7 14:23:15 2016 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../main/webapp/app/components/tab-n-refresh.js |  2 ++
 .../webapp/app/styles/dags-page-search.less     |  7 ++--
 .../main/webapp/app/styles/tab-n-refresh.less   | 20 ++++++++---
 .../app/templates/components/tab-n-refresh.hbs  | 34 +++++++++---------
 .../main/webapp/app/templates/dag/graphical.hbs |  1 -
 tez-ui/src/main/webapp/package.json             |  2 +-
 .../components/tab-n-refresh-test.js            | 36 ++++++++++++++++----
 8 files changed, 67 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/a2d120b2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d90ebe4..4a5bffe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -45,6 +45,7 @@ ALL CHANGES:
   TEZ-3262. Tez UI : zip.js is not having a bower friendly versioning system
   TEZ-3063. Tez UI: Display Input, Output, Processor, Source and Sink configurations under a vertex
   TEZ-3281. Tez UI: Swimlane improvements
+  TEZ-3264. Tez UI: UI discrepancies
 
 Release 0.8.4: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/a2d120b2/tez-ui/src/main/webapp/app/components/tab-n-refresh.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/components/tab-n-refresh.js b/tez-ui/src/main/webapp/app/components/tab-n-refresh.js
index 6ac6454..c1613d0 100644
--- a/tez-ui/src/main/webapp/app/components/tab-n-refresh.js
+++ b/tez-ui/src/main/webapp/app/components/tab-n-refresh.js
@@ -24,6 +24,8 @@ export default Ember.Component.extend({
     this.setApplication();
   },
 
+  classNames: ["tab-n-refresh"],
+
   autoRefreshEnabled: false,
   autoRefreshVisible: true,
 

http://git-wip-us.apache.org/repos/asf/tez/blob/a2d120b2/tez-ui/src/main/webapp/app/styles/dags-page-search.less
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/styles/dags-page-search.less b/tez-ui/src/main/webapp/app/styles/dags-page-search.less
index d38ce09..5fc3cfb 100644
--- a/tez-ui/src/main/webapp/app/styles/dags-page-search.less
+++ b/tez-ui/src/main/webapp/app/styles/dags-page-search.less
@@ -43,16 +43,13 @@
     display: inline-block;
     width: 16.66%;
 
+    vertical-align: top;
+
     padding-left: 3px;
 
     label {
       margin-bottom: 2px;
     }
-
-    select {
-      top: -1px;
-      position: relative;
-    }
   }
 
   .dag-name {

http://git-wip-us.apache.org/repos/asf/tez/blob/a2d120b2/tez-ui/src/main/webapp/app/styles/tab-n-refresh.less
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/styles/tab-n-refresh.less b/tez-ui/src/main/webapp/app/styles/tab-n-refresh.less
index 97acff0..241c586 100644
--- a/tez-ui/src/main/webapp/app/styles/tab-n-refresh.less
+++ b/tez-ui/src/main/webapp/app/styles/tab-n-refresh.less
@@ -17,15 +17,25 @@
  */
 
 .tab-n-refresh {
+  display: flex;
+  flex-wrap: wrap;
+
   margin-bottom: 10px;
-  position: relative;
 
-  height: 42px;
+  .nav {
+    flex: 1 0 auto;
+    height: 42px;
+    margin-top: 5px;
+  }
 
   .refresh-ui {
-    position: absolute;
-    right: 0px;
-    top: -10px;
+    flex: 1 0 auto;
+
+    text-align: right;
+    margin-top: -5px;
+    padding-bottom: 5px;
+
+    border-bottom: 1px solid @border-color;
 
     .text-elements {
       display: inline-block;

http://git-wip-us.apache.org/repos/asf/tez/blob/a2d120b2/tez-ui/src/main/webapp/app/templates/components/tab-n-refresh.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/components/tab-n-refresh.hbs b/tez-ui/src/main/webapp/app/templates/components/tab-n-refresh.hbs
index e489f00..c2790b3 100644
--- a/tez-ui/src/main/webapp/app/templates/components/tab-n-refresh.hbs
+++ b/tez-ui/src/main/webapp/app/templates/components/tab-n-refresh.hbs
@@ -16,7 +16,7 @@
  * limitations under the License.
 }}
 
-<ul class="nav nav-tabs tab-n-refresh">
+<ul class="nav nav-tabs">
   {{#each normalizedTabs as |tab|}}
     <li class="{{if tab.active 'active'}}">
       {{#link-to tab.routeName}}
@@ -24,21 +24,21 @@
       {{/link-to}}
     </li>
   {{/each}}
-  <span class="refresh-ui">
-    <span class="text-elements">
-      <span class="auto-refresh {{unless autoRefreshVisible 'no-visible'}}">
-        {{input type="checkbox" name="autoEnabled" checked=autoRefreshEnabled}}
-        Auto Refresh
-        <br/>
-      </span>
-      {{#if loadTime}}
-        Last refreshed at <b>{{date-formatter content=loadTime}}</b>
-      {{else}}
-        Load time not available!
-      {{/if}}
+</ul>
+<div class="refresh-ui">
+  <span class="text-elements">
+    <span class="auto-refresh {{unless autoRefreshVisible 'no-visible'}}">
+      {{input type="checkbox" name="autoEnabled" checked=autoRefreshEnabled}}
+      Auto Refresh
+      <br/>
     </span>
-    <button type="button" class="btn btn-success" {{action "refresh"}}>
-      <i class='fa fa-refresh'></i> Refresh
-    </button>
+    {{#if loadTime}}
+      Last refreshed at <b>{{date-formatter content=loadTime}}</b>
+    {{else}}
+      Load time not available!
+    {{/if}}
   </span>
-</ul>
\ No newline at end of file
+  <button type="button" class="btn btn-success" {{action "refresh"}}>
+    <i class='fa fa-refresh'></i> Refresh
+  </button>
+</div>

http://git-wip-us.apache.org/repos/asf/tez/blob/a2d120b2/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs b/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs
index 1b4e110..8286ac7 100644
--- a/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs
@@ -17,7 +17,6 @@
 }}
 
 {{#if loaded}}
-  <br/>
   <div id="graphical-view-component-container">
     {{em-tgraph
       data=viewData

http://git-wip-us.apache.org/repos/asf/tez/blob/a2d120b2/tez-ui/src/main/webapp/package.json
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/package.json b/tez-ui/src/main/webapp/package.json
index 1e7046f..15a77e4 100644
--- a/tez-ui/src/main/webapp/package.json
+++ b/tez-ui/src/main/webapp/package.json
@@ -58,7 +58,7 @@
   },
   "dependencies": {
     "em-helpers": "0.5.10",
-    "em-table": "0.3.13",
+    "em-table": "0.3.14",
     "em-tgraph": "0.0.5"
   }
 }

http://git-wip-us.apache.org/repos/asf/tez/blob/a2d120b2/tez-ui/src/main/webapp/tests/integration/components/tab-n-refresh-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/integration/components/tab-n-refresh-test.js b/tez-ui/src/main/webapp/tests/integration/components/tab-n-refresh-test.js
index e45b461..e05ad0a 100644
--- a/tez-ui/src/main/webapp/tests/integration/components/tab-n-refresh-test.js
+++ b/tez-ui/src/main/webapp/tests/integration/components/tab-n-refresh-test.js
@@ -24,6 +24,25 @@ moduleForComponent('tab-n-refresh', 'Integration | Component | tab n refresh', {
 });
 
 test('Basic creation test', function(assert) {
+  this.render(hbs`{{tab-n-refresh}}`);
+
+  assert.equal(this.$(".refresh-ui button").text().trim(), 'Refresh');
+  assert.equal(
+    this.$(".refresh-ui .text-elements").text().trim().split(" ").slice(-4).join(" "),
+    "Load time not available!"
+  );
+  assert.equal(this.$(".refresh-ui input").val(), 'on');
+
+  this.render(hbs`
+    {{#tab-n-refresh}}
+      template block text
+    {{/tab-n-refresh}}
+  `);
+
+  assert.equal(this.$(".refresh-ui button").text().trim(), 'Refresh');
+});
+
+test('normalizedTabs test', function(assert) {
   var testTabs = [{
     text: "Tab 1",
     routeName: "route_1",
@@ -36,15 +55,18 @@ test('Basic creation test', function(assert) {
 
   this.render(hbs`{{tab-n-refresh tabs=tabs}}`);
 
-  assert.equal(this.$("button").text().trim(), 'Refresh');
   assert.equal($(this.$("li")[0]).text().trim(), testTabs[0].text);
   assert.equal($(this.$("li")[1]).text().trim(), testTabs[1].text);
+});
 
-  this.render(hbs`
-    {{#tab-n-refresh tabs=tabs}}
-      template block text
-    {{/tab-n-refresh}}
-  `);
+test('loadTime test', function(assert) {
+  var loadTime = 1465226174574;
+
+  this.set("loadTime", loadTime);
 
-  assert.equal(this.$("button").text().trim(), 'Refresh');
+  this.render(hbs`{{tab-n-refresh loadTime=loadTime}}`);
+  assert.equal(
+    this.$(".refresh-ui .text-elements").text().trim().split(" ").slice(-7).join(" ").replace("\n", ""),
+    "Last refreshed at 06 Jun 2016 20:46:14"
+  );
 });