2018-04-03 14:16:57 +00:00
|
|
|
import Ember from 'ember';
|
|
|
|
import ModelBoundaryRoute from 'vault/mixins/model-boundary-route';
|
|
|
|
|
2018-05-25 20:33:22 +00:00
|
|
|
const { inject } = Ember;
|
2018-04-03 14:16:57 +00:00
|
|
|
export default Ember.Route.extend(ModelBoundaryRoute, {
|
2018-05-25 20:33:22 +00:00
|
|
|
auth: inject.service(),
|
2018-07-19 01:59:04 +00:00
|
|
|
controlGroup: inject.service(),
|
2018-05-25 20:33:22 +00:00
|
|
|
flashMessages: inject.service(),
|
|
|
|
console: inject.service(),
|
2018-04-03 14:16:57 +00:00
|
|
|
|
|
|
|
modelTypes: ['secret', 'secret-engine'],
|
|
|
|
|
|
|
|
beforeModel() {
|
|
|
|
this.get('auth').deleteCurrentToken();
|
2018-07-19 01:59:04 +00:00
|
|
|
this.get('controlGroup').deleteTokens();
|
2018-05-25 20:33:22 +00:00
|
|
|
this.get('console').set('isOpen', false);
|
|
|
|
this.get('console').clearLog(true);
|
2018-04-03 14:16:57 +00:00
|
|
|
this.clearModelCache();
|
|
|
|
this.replaceWith('vault.cluster');
|
|
|
|
this.get('flashMessages').clearMessages();
|
|
|
|
},
|
|
|
|
});
|