455dfe0a1b
* Add model layer support for filtering intentions by service * Add Route, Controller and template for services.show.intentions tab We are still loading the intentions themselves in the parent Route for the moment * Load the intentions in in the parent route for the moment * Temporarily add support for returning to history -1 Once we have an intention form underneath the service/intention tab this will no longer be needed * Add the new tab and enable blocking queries for it * Add some further acceptance testing around intention listings
22 lines
628 B
JavaScript
22 lines
628 B
JavaScript
import Route from '@ember/routing/route';
|
|
import { inject as service } from '@ember/service';
|
|
import WithIntentionActions from 'consul-ui/mixins/intention/with-actions';
|
|
|
|
export default Route.extend(WithIntentionActions, {
|
|
repo: service('repository/intention'),
|
|
model: function() {
|
|
const parent = this.routeName
|
|
.split('.')
|
|
.slice(0, -1)
|
|
.join('.');
|
|
return this.modelFor(parent);
|
|
},
|
|
setupController: function(controller, model) {
|
|
controller.setProperties(model);
|
|
},
|
|
// Overwrite default afterDelete action to just refresh
|
|
afterDelete: function() {
|
|
return this.refresh();
|
|
},
|
|
});
|