Files
nomad/ui/app/templates/administration/sentinel-policies/gallery.hbs
Phil Renaud 86c858cdc3 [ui] Sentinel Policies CRUD UI (#20483)
* 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>
2024-05-22 16:41:50 -04:00

36 lines
1.6 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
<Breadcrumb @crumb={{hash label="Gallery" args=(array "administration.sentinel-policies.gallery" )}} />
{{page-title "Sentinel Policy Gallery"}}
<section class="section">
<Hds::PageHeader class="variable-title" as |PH|>
<PH.Title>Choose a Template</PH.Title>
<PH.Description>
Select a policy template below. You will have an opportunity to modify the policy before it is submitted.
</PH.Description>
</Hds::PageHeader>
<main class="radio-group" data-test-template-list>
<Hds::Form::RadioCard::Group as |G|>
<G.Legend>Select a Template</G.Legend>
{{#each this.templates as |template|}}
<G.RadioCard class="form-container" @layout="fixed" @maxWidth="30%" @checked={{eq template.name
this.selectedTemplate}} id={{template.name}} data-test-template-card={{template.name}} {{on "change"
this.onChange}} as |R|>
<R.Label data-test-template-label>{{template.displayName}}</R.Label>
<R.Description data-test-template-description>{{template.description}}</R.Description>
</G.RadioCard>
{{/each}}
</Hds::Form::RadioCard::Group>
</main>
<footer class="buttonset">
<Hds::ButtonSet class="button-group">
<Hds::Button @text="Apply" @route="administration.sentinel-policies.new" @query={{hash template=this.selectedTemplate}}
disabled={{is-equal this.selectedTemplate null}} data-test-apply />
<Hds::Button @text="Cancel" @route="administration.sentinel-policies.new" @color="secondary" data-test-cancel />
</Hds::ButtonSet>
</footer>
</section>