Repository: ambari
Updated Branches:
  refs/heads/trunk eeea51e1e -> 4351f73b9


AMBARI-5107. Job Tez DAG vertex start/end time should show seconds also 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: 4351f73b96be3216ac39538b6d1e80ed770fd140
Parents: eeea51e
Author: Alex Antonenko <[email protected]>
Authored: Mon Mar 17 15:47:19 2014 +0200
Committer: Alex Antonenko <[email protected]>
Committed: Mon Mar 17 15:50:59 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/utils/date.js                            | 8 ++++++--
 ambari-web/app/views/main/jobs/hive_job_details_view.js | 4 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4351f73b/ambari-web/app/utils/date.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/date.js b/ambari-web/app/utils/date.js
index 5ceff21..b24f064 100644
--- a/ambari-web/app/utils/date.js
+++ b/ambari-web/app/utils/date.js
@@ -31,12 +31,16 @@ module.exports = {
    * @param timestamp
    * @return string date
    */
-  dateFormat:function (timestamp) {
+  dateFormat:function (timestamp, showSeconds) {
     if (!validator.isValidInt(timestamp)) return timestamp;
     var date = new Date(timestamp);
     var months = this.dateMonths;
     var days = this.dateDays;
-    return days[date.getDay()] + ', ' + months[date.getMonth()] + ' ' + 
this.dateFormatZeroFirst(date.getDate()) + ', ' + date.getFullYear() + ' ' + 
this.dateFormatZeroFirst(date.getHours()) + ':' + 
this.dateFormatZeroFirst(date.getMinutes());
+    var formattedDate = days[date.getDay()] + ', ' + months[date.getMonth()] + 
' ' + this.dateFormatZeroFirst(date.getDate()) + ', ' + date.getFullYear() + ' 
' + this.dateFormatZeroFirst(date.getHours()) + ':' + 
this.dateFormatZeroFirst(date.getMinutes());
+    if (showSeconds) {
+      formattedDate += ':' + this.dateFormatZeroFirst(date.getSeconds());
+    };
+    return formattedDate;
   },
   /**
    * Convert timestamp to date-string 'DAY_OF_THE_WEEK MONTH DAY YEAR'

http://git-wip-us.apache.org/repos/asf/ambari/blob/4351f73b/ambari-web/app/views/main/jobs/hive_job_details_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/jobs/hive_job_details_view.js 
b/ambari-web/app/views/main/jobs/hive_job_details_view.js
index 42dd238..f6bd2bd 100644
--- a/ambari-web/app/views/main/jobs/hive_job_details_view.js
+++ b/ambari-web/app/views/main/jobs/hive_job_details_view.js
@@ -211,8 +211,8 @@ App.MainHiveJobDetailsView = Em.View.extend({
         read : v.get('recordReadCount') == null ? null : 
Em.I18n.t('jobs.hive.tez.records.count').format(v.get('recordReadCount')),
         write : v.get('recordWriteCount') == null ? null : 
Em.I18n.t('jobs.hive.tez.records.count').format(v.get('recordWriteCount'))
       },
-      started: v.get('startTime') ? dateUtils.dateFormat(v.get('startTime')) : 
'',
-      ended: v.get('endTime') ? dateUtils.dateFormat(v.get('endTime')) : '',
+      started: v.get('startTime') ? dateUtils.dateFormat(v.get('startTime'), 
true) : '',
+      ended: v.get('endTime') ? dateUtils.dateFormat(v.get('endTime'), true) : 
'',
       status: status
     };
   }.property('selectedVertex.fileReadOps', 'selectedVertex.fileWriteOps', 
'selectedVertex.hdfsReadOps', 'selectedVertex.hdfdWriteOps',

Reply via email to