add a dashboard table state

This commit is contained in:
Alex Holliday committed 2026-09-25 11:06:48 -07:00
1 parent 32a5ca8799
commit 7ab80ac3f4
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -9,6 +9,7 @@ type ThemeMode = "light" | "dark";
type ChartType = "histogram" | "line"; type ChartType = "histogram" | "line";
type TableName = type TableName =
| "dashboard"
| "monitors" | "monitors"
| "team" | "team"
| "maintenance" | "maintenance"
@@ -26,6 +27,7 @@ interface SidebarState {
} }
interface UIState { interface UIState {
dashboard: TableState;
monitors: TableState; monitors: TableState;
pagespeed: TableState; pagespeed: TableState;
team: TableState; team: TableState;
@@ -51,6 +53,9 @@ const initialMode: ThemeMode = window?.matchMedia?.("(prefers-color-scheme: dark
: "light"; : "light";
const initialState: UIState = { const initialState: UIState = {
dashboard: {
rowsPerPage: 10,
},
monitors: { monitors: {
rowsPerPage: 10, rowsPerPage: 10,
}, },
+1 -1
View File
@@ -34,7 +34,7 @@ const Dashboard = () => {
types: [...MonitorTypes], types: [...MonitorTypes],
checksLimit: 1, checksLimit: 1,
refreshInterval: 30000, refreshInterval: 30000,
rowsPerPageTable: "monitors", rowsPerPageTable: "dashboard",
rowsPerPageDefault: 100, rowsPerPageDefault: 100,
}); });