mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-01 10:10:49 +02:00
Show transition card if no connectors (#2597)
* show transition card if no connectors * squash * update apos
This commit is contained in:
@ -17,7 +17,7 @@ import {
|
|||||||
} from "../../../../components/embedding/interfaces";
|
} from "../../../../components/embedding/interfaces";
|
||||||
import { Connector } from "@/lib/connectors/connectors";
|
import { Connector } from "@/lib/connectors/connectors";
|
||||||
import { FailedReIndexAttempts } from "@/components/embedding/FailedReIndexAttempts";
|
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({
|
export default function UpgradingPage({
|
||||||
futureEmbeddingModel,
|
futureEmbeddingModel,
|
||||||
@ -87,10 +87,6 @@ export default function UpgradingPage({
|
|||||||
});
|
});
|
||||||
}, [ongoingReIndexingStatus]);
|
}, [ongoingReIndexingStatus]);
|
||||||
|
|
||||||
if (!failedIndexingStatus) {
|
|
||||||
return <div>No failed index attempts</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{popup}
|
{popup}
|
||||||
@ -116,7 +112,7 @@ export default function UpgradingPage({
|
|||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{futureEmbeddingModel && connectors && connectors.length > 0 && (
|
{futureEmbeddingModel && (
|
||||||
<div>
|
<div>
|
||||||
<Title className="mt-8">Current Upgrade Status</Title>
|
<Title className="mt-8">Current Upgrade Status</Title>
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
@ -133,29 +129,48 @@ export default function UpgradingPage({
|
|||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
{failedIndexingStatus.length > 0 && (
|
|
||||||
<FailedReIndexAttempts
|
|
||||||
failedIndexingStatuses={failedIndexingStatus}
|
|
||||||
setPopup={setPopup}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Text className="my-4">
|
{connectors && connectors.length > 0 ? (
|
||||||
The table below shows the re-indexing progress of all existing
|
<>
|
||||||
connectors. Once all connectors have been re-indexed successfully,
|
{failedIndexingStatus && failedIndexingStatus.length > 0 && (
|
||||||
the new model will be used for all search queries. Until then, we
|
<FailedReIndexAttempts
|
||||||
will use the old model so that no downtime is necessary during
|
failedIndexingStatuses={failedIndexingStatus}
|
||||||
this transition.
|
setPopup={setPopup}
|
||||||
</Text>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{isLoadingOngoingReIndexingStatus ? (
|
<Text className="my-4">
|
||||||
<ThreeDotsLoader />
|
The table below shows the re-indexing progress of all existing
|
||||||
) : sortedReindexingProgress ? (
|
connectors. Once all connectors have been re-indexed
|
||||||
<ReindexingProgressTable
|
successfully, the new model will be used for all search
|
||||||
reindexingProgress={sortedReindexingProgress}
|
queries. Until then, we will use the old model so that no
|
||||||
/>
|
downtime is necessary during this transition.
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
{isLoadingOngoingReIndexingStatus ? (
|
||||||
|
<ThreeDotsLoader />
|
||||||
|
) : sortedReindexingProgress ? (
|
||||||
|
<ReindexingProgressTable
|
||||||
|
reindexingProgress={sortedReindexingProgress}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<ErrorCallout errorTitle="Failed to fetch re-indexing progress" />
|
||||||
|
)}
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
<ErrorCallout errorTitle="Failed to fetch re-indexing progress" />
|
<div className="mt-8 p-6 bg-background-100 border border-border-strong rounded-lg max-w-2xl">
|
||||||
|
<h3 className="text-lg font-semibold mb-2">
|
||||||
|
Switching Embedding Models
|
||||||
|
</h3>
|
||||||
|
<p className="mb-4 text-text-800">
|
||||||
|
You're currently switching embedding models, but there
|
||||||
|
are no connectors to re-index. This means the transition will
|
||||||
|
be quick and seamless!
|
||||||
|
</p>
|
||||||
|
<p className="text-text-600">
|
||||||
|
The new model will be active soon.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,8 +72,6 @@ function Main() {
|
|||||||
return <ErrorCallout errorTitle="Failed to fetch embedding model status" />;
|
return <ErrorCallout errorTitle="Failed to fetch embedding model status" />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentModelName = currentEmeddingModel?.model_name;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-screen">
|
<div className="h-screen">
|
||||||
{!futureEmbeddingModel ? (
|
{!futureEmbeddingModel ? (
|
||||||
|
Reference in New Issue
Block a user