Pull request: trim empty lines in the logs and statistics configuration
Updates #6140
Squashed commit of the following:
commit 9ad618684a9a89314d8eb57028f34bd32be9fdbb
Merge: cd1cee0c6 3f7089d24
Author: Ildar Kamalov <ik@adguard.com>
Date: Mon Aug 28 17:24:36 2023 +0300
Merge branch 'master' into ADG-7414
commit cd1cee0c6235248f6f8670b2b8d0144468170b23
Author: Ildar Kamalov <ik@adguard.com>
Date: Mon Aug 28 15:28:04 2023 +0300
fix stats form
commit 88bb1adfd5da913bf0c260a092b2b6ac627b06ef
Author: Ildar Kamalov <ik@adguard.com>
Date: Mon Aug 28 14:55:58 2023 +0300
client: trim empty lines in the logs configuration textarea
This commit is contained in:
parent
3f7089d241
commit
e1f6229e56
|
@ -13,8 +13,11 @@ import flow from 'lodash/flow';
|
||||||
import {
|
import {
|
||||||
CheckboxField,
|
CheckboxField,
|
||||||
toFloatNumber,
|
toFloatNumber,
|
||||||
renderTextareaField, renderInputField, renderRadioField,
|
renderTextareaField,
|
||||||
|
renderInputField,
|
||||||
|
renderRadioField,
|
||||||
} from '../../../helpers/form';
|
} from '../../../helpers/form';
|
||||||
|
import { trimLinesAndRemoveEmpty } from '../../../helpers/helpers';
|
||||||
import {
|
import {
|
||||||
FORM_NAME,
|
FORM_NAME,
|
||||||
QUERY_LOG_INTERVALS_DAYS,
|
QUERY_LOG_INTERVALS_DAYS,
|
||||||
|
@ -147,6 +150,7 @@ let Form = (props) => {
|
||||||
component={renderTextareaField}
|
component={renderTextareaField}
|
||||||
placeholder={t('ignore_domains')}
|
placeholder={t('ignore_domains')}
|
||||||
disabled={processing}
|
disabled={processing}
|
||||||
|
normalizeOnBlur={trimLinesAndRemoveEmpty}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-5">
|
<div className="mt-5">
|
||||||
|
|
|
@ -24,6 +24,7 @@ import {
|
||||||
CUSTOM_INTERVAL,
|
CUSTOM_INTERVAL,
|
||||||
RETENTION_RANGE,
|
RETENTION_RANGE,
|
||||||
} from '../../../helpers/constants';
|
} from '../../../helpers/constants';
|
||||||
|
import { trimLinesAndRemoveEmpty } from '../../../helpers/helpers';
|
||||||
import '../FormButton.css';
|
import '../FormButton.css';
|
||||||
|
|
||||||
const getIntervalTitle = (intervalMs, t) => {
|
const getIntervalTitle = (intervalMs, t) => {
|
||||||
|
@ -135,6 +136,7 @@ let Form = (props) => {
|
||||||
component={renderTextareaField}
|
component={renderTextareaField}
|
||||||
placeholder={t('ignore_domains')}
|
placeholder={t('ignore_domains')}
|
||||||
disabled={processing}
|
disabled={processing}
|
||||||
|
normalizeOnBlur={trimLinesAndRemoveEmpty}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-5">
|
<div className="mt-5">
|
||||||
|
|
Loading…
Reference in New Issue