{{define "content"}} {{$csrf := .CSRF}}
A policy pairs a set of blacklists and allowlists with what to do when a name matches.
| Policy | Blocks | Allows | Action | Networks | Status | Actions |
|---|---|---|---|---|---|---|
|
{{.Name}}
{{if .Description}} {{truncate 70 .Description}} {{end}}
|
{{if .BlacklistName}}
{{range .BlacklistName}}
{{.}}
{{end}}
{{else}}—{{end}}
|
{{if .AllowlistName}}
{{range .AllowlistName}}
{{.}}
{{end}}
{{else}}—{{end}}
|
{{.BlockAction.Label}}
{{if eq (printf "%s" .BlockAction) "sinkhole"}}
{{.SinkholeIPv4}} / {{.SinkholeIPv6}}
{{end}}
|
{{.NetworkCount}} | {{statusWord .Enabled}} |
{{template "postform" dict
"Action" (printf "/policies/rules/%d/toggle" .ID) "CSRF" $csrf
"ReturnTo" "/policies"
"Fields" (dict "enabled" (boolstr (not .Enabled)))
"Icon" (toggleIcon .Enabled)
"Class" "btn btn-sm btn-outline-secondary"
"Title" (printf "%s this policy" (toggleVerb .Enabled))}}
{{template "confirmform" dict
"Action" (printf "/policies/rules/%d/delete" .ID) "CSRF" $csrf
"Icon" "bi-trash"
"Message" (printf "Delete the policy %q? It will be removed from %d network(s)." .Name .NetworkCount)}}
|