diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/timeline-view.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/timeline-view.js index 031dd41be93..4f0af8dbce3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/timeline-view.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/timeline-view.js @@ -455,7 +455,7 @@ export default Ember.Component.extend({ }, { id: 'elapsedTime', headerTitle: 'Elapsed Time', - contentPath: 'elapsedTime' + contentPath: 'formattedElapsedTime' }, { id: 'priority', headerTitle: 'Priority', diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container.js index 6a33e9a2fed..649970eea33 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container.js @@ -26,6 +26,7 @@ export default DS.Model.extend({ priority: DS.attr('number'), startedTime: DS.attr('number'), finishedTime: DS.attr('number'), + elapsedTime: DS.attr('number'), logUrl: DS.attr('string'), containerExitStatus: DS.attr('number'), containerState: DS.attr('string'), @@ -49,18 +50,14 @@ export default DS.Model.extend({ return this.get("finishedTime"); }.property("finishedTime"), - elapsedTime: function() { - var elapsedMs = this.get("finishedTs") - this.get("startTs"); - if (elapsedMs <= 0) { - elapsedMs = Date.now() - this.get("startTs"); - } - return Converter.msToElapsedTimeUnit(elapsedMs); - }.property(), + formattedElapsedTime: function() { + return Converter.msToElapsedTimeUnit(this.get("elapsedTime")); + }.property("elapsedTime"), tooltipLabel: function() { return "
Id:" + this.get("id") + "
ElapsedTime:" + - String(this.get("elapsedTime")) + "
"; + String(this.get("formattedElapsedTime")) + ""; }.property(), masterNodeURL: function() { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/container-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/container-table.hbs index 25d57c5f02a..a57653ad501 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/container-table.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/container-table.hbs @@ -30,7 +30,7 @@ {{/if}}