Stage 7: configuration view — backend service, routers, tests, and frontend
- config_service.py: read/write jail config via asyncio.gather, global settings, in-process regex validation, log preview via _read_tail_lines - server_service.py: read/write server settings, flush logs - config router: 9 endpoints for jail/global config, regex-test, logpath management, log preview - server router: GET/PUT settings, POST flush-logs - models/config.py expanded with JailConfig, GlobalConfigUpdate, LogPreview* models - 285 tests pass (68 new), ruff clean, mypy clean (44 files) - Frontend: types/config.ts, api/config.ts, hooks/useConfig.ts, ConfigPage.tsx full implementation (Jails accordion editor, Global config, Server settings, Regex Tester with preview) - Fixed pre-existing frontend lint: JSX.Element → React.JSX.Element (10 files), void/promise patterns in useServerStatus + useJails, no-misused-spread in client.ts, eslint.config.ts self-excluded
This commit is contained in:
@@ -11,7 +11,7 @@ import { useAuth } from "../providers/AuthProvider";
|
||||
|
||||
interface RequireAuthProps {
|
||||
/** The protected page content to render when authenticated. */
|
||||
children: JSX.Element;
|
||||
children: React.JSX.Element;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ interface RequireAuthProps {
|
||||
* Redirects to `/login?next=<path>` otherwise so the intended destination is
|
||||
* preserved and honoured after a successful login.
|
||||
*/
|
||||
export function RequireAuth({ children }: RequireAuthProps): JSX.Element {
|
||||
export function RequireAuth({ children }: RequireAuthProps): React.JSX.Element {
|
||||
const { isAuthenticated } = useAuth();
|
||||
const location = useLocation();
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ const useStyles = makeStyles({
|
||||
* Render this at the top of the dashboard page (and any page that should
|
||||
* show live server status).
|
||||
*/
|
||||
export function ServerStatusBar(): JSX.Element {
|
||||
export function ServerStatusBar(): React.JSX.Element {
|
||||
const styles = useStyles();
|
||||
const { status, loading, error, refresh } = useServerStatus();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user