mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-23 02:00:07 +02:00
Disallow re-indexing for File connector
This commit is contained in:
parent
c64c25b2e1
commit
9b7069a043
@ -14,6 +14,12 @@ import { SSRAutoRefresh } from "@/components/SSRAutoRefresh";
|
|||||||
import { ErrorCallout } from "@/components/ErrorCallout";
|
import { ErrorCallout } from "@/components/ErrorCallout";
|
||||||
import { ReIndexButton } from "./ReIndexButton";
|
import { ReIndexButton } from "./ReIndexButton";
|
||||||
import { isCurrentlyDeleting } from "@/lib/documentDeletion";
|
import { isCurrentlyDeleting } from "@/lib/documentDeletion";
|
||||||
|
import { ValidSources } from "@/lib/types";
|
||||||
|
|
||||||
|
// since the uploaded files are cleaned up after some period of time
|
||||||
|
// re-indexing will not work for the file connector. Also, it would not
|
||||||
|
// make sense to re-index, since the files will not have changed.
|
||||||
|
const CONNECTOR_TYPES_THAT_CANT_REINDEX: ValidSources[] = ["file"];
|
||||||
|
|
||||||
export default async function Page({
|
export default async function Page({
|
||||||
params,
|
params,
|
||||||
@ -88,11 +94,15 @@ export default async function Page({
|
|||||||
<div className="flex">
|
<div className="flex">
|
||||||
<Title>Indexing Attempts</Title>
|
<Title>Indexing Attempts</Title>
|
||||||
|
|
||||||
<ReIndexButton
|
{!CONNECTOR_TYPES_THAT_CANT_REINDEX.includes(
|
||||||
connectorId={ccPair.connector.id}
|
ccPair.connector.source
|
||||||
credentialId={ccPair.credential.id}
|
) && (
|
||||||
isDisabled={ccPair.connector.disabled}
|
<ReIndexButton
|
||||||
/>
|
connectorId={ccPair.connector.id}
|
||||||
|
credentialId={ccPair.credential.id}
|
||||||
|
isDisabled={ccPair.connector.disabled}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<IndexingAttemptsTable ccPair={ccPair} />
|
<IndexingAttemptsTable ccPair={ccPair} />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user