ui/lib/global-admin/addon/components/new-edit-policy/template.hbs

141 lines
2.8 KiB
Handlebars

<section class="header clearfix">
<div class="pull-left">
<h1>
{{#if editing}}
{{t "podSecurityPoliciesPage.editPodSecurityPolicy"}}
{{else if readOnly}}
{{t "podSecurityPoliciesPage.detail.header"}}: {{model.name}}
{{else}}
{{t "podSecurityPoliciesPage.addPodSecurityPolicy"}}
{{/if}}
</h1>
</div>
</section>
{{#if (and readOnly model.description)}}
<div class="row mb-30">
{{banner-message
color="bg-secondary mb-0 mt-10"
message=(linkify model.description)
}}
</div>
{{/if}}
{{#unless readOnly}}
<section class="horizontal-form container-fluid">
{{form-name-description
model=model
nameRequired=false
namePlaceholder="podSecurityPoliciesPage.new.form.name.placeholder"
}}
</section>
{{/unless}}
<section>
{{#accordion-list as |al expandFn|}}
<div class="mt-20">
{{form-basic-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-capability-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-volume-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-hostpath-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-fsgroup-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-hostports-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-runasuser-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-selinux-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-supplementalgroups-policy
model=model
expandAll=al.expandAll
expandFn=expandFn
readOnly=readOnly
}}
</div>
<div class="mt-20">
{{form-labels-annotations
labelErrors=labelErrors
initialLabels=model.labels
setLabels=(action "setLabels")
expandAll=al.expandAll
expandFn=expandFn
model=model
}}
</div>
{{/accordion-list}}
</section>
{{top-errors errors=errors}}
{{#unless readOnly}}
{{save-cancel
editing=editing
save=(action "save")
cancel=(action "cancel")
}}
{{/unless}}