Switch dashboard/map/history views to archive source for long-term data
Update fail2ban dbpurgeage to 648000 and history sync backfill/pagination for archive-based 7.5 day history.
This commit is contained in:
@@ -46,6 +46,10 @@ interface BanTableProps {
|
||||
* Changing this value triggers a re-fetch and resets to page 1.
|
||||
*/
|
||||
origin?: BanOriginFilter;
|
||||
/**
|
||||
* Data source used for the table query.
|
||||
*/
|
||||
source?: "fail2ban" | "archive";
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -186,9 +190,9 @@ function buildBanColumns(styles: ReturnType<typeof useStyles>): TableColumnDefin
|
||||
* @param props.timeRange - Active time-range preset from the parent page.
|
||||
* @param props.origin - Active origin filter from the parent page.
|
||||
*/
|
||||
export function BanTable({ timeRange, origin = "all" }: BanTableProps): React.JSX.Element {
|
||||
export function BanTable({ timeRange, origin = "all", source = "fail2ban" }: BanTableProps): React.JSX.Element {
|
||||
const styles = useStyles();
|
||||
const { banItems, total, page, setPage, loading, error, refresh } = useBans(timeRange, origin);
|
||||
const { banItems, total, page, setPage, loading, error, refresh } = useBans(timeRange, origin, source);
|
||||
|
||||
const banColumns = buildBanColumns(styles);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user