mirror of https://github.com/rancher/ui.git
65 lines
1.6 KiB
JavaScript
65 lines
1.6 KiB
JavaScript
import { alias } from '@ember/object/computed';
|
|
import { inject as service } from '@ember/service';
|
|
import Controller, { inject as controller } from '@ember/controller';
|
|
|
|
export default Controller.extend({
|
|
projectController: controller('authenticated.project'),
|
|
scope: service(),
|
|
|
|
groupTableBy: alias('projectController.groupTableBy'),
|
|
expandedInstances: alias('projectController.expandedInstances'),
|
|
preSorts: alias('projectController.preSorts'),
|
|
|
|
queryParams: ['sortBy'],
|
|
sortBy: 'name',
|
|
|
|
actions: {
|
|
// toggleExpand() {
|
|
// this.get('projectController').send('toggleExpand', ...arguments);
|
|
// },
|
|
},
|
|
|
|
headers: [
|
|
// {
|
|
// name: 'expand',
|
|
// sort: false,
|
|
// searchField: null,
|
|
// width: 30
|
|
// },
|
|
{
|
|
name: 'state',
|
|
sort: ['sortState','displayName'],
|
|
searchField: 'displayState',
|
|
translationKey: 'generic.state',
|
|
width: 120
|
|
},
|
|
{
|
|
name: 'name',
|
|
sort: ['displayName','id'],
|
|
searchField: 'displayName',
|
|
translationKey: 'volumesPage.claimName.label',
|
|
},
|
|
{
|
|
name: 'size',
|
|
sort: ['sizeBytes'],
|
|
search: ['sizeBytes','displaySize'],
|
|
translationKey: 'generic.size',
|
|
width: 120
|
|
},
|
|
{
|
|
name: 'volume',
|
|
sort: ['volume.displayName','displayName','id'],
|
|
translationKey: 'volumesPage.volume.label',
|
|
searchField: null,
|
|
},
|
|
{
|
|
name: 'storageClass',
|
|
sort: ['storageClass.displayName','displayName','id'],
|
|
translationKey: 'volumesPage.storageClass.label',
|
|
searchField: null,
|
|
},
|
|
],
|
|
|
|
rows: alias('model.persistentVolumeClaims'),
|
|
});
|