diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index d3700869..41d97778 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -174,7 +174,7 @@ "rule_added_to_custom_filtering_toast": "Rule added to the custom filtering rules", "query_log_response_status": "Status: {{value}}", "query_log_filtered": "Filtered by {{filter}}", - "query_log_confirm_clear": "Are you sure you want to clear the entire query log? This will also clear statistics on the dashboard.", + "query_log_confirm_clear": "Are you sure you want to clear the entire query log?", "query_log_cleared": "The query log has been successfully cleared", "query_log_clear": "Clear query logs", "query_log_retention": "Query logs retention", @@ -182,6 +182,7 @@ "query_log_configuration": "Logs configuration", "query_log_disabled": "The query log is disabled and can be configured in the <0>settings0>", "query_log_strict_search": "Use double quotes for strict search", + "query_log_retention_confirm": "Are you sure you want to change query log retention? If you decrease the interval value, some data will be lost", "source_label": "Source", "found_in_known_domain_db": "Found in the known domains database.", "category_label": "Category", @@ -378,6 +379,7 @@ "statistics_retention_desc": "If you decrease the interval value, some data will be lost", "statistics_clear": " Clear statistics", "statistics_clear_confirm": "Are you sure you want to clear statistics?", + "statistics_retention_confirm": "Are you sure you want to change statistics retention? If you decrease the interval value, some data will be lost", "statistics_cleared": "Statistics successfully cleared", "interval_hours": "{{count}} hour", "interval_hours_plural": "{{count}} hours", diff --git a/client/src/components/Settings/LogsConfig/Form.js b/client/src/components/Settings/LogsConfig/Form.js index e90c6487..3daf2b8d 100644 --- a/client/src/components/Settings/LogsConfig/Form.js +++ b/client/src/components/Settings/LogsConfig/Form.js @@ -7,7 +7,7 @@ import flow from 'lodash/flow'; import { renderSelectField, renderRadioField, toNumber } from '../../../helpers/form'; import { QUERY_LOG_INTERVALS_DAYS } from '../../../helpers/constants'; -const getIntervalFields = (processing, t, handleChange, toNumber) => +const getIntervalFields = (processing, t, toNumber) => QUERY_LOG_INTERVALS_DAYS.map((interval) => { const title = interval === 1 ? t('interval_24_hour') : t('interval_days', { count: interval }); @@ -20,7 +20,6 @@ const getIntervalFields = (processing, t, handleChange, toNumber) => component={renderRadioField} value={interval} placeholder={title} - onChange={handleChange} normalize={toNumber} disabled={processing} /> @@ -29,48 +28,56 @@ const getIntervalFields = (processing, t, handleChange, toNumber) => const Form = (props) => { const { - handleSubmit, handleChange, processing, t, + handleSubmit, submitting, invalid, processing, processingClear, handleClear, t, } = props; return (