mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 01:27:31 +00:00
fix: added suggested changes
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable no-nested-ternary */
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Control, Controller, UseFormReset, UseFormSetValue, UseFormWatch } from "react-hook-form";
|
import { Control, Controller, UseFormReset, UseFormSetValue, UseFormWatch } from "react-hook-form";
|
||||||
import { faCaretDown, faCheckCircle, faFilterCircleXmark } from "@fortawesome/free-solid-svg-icons";
|
import { faCaretDown, faCheckCircle, faFilterCircleXmark } from "@fortawesome/free-solid-svg-icons";
|
||||||
@@ -116,12 +115,7 @@ export const LogsFilter = ({
|
|||||||
const selectedProject = watch("project");
|
const selectedProject = watch("project");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className={twMerge("sticky top-20 z-10 flex flex-col bg-bunker-800", className)}>
|
||||||
className={twMerge(
|
|
||||||
"sticky top-20 z-10 flex flex-wrap items-center justify-between bg-bunker-800",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
{isOrgAuditLogs && workspacesInOrg.length > 0 && (
|
{isOrgAuditLogs && workspacesInOrg.length > 0 && (
|
||||||
<Controller
|
<Controller
|
||||||
@@ -157,7 +151,11 @@ export const LogsFilter = ({
|
|||||||
control={control}
|
control={control}
|
||||||
name="secretPath"
|
name="secretPath"
|
||||||
render={({ field: { onChange, value, ...field } }) => (
|
render={({ field: { onChange, value, ...field } }) => (
|
||||||
<FormControl label="Secret Path" className="w-40">
|
<FormControl
|
||||||
|
tooltipText="Filter audit logs related to events that occurred on a specific secret path."
|
||||||
|
label="Secret Path"
|
||||||
|
className="w-40"
|
||||||
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder="/folder"
|
placeholder="/folder"
|
||||||
{...field}
|
{...field}
|
||||||
@@ -174,14 +172,24 @@ export const LogsFilter = ({
|
|||||||
control={control}
|
control={control}
|
||||||
name="secretKey"
|
name="secretKey"
|
||||||
render={({ field: { onChange, value, ...field } }) => (
|
render={({ field: { onChange, value, ...field } }) => (
|
||||||
<FormControl label="Secret Key" className="w-40">
|
<FormControl
|
||||||
<Input {...field} value={value} onChange={(e) => onChange(e.target.value)} />
|
tooltipText="Filter audit logs related to a specific secret."
|
||||||
|
label="Secret Name"
|
||||||
|
className="w-40"
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
{...field}
|
||||||
|
placeholder="API_KEY"
|
||||||
|
value={value}
|
||||||
|
onChange={(e) => onChange(e.target.value)}
|
||||||
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-1 flex items-center space-x-2">
|
<div className="mt-1 flex w-full justify-start">
|
||||||
|
<div className="flex items-center space-x-2">
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
name="eventType"
|
name="eventType"
|
||||||
@@ -355,7 +363,9 @@ export const LogsFilter = ({
|
|||||||
userAgentType: undefined,
|
userAgentType: undefined,
|
||||||
startDate: undefined,
|
startDate: undefined,
|
||||||
endDate: undefined,
|
endDate: undefined,
|
||||||
project: null
|
project: null,
|
||||||
|
secretPath: undefined,
|
||||||
|
secretKey: undefined
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -363,5 +373,6 @@ export const LogsFilter = ({
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user