forked from hashicorp/vault
/
show.js
29 lines (27 loc) · 866 Bytes
/
show.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import Controller, { inject as controller } from '@ember/controller';
import BackendCrumbMixin from 'vault/mixins/backend-crumb';
export default Controller.extend(BackendCrumbMixin, {
backendController: controller('vault.cluster.secrets.backend'),
queryParams: ['tab', 'version'],
version: '',
tab: '',
reset() {
this.set('tab', '');
this.set('version', '');
},
actions: {
refresh: function() {
// closure actions don't bubble to routes,
// so we have to manually bubble here
this.send('refreshModel');
},
toggleAdvancedEdit(bool) {
this.set('preferAdvancedEdit', bool);
this.get('backendController').set('preferAdvancedEdit', bool);
},
toggleObfuscatedInput(bool) {
this.set('preferObfuscated', bool);
this.get('backendController').set('preferObfuscated', bool);
},
},
});