From 737e37170d963b7200cdaeec46ecc225388f4bc4 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Wed, 5 Feb 2025 11:32:03 -0800 Subject: [PATCH 1/2] minor updates --- backend/onyx/db/document_set.py | 2 +- .../groups/[groupId]/AddConnectorForm.tsx | 4 +- .../admin/groups/[groupId]/GroupDisplay.tsx | 55 ++++++++++++------- web/src/components/ui/button.tsx | 16 ++++-- 4 files changed, 49 insertions(+), 28 deletions(-) diff --git a/backend/onyx/db/document_set.py b/backend/onyx/db/document_set.py index 0a5397eb8..0229682fd 100644 --- a/backend/onyx/db/document_set.py +++ b/backend/onyx/db/document_set.py @@ -198,7 +198,7 @@ def _check_if_cc_pairs_are_owned_by_groups( ids=missing_cc_pair_ids, ) for cc_pair in cc_pairs: - if cc_pair.access_type != AccessType.PUBLIC: + if cc_pair.access_type == AccessType.PRIVATE: raise ValueError( f"Connector Credential Pair with ID: '{cc_pair.id}'" " is not owned by the specified groups" diff --git a/web/src/app/ee/admin/groups/[groupId]/AddConnectorForm.tsx b/web/src/app/ee/admin/groups/[groupId]/AddConnectorForm.tsx index c002bbc89..fa6afac67 100644 --- a/web/src/app/ee/admin/groups/[groupId]/AddConnectorForm.tsx +++ b/web/src/app/ee/admin/groups/[groupId]/AddConnectorForm.tsx @@ -74,8 +74,8 @@ export const AddConnectorForm: React.FC = ({ .map((userGroupCCPair) => userGroupCCPair.id) .includes(ccPair.cc_pair_id) ) - // remove public docs, since they don't make sense as part of a group - .filter((ccPair) => !(ccPair.access_type === "public")) + // remove public and synced docs, since they don't make sense as part of a group + .filter((ccPair) => ccPair.access_type === "private") .map((ccPair) => { return { name: ccPair.name?.toString() || "", diff --git a/web/src/app/ee/admin/groups/[groupId]/GroupDisplay.tsx b/web/src/app/ee/admin/groups/[groupId]/GroupDisplay.tsx index 9193ae1fb..878eb0f63 100644 --- a/web/src/app/ee/admin/groups/[groupId]/GroupDisplay.tsx +++ b/web/src/app/ee/admin/groups/[groupId]/GroupDisplay.tsx @@ -32,6 +32,12 @@ import { TableHeader, TableRow, } from "@/components/ui/table"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip"; import { Button } from "@/components/ui/button"; import { DeleteButton } from "@/components/DeleteButton"; import { Bubble } from "@/components/Bubble"; @@ -290,16 +296,21 @@ export const GroupDisplay = ({ )} - - +
+ +
{addMemberFormVisible && ( - +
+ +
{addConnectorFormVisible && ( ( if (tooltip) { return ( -
+
{button} -
- {tooltip} +
+
+ {tooltip} +
); From 477f8eeb682dba875af873079de8dc8b4b034ecf Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Wed, 5 Feb 2025 11:37:35 -0800 Subject: [PATCH 2/2] minor update --- .../admin/groups/[groupId]/GroupDisplay.tsx | 76 +++++++++++-------- web/src/components/ui/button.tsx | 14 ++-- 2 files changed, 51 insertions(+), 39 deletions(-) diff --git a/web/src/app/ee/admin/groups/[groupId]/GroupDisplay.tsx b/web/src/app/ee/admin/groups/[groupId]/GroupDisplay.tsx index 878eb0f63..41d3c6c40 100644 --- a/web/src/app/ee/admin/groups/[groupId]/GroupDisplay.tsx +++ b/web/src/app/ee/admin/groups/[groupId]/GroupDisplay.tsx @@ -296,21 +296,29 @@ export const GroupDisplay = ({ )}
-
- -
+ + + + + + {!userGroup.is_up_to_date && ( + +

Cannot update group while sync is occurring

+
+ )} +
+
{addMemberFormVisible && ( -
- -
+ + + + + + {!userGroup.is_up_to_date && ( + +

Cannot update group while sync is occurring

+
+ )} +
+
{addConnectorFormVisible && ( ( if (tooltip) { return ( -
+
{button} -
-
- {tooltip} -
+
+ {tooltip}
);