From a392ef05417fc05e6d51b4d8e2bed52c0ac8e895 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Sun, 29 Sep 2024 15:35:41 -0700 Subject: [PATCH] Show transition card if no connectors (#2597) * show transition card if no connectors * squash * update apos --- .../configuration/search/UpgradingPage.tsx | 67 ++++++++++++------- .../app/admin/configuration/search/page.tsx | 2 - 2 files changed, 41 insertions(+), 28 deletions(-) diff --git a/web/src/app/admin/configuration/search/UpgradingPage.tsx b/web/src/app/admin/configuration/search/UpgradingPage.tsx index 6e41f4cf4..bbbb75797 100644 --- a/web/src/app/admin/configuration/search/UpgradingPage.tsx +++ b/web/src/app/admin/configuration/search/UpgradingPage.tsx @@ -17,7 +17,7 @@ import { } from "../../../../components/embedding/interfaces"; import { Connector } from "@/lib/connectors/connectors"; import { FailedReIndexAttempts } from "@/components/embedding/FailedReIndexAttempts"; -import { PopupSpec, usePopup } from "@/components/admin/connectors/Popup"; +import { usePopup } from "@/components/admin/connectors/Popup"; export default function UpgradingPage({ futureEmbeddingModel, @@ -87,10 +87,6 @@ export default function UpgradingPage({ }); }, [ongoingReIndexingStatus]); - if (!failedIndexingStatus) { - return
No failed index attempts
; - } - return ( <> {popup} @@ -116,7 +112,7 @@ export default function UpgradingPage({ )} - {futureEmbeddingModel && connectors && connectors.length > 0 && ( + {futureEmbeddingModel && (
Current Upgrade Status
@@ -133,29 +129,48 @@ export default function UpgradingPage({ > Cancel - {failedIndexingStatus.length > 0 && ( - - )} - - The table below shows the re-indexing progress of all existing - connectors. Once all connectors have been re-indexed successfully, - the new model will be used for all search queries. Until then, we - will use the old model so that no downtime is necessary during - this transition. - + {connectors && connectors.length > 0 ? ( + <> + {failedIndexingStatus && failedIndexingStatus.length > 0 && ( + + )} - {isLoadingOngoingReIndexingStatus ? ( - - ) : sortedReindexingProgress ? ( - + + The table below shows the re-indexing progress of all existing + connectors. Once all connectors have been re-indexed + successfully, the new model will be used for all search + queries. Until then, we will use the old model so that no + downtime is necessary during this transition. + + + {isLoadingOngoingReIndexingStatus ? ( + + ) : sortedReindexingProgress ? ( + + ) : ( + + )} + ) : ( - +
+

+ Switching Embedding Models +

+

+ You're currently switching embedding models, but there + are no connectors to re-index. This means the transition will + be quick and seamless! +

+

+ The new model will be active soon. +

+
)}
diff --git a/web/src/app/admin/configuration/search/page.tsx b/web/src/app/admin/configuration/search/page.tsx index 5541865f3..6a0d428d3 100644 --- a/web/src/app/admin/configuration/search/page.tsx +++ b/web/src/app/admin/configuration/search/page.tsx @@ -72,8 +72,6 @@ function Main() { return ; } - const currentModelName = currentEmeddingModel?.model_name; - return (
{!futureEmbeddingModel ? (