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

View File

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

View File

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