This commit is contained in:
ponzischeme89
2026-08-19 14:25:44 +12:00
parent 2b43b9ef12
commit 590e069366
83 changed files with 8948 additions and 1266 deletions
+10 -1
View File
@@ -375,7 +375,16 @@ export function LogsPage() {
const [dropped, setDropped] = useState(0);
const [paused, setPaused] = useState(false);
const [held, setHeld] = useState(0);
const [filters, setFilters] = useState<LogFilters>(EMPTY_FILTERS);
/* A ?q= in the address seeds the text filter once, so a page that has diagnosed
something can hand the operator the logs already narrowed to it — which is what the
Integrations area's "open the logs" link does with a failing service's name. Seeded
on the initial state rather than in an effect: applying it later would fight whatever
the operator had already typed, and the whole point of a deep link is that it is where
they arrive rather than something that happens to them. */
const [filters, setFilters] = useState<LogFilters>(() => {
const seed = new URLSearchParams(window.location.search).get('q') ?? '';
return seed ? { ...EMPTY_FILTERS, text: seed } : EMPTY_FILTERS;
});
const [error, setError] = useState('');
const [viewport, setViewport] = useState({ top: 0, height: 600 });
const [atTail, setAtTail] = useState(true);