mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-09 04:18:32 +02:00
Minor misc docset updates
Minor misc docset updates
This commit is contained in:
commit
cbd8b094bd
@ -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"
|
||||
|
@ -74,8 +74,8 @@ export const AddConnectorForm: React.FC<AddConnectorFormProps> = ({
|
||||
.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() || "",
|
||||
|
@ -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,29 @@ export const GroupDisplay = ({
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Button
|
||||
className="mt-3"
|
||||
size="sm"
|
||||
variant="submit"
|
||||
onClick={() => setAddMemberFormVisible(true)}
|
||||
disabled={!userGroup.is_up_to_date}
|
||||
>
|
||||
Add Users
|
||||
</Button>
|
||||
|
||||
<TooltipProvider>
|
||||
<Tooltip delayDuration={0}>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
size="sm"
|
||||
className={userGroup.is_up_to_date ? "" : "opacity-50"}
|
||||
variant="submit"
|
||||
onClick={() => {
|
||||
if (userGroup.is_up_to_date) {
|
||||
setAddMemberFormVisible(true);
|
||||
}
|
||||
}}
|
||||
>
|
||||
Add Users
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
{!userGroup.is_up_to_date && (
|
||||
<TooltipContent>
|
||||
<p>Cannot update group while sync is occurring</p>
|
||||
</TooltipContent>
|
||||
)}
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
{addMemberFormVisible && (
|
||||
<AddMemberForm
|
||||
users={users}
|
||||
@ -389,15 +408,29 @@ export const GroupDisplay = ({
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Button
|
||||
className="mt-3"
|
||||
onClick={() => setAddConnectorFormVisible(true)}
|
||||
size="sm"
|
||||
variant="submit"
|
||||
disabled={!userGroup.is_up_to_date}
|
||||
>
|
||||
Add Connectors
|
||||
</Button>
|
||||
<TooltipProvider>
|
||||
<Tooltip delayDuration={0}>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
size="sm"
|
||||
className={userGroup.is_up_to_date ? "" : "opacity-50"}
|
||||
variant="submit"
|
||||
onClick={() => {
|
||||
if (userGroup.is_up_to_date) {
|
||||
setAddConnectorFormVisible(true);
|
||||
}
|
||||
}}
|
||||
>
|
||||
Add Connectors
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
{!userGroup.is_up_to_date && (
|
||||
<TooltipContent>
|
||||
<p>Cannot update group while sync is occurring</p>
|
||||
</TooltipContent>
|
||||
)}
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
|
||||
{addConnectorFormVisible && (
|
||||
<AddConnectorForm
|
||||
|
@ -118,7 +118,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
return (
|
||||
<div className="relative group">
|
||||
{button}
|
||||
<div className="absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-neutral-800 text-white text-sm rounded-sm opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap">
|
||||
<div className="absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-neutral-800 text-white text-sm rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap">
|
||||
{tooltip}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user