open-vault/ui/app/routes/vault/cluster/logout.js
madalynrose 2b41283a91
UI console (#4631)
* adding columnify and ember-cli-cjs-transform

* add yargs-parser

* remove vendored yargs-parser tokenizer and use cjs transform to import it from actual yargs-parser

* add clear command that clears the log, but maintains history

* make codemirror have no gutter and be auto-height when rendered in the console output log

* add fullscreen command and hook up fullscreen toggle button

* hook up copy button
2018-05-25 16:33:22 -04:00

21 lines
583 B
JavaScript

import Ember from 'ember';
import ModelBoundaryRoute from 'vault/mixins/model-boundary-route';
const { inject } = Ember;
export default Ember.Route.extend(ModelBoundaryRoute, {
auth: inject.service(),
flashMessages: inject.service(),
console: inject.service(),
modelTypes: ['secret', 'secret-engine'],
beforeModel() {
this.get('auth').deleteCurrentToken();
this.get('console').set('isOpen', false);
this.get('console').clearLog(true);
this.clearModelCache();
this.replaceWith('vault.cluster');
this.get('flashMessages').clearMessages();
},
});