mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 17:51:54 +01:00
Show transition card if no connectors (#2597)
* show transition card if no connectors * squash * update apos
This commit is contained in:
parent
5679f0af61
commit
a392ef0541
@ -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 <div>No failed index attempts</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{popup}
|
||||
@ -116,7 +112,7 @@ export default function UpgradingPage({
|
||||
</Modal>
|
||||
)}
|
||||
|
||||
{futureEmbeddingModel && connectors && connectors.length > 0 && (
|
||||
{futureEmbeddingModel && (
|
||||
<div>
|
||||
<Title className="mt-8">Current Upgrade Status</Title>
|
||||
<div className="mt-4">
|
||||
@ -133,29 +129,48 @@ export default function UpgradingPage({
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
{failedIndexingStatus.length > 0 && (
|
||||
<FailedReIndexAttempts
|
||||
failedIndexingStatuses={failedIndexingStatus}
|
||||
setPopup={setPopup}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Text className="my-4">
|
||||
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.
|
||||
</Text>
|
||||
{connectors && connectors.length > 0 ? (
|
||||
<>
|
||||
{failedIndexingStatus && failedIndexingStatus.length > 0 && (
|
||||
<FailedReIndexAttempts
|
||||
failedIndexingStatuses={failedIndexingStatus}
|
||||
setPopup={setPopup}
|
||||
/>
|
||||
)}
|
||||
|
||||
{isLoadingOngoingReIndexingStatus ? (
|
||||
<ThreeDotsLoader />
|
||||
) : sortedReindexingProgress ? (
|
||||
<ReindexingProgressTable
|
||||
reindexingProgress={sortedReindexingProgress}
|
||||
/>
|
||||
<Text className="my-4">
|
||||
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.
|
||||
</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>
|
||||
|
@ -72,8 +72,6 @@ function Main() {
|
||||
return <ErrorCallout errorTitle="Failed to fetch embedding model status" />;
|
||||
}
|
||||
|
||||
const currentModelName = currentEmeddingModel?.model_name;
|
||||
|
||||
return (
|
||||
<div className="h-screen">
|
||||
{!futureEmbeddingModel ? (
|
||||
|
Loading…
x
Reference in New Issue
Block a user