You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2014/12/19 20:18:22 UTC

[1/2] tez git commit: TEZ-1870. Time displayed in the UI is in GMT. (Sreenath Somarajapuram via hitesh)

Repository: tez
Updated Branches:
  refs/heads/master 1f8141b83 -> cdc5c7bf1


TEZ-1870. Time displayed in the UI is in GMT. (Sreenath Somarajapuram via hitesh)


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

Branch: refs/heads/master
Commit: 7129646460a55c7df8cb7897b3ea71945ce6e699
Parents: 1f8141b
Author: Hitesh Shah <hi...@apache.org>
Authored: Fri Dec 19 11:13:58 2014 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Fri Dec 19 11:13:58 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../main/webapp/app/scripts/controllers/tez-app-controller.js | 4 ++--
 tez-ui/src/main/webapp/app/scripts/helpers/date.js            | 7 ++++---
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/71296464/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index bb2bc5d..31d9c1e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.0: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-1870. Time displayed in the UI is in GMT.
   TEZ-1858. Docs for deploying/using the Tez UI.
   TEZ-1642. TestAMRecovery sometimes fail.
   TEZ-1859. TestGroupedSplits has commented out test: testGzip.

http://git-wip-us.apache.org/repos/asf/tez/blob/71296464/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
index 64682d4..3df83fd 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
@@ -24,8 +24,8 @@ App.TezAppController = Em.ObjectController.extend(App.Helpers.DisplayHelper, {
   loading: true,
 
   rmTrackingURL: function() {
-    return App.env.RMWebUrl + '/cluster/app/tez_' + this.get('id');
-  }.property('id'),
+    return App.env.RMWebUrl + '/cluster/app/' + this.get('appId');
+  }.property('appId'),
 
   updateLoading: function() {
     this.set('loading', false);

http://git-wip-us.apache.org/repos/asf/tez/blob/71296464/tez-ui/src/main/webapp/app/scripts/helpers/date.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/helpers/date.js b/tez-ui/src/main/webapp/app/scripts/helpers/date.js
index b9dd697..750b4f4 100644
--- a/tez-ui/src/main/webapp/app/scripts/helpers/date.js
+++ b/tez-ui/src/main/webapp/app/scripts/helpers/date.js
@@ -46,7 +46,7 @@ App.Helpers.date = {
    * Convert timestamp to date-string 'DAY_OF_THE_WEEK, MONTH DAY, YEAR HOURS:MINUTES'
    *
    * @param {number} timestamp
-   * @param {bool} showSeconds should seconds be added to result string
+   * @param {bool} showSeconds should seconds be added to result string. true by default.
    * @param {bool} showMilliseconds should miliseconds be added to result string (if <code>showSeconds</code> is false, milliseconds wouldn't be added)
    * @return {*} date
    * @method dateFormat
@@ -55,14 +55,15 @@ App.Helpers.date = {
     if (!App.Helpers.number.isValidInt(timestamp)) {
       return timestamp;
     }
-    var format = 'ddd, MMM DD, YYYY HH:mm';
+    if(showSeconds == undefined) showSeconds = true;
+    var format = 'DD MMM YYYY HH:mm';
     if (showSeconds) {
       format += ':ss';
       if (showMilliseconds) {
         format += ':SSS';
       }
     }
-    return moment((new Date(timestamp)).toISOString().replace('Z', '')).format(format);
+    return moment.utc(timestamp).local().format(format);
   },
 
   /**


[2/2] tez git commit: TEZ-1864. move initialization code dependent on config params to App.ready. (Sreenath Somarajapuram via hitesh)

Posted by hi...@apache.org.
TEZ-1864. move initialization code dependent on config params to App.ready. (Sreenath Somarajapuram via hitesh)


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

Branch: refs/heads/master
Commit: cdc5c7bf1fcb8796aa811fc1d6aeb802dc624d26
Parents: 7129646
Author: Hitesh Shah <hi...@apache.org>
Authored: Fri Dec 19 11:16:03 2014 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Fri Dec 19 11:16:03 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                               |   1 +
 tez-ui/src/main/webapp/app/scripts/app.js | 115 ++++++++++++-------------
 2 files changed, 56 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/cdc5c7bf/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 31d9c1e..37d0700 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.0: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-1864. move initialization code dependent on config params to App.ready.
   TEZ-1870. Time displayed in the UI is in GMT.
   TEZ-1858. Docs for deploying/using the Tez UI.
   TEZ-1642. TestAMRecovery sometimes fail.

http://git-wip-us.apache.org/repos/asf/tez/blob/cdc5c7bf/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 43aad3c..d74ca34 100644
--- a/tez-ui/src/main/webapp/app/scripts/app.js
+++ b/tez-ui/src/main/webapp/app/scripts/app.js
@@ -36,72 +36,67 @@ App.Helpers = Em.Namespace.create(),
 App.Mappers = Em.Namespace.create(),
 App.Configs = Em.Namespace.create();
 
-Ember.Application.initializer({
-  name: "initApp",
+App.ready = function () {
+  $.extend(App.env, App.Configs.envDefaults);
 
-  initialize: function(container, application) {
-    $.extend(App.env, App.Configs.envDefaults);
+  App.ApplicationAdapter = App.TimelineRESTAdapter.extend({
+    host: App.env.timelineBaseUrl
+  });
+  App.ApplicationSerializer = App.TimelineSerializer.extend();
 
-    application.ApplicationAdapter = App.TimelineRESTAdapter.extend({
-      host: App.env.timelineBaseUrl
-    });
-    application.ApplicationSerializer = App.TimelineSerializer.extend();
+  App.AppDetailAdapter = DS.RESTAdapter.extend({
+    ajax: function(url, method, hash) {
+      hash = hash || {}; // hash may be undefined
+      hash.crossDomain = true;
+      hash.xhrFields = {withCredentials: true};
+      return this._super(url, method, hash);
+    },
+    namespace: App.Configs.restNamespace.applicationHistory,
+    host: App.env.timelineBaseUrl,
+    pathForType: function() {
+      return "apps";
+    },
+  });
 
-    application.AppDetailAdapter = DS.RESTAdapter.extend({
-      ajax: function(url, method, hash) {
-        hash = hash || {}; // hash may be undefined
-        hash.crossDomain = true;
-        hash.xhrFields = {withCredentials: true};
-        return this._super(url, method, hash);
-      },
-      namespace: App.Configs.restNamespace.applicationHistory,
-      host: App.env.timelineBaseUrl,
-      pathForType: function() {
-        return "apps";
-      },
-    });
-
-    application.VertexAdapter = App.ApplicationAdapter.extend({
-      _setInputs: function (store, data) {
-        var dagId = Ember.get(data, 'primaryfilters.TEZ_DAG_ID.0'),
-            vertexName = Ember.get(data, 'otherinfo.vertexName');
-        if(dagId) {
-          return store.find('dag', dagId).then(function (dag) {
-            if(dag.get('vertices') instanceof Array) {
-              var vertexData = dag.get('vertices').findBy('vertexName', vertexName);
-              if(vertexData && vertexData.additionalInputs) {
-                data.inputs = vertexData.additionalInputs;
-              }
+  App.VertexAdapter = App.ApplicationAdapter.extend({
+    _setInputs: function (store, data) {
+      var dagId = Ember.get(data, 'primaryfilters.TEZ_DAG_ID.0'),
+          vertexName = Ember.get(data, 'otherinfo.vertexName');
+      if(dagId) {
+        return store.find('dag', dagId).then(function (dag) {
+          if(dag.get('vertices') instanceof Array) {
+            var vertexData = dag.get('vertices').findBy('vertexName', vertexName);
+            if(vertexData && vertexData.additionalInputs) {
+              data.inputs = vertexData.additionalInputs;
             }
-            return data;
-          });
-        }
-        else {
-          return Em.RSVP.Promise(data);
-        }
-      },
-      find: function(store, type, id) {
-        var that = this;
-        return this._super(store, type, id).then(function (data) {
-          return that._setInputs(store, data);
-        });
-      },
-      findQuery: function(store, type, queryObj, records) {
-        var that = this;
-        return that._super(store, type, queryObj, records ).then(function (data) {
-          var fetchers = [];
-          data.entities.forEach(function (datum) {
-            fetchers.push(that._setInputs(store, datum));
-          });
-          return Em.RSVP.allSettled(fetchers).then(function () {
-            return data;
-          });
+          }
+          return data;
         });
       }
-    });
-
-  }
-});
+      else {
+        return Em.RSVP.Promise(data);
+      }
+    },
+    find: function(store, type, id) {
+      var that = this;
+      return this._super(store, type, id).then(function (data) {
+        return that._setInputs(store, data);
+      });
+    },
+    findQuery: function(store, type, queryObj, records) {
+      var that = this;
+      return that._super(store, type, queryObj, records ).then(function (data) {
+        var fetchers = [];
+        data.entities.forEach(function (datum) {
+          fetchers.push(that._setInputs(store, datum));
+        });
+        return Em.RSVP.allSettled(fetchers).then(function () {
+          return data;
+        });
+      });
+    }
+  });
+};
 
 /* Order and include */
 require('scripts/default-configs');