{{#modal-dialog data-test-role-form onclose=(action (mut state) 'role') name="new-role-toggle"}} {{#block-slot 'header'}} {{#if (eq state 'role')}}

New Role

{{else}}

New Policy

{{/if}} {{/block-slot}} {{#block-slot 'body'}} {{#role-form form=form dc=dc}} {{#block-slot 'policy'}} {{#policy-selector source=source dc=dc items=item.Policies}} {{#block-slot 'trigger'}} {{/block-slot}} {{/policy-selector}} {{/block-slot}} {{/role-form}} {{policy-form data-test-policy-form name="role[policy]" form=policyForm dc=dc}} {{/block-slot}} {{#block-slot 'actions' as |close|}} {{#if (eq state 'role')}} {{else}} {{/if}} {{/block-slot}} {{/modal-dialog}} {{#child-selector repo=repo dc=dc type="role" placeholder="Search for role" items=items}} {{#block-slot 'label'}} Apply an existing role {{/block-slot}} {{#block-slot 'create'}} {{/block-slot}} {{#block-slot 'option' as |option|}} {{option.Name}} {{/block-slot}} {{#block-slot 'set'}} {{#tabular-collection data-test-roles rows=5 items=(sort-by 'CreateTime:desc' 'Name:asc' items) as |item index| }} {{#block-slot 'header'}} Name Description {{/block-slot}} {{#block-slot 'row'}} {{item.Name}} {{item.Description}} {{/block-slot}} {{#block-slot 'actions' as |index change checked|}} {{#confirmation-dialog confirming=false index=index message="Are you sure you want to remove this Role?"}} {{#block-slot 'action' as |confirm|}} {{#action-group index=index onchange=(action change) checked=(if (eq checked index) 'checked')}} {{/action-group}} {{/block-slot}} {{#block-slot 'dialog' as |execute cancel message name|}} {{delete-confirmation message=message execute=execute cancel=cancel}} {{/block-slot}} {{/confirmation-dialog}} {{/block-slot}} {{/tabular-collection}} {{/block-slot}} {{/child-selector}}