mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-20 04:37:09 +02:00
slightly cleaner loading (#2776)
This commit is contained in:
@@ -27,11 +27,11 @@ export default function UpgradingPage({
|
|||||||
const [isCancelling, setIsCancelling] = useState<boolean>(false);
|
const [isCancelling, setIsCancelling] = useState<boolean>(false);
|
||||||
|
|
||||||
const { setPopup, popup } = usePopup();
|
const { setPopup, popup } = usePopup();
|
||||||
const { data: connectors } = useSWR<Connector<any>[]>(
|
const { data: connectors, isLoading: isLoadingConnectors } = useSWR<
|
||||||
"/api/manage/connector",
|
Connector<any>[]
|
||||||
errorHandlingFetcher,
|
>("/api/manage/connector", errorHandlingFetcher, {
|
||||||
{ refreshInterval: 5000 } // 5 seconds
|
refreshInterval: 5000, // 5 seconds
|
||||||
);
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: ongoingReIndexingStatus,
|
data: ongoingReIndexingStatus,
|
||||||
@@ -90,6 +90,10 @@ export default function UpgradingPage({
|
|||||||
});
|
});
|
||||||
}, [ongoingReIndexingStatus]);
|
}, [ongoingReIndexingStatus]);
|
||||||
|
|
||||||
|
if (isLoadingConnectors || isLoadingOngoingReIndexingStatus) {
|
||||||
|
return <ThreeDotsLoader />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{popup}
|
{popup}
|
||||||
@@ -150,9 +154,7 @@ export default function UpgradingPage({
|
|||||||
downtime is necessary during this transition.
|
downtime is necessary during this transition.
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
{isLoadingOngoingReIndexingStatus ? (
|
{sortedReindexingProgress ? (
|
||||||
<ThreeDotsLoader />
|
|
||||||
) : sortedReindexingProgress ? (
|
|
||||||
<ReindexingProgressTable
|
<ReindexingProgressTable
|
||||||
reindexingProgress={sortedReindexingProgress}
|
reindexingProgress={sortedReindexingProgress}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user