open-vault/ui/lib/kmip/addon/templates/role.hbs
Matthew Irish 29a85fa1c5
UI kmip acceptance (#7129)
* change the story blueprint so that using -ir will generate a story in the expected place for in-repo addons and engines

* update gen-story-md script to do output md to stories folder inside of in-repo addons and engines

* update storybook config to look for story files in /lib

* add story for list-view component

* add list view page object

* add kmip page objects and tests

* update storybook commands in the README

* split tests up more

* update var name in storybook
2019-08-01 16:04:59 -05:00

44 lines
1.3 KiB
Handlebars

<HeaderCredentials @role={{this.role}} @scope={{this.scope}} />
<Toolbar>
<ToolbarActions>
{{#if model.updatePath.canUpdate}}
<ModelWrap as |m|>
<ConfirmAction
@buttonClasses="toolbar-link"
@onConfirmAction={{action
(perform
m.callMethod
"destroyRecord"
model
(concat "Successfully deleted role " model.id)
(concat "There was an error deleting the role " model.id)
(transition-to "vault.cluster.secrets.backend.kmip.scope.roles" this.scope)
)
}}
@confirmMessage={{concat "Are you sure you want to delete " model.id "?"}}
@cancelButtonText="Cancel"
>
Delete role
</ConfirmAction>
</ModelWrap>
{{/if}}
{{#if model.updatePath.canUpdate}}
<ToolbarLink
@params={{array "role.edit" this.scope this.role}}
data-test-kmip-link-edit-role
>
Edit role
</ToolbarLink>
{{/if}}
</ToolbarActions>
</Toolbar>
<div class="box is-fullwidth is-sideless is-shadowless">
<FieldGroupShow @model={{model}} @showAllFields={{false}} />
<div class="box is-fullwidth is-shadowless">
<h2 class="title is-5">
Allowed Operations
</h2>
<OperationFieldDisplay @model={{this.model}} />
</div>
</div>