-
- Removing a list is a configuration change: delete its source in Settings, then refresh.
+
+ {managed
+ ? 'Lists you add here are BlockList objects in the cluster. Lists named in the resolver\'s config file are shown but edited there. Turning a list off keeps it, and the resolver drops its rules.'
+ : 'Lists come from the resolver\'s configuration; edit the config and reload to change them.'}
+
+
+
+ setPendingRemove(null)}
+ onConfirm={() => void confirmRemove()}
+ title="Remove this blocklist?"
+ message={pendingRemove ? `${pendingRemove} and its rules are dropped from the resolver.` : ''}
+ confirmLabel="Remove"
+ destructive
+ pending={removeSource.pending}
+ />
)
}
diff --git a/web/src/pages/Clients.tsx b/web/src/pages/Clients.tsx
index a35e536..c4bdf97 100644
--- a/web/src/pages/Clients.tsx
+++ b/web/src/pages/Clients.tsx
@@ -213,7 +213,21 @@ export default function Clients() {
const { canWrite } = useWhoami()
const { data, error, loading, refetch } = useApi(() => getClients(), [])
- const groups = useMemo(() => data?.groups ?? [], [data])
+ // 'history' rows are traffic counters for a name that is not a group (the
+ // default bucket, or a group removed since); saving them back would try to
+ // create them.
+ const groups = useMemo(
+ () => (data?.groups ?? []).filter((g) => g.source !== 'history'),
+ [data],
+ )
+ const defaultEditable = data?.default_policy_editable !== false
+ // A group the resolver's config file defines cannot be changed through the
+ // console, which writes cluster objects; saying so beats a save that
+ // appears to work.
+ const isLocked = (g: ClientGroup): boolean =>
+ g.source !== 'kubernetes' && data?.file_groups_editable === false
+ const lockedReason = "Defined in the resolver's config file; edit it there"
+
const [defaultPolicy] = useState('')
const [defaultDraft, setDefaultDraft] = useState(null)
const [editorOpen, setEditorOpen] = useState(false)
@@ -357,13 +371,13 @@ export default function Clients() {
title="Default policy"
subtitle={`Applied to clients that match no group. Default rate limit: ${
formatNumber(data?.default_rate_limit ?? 0)
- } qps`}
+ } qps${defaultEditable ? '' : ' · set in the resolver\'s config (acl.default_policy)'}`}
>
{group.comment ? (
{group.comment}
@@ -417,13 +436,14 @@ export default function Clients() {