YARN-9913. In YARN ui2 attempt container tab, The Container's ElapsedTime of running Application is incorrect when the browser and the yarn server are in different timezons.
This commit is contained in:
parent
54dc6b7d72
commit
2eed96f48b
|
@ -455,7 +455,7 @@ export default Ember.Component.extend({
|
||||||
}, {
|
}, {
|
||||||
id: 'elapsedTime',
|
id: 'elapsedTime',
|
||||||
headerTitle: 'Elapsed Time',
|
headerTitle: 'Elapsed Time',
|
||||||
contentPath: 'elapsedTime'
|
contentPath: 'formattedElapsedTime'
|
||||||
}, {
|
}, {
|
||||||
id: 'priority',
|
id: 'priority',
|
||||||
headerTitle: 'Priority',
|
headerTitle: 'Priority',
|
||||||
|
|
|
@ -26,6 +26,7 @@ export default DS.Model.extend({
|
||||||
priority: DS.attr('number'),
|
priority: DS.attr('number'),
|
||||||
startedTime: DS.attr('number'),
|
startedTime: DS.attr('number'),
|
||||||
finishedTime: DS.attr('number'),
|
finishedTime: DS.attr('number'),
|
||||||
|
elapsedTime: DS.attr('number'),
|
||||||
logUrl: DS.attr('string'),
|
logUrl: DS.attr('string'),
|
||||||
containerExitStatus: DS.attr('number'),
|
containerExitStatus: DS.attr('number'),
|
||||||
containerState: DS.attr('string'),
|
containerState: DS.attr('string'),
|
||||||
|
@ -49,18 +50,14 @@ export default DS.Model.extend({
|
||||||
return this.get("finishedTime");
|
return this.get("finishedTime");
|
||||||
}.property("finishedTime"),
|
}.property("finishedTime"),
|
||||||
|
|
||||||
elapsedTime: function() {
|
formattedElapsedTime: function() {
|
||||||
var elapsedMs = this.get("finishedTs") - this.get("startTs");
|
return Converter.msToElapsedTimeUnit(this.get("elapsedTime"));
|
||||||
if (elapsedMs <= 0) {
|
}.property("elapsedTime"),
|
||||||
elapsedMs = Date.now() - this.get("startTs");
|
|
||||||
}
|
|
||||||
return Converter.msToElapsedTimeUnit(elapsedMs);
|
|
||||||
}.property(),
|
|
||||||
|
|
||||||
tooltipLabel: function() {
|
tooltipLabel: function() {
|
||||||
return "<p>Id:" + this.get("id") +
|
return "<p>Id:" + this.get("id") +
|
||||||
"</p><p>ElapsedTime:" +
|
"</p><p>ElapsedTime:" +
|
||||||
String(this.get("elapsedTime")) + "</p>";
|
String(this.get("formattedElapsedTime")) + "</p>";
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
masterNodeURL: function() {
|
masterNodeURL: function() {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Elapsed Time</td>
|
<td>Elapsed Time</td>
|
||||||
<td>{{container.elapsedTime}}</td>
|
<td>{{container.formattedElapsedTime}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Priority</td>
|
<td>Priority</td>
|
||||||
|
|
Loading…
Reference in New Issue