open-consul/ui/packages/consul-ui/app/routes/dc/intentions/index.js

30 lines
650 B
JavaScript
Raw Normal View History

import Route from 'consul-ui/routing/route';
export default class IndexRoute extends Route {
queryParams = {
sortBy: 'sort',
2020-11-13 15:55:40 +00:00
access: 'access',
searchproperty: {
as: 'searchproperty',
empty: [['SourceName', 'DestinationName']],
},
search: {
as: 'filter',
replace: true,
},
};
async model(params) {
return {
dc: this.modelFor('dc').dc.Name,
nspace: this.optionalParams().nspace,
searchProperties: this.queryParams.searchproperty.empty[0],
};
}
setupController(controller, model) {
super.setupController(...arguments);
controller.setProperties(model);
}
}