Skip to content

Commit

Permalink
Pull request: trim empty lines in the logs and statistics configuration
Browse files Browse the repository at this point in the history
Updates #6140

Squashed commit of the following:

commit 9ad6186
Merge: cd1cee0 3f7089d
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 28 17:24:36 2023 +0300

    Merge branch 'master' into ADG-7414

commit cd1cee0
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 28 15:28:04 2023 +0300

    fix stats form

commit 88bb1ad
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 28 14:55:58 2023 +0300

    client: trim empty lines in the logs configuration textarea
  • Loading branch information
IldarKamalov committed Aug 28, 2023
1 parent 3f7089d commit e1f6229
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/components/Settings/LogsConfig/Form.js
Expand Up @@ -13,8 +13,11 @@ import flow from 'lodash/flow';
import {
CheckboxField,
toFloatNumber,
renderTextareaField, renderInputField, renderRadioField,
renderTextareaField,
renderInputField,
renderRadioField,
} from '../../../helpers/form';
import { trimLinesAndRemoveEmpty } from '../../../helpers/helpers';
import {
FORM_NAME,
QUERY_LOG_INTERVALS_DAYS,
Expand Down Expand Up @@ -147,6 +150,7 @@ let Form = (props) => {
component={renderTextareaField}
placeholder={t('ignore_domains')}
disabled={processing}
normalizeOnBlur={trimLinesAndRemoveEmpty}
/>
</div>
<div className="mt-5">
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/Settings/StatsConfig/Form.js
Expand Up @@ -24,6 +24,7 @@ import {
CUSTOM_INTERVAL,
RETENTION_RANGE,
} from '../../../helpers/constants';
import { trimLinesAndRemoveEmpty } from '../../../helpers/helpers';
import '../FormButton.css';

const getIntervalTitle = (intervalMs, t) => {
Expand Down Expand Up @@ -135,6 +136,7 @@ let Form = (props) => {
component={renderTextareaField}
placeholder={t('ignore_domains')}
disabled={processing}
normalizeOnBlur={trimLinesAndRemoveEmpty}
/>
</div>
<div className="mt-5">
Expand Down

0 comments on commit e1f6229

Please sign in to comment.