mirror of
https://github.com/hansjone/netx.git
synced 2026-10-12 00:40:44 +08:00
Improve frontend load performance and fix UME/login UX.
Defer topology xyflow and WebCRT xterm until needed, calm idle polling, bake login earth brightness, and let AI alert rules scroll as one natural panel. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
a0170907e4
commit
9bcb8ee0e3
11 changed files with 906 additions and 663 deletions
|
|
@ -89,15 +89,18 @@ export function WorkbenchPage() {
|
|||
const metricsQuery = useQuery({
|
||||
queryKey: ["runtimeMetrics"],
|
||||
queryFn: fetchRuntimeMetrics,
|
||||
refetchInterval: 5000,
|
||||
staleTime: 2000,
|
||||
staleTime: 10_000,
|
||||
refetchInterval: 15_000,
|
||||
refetchIntervalInBackground: false,
|
||||
});
|
||||
|
||||
const opsQuery = useQuery({
|
||||
queryKey: ["opsTasks"],
|
||||
queryFn: fetchOpsTasks,
|
||||
refetchInterval: 4000,
|
||||
staleTime: 1500,
|
||||
staleTime: 10_000,
|
||||
// Share AppLayout cache; speed up only while something is active.
|
||||
refetchInterval: (q) => ((q.state.data?.active ?? 0) > 0 ? 4000 : 20_000),
|
||||
refetchIntervalInBackground: false,
|
||||
});
|
||||
|
||||
const visibleBySection = useMemo(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue