mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
* Update page headers for database components * Update generate forms and license info * Mount backend form page headers.. * Raft page headers * Update role-aws-edit page header * Tools, role-ssh, mount-backend-form and fix tests * OIDC, TOTP and userpass page headers and tsts * odic, keymgmt, and dashboard * Fix dashboard title tests * Fix breadcrumbs * MFA, idenitity, and generated item * Fix mfa enforcement page header tests * Move tabs out of page header Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com>
38 lines
857 B
JavaScript
38 lines
857 B
JavaScript
/**
|
|
* Copyright IBM Corp. 2016, 2025
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import RoleEdit from './role-edit';
|
|
import { computed } from '@ember/object';
|
|
|
|
export default RoleEdit.extend({
|
|
init() {
|
|
this._super(...arguments);
|
|
this.set('backendType', 'ssh');
|
|
},
|
|
|
|
title: computed('mode', function () {
|
|
if (this.mode === 'create') {
|
|
return 'Create SSH Role';
|
|
} else if (this.mode === 'edit') {
|
|
return 'Edit SSH Role';
|
|
} else {
|
|
return 'SSH Role';
|
|
}
|
|
}),
|
|
|
|
subtitle: computed('mode', 'model.id', function () {
|
|
if (this.mode === 'create' || this.mode === 'edit') return;
|
|
|
|
return this.model.id;
|
|
}),
|
|
|
|
actions: {
|
|
updateTtl(path, val) {
|
|
const model = this.model;
|
|
const valueToSet = val.enabled === true ? `${val.seconds}s` : undefined;
|
|
model.set(path, valueToSet);
|
|
},
|
|
},
|
|
});
|