+ client: handle logs configuration
This commit is contained in:
committed by
Simon Zolin
parent
27f895cf46
commit
a753ae86cc
@@ -9,9 +9,8 @@ import { STATS_INTERVALS_DAYS } from '../../../helpers/constants';
|
||||
|
||||
const getIntervalFields = (processing, t, handleChange, toNumber) =>
|
||||
STATS_INTERVALS_DAYS.map((interval) => {
|
||||
const title = interval === 1
|
||||
? t('interval_24_hour')
|
||||
: t('interval_days', { count: interval });
|
||||
const title =
|
||||
interval === 1 ? t('interval_24_hour') : t('interval_days', { count: interval });
|
||||
|
||||
return (
|
||||
<Field
|
||||
@@ -37,7 +36,7 @@ const Form = (props) => {
|
||||
<form onSubmit={handleSubmit}>
|
||||
<div className="row">
|
||||
<div className="col-12">
|
||||
<label className="form__label form__label--with-desc" htmlFor="server_name">
|
||||
<label className="form__label form__label--with-desc">
|
||||
<Trans>statistics_retention</Trans>
|
||||
</label>
|
||||
<div className="form__desc form__desc--top">
|
||||
@@ -45,7 +44,7 @@ const Form = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-12">
|
||||
<div className="form__group mt-2">
|
||||
<div className="form__group form__group--settings mt-2">
|
||||
<div className="custom-controls-stacked">
|
||||
{getIntervalFields(processing, t, handleChange, toNumber)}
|
||||
</div>
|
||||
@@ -69,6 +68,6 @@ Form.propTypes = {
|
||||
export default flow([
|
||||
withNamespaces(),
|
||||
reduxForm({
|
||||
form: 'logConfigForm',
|
||||
form: 'statsConfigForm',
|
||||
}),
|
||||
])(Form);
|
||||
|
||||
Reference in New Issue
Block a user