2018-07-05 18:28:12 +00:00
|
|
|
import ClusterRouteBase from './cluster-route-base';
|
|
|
|
import Ember from 'ember';
|
2018-07-20 21:48:25 +00:00
|
|
|
import config from 'vault/config/environment';
|
2018-07-05 18:28:12 +00:00
|
|
|
|
2018-08-16 17:48:24 +00:00
|
|
|
const { inject } = Ember;
|
2018-07-05 18:28:12 +00:00
|
|
|
|
|
|
|
export default ClusterRouteBase.extend({
|
2018-07-20 21:48:25 +00:00
|
|
|
flashMessages: inject.service(),
|
2018-08-16 17:48:24 +00:00
|
|
|
version: inject.service(),
|
2018-07-05 18:28:12 +00:00
|
|
|
beforeModel() {
|
2018-08-16 17:48:24 +00:00
|
|
|
return this._super().then(() => {
|
|
|
|
return this.get('version').fetchFeatures();
|
|
|
|
});
|
2018-07-05 18:28:12 +00:00
|
|
|
},
|
|
|
|
model() {
|
2018-08-16 17:48:24 +00:00
|
|
|
return this._super(...arguments);
|
2018-07-05 18:28:12 +00:00
|
|
|
},
|
|
|
|
resetController(controller) {
|
|
|
|
controller.set('wrappedToken', '');
|
|
|
|
controller.set('authMethod', '');
|
|
|
|
},
|
2018-07-20 21:48:25 +00:00
|
|
|
|
|
|
|
afterModel() {
|
|
|
|
if (config.welcomeMessage) {
|
|
|
|
this.get('flashMessages').stickyInfo(config.welcomeMessage);
|
|
|
|
}
|
|
|
|
},
|
2018-07-05 18:28:12 +00:00
|
|
|
});
|