mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-11 23:29:05 +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 { Control, Controller, UseFormReset, UseFormSetValue, UseFormWatch } from "react-hook-form";
|
||||
import { faCaretDown, faCheckCircle, faFilterCircleXmark } from "@fortawesome/free-solid-svg-icons";
|
||||
@@ -116,12 +115,7 @@ export const LogsFilter = ({
|
||||
const selectedProject = watch("project");
|
||||
|
||||
return (
|
||||
<div
|
||||
className={twMerge(
|
||||
"sticky top-20 z-10 flex flex-wrap items-center justify-between bg-bunker-800",
|
||||
className
|
||||
)}
|
||||
>
|
||||
<div className={twMerge("sticky top-20 z-10 flex flex-col bg-bunker-800", className)}>
|
||||
<div className="flex items-center gap-4">
|
||||
{isOrgAuditLogs && workspacesInOrg.length > 0 && (
|
||||
<Controller
|
||||
@@ -157,7 +151,11 @@ export const LogsFilter = ({
|
||||
control={control}
|
||||
name="secretPath"
|
||||
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
|
||||
placeholder="/folder"
|
||||
{...field}
|
||||
@@ -174,14 +172,24 @@ export const LogsFilter = ({
|
||||
control={control}
|
||||
name="secretKey"
|
||||
render={({ field: { onChange, value, ...field } }) => (
|
||||
<FormControl label="Secret Key" className="w-40">
|
||||
<Input {...field} value={value} onChange={(e) => onChange(e.target.value)} />
|
||||
<FormControl
|
||||
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>
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</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
|
||||
control={control}
|
||||
name="eventType"
|
||||
@@ -355,7 +363,9 @@ export const LogsFilter = ({
|
||||
userAgentType: undefined,
|
||||
startDate: undefined,
|
||||
endDate: undefined,
|
||||
project: null
|
||||
project: null,
|
||||
secretPath: undefined,
|
||||
secretKey: undefined
|
||||
})
|
||||
}
|
||||
>
|
||||
@@ -363,5 +373,6 @@ export const LogsFilter = ({
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user