backup
This commit is contained in:
@@ -104,6 +104,7 @@ export function JailSectionPanel({ jailName, section, onChange }: JailSectionPan
|
||||
value={section.bantime !== null ? String(section.bantime) : ""}
|
||||
size="small"
|
||||
type="number"
|
||||
aria-label="Ban Time (s)"
|
||||
placeholder="e.g. 3600"
|
||||
onChange={(_e, d) => {
|
||||
const n = parseInt(d.value, 10);
|
||||
|
||||
@@ -346,6 +346,7 @@ function JailConfigDetail({
|
||||
type="number"
|
||||
value={banTime}
|
||||
readOnly={readOnly}
|
||||
aria-label="Ban Time (s)"
|
||||
onChange={(_e, d) => {
|
||||
setBanTime(d.value);
|
||||
}}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import {
|
||||
Badge,
|
||||
Button,
|
||||
@@ -204,10 +205,17 @@ export function HistoryPage(): React.JSX.Element {
|
||||
const [jailFilter, setJailFilter] = useState("");
|
||||
const [ipFilter, setIpFilter] = useState("");
|
||||
const [page, setPage] = useState(1);
|
||||
const [searchParams] = useSearchParams();
|
||||
|
||||
// Per-IP detail navigation
|
||||
const [selectedIp, setSelectedIp] = useState<string | null>(null);
|
||||
|
||||
// Allow URL param to override source (e.g., ?source=fail2ban to bypass archive rate limits).
|
||||
// Default to "archive" for normal browsing.
|
||||
const sourceParam = searchParams.get("source");
|
||||
const historySource: "fail2ban" | "archive" =
|
||||
sourceParam === "fail2ban" || sourceParam === "archive" ? sourceParam : "archive";
|
||||
|
||||
const { items, total, page: currentPage, loading, error, setPage: setCurrentPage, refresh } =
|
||||
useHistory(
|
||||
page,
|
||||
@@ -216,7 +224,7 @@ export function HistoryPage(): React.JSX.Element {
|
||||
originFilter !== "all" ? originFilter : undefined,
|
||||
jailFilter.trim() || undefined,
|
||||
ipFilter.trim() || undefined,
|
||||
"archive",
|
||||
historySource,
|
||||
);
|
||||
|
||||
const handleIpClick = useCallback((ip: string): void => {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user