mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
* Gallery allows picking stuff * Small fixes * added sentinel templates * Can set enforcement level on policies * Working on the interactive sentinel dev mode * Very rough development flow on FE * Changed position in gutter menu * More sentinel stuff * PR cleanup: removed testmode, removed unneeded mixins and deps * Heliosification * Index-level sentinel policy deletion and page title fixes * Makes the Canaries sentinel policy real and then comments out the unfinished ones * rename Access Control to Administration in prep for moving Sentinel Policies and Node Pool admin there * Sentinel policies moved within the Administration section * Mirage fixture for sentinel policy endpoints * Description length check and 500 prevention * Sync review PR feedback addressed, implied butons on radio cards * Cull un-used sentinel policies --------- Co-authored-by: Mike Nomitch <mail@mikenomitch.com>
75 lines
1.8 KiB
Handlebars
75 lines
1.8 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
~}}
|
|
|
|
<form class="acl-form" autocomplete="off" {{on "submit" this.save}}>
|
|
<Hds::Form::TextInput::Field
|
|
@isRequired={{true}}
|
|
data-test-role-name-input
|
|
@value={{@role.name}}
|
|
{{on "input" this.updateRoleName}}
|
|
{{autofocus ignore=(not @role.isNew)}}
|
|
as |F|>
|
|
<F.Label>Role Name</F.Label>
|
|
</Hds::Form::TextInput::Field>
|
|
|
|
<div>
|
|
<label>
|
|
<span>
|
|
Description (optional)
|
|
</span>
|
|
<Input
|
|
data-test-role-description-input
|
|
@value={{@role.description}}
|
|
class="input"
|
|
/>
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label>
|
|
Policies
|
|
</label>
|
|
<Hds::Table @caption="A list of policies available to this role" class="acl-table"
|
|
@model={{@policies}}
|
|
@columns={{array
|
|
(hash key="selected" width="80px")
|
|
(hash key="name" label="Name" isSortable=true)
|
|
(hash key="description" label="Description")
|
|
(hash key="definition" label="View Policy Definition")
|
|
}}
|
|
@sortBy="name"
|
|
data-test-role-policies
|
|
>
|
|
<:body as |B|>
|
|
<B.Tr>
|
|
<B.Td class="selection-checkbox">
|
|
<label>
|
|
<input type="checkbox"
|
|
checked={{find-by "name" B.data.name @role.policies}}
|
|
{{on "change" (action this.updateRolePolicies B.data)}}
|
|
/>
|
|
</label>
|
|
</B.Td>
|
|
<B.Td data-test-policy-name>{{B.data.name}}</B.Td>
|
|
<B.Td>{{B.data.description}}</B.Td>
|
|
<B.Td>
|
|
<LinkTo @route="administration.policies.policy" @model={{B.data.name}}>
|
|
View Policy Definition
|
|
</LinkTo>
|
|
</B.Td>
|
|
</B.Tr>
|
|
</:body>
|
|
</Hds::Table>
|
|
</div>
|
|
|
|
<footer>
|
|
{{#if (can "update role")}}
|
|
<Hds::Button @text="Save Role" @color="primary"
|
|
{{on "click" this.save}}
|
|
data-test-save-role
|
|
/>
|
|
{{/if}}
|
|
</footer>
|
|
</form> |