mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
Merge pull request #13750 from dataease/pr@dev-v2@perf_login_limit_validate
perf(X-Pack): 登录限制-表单验证
This commit is contained in:
commit
d71096e2c3
@ -28,7 +28,14 @@ const pvpOptions = [
|
|||||||
{ value: '3', label: t('commons.date.three_months') },
|
{ value: '3', label: t('commons.date.three_months') },
|
||||||
{ value: '4', label: t('commons.date.one_month') }
|
{ value: '4', label: t('commons.date.one_month') }
|
||||||
]
|
]
|
||||||
|
const requireKeys = [
|
||||||
|
'logLiveTime',
|
||||||
|
'thresholdLogLiveTime',
|
||||||
|
'exportFileLiveTime',
|
||||||
|
'frontTimeOut',
|
||||||
|
'loginLimitTime',
|
||||||
|
'loginLimitRate'
|
||||||
|
]
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
form: reactive({
|
form: reactive({
|
||||||
dsIntervalTime: '30',
|
dsIntervalTime: '30',
|
||||||
@ -166,16 +173,7 @@ const edit = (
|
|||||||
state.openOptions = openOptions || []
|
state.openOptions = openOptions || []
|
||||||
state.settingList = list.map(item => {
|
state.settingList = list.map(item => {
|
||||||
const pkey = item.pkey
|
const pkey = item.pkey
|
||||||
if (pkey === 'basic.logLiveTime' || pkey === 'basic.thresholdLogLiveTime') {
|
if (requireKeys.some(requireKey => `basic.${requireKey}` === pkey)) {
|
||||||
rule[pkey.split('.')[1]] = [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('common.require'),
|
|
||||||
trigger: ['blur', 'change']
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
if (pkey === 'basic.exportFileLiveTime' || pkey === 'basic.frontTimeOut') {
|
|
||||||
rule[pkey.split('.')[1]] = [
|
rule[pkey.split('.')[1]] = [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 6b084968357d809d46b9b6f2bc2c2fa787f28f6e
|
Subproject commit 3bc8d0b3767818d5ba49f13b7b72b7e82b4e2c27
|
Loading…
Reference in New Issue
Block a user