diff --git a/ui/src/app/components/search/SearchStatus.js b/ui/src/app/components/search/SearchStatus.js index 571bf6a..331d7ce 100644 --- a/ui/src/app/components/search/SearchStatus.js +++ b/ui/src/app/components/search/SearchStatus.js @@ -1,6 +1,9 @@ +import { useMemo } from 'react'; + import moment from 'moment'; - +import { useRouteServersMap } + from 'app/context/route-servers'; import { useApiStatus } from 'app/context/api-status'; import { useRoutesLoading } @@ -12,6 +15,37 @@ import RelativeTime from 'app/components/datetime/RelativeTime'; +const RefreshIncomplete = () => { + const routeServers = useRouteServersMap(); + const status = useApiStatus(); + const sources = status.store?.routes?.sources; + + let notInitialized = useMemo(() => { + let missing = []; + for (const id in sources) { + if (sources[id].initialized) { + continue; + } + missing.push(routeServers[id].name); + } + return missing; + }, [routeServers, sources]); + + + return ( + <> +
+ Routes refresh was incomplete and results are missing + from: +
+ + {notInitialized.map((name) => + {name}