mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 06:35:21 +00:00
feat: review feedback, and more changes in cli
This commit is contained in:
@@ -6,6 +6,7 @@ export type TGateway = {
|
||||
updatedAt: string;
|
||||
issuedAt: string;
|
||||
serialNumber: string;
|
||||
heartbeart: string;
|
||||
identity: {
|
||||
name: string;
|
||||
id: string;
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { format } from "date-fns";
|
||||
import { format, formatRelative } from "date-fns";
|
||||
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { OrgPermissionCan } from "@app/components/permissions";
|
||||
@@ -139,6 +139,11 @@ export const GatewayListPage = withPermission(
|
||||
<Td>{el.name}</Td>
|
||||
<Td>{format(new Date(el.issuedAt), "yyyy-MM-dd hh:mm:ss aaa")}</Td>
|
||||
<Td>{el.identity.name}</Td>
|
||||
<Td>
|
||||
{el.heartbeart
|
||||
? formatRelative(new Date(), new Date(el.heartbeart))
|
||||
: "-"}
|
||||
</Td>
|
||||
<Td className="w-5">
|
||||
<Tooltip className="max-w-sm text-center" content="Options">
|
||||
<DropdownMenu>
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ export const formSchema = z.object({
|
||||
[OrgPermissionSubjects.ProjectTemplates]: generalPermissionSchema,
|
||||
"app-connections": appConnectionsPermissionSchema,
|
||||
kmip: kmipPermissionSchema,
|
||||
[OrgPermissionSubjects.Gateway]: orgGatewayPermissionSchema
|
||||
gateway: orgGatewayPermissionSchema
|
||||
})
|
||||
.optional()
|
||||
});
|
||||
|
||||
+3
-3
@@ -76,7 +76,7 @@ export const OrgGatewayPermissionRow = ({ isEditable, control, setValue }: Props
|
||||
switch (val) {
|
||||
case Permission.FullAccess:
|
||||
setValue(
|
||||
"permissions.app-connections",
|
||||
"permissions.gateway",
|
||||
{
|
||||
[OrgGatewayPermissionActions.Read]: true,
|
||||
[OrgGatewayPermissionActions.Edit]: true,
|
||||
@@ -88,7 +88,7 @@ export const OrgGatewayPermissionRow = ({ isEditable, control, setValue }: Props
|
||||
break;
|
||||
case Permission.ReadOnly:
|
||||
setValue(
|
||||
"permissions.app-connections",
|
||||
"permissions.gateway",
|
||||
{
|
||||
[OrgGatewayPermissionActions.Read]: true,
|
||||
[OrgGatewayPermissionActions.Edit]: false,
|
||||
@@ -102,7 +102,7 @@ export const OrgGatewayPermissionRow = ({ isEditable, control, setValue }: Props
|
||||
case Permission.NoAccess:
|
||||
default:
|
||||
setValue(
|
||||
"permissions.app-connections",
|
||||
"permissions.gateway",
|
||||
{
|
||||
[OrgGatewayPermissionActions.Read]: false,
|
||||
[OrgGatewayPermissionActions.Edit]: false,
|
||||
|
||||
Reference in New Issue
Block a user