script-src 'self' blocks inline onclick handlers and <script> blocks. Migrate all interactive behavior to data-* attributes wired by mcias.js: - data-toggle-form: accounts, policies, pgcreds create-form buttons - data-href: audit clickable table rows - data-tab: policy form tab switching (moved showTab from inline script) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
41 lines
1.0 KiB
HTML
41 lines
1.0 KiB
HTML
{{define "policies"}}{{template "base" .}}{{end}}
|
|
{{define "title"}}Policy Rules — MCIAS{{end}}
|
|
{{define "content"}}
|
|
<div class="page-header d-flex align-center justify-between">
|
|
<div>
|
|
<h1>Policy Rules</h1>
|
|
<p class="text-muted text-small">{{len .Rules}} operator rules (built-in defaults not shown)</p>
|
|
</div>
|
|
<button class="btn btn-primary"
|
|
data-toggle-form="create-form"
|
|
data-label-show="Add Rule"
|
|
data-label-hide="Cancel">
|
|
Add Rule
|
|
</button>
|
|
</div>
|
|
|
|
<div id="create-form" class="card mt-2" hidden>
|
|
<h2 style="font-size:1rem;font-weight:600;margin-bottom:1rem">Create Policy Rule</h2>
|
|
{{template "policy_form" .}}
|
|
</div>
|
|
|
|
<div class="table-wrapper mt-2">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Priority</th>
|
|
<th>Description</th>
|
|
<th>Effect</th>
|
|
<th>Enabled</th>
|
|
<th>Updated</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="policies-tbody">
|
|
{{range .Rules}}{{template "policy_row" .}}{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{end}}
|