client: move cache fields to the upstream tab

This commit is contained in:
Ildar Kamalov 2023-11-21 17:27:38 +03:00
parent 789060e4d4
commit feb15745d2
2 changed files with 31 additions and 30 deletions

View File

@ -736,5 +736,6 @@
"friday_short": "Fri",
"saturday_short": "Sat",
"upstream_dns_cache_configuration": "Upstream DNS cache configuration",
"enable_upstream_dns_cache": "Enable upstream DNS cache"
"enable_upstream_dns_cache": "Enable DNS cache for this client's custom upstream configuration",
"dns_cache_size": "DNS cache size (in bytes)"
}

View File

@ -222,35 +222,6 @@ let Form = (props) => {
/>
</div>
))}
<div className="form__label--bold form__label--top form__label--bot">
{t('upstream_dns_cache_configuration')}
</div>
<div className="form__group mb-2">
<Field
name="upstreams_cache_enabled"
type="checkbox"
component={CheckboxField}
placeholder={t('enable_upstream_dns_cache')}
/>
</div>
<div className="form__group form__group--settings">
<label
htmlFor="upstreams_cache_size"
className="form__label"
>
{t('cache_size')}
</label>
<Field
name="upstreams_cache_size"
type="number"
component={renderInputField}
placeholder={t('enter_cache_size')}
className="form-control"
normalize={toNumber}
min={0}
max={UINT32_RANGE.MAX}
/>
</div>
</div>,
},
block_services: {
@ -341,6 +312,35 @@ let Form = (props) => {
normalizeOnBlur={trimLinesAndRemoveEmpty}
/>
<Examples />
<div className="form__label--bold mt-5 mb-3">
{t('upstream_dns_cache_configuration')}
</div>
<div className="form__group mb-2">
<Field
name="upstreams_cache_enabled"
type="checkbox"
component={CheckboxField}
placeholder={t('enable_upstream_dns_cache')}
/>
</div>
<div className="form__group form__group--settings">
<label
htmlFor="upstreams_cache_size"
className="form__label"
>
{t('dns_cache_size')}
</label>
<Field
name="upstreams_cache_size"
type="number"
component={renderInputField}
placeholder={t('enter_cache_size')}
className="form-control"
normalize={toNumber}
min={0}
max={UINT32_RANGE.MAX}
/>
</div>
</div>,
},
};