diff --git a/client/src/components/Settings/LogsConfig/Form.tsx b/client/src/components/Settings/LogsConfig/Form.tsx index 396f0e5b..dce13997 100644 --- a/client/src/components/Settings/LogsConfig/Form.tsx +++ b/client/src/components/Settings/LogsConfig/Form.tsx @@ -10,6 +10,7 @@ import { DAY, RETENTION_CUSTOM, RETENTION_RANGE, + CUSTOM_INTERVAL, } from '../../../helpers/constants'; import '../FormButton.css'; @@ -26,7 +27,7 @@ const getIntervalTitle = (interval: number) => { } }; -type FormValues = { +export type FormValues = { enabled: boolean; anonymize_client_ip: boolean; interval: number; @@ -36,18 +37,18 @@ type FormValues = { type Props = { initialValues: Partial; - onSubmit: (values: FormValues) => void; - handleClear: () => void; processing: boolean; - processingClear: boolean; + processingReset: boolean; + onSubmit: (values: FormValues) => void; + onReset: () => void; } -export const LogsConfigForm = ({ +export const Form = ({ initialValues, - onSubmit, processing, - processingClear, - handleClear, + processingReset, + onSubmit, + onReset, }: Props) => { const { register, @@ -62,7 +63,7 @@ export const LogsConfigForm = ({ anonymize_client_ip: initialValues.anonymize_client_ip || false, interval: initialValues.interval || DAY, customInterval: initialValues.customInterval || null, - ignored: initialValues.ignored ?? '', + ignored: initialValues.ignored || '', }, }); @@ -89,8 +90,6 @@ export const LogsConfigForm = ({ processing || (intervalValue === RETENTION_CUSTOM && !customIntervalValue); - console.log(intervalValue, RETENTION_CUSTOM, customIntervalValue); - return (
@@ -132,9 +131,9 @@ export const LogsConfigForm = ({
-