{{key-value-header baseKey=model path="vault.cluster.secrets.backend.list" mode=mode root=root showCurrent=true }}

{{#if (eq mode "create") }} Create an SSH role {{else if (eq mode 'edit')}} Edit SSH role {{else}} SSH role {{model.id}} {{/if}}

{{#if (eq mode "show") }} {{#if (or model.canUpdate model.canDelete)}}
{{#secret-link secret=model.id mode="edit" replace=true class="button has-icon-right is-ghost is-compact" data-test-edit-link=true }} Edit role {{i-con glyph="chevron-right" size=11}} {{/secret-link}}
{{/if}}
{{#if (eq model.keyType "otp")}} {{#secret-link mode="credentials" secret=model.id class="button has-icon-right is-ghost is-compact" data-test-backend-credentials=true }} Generate credentials {{i-con glyph="chevron-right" size=11}} {{/secret-link}} {{else}} {{#secret-link mode="sign" secret=model.id class="button has-icon-right is-ghost is-compact" data-test-backend-credentials=true }} Sign keys {{i-con glyph="chevron-right" size=11}} {{/secret-link}} {{/if}}
{{/if}}
{{#if (or (eq mode 'edit') (eq mode 'create'))}} {{partial 'partials/role-ssh/form'}} {{else}} {{partial 'partials/role-ssh/show'}} {{/if}}