Add ignore-self toggle to Jail Detail page
Implements the missing UI control for POST /api/jails/{name}/ignoreself:
- Add jailIgnoreSelf endpoint constant to endpoints.ts
- Add toggleIgnoreSelf(name, on) API function to jails.ts
- Expose toggleIgnoreSelf action from useJailDetail hook
- Replace read-only 'ignore self' badge with a Fluent Switch in
IgnoreListSection to allow enabling/disabling the flag per jail
- Add 5 vitest tests for checked/unchecked state and toggle behaviour
This commit is contained in:
@@ -45,6 +45,7 @@ export const ENDPOINTS = {
|
||||
jailReload: (name: string): string => `/jails/${encodeURIComponent(name)}/reload`,
|
||||
jailsReloadAll: "/jails/reload-all",
|
||||
jailIgnoreIp: (name: string): string => `/jails/${encodeURIComponent(name)}/ignoreip`,
|
||||
jailIgnoreSelf: (name: string): string => `/jails/${encodeURIComponent(name)}/ignoreself`,
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Bans
|
||||
|
||||
Reference in New Issue
Block a user