ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-7677. Slider View: Start Time/End Time sortings do not work. (akovalenko)
Date Tue, 07 Oct 2014 17:07:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 45c2a9d9e -> 86798709c


AMBARI-7677. Slider View: Start Time/End Time sortings do not work. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 86798709cc554f18dc47550951652f86058753a6
Parents: 45c2a9d
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Tue Oct 7 20:03:51 2014 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Tue Oct 7 20:06:05 2014 +0300

----------------------------------------------------------------------
 .../src/main/resources/ui/app/mappers/slider_apps_mapper.js    | 4 ++--
 .../slider/src/main/resources/ui/app/models/slider_app.js      | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/86798709/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 74a679a..72baa67 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -262,8 +262,8 @@ App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically,
{
           status: app.state,
           displayStatus: self.stateMap[app.state] || app.state,
           user: app.user,
-          started: app.startTime ? (new Date(app.startTime).toUTCString()) : "-",
-          ended: app.endTime ? (new Date(app.endTime).toUTCString()) : "-",
+          started: app.startTime || 0,
+          ended: app.endTime  || 0,
           appType: app.type.toUpperCase(),
           diagnostics: app.diagnostics || "-",
           description: app.description || "-",

http://git-wip-us.apache.org/repos/asf/ambari/blob/86798709/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
index 70392bd..87aca47 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
@@ -53,7 +53,8 @@ App.SliderApp = DS.Model.extend({
    */
 
   startedToLocalTime: function () {
-    return moment(this.get('started')).format('ddd, DD MMM YYYY, HH:mm:ss Z [GMT]');
+    var started = this.get('started');
+    return started ? moment(started).format('ddd, DD MMM YYYY, HH:mm:ss Z [GMT]') : '-';
   }.property('started'),
 
   /**
@@ -66,7 +67,8 @@ App.SliderApp = DS.Model.extend({
    */
 
   endedToLocalTime: function () {
-    return moment(this.get('ended')).format('ddd, DD MMM YYYY, HH:mm:ss Z [GMT]');
+    var ended = this.get('ended');
+    return ended ? moment(ended).format('ddd, DD MMM YYYY, HH:mm:ss Z [GMT]') : '-';
   }.property('ended'),
 
   /**


Mime
View raw message