From b1fbff1aef55f8b4c6dc1654e6996487242eaa7a Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Sun, 29 Sep 2024 15:13:43 -0700 Subject: [PATCH 1/3] show transition card if no connectors --- .../configuration/search/UpgradingPage.tsx | 68 ++++++++++++------- .../app/admin/configuration/search/page.tsx | 2 - 2 files changed, 42 insertions(+), 28 deletions(-) diff --git a/web/src/app/admin/configuration/search/UpgradingPage.tsx b/web/src/app/admin/configuration/search/UpgradingPage.tsx index 6e41f4cf42d..59523a117c9 100644 --- a/web/src/app/admin/configuration/search/UpgradingPage.tsx +++ b/web/src/app/admin/configuration/search/UpgradingPage.tsx @@ -6,7 +6,7 @@ import { FailedConnectorIndexingStatus, ValidStatuses, } from "@/lib/types"; -import { Button, Text, Title } from "@tremor/react"; +import { Button, Card, Text, Title } from "@tremor/react"; import { useMemo, useState } from "react"; import useSWR, { mutate } from "swr"; import { ReindexingProgressTable } from "../../../../components/embedding/ReindexingProgressTable"; @@ -18,6 +18,7 @@ import { import { Connector } from "@/lib/connectors/connectors"; import { FailedReIndexAttempts } from "@/components/embedding/FailedReIndexAttempts"; import { PopupSpec, usePopup } from "@/components/admin/connectors/Popup"; +import { EmbeddingIcon } from "@/components/icons/icons"; export default function UpgradingPage({ futureEmbeddingModel, @@ -87,10 +88,6 @@ export default function UpgradingPage({ }); }, [ongoingReIndexingStatus]); - if (!failedIndexingStatus) { - return
No failed index attempts
; - } - return ( <> {popup} @@ -116,7 +113,7 @@ export default function UpgradingPage({ )} - {futureEmbeddingModel && connectors && connectors.length > 0 && ( + {futureEmbeddingModel && (
Current Upgrade Status
@@ -133,29 +130,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 && ( + + )} + + + 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 ? ( - + {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 5541865f32d..6a0d428d357 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 ? ( From 1f382cdddb3908edae7fa11717380f29f04df24b Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Sun, 29 Sep 2024 15:15:05 -0700 Subject: [PATCH 2/3] squash --- web/src/app/admin/configuration/search/UpgradingPage.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/app/admin/configuration/search/UpgradingPage.tsx b/web/src/app/admin/configuration/search/UpgradingPage.tsx index 59523a117c9..c94327652ab 100644 --- a/web/src/app/admin/configuration/search/UpgradingPage.tsx +++ b/web/src/app/admin/configuration/search/UpgradingPage.tsx @@ -6,7 +6,7 @@ import { FailedConnectorIndexingStatus, ValidStatuses, } from "@/lib/types"; -import { Button, Card, Text, Title } from "@tremor/react"; +import { Button, Text, Title } from "@tremor/react"; import { useMemo, useState } from "react"; import useSWR, { mutate } from "swr"; import { ReindexingProgressTable } from "../../../../components/embedding/ReindexingProgressTable"; @@ -17,8 +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 { EmbeddingIcon } from "@/components/icons/icons"; +import { usePopup } from "@/components/admin/connectors/Popup"; export default function UpgradingPage({ futureEmbeddingModel, From 53d861eec1e87403b81ce3e2e254e0ecb8597bc2 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Sun, 29 Sep 2024 15:18:09 -0700 Subject: [PATCH 3/3] update apos --- web/src/app/admin/configuration/search/UpgradingPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/app/admin/configuration/search/UpgradingPage.tsx b/web/src/app/admin/configuration/search/UpgradingPage.tsx index c94327652ab..bbbb75797c7 100644 --- a/web/src/app/admin/configuration/search/UpgradingPage.tsx +++ b/web/src/app/admin/configuration/search/UpgradingPage.tsx @@ -163,9 +163,9 @@ export default function UpgradingPage({ 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! + 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.