YARN-8803. [UI2] Show flow runs in the order of recently created time in graph widgets. Contributed by Akhil PB.

(cherry picked from commit c79f139519)
This commit is contained in:
Sunil G 2019-03-06 16:49:08 +05:30
parent d721634fea
commit aff5973401
2 changed files with 7 additions and 4 deletions

View File

@ -165,7 +165,7 @@ export default Ember.Controller.extend({
getSortedVizDataInDesc: function(data) {
return data.sort(function(d1, d2) {
return d2.value - d1.value;
return d2.createdTs - d1.createdTs;
});
},

View File

@ -46,7 +46,8 @@ export default DS.Model.extend({
label: this.get('runid'),
value: this.get('runDurationTs'),
tooltip: this.get("shownid") + "<br>" + Converter.msToElapsedTimeUnit(this.get('runDurationTs')),
flowrunUid: this.get('uid')
flowrunUid: this.get('uid'),
createdTs: this.get('createTimeRaw')
};
},
@ -55,7 +56,8 @@ export default DS.Model.extend({
label: this.get('runid'),
value: this.get('cpuVCores'),
tooltip: this.get("shownid") + "<br>" + 'CPU VCores: ' + this.get('cpuVCores'),
flowrunUid: this.get('uid')
flowrunUid: this.get('uid'),
createdTs: this.get('createTimeRaw')
};
},
@ -64,7 +66,8 @@ export default DS.Model.extend({
label: this.get('runid'),
value: this.get('memoryUsed'),
tooltip: this.get("shownid") + "<br>" + 'Memory Used: ' + Converter.memoryBytesToMB(this.get('memoryUsed')),
flowrunUid: this.get('uid')
flowrunUid: this.get('uid'),
createdTs: this.get('createTimeRaw')
};
}
});