open-vault/ui/app/components/role-ssh-edit.js
Chelsea Shaw 97de33ba0d
Ui/ttl form field model (#8891)
Update TTL picker on SSH signing and role create/edit
2020-05-08 12:08:04 -05:00

17 lines
361 B
JavaScript

import RoleEdit from './role-edit';
export default RoleEdit.extend({
init() {
this._super(...arguments);
this.set('backendType', 'ssh');
},
actions: {
updateTtl(path, val) {
const model = this.get('model');
let valueToSet = val.enabled === true ? `${val.seconds}s` : undefined;
model.set(path, valueToSet);
},
},
});