2018-06-12 21:06:37 +00:00
|
|
|
<PageHeader as |p|>
|
|
|
|
<p.levelLeft>
|
2019-02-14 18:52:34 +00:00
|
|
|
<h1 class="title is-3" data-test-mount-form-header="true">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.showEnable}}
|
|
|
|
{{#with (find-by "type" this.mountModel.type this.mountTypes) as |typeInfo|}}
|
|
|
|
<Icon @name={{or typeInfo.glyph typeInfo.type}} class="has-text-grey-light" />
|
2019-02-14 18:52:34 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if (eq this.mountType "auth")}}
|
2019-03-29 23:40:12 +00:00
|
|
|
{{concat "Enable " typeInfo.displayName " Authentication Method"}}
|
2018-08-28 05:03:55 +00:00
|
|
|
{{else}}
|
2019-03-29 23:40:12 +00:00
|
|
|
{{concat "Enable " typeInfo.displayName " Secrets Engine"}}
|
2018-08-28 05:03:55 +00:00
|
|
|
{{/if}}
|
|
|
|
{{/with}}
|
2021-12-17 03:44:29 +00:00
|
|
|
{{else if (eq this.mountType "auth")}}
|
2019-03-29 23:40:12 +00:00
|
|
|
Enable an Authentication Method
|
2018-06-12 21:06:37 +00:00
|
|
|
{{else}}
|
2019-03-29 23:40:12 +00:00
|
|
|
Enable a Secrets Engine
|
2018-06-12 21:06:37 +00:00
|
|
|
{{/if}}
|
|
|
|
</h1>
|
|
|
|
</p.levelLeft>
|
|
|
|
</PageHeader>
|
2021-12-17 03:44:29 +00:00
|
|
|
<form {{action (perform this.mountBackend) on="submit"}}>
|
2018-04-03 14:16:57 +00:00
|
|
|
<div class="box is-sideless is-fullwidth is-marginless">
|
2021-12-17 03:44:29 +00:00
|
|
|
<NamespaceReminder @mode="enable" @noun={{if (eq this.mountType "auth") "Auth Method" "Secret Engine"}} />
|
|
|
|
<MessageError @model={{this.model}} @errorMessage={{this.errorMessage}} />
|
|
|
|
{{#if this.showEnable}}
|
|
|
|
<FormFieldGroups
|
|
|
|
@model={{this.mountModel}}
|
|
|
|
@onChange={{action "onTypeChange"}}
|
|
|
|
@renderGroup="default"
|
|
|
|
@validationMessages={{this.validationMessages}}
|
|
|
|
@onKeyUp={{action "onKeyUp"}}
|
|
|
|
/>
|
|
|
|
<FormFieldGroups @model={{this.mountModel}} @onChange={{action "onTypeChange"}} @renderGroup="Method Options" />
|
2018-08-28 05:03:55 +00:00
|
|
|
{{else}}
|
|
|
|
{{#each (array "generic" "cloud" "infra") as |category|}}
|
|
|
|
<h3 class="title box-radio-header">
|
|
|
|
{{capitalize category}}
|
|
|
|
</h3>
|
|
|
|
<div class="box-radio-container">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#each (filter-by "category" category this.mountTypes) as |type|}}
|
2020-08-26 16:31:18 +00:00
|
|
|
<BoxRadio
|
|
|
|
@displayName={{type.displayName}}
|
|
|
|
@type={{type.type}}
|
|
|
|
@glyph={{or type.glyph type.type}}
|
2021-12-17 03:44:29 +00:00
|
|
|
@groupValue={{this.mountModel.type}}
|
2020-08-26 16:31:18 +00:00
|
|
|
@groupName="mount-type"
|
2021-12-17 03:44:29 +00:00
|
|
|
@onRadioChange={{queue (action (mut this.mountModel.type)) (action "onTypeChange" "type")}}
|
2020-08-26 16:31:18 +00:00
|
|
|
@disabled={{if type.requiredFeature (not (has-feature type.requiredFeature)) false}}
|
2021-12-17 03:44:29 +00:00
|
|
|
@tooltipMessage={{if
|
|
|
|
(or (eq type.type "transform") (eq type.type "kmip"))
|
|
|
|
(concat
|
|
|
|
type.displayName
|
|
|
|
" is part of the Advanced Data Protection module, which is not included in your enterprise license."
|
|
|
|
)
|
|
|
|
"This secret engine is not included in your license."
|
2020-08-26 16:31:18 +00:00
|
|
|
}}
|
|
|
|
/>
|
2019-02-14 18:52:34 +00:00
|
|
|
{{/each}}
|
2018-08-28 05:03:55 +00:00
|
|
|
</div>
|
|
|
|
{{/each}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="field is-grouped box is-fullwidth is-bottomless">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.showEnable}}
|
2019-02-14 18:52:34 +00:00
|
|
|
<div class="control">
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
data-test-mount-submit="true"
|
2021-12-17 03:44:29 +00:00
|
|
|
class="button is-primary {{if this.mountBackend.isRunning "loading"}}"
|
|
|
|
disabled={{or this.mountBackend.isRunning this.isFormInvalid}}
|
2019-02-14 18:52:34 +00:00
|
|
|
>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if (eq this.mountType "auth")}}
|
2019-02-14 18:52:34 +00:00
|
|
|
Enable Method
|
|
|
|
{{else}}
|
|
|
|
Enable Engine
|
|
|
|
{{/if}}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="control">
|
2021-12-17 03:44:29 +00:00
|
|
|
<button data-test-mount-back type="button" class="button" onclick={{action "toggleShowEnable" false}}>
|
2019-02-14 18:52:34 +00:00
|
|
|
Back
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-08-28 05:03:55 +00:00
|
|
|
{{else}}
|
|
|
|
<button
|
|
|
|
data-test-mount-next
|
|
|
|
type="button"
|
|
|
|
class="button is-primary"
|
2019-02-14 18:52:34 +00:00
|
|
|
onclick={{action "toggleShowEnable" true}}
|
2021-12-17 03:44:29 +00:00
|
|
|
disabled={{not this.mountModel.type}}
|
2019-02-14 18:52:34 +00:00
|
|
|
>
|
2018-08-28 05:03:55 +00:00
|
|
|
Next
|
|
|
|
</button>
|
|
|
|
{{/if}}
|
2018-04-03 14:16:57 +00:00
|
|
|
</div>
|
2021-12-17 03:44:29 +00:00
|
|
|
</form>
|