mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-09 20:55:06 +02:00
Fix filter hiding
This commit is contained in:
@@ -11,6 +11,7 @@ from sqlalchemy.orm import Session
|
|||||||
from danswer.auth.users import current_admin_user
|
from danswer.auth.users import current_admin_user
|
||||||
from danswer.auth.users import current_user
|
from danswer.auth.users import current_user
|
||||||
from danswer.background.celery.celery_utils import get_deletion_status
|
from danswer.background.celery.celery_utils import get_deletion_status
|
||||||
|
from danswer.configs.constants import DocumentSource
|
||||||
from danswer.connectors.file.utils import write_temp_files
|
from danswer.connectors.file.utils import write_temp_files
|
||||||
from danswer.connectors.google_drive.connector_auth import build_service_account_creds
|
from danswer.connectors.google_drive.connector_auth import build_service_account_creds
|
||||||
from danswer.connectors.google_drive.connector_auth import delete_google_app_cred
|
from danswer.connectors.google_drive.connector_auth import delete_google_app_cred
|
||||||
@@ -453,7 +454,11 @@ def get_connectors(
|
|||||||
) -> list[ConnectorSnapshot]:
|
) -> list[ConnectorSnapshot]:
|
||||||
connectors = fetch_connectors(db_session)
|
connectors = fetch_connectors(db_session)
|
||||||
return [
|
return [
|
||||||
ConnectorSnapshot.from_connector_db_model(connector) for connector in connectors
|
ConnectorSnapshot.from_connector_db_model(connector)
|
||||||
|
for connector in connectors
|
||||||
|
# don't include INGESTION_API, as it's not a "real"
|
||||||
|
# connector like those created by the user
|
||||||
|
if connector.source != DocumentSource.INGESTION_API
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@@ -3,12 +3,11 @@ import { Header } from "@/components/Header";
|
|||||||
import {
|
import {
|
||||||
getAuthDisabledSS,
|
getAuthDisabledSS,
|
||||||
getCurrentUserSS,
|
getCurrentUserSS,
|
||||||
processCookies,
|
|
||||||
} from "@/lib/userSS";
|
} from "@/lib/userSS";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
import { HealthCheckBanner } from "@/components/health/healthcheck";
|
import { HealthCheckBanner } from "@/components/health/healthcheck";
|
||||||
import { ApiKeyModal } from "@/components/openai/ApiKeyModal";
|
import { ApiKeyModal } from "@/components/openai/ApiKeyModal";
|
||||||
import { buildUrl, fetchSS } from "@/lib/utilsSS";
|
import { fetchSS } from "@/lib/utilsSS";
|
||||||
import { Connector, DocumentSet, User } from "@/lib/types";
|
import { Connector, DocumentSet, User } from "@/lib/types";
|
||||||
import { cookies } from "next/headers";
|
import { cookies } from "next/headers";
|
||||||
import { SearchType } from "@/lib/search/interfaces";
|
import { SearchType } from "@/lib/search/interfaces";
|
||||||
@@ -18,18 +17,8 @@ export default async function Home() {
|
|||||||
const tasks = [
|
const tasks = [
|
||||||
getAuthDisabledSS(),
|
getAuthDisabledSS(),
|
||||||
getCurrentUserSS(),
|
getCurrentUserSS(),
|
||||||
fetch(buildUrl("/manage/connector"), {
|
fetchSS("/manage/connector"),
|
||||||
next: { revalidate: 0 },
|
fetchSS("/manage/document-set"),
|
||||||
headers: {
|
|
||||||
cookie: processCookies(cookies()),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
fetch(buildUrl("/manage/document-set"), {
|
|
||||||
next: { revalidate: 0 },
|
|
||||||
headers: {
|
|
||||||
cookie: processCookies(cookies()),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
fetchSS("/persona"),
|
fetchSS("/persona"),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user