mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 18:27:19 +00:00
final touches
This commit is contained in:
+1
-1
@@ -197,7 +197,7 @@ export const PoliciesTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
{isExpanded && (
|
{isExpanded && (
|
||||||
<Tr className="bg-mineshaft-800">
|
<Tr className="bg-mineshaft-800">
|
||||||
<Td colSpan={7} className="p-0">
|
<Td colSpan={7} className="p-0">
|
||||||
<div className="flex max-h-80 w-full gap-2 gap-4 overflow-auto overflow-x-hidden p-4">
|
<div className="flex max-h-80 w-full gap-4 overflow-auto overflow-x-hidden p-4">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<div className="mb-2 text-sm font-medium text-mineshaft-300">
|
<div className="mb-2 text-sm font-medium text-mineshaft-300">
|
||||||
Approval Conditions
|
Approval Conditions
|
||||||
|
|||||||
+1
-10
@@ -1,4 +1,3 @@
|
|||||||
import { useEffect } from "react";
|
|
||||||
import { Controller, useFormContext } from "react-hook-form";
|
import { Controller, useFormContext } from "react-hook-form";
|
||||||
|
|
||||||
import { TtlFormLabel } from "@app/components/features";
|
import { TtlFormLabel } from "@app/components/features";
|
||||||
@@ -7,15 +6,7 @@ import { FormControl, Input } from "@app/components/v2";
|
|||||||
import { TPolicyForm } from "../PolicySchema";
|
import { TPolicyForm } from "../PolicySchema";
|
||||||
|
|
||||||
export const PolicyDetailsStep = () => {
|
export const PolicyDetailsStep = () => {
|
||||||
const {
|
const { control } = useFormContext<TPolicyForm>();
|
||||||
control,
|
|
||||||
formState: { errors }
|
|
||||||
} = useFormContext<TPolicyForm>();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log("YOOOO");
|
|
||||||
console.log(errors);
|
|
||||||
}, [errors]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ export const PolicyReviewStep = () => {
|
|||||||
const { data: members = [] } = useGetWorkspaceUsers(projectId);
|
const { data: members = [] } = useGetWorkspaceUsers(projectId);
|
||||||
const { data: groups = [] } = useListWorkspaceGroups(projectId);
|
const { data: groups = [] } = useListWorkspaceGroups(projectId);
|
||||||
|
|
||||||
const { name, maxRequestTtl, conditions, constraints, steps } = watch();
|
const { name, conditions, constraints, steps } = watch();
|
||||||
|
|
||||||
const getApproverLabel = (approverId: string, approverType: ApproverType) => {
|
const getApproverLabel = (approverId: string, approverType: ApproverType) => {
|
||||||
if (approverType === ApproverType.User) {
|
if (approverType === ApproverType.User) {
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
export { PolicyApprovalSteps } from "./PolicyApprovalSteps";
|
export { PolicyApprovalSteps } from "./PolicyApprovalSteps";
|
||||||
export { PolicyConstraintsStep } from "./PolicyConstraintsStep";
|
|
||||||
export { PolicyDetailsStep } from "./PolicyDetailsStep";
|
export { PolicyDetailsStep } from "./PolicyDetailsStep";
|
||||||
export { PolicyReviewStep } from "./PolicyReviewStep";
|
export { PolicyReviewStep } from "./PolicyReviewStep";
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import {
|
|||||||
faArrowDown,
|
faArrowDown,
|
||||||
faArrowUp,
|
faArrowUp,
|
||||||
faCheckCircle,
|
faCheckCircle,
|
||||||
|
faClipboardCheck,
|
||||||
faFilter,
|
faFilter,
|
||||||
faFolderPlus,
|
faFolderPlus,
|
||||||
faMagnifyingGlass,
|
faMagnifyingGlass,
|
||||||
faPen,
|
|
||||||
faPlus,
|
faPlus,
|
||||||
faSearch
|
faSearch
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
@@ -328,11 +328,11 @@ export const PamAccountsTable = ({ projectId }: Props) => {
|
|||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
<Button
|
<Button
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
leftIcon={<FontAwesomeIcon icon={faPen} />}
|
leftIcon={<FontAwesomeIcon icon={faClipboardCheck} />}
|
||||||
onClick={() => handlePopUpOpen("requestAccount")}
|
onClick={() => handlePopUpOpen("requestAccount")}
|
||||||
className="h-10 transition-colors"
|
className="h-10 transition-colors"
|
||||||
>
|
>
|
||||||
Request Account
|
Request Access
|
||||||
</Button>
|
</Button>
|
||||||
<ProjectPermissionCan
|
<ProjectPermissionCan
|
||||||
I={ProjectPermissionPamAccountActions.Create}
|
I={ProjectPermissionPamAccountActions.Create}
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ const Content = ({ onOpenChange, account, accountPath }: Props) => {
|
|||||||
control={control}
|
control={control}
|
||||||
render={({ field, fieldState: { error } }) => (
|
render={({ field, fieldState: { error } }) => (
|
||||||
<FormControl
|
<FormControl
|
||||||
|
isRequired
|
||||||
helperText="Account path including the account name. Supports glob patterns (e.g., /folder/**, /*/account-name)"
|
helperText="Account path including the account name. Supports glob patterns (e.g., /folder/**, /*/account-name)"
|
||||||
errorText={error?.message}
|
errorText={error?.message}
|
||||||
isError={Boolean(error?.message)}
|
isError={Boolean(error?.message)}
|
||||||
@@ -126,7 +127,6 @@ const Content = ({ onOpenChange, account, accountPath }: Props) => {
|
|||||||
render={({ field, fieldState: { error } }) => (
|
render={({ field, fieldState: { error } }) => (
|
||||||
<FormControl
|
<FormControl
|
||||||
label={<TtlFormLabel label="Access Duration" />}
|
label={<TtlFormLabel label="Access Duration" />}
|
||||||
helperText="Duration of access requested"
|
|
||||||
errorText={error?.message}
|
errorText={error?.message}
|
||||||
isError={Boolean(error?.message)}
|
isError={Boolean(error?.message)}
|
||||||
>
|
>
|
||||||
@@ -139,7 +139,6 @@ const Content = ({ onOpenChange, account, accountPath }: Props) => {
|
|||||||
control={control}
|
control={control}
|
||||||
render={({ field, fieldState: { error } }) => (
|
render={({ field, fieldState: { error } }) => (
|
||||||
<FormControl
|
<FormControl
|
||||||
helperText="Provide a reason for requesting access"
|
|
||||||
errorText={error?.message}
|
errorText={error?.message}
|
||||||
isError={Boolean(error?.message)}
|
isError={Boolean(error?.message)}
|
||||||
label="Justification"
|
label="Justification"
|
||||||
@@ -178,7 +177,7 @@ export const PamRequestAccountAccessModal = (props: Props) => {
|
|||||||
<ModalContent
|
<ModalContent
|
||||||
className="max-w-2xl pb-2"
|
className="max-w-2xl pb-2"
|
||||||
title="Request Account Access"
|
title="Request Account Access"
|
||||||
subTitle="Request access to this account path"
|
subTitle="Request access to an account path"
|
||||||
>
|
>
|
||||||
<Content {...props} />
|
<Content {...props} />
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user