You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ma...@apache.org on 2014/04/05 02:05:14 UTC
[28/50] [abbrv] git commit: Fixed bug in rendering dates.
Fixed bug in rendering dates.
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/b0688069
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/b0688069
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/b0688069
Branch: refs/heads/mansu/job_page
Commit: b068806900867d67fe54a85525a9f9e9df38fe97
Parents: 96ab501
Author: Suman Karumuri <sk...@twitter.com>
Authored: Sun Mar 30 01:00:04 2014 -0700
Committer: Suman Karumuri <sk...@twitter.com>
Committed: Sun Mar 30 01:00:04 2014 -0700
----------------------------------------------------------------------
.../apache/aurora/scheduler/http/ui/js/controllers.js | 13 ++++---------
.../apache/aurora/scheduler/http/ui/taskStatus.html | 2 +-
2 files changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b0688069/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 506375c..4bc8dc7 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
@@ -282,7 +282,6 @@ auroraUIControllers.controller('JobController',
cellTemplateUrl: '/schedulingDetail.html'}
];
- // TODO: BUG showing dates.
$scope.taskSummaryTableConfig = summaryTableConfig;
var showSummary = 'Show Summary';
@@ -303,7 +302,7 @@ auroraUIControllers.controller('JobController',
{label: 'Status', map: 'status', cellTemplateUrl: '/taskStatus.html'},
{label: 'Last Active', map: 'latestActivity',
formatFunction: function (date) {
- return fromNow(date);
+ return moment(date).fromNow();
}},
{label: 'Host', map: 'host', cellTemplateUrl: '/taskSandbox.html'},
{label: '', map: 'taskId', cellTemplateUrl: '/taskLink.html'}
@@ -316,10 +315,10 @@ auroraUIControllers.controller('JobController',
[
{label: 'Running duration', map: 'duration',
formatFunction: function (duration) {
- return fromNow(moment().subtract(duration), true);
+ return moment(moment().subtract(duration)).fromNow(true);
}}
],
- _.last(taskColumns, taskColumns.length - 3)
+ _.last(taskColumns, taskColumns.length - 2)
);
$scope.completedTasks = [];
@@ -400,14 +399,10 @@ auroraUIControllers.controller('JobController',
return runningTaskEvent ? _.last(sortedTaskEvents).timestamp - runningTaskEvent.timestamp : 0;
}
- function fromNow(date, dropSuffix) {
- return moment(date).fromNow(dropSuffix);
- }
-
function summarizeTaskEvents(taskEvents) {
return _.map(taskEvents, function (taskEvent) {
return {
- date: moment(taskEvent.timestamp).format('MM DD h:mm:ss z'),
+ date: moment(taskEvent.timestamp).format('MM DD h:mm:ss'),
status: _.invert(ScheduleStatus)[taskEvent.status],
message: taskEvent.message
};
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b0688069/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 da59102..121dfe8 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
@@ -8,7 +8,7 @@
<ul ng-if='showDetails'>
<li ng-repeat='taskEvent in dataRow.taskEvents'>
- {{taskEvent.date}} UTC -
+ {{taskEvent.date}} local -
<span title='{{taskEvent.status | scheduleStatusTooltip}}'>
<span class='schedulingStatus'>{{taskEvent.status}}</span>
</span>