mirror of https://github.com/rancher/ui.git
Missing variable for sorts
reworked logic on getting sorts on evn api keys page
This commit is contained in:
parent
3033a356a2
commit
27de30d1aa
|
|
@ -1,9 +1,10 @@
|
|||
import Ember from 'ember';
|
||||
import AccountController from '../account/controller';
|
||||
|
||||
export default AccountController.extend({
|
||||
arranged: function() {
|
||||
arranged: Ember.computed('model.environment.@each.{accountId,name,createdTs}','sortBy','descending', function() {
|
||||
var project = this.get('project.id');
|
||||
let sort = this.get('sorts')[this.get('sortBy')];
|
||||
let sort = (Ember.get(this.get('headers').findBy('name', this.get('sortBy')), 'sort')||[]);
|
||||
|
||||
let out = this.get('model.environment').filter((row) => {
|
||||
return row.get('accountId') === project;
|
||||
|
|
@ -14,5 +15,5 @@ export default AccountController.extend({
|
|||
}
|
||||
|
||||
return out;
|
||||
}.property('model.environment.@each.{accountId,name,createdTs}','sortBy','descending'),
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue