YARN-8603. [UI2] Latest run application should be listed first in the RM UI. Contributed by Akhil PB.

This commit is contained in:
Rohith Sharma K S 2018-08-03 13:58:41 +05:30
parent db465afb5c
commit 33482d35e8
3 changed files with 11 additions and 2 deletions

View File

@ -20,6 +20,7 @@
import Ember from 'ember';
import ColumnDef from 'em-table/utils/column-definition';
import TableDef from 'em-table/utils/table-definition';
import Converter from 'yarn-ui/utils/converter';
export default Ember.Controller.extend({
tableDefinition: TableDef.create({
@ -83,6 +84,9 @@ export default Ember.Controller.extend({
headerTitle: 'Start Time',
contentPath: 'startTime',
facetType: null,
getCellContent: function(row) {
return Converter.timeStampToDate(row.get('startTime'));
}
}, {
id: 'elTime',
headerTitle: 'Elapsed Time',
@ -169,6 +173,9 @@ export default Ember.Controller.extend({
headerTitle: 'Started Time',
contentPath: 'startTime',
facetType: null,
getCellContent: function(row) {
return Converter.timeStampToDate(row.get('startTime'));
}
}, {
id: 'finishTime',
headerTitle: 'Finished Time',

View File

@ -25,7 +25,9 @@ export default AppTableController.extend({
tableDefinition: TableDefinition.create({
searchType: 'manual',
enableFaceting: true,
rowCount: 25
rowCount: 25,
sortColumnId: 'stTime',
sortOrder: 'desc'
}),
searchText: Ember.computed.alias('tableDefinition.searchText'),
sortColumnId: Ember.computed.alias('tableDefinition.sortColumnId'),

View File

@ -42,7 +42,7 @@ export default DS.JSONAPISerializer.extend({
user: payload.user,
queue: payload.queue,
state: payload.state,
startTime: Converter.timeStampToDate(payload.startedTime),
startTime: payload.startedTime, // will be formatted in em-table
elapsedTime: payload.elapsedTime,
finishedTime: Converter.timeStampToDate(payload.finishedTime),
finalStatus: payload.finalStatus,