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:
@@ -98,8 +98,10 @@ export function MapPage(): React.JSX.Element {
|
||||
|
||||
const PAGE_SIZE_OPTIONS = [25, 50, 100] as const;
|
||||
|
||||
const source = range === "24h" ? "fail2ban" : "archive";
|
||||
|
||||
const { countries, countryNames, bans, total, loading, error, refresh } =
|
||||
useMapData(range, originFilter);
|
||||
useMapData(range, originFilter, source);
|
||||
|
||||
const {
|
||||
thresholds: mapThresholds,
|
||||
@@ -163,6 +165,9 @@ export function MapPage(): React.JSX.Element {
|
||||
setSelectedCountry(null);
|
||||
}}
|
||||
/>
|
||||
<Badge appearance="filled" color={source === "archive" ? "brand" : "success"}>
|
||||
{source === "archive" ? "Archive (BanGUI DB)" : "Live (fail2ban DB)"}
|
||||
</Badge>
|
||||
<Button
|
||||
icon={<ArrowCounterclockwiseRegular />}
|
||||
onClick={(): void => {
|
||||
|
||||
Reference in New Issue
Block a user