Merge pull request #112 from xpack-ai/hotfix/ui-cx

fix: prevent "Deny All" resource group from being set as default
This commit is contained in:
ningyv authored and GitHub committed 2026-01-07 17:41:17 +08:00
commit e1c59da804
2 files changed
+2 -8

No files matched your search

@@ -52,7 +52,7 @@ export const AddServerModal: React.FC<AddServerModalProps> = ({
</ModalHeader>
<ModalBody>
{
id !== 'allow-all' && <>
!['allow-all', 'deny-all'].includes(id) && <>
<Input
label={t("Resource Group Name")}
value={serverName}
@@ -84,12 +84,6 @@ const GroupServiceTable: React.FC<GroupServiceTableProps> = ({
return !['allow-all', 'deny-all'].includes(resourceGroupDetail.id);
}, [resourceGroupDetail]);
// 是否展示编辑按钮
const showEditOptions = useMemo(() => {
if (!resourceGroupDetail) return false;
return !['deny-all'].includes(resourceGroupDetail.id);
}, [resourceGroupDetail]);
const getResourceGroup = async (groupId: string) => {
const response = await fetchResourceGroupDetail(groupId);
if (response) {
@@ -112,7 +106,7 @@ const GroupServiceTable: React.FC<GroupServiceTableProps> = ({
{resourceGroupDetail?.name}
</h2>
<div className="flex gap-2 h-[32px]">
{showEditOptions && currentGroupId && <>
{currentGroupId && <>
<Button
isIconOnly
size="sm"