ui/app/container/controller.js

62 lines
1.6 KiB
JavaScript

import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
export default Controller.extend({
scope: service(),
actions: {
changeContainer(container) {
this.transitionToRoute('container', container.get('id'));
}
},
portSortBy: 'privatePort',
queryParams: ['sortBy'],
searchText: '',
portHeaders: [
{
name: 'publicIp',
sort: ['displayPublicIp','privatePort','protocol'],
searchField: 'displayPublicIp',
translationKey: 'generic.ipAddress',
},
{
name: 'publicPort',
sort: ['publicPort','privatePort','protocol'],
searchField: 'publicPort',
translationKey: 'containerPage.portsTab.table.public',
},
{
name: 'privatePort',
sort: ['privatePort','protocol'],
searchField: 'privatePort',
translationKey: 'containerPage.portsTab.table.private',
},
{
name: 'protocol',
sort: ['protocol','privatePort'],
searchField: 'protocol',
translationKey: 'containerPage.portsTab.table.protocol',
},
],
storageSortBy: 'state',
storageHeaders: [
{
name: 'state',
sort: ['sortState','displayUri','id'],
translationKey: 'hostsPage.hostPage.storageTab.table.header.state',
width: 125,
},
{
name: 'hostPath',
sort: ['displayUri','id'],
translationKey: 'hostsPage.hostPage.storageTab.table.header.hostPath',
},
{
name: 'mounts',
sort: false,
translationKey: 'hostsPage.hostPage.storageTab.table.header.mounts',
},
],
});