tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhiyu...@apache.org
Subject [15/50] [abbrv] tez git commit: TEZ-3626. Tez UI: First Task Start Time & Last Task Finish Time values are showing up incorrectly (sree)
Date Tue, 28 Mar 2017 19:47:56 GMT
TEZ-3626. Tez UI: First Task Start Time & Last Task Finish Time values are showing up incorrectly
(sree)


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

Branch: refs/heads/TEZ-1190
Commit: fc0897b92802bbbd922d2a90cdc07cf2d3b0a3e1
Parents: 3914342
Author: Sreenath Somarajapuram <sree@apache.org>
Authored: Wed Feb 22 17:05:18 2017 +0530
Committer: Sreenath Somarajapuram <sree@apache.org>
Committed: Wed Feb 22 17:05:18 2017 +0530

----------------------------------------------------------------------
 CHANGES.txt                                              |  1 +
 tez-ui/src/main/webapp/app/components/date-formatter.js  |  8 ++++++++
 .../webapp/app/templates/components/date-formatter.hbs   |  2 +-
 .../tests/integration/components/date-formatter-test.js  | 11 +++++++++++
 4 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/fc0897b9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 54cddc8..5427e12 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -201,6 +201,7 @@ ALL CHANGES:
   TEZ-3615. Tez UI: Table changes
   TEZ-3619. Tez UI: Improve DAG Data download
   TEZ-3629. Tez UI: Enable the UI to display log links from LLAP
+  TEZ-3626. Tez UI: First Task Start Time & Last Task Finish Time values are showing
up incorrectly
 
 Release 0.8.5: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/fc0897b9/tez-ui/src/main/webapp/app/components/date-formatter.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/components/date-formatter.js b/tez-ui/src/main/webapp/app/components/date-formatter.js
index da21383..e428f51 100644
--- a/tez-ui/src/main/webapp/app/components/date-formatter.js
+++ b/tez-ui/src/main/webapp/app/components/date-formatter.js
@@ -24,6 +24,14 @@ export default Ember.Component.extend({
 
   content: null,
 
+  date: Ember.computed("content", function () {
+    var content = this.get("content");
+    if(content <= 0) {
+      content = undefined;
+    }
+    return content;
+  }),
+
   env: Ember.inject.service('env'),
   timeZone: Ember.computed.oneWay('env.app.timeZone'),
 

http://git-wip-us.apache.org/repos/asf/tez/blob/fc0897b9/tez-ui/src/main/webapp/app/templates/components/date-formatter.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/components/date-formatter.hbs b/tez-ui/src/main/webapp/app/templates/components/date-formatter.hbs
index 0f740cb..cdf90da 100644
--- a/tez-ui/src/main/webapp/app/templates/components/date-formatter.hbs
+++ b/tez-ui/src/main/webapp/app/templates/components/date-formatter.hbs
@@ -16,4 +16,4 @@
  * limitations under the License.
 }}
 
-{{txt content type="date" timeZone=timeZone}}
\ No newline at end of file
+{{txt date type="date" timeZone=timeZone}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/fc0897b9/tez-ui/src/main/webapp/tests/integration/components/date-formatter-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/integration/components/date-formatter-test.js b/tez-ui/src/main/webapp/tests/integration/components/date-formatter-test.js
index dad41f9..9b1ccea 100644
--- a/tez-ui/src/main/webapp/tests/integration/components/date-formatter-test.js
+++ b/tez-ui/src/main/webapp/tests/integration/components/date-formatter-test.js
@@ -38,3 +38,14 @@ test('Basic creation test', function(assert) {
 
   assert.equal(this.$().text().trim(), 'Not Available!');
 });
+
+test('Negative value test', function(assert) {
+  this.render(hbs`{{date-formatter -1}}`);
+  assert.equal(this.$().text().trim(), 'Not Available!');
+
+  this.render(hbs`{{date-formatter -99}}`);
+  assert.equal(this.$().text().trim(), 'Not Available!');
+
+  this.render(hbs`{{date-formatter 0}}`);
+  assert.equal(this.$().text().trim(), 'Not Available!');
+});
\ No newline at end of file


Mime
View raw message