Make ModifyIndex the default sort property for alloc tables

This commit is contained in:
Michael Lange 2017-10-17 17:51:00 -07:00
parent f842d009a4
commit 77cf33472f
3 changed files with 6 additions and 2 deletions

View file

@ -5,6 +5,8 @@ const { Component, computed } = Ember;
export default Component.extend({
tagName: 'th',
attributeBindings: ['title'],
// The prop that the table is currently sorted by
currentProp: '',

View file

@ -17,8 +17,8 @@ export default Controller.extend(Sortable, Searchable, {
currentPage: 1,
pageSize: 10,
sortProperty: 'name',
sortDescending: false,
sortProperty: 'modifyIndex',
sortDescending: true,
searchProps: computed(() => ['id', 'name']),

View file

@ -9,6 +9,8 @@ const DESIRED_STATUSES = ['run', 'stop', 'evict'];
export default Factory.extend({
id: i => (i >= 100 ? `${UUIDS[i % 100]}-${i}` : UUIDS[i]),
modifyIndex: () => faker.random.number({ min: 10, max: 2000 }),
clientStatus: faker.list.random(...CLIENT_STATUSES),
desiredStatus: faker.list.random(...DESIRED_STATUSES),