mirror of https://github.com/hashicorp/consul
31 lines
656 B
JavaScript
31 lines
656 B
JavaScript
import Route from 'consul-ui/routing/route';
|
|
|
|
export default class InstancesRoute extends Route {
|
|
queryParams = {
|
|
sortBy: 'sort',
|
|
status: 'status',
|
|
source: 'source',
|
|
searchproperty: {
|
|
as: 'searchproperty',
|
|
empty: [['Name', 'Tags', 'ID', 'Address', 'Port', 'Service.Meta', 'Node.Meta']],
|
|
},
|
|
search: {
|
|
as: 'filter',
|
|
replace: true,
|
|
},
|
|
};
|
|
|
|
model() {
|
|
const parent = this.routeName
|
|
.split('.')
|
|
.slice(0, -1)
|
|
.join('.');
|
|
return this.modelFor(parent);
|
|
}
|
|
|
|
setupController(controller, model) {
|
|
super.setupController(...arguments);
|
|
controller.setProperties(model);
|
|
}
|
|
}
|