mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 19:16:22 +00:00
Revise PR based on review
This commit is contained in:
@@ -95,7 +95,8 @@ const Page = () => {
|
||||
)}
|
||||
onClick={() =>
|
||||
handlePopUpOpen("deleteSshHostGroup", {
|
||||
groupId: data.id
|
||||
groupId: data.id,
|
||||
name: data.name
|
||||
})
|
||||
}
|
||||
disabled={!isAllowed}
|
||||
@@ -123,7 +124,9 @@ const Page = () => {
|
||||
<SshHostGroupModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteSshHostGroup.isOpen}
|
||||
title="Are you sure want to remove the SSH group from the project?"
|
||||
title={`Are you sure want to remove the SSH group: ${
|
||||
(popUp?.deleteSshHostGroup?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteSshHostGroup", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() =>
|
||||
|
||||
+7
-3
@@ -88,9 +88,13 @@ export const SshHostGroupHostsSection = ({ sshHostGroupId }: Props) => {
|
||||
<AddHostGroupMemberModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeHostFromSshHostGroup.isOpen}
|
||||
title={`Are you sure want to remove the host ${
|
||||
(popUp?.removeHostFromSshHostGroup?.data as { hostname: string })?.hostname || ""
|
||||
} from this SSH group?`}
|
||||
title={`Are you sure want to remove ${
|
||||
(popUp?.removeHostFromSshHostGroup?.data as { hostname: string; alias?: string })
|
||||
?.alias ||
|
||||
(popUp?.removeHostFromSshHostGroup?.data as { hostname: string; alias?: string })
|
||||
?.hostname ||
|
||||
""
|
||||
} from this host group?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("removeHostFromSshHostGroup", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() =>
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
import { faServer, faUserMinus } from "@fortawesome/free-solid-svg-icons";
|
||||
import { faServer, faTrash } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
|
||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||
@@ -68,13 +68,14 @@ export const SshHostGroupHostsTable = ({ sshHostGroupId, handlePopUpOpen }: Prop
|
||||
onClick={() =>
|
||||
handlePopUpOpen("removeHostFromSshHostGroup", {
|
||||
sshHostId: host.id,
|
||||
alias: host.alias,
|
||||
hostname: host.hostname
|
||||
})
|
||||
}
|
||||
variant="plain"
|
||||
colorSchema="danger"
|
||||
>
|
||||
<FontAwesomeIcon icon={faUserMinus} />
|
||||
<FontAwesomeIcon icon={faTrash} />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user