0.2.78
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user