aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [49/50] [abbrv] git commit: Now showing formatted time in status.
Date Sat, 05 Apr 2014 00:05:35 GMT
Now showing formatted time in status.


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

Branch: refs/heads/mansu/job_page
Commit: 00861863f85462b3abf4b9b38f35b4a8ce973cf4
Parents: 09519c3
Author: Suman Karumuri <skarumuri@twitter.com>
Authored: Fri Apr 4 16:36:12 2014 -0700
Committer: Suman Karumuri <skarumuri@twitter.com>
Committed: Fri Apr 4 16:40:44 2014 -0700

----------------------------------------------------------------------
 .../org/apache/aurora/scheduler/http/ui/js/controllers.js    | 4 ++--
 .../org/apache/aurora/scheduler/http/ui/js/filters.js        | 8 +++++++-
 .../org/apache/aurora/scheduler/http/ui/taskStatus.html      | 3 ++-
 3 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/00861863/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
index 319344b..d867f45 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
@@ -321,7 +321,7 @@ auroraUIControllers.controller('JobController',
       {label: 'Running duration',
         map: 'duration',
         formatFunction: function (duration) {
-          return moment(moment().subtract(duration)).fromNow(true);
+          return moment.duration(duration).humanize();
         }
       });
 
@@ -334,7 +334,7 @@ auroraUIControllers.controller('JobController',
     function addColumn(idxPosition, currentColumns, newColumn) {
       return _.union(
         _.first(currentColumns, idxPosition),
-        [ newColumn ],
+        [newColumn],
         _.last(currentColumns, currentColumns.length - idxPosition));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/00861863/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js
index 0bde9fb..4032541 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js
@@ -44,4 +44,10 @@ auroraUI.filter('toCores', function () {
   return  function (count) {
     return count + ' cores';
   }
-});
\ No newline at end of file
+});
+
+auroraUI.filter('toElapsedTime', function () {
+  return function (timestamp) {
+    return moment.duration(moment().valueOf() - timestamp).humanize();
+  }
+});

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/00861863/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html b/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html
index 9f04f51..102d155 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html
@@ -4,7 +4,8 @@
       <span ng-if='!showDetails'><i class='icon-plus'></i></span>
       <span ng-if='showDetails'><i class='icon-minus'></i></span>
       <span>
-        {{dataRow.latestActivity}} - <span class='schedulingStatus'>{{formatedValue}}</span>
+        {{dataRow.latestActivity | toElapsedTime}} ago -
+        <span class='schedulingStatus'>{{formatedValue}}</span>
       </span>
     </span>
 


Mime
View raw message