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

New Role

{{else}}

New Policy

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