feat(X-Pack): 日志保留时间
This commit is contained in:
parent
58235aaa02
commit
5eefb53ef6
@ -2133,7 +2133,8 @@ export default {
|
|||||||
autoCreateUser: '第三方自动创建用户',
|
autoCreateUser: '第三方自动创建用户',
|
||||||
dsIntervalTime: '数据源检测时间间隔',
|
dsIntervalTime: '数据源检测时间间隔',
|
||||||
dsExecuteTime: '数据源检测频率',
|
dsExecuteTime: '数据源检测频率',
|
||||||
frontTimeOut: '请求超时时间(秒)'
|
frontTimeOut: '请求超时时间(秒)',
|
||||||
|
logLiveTime: '日志保留时间(天)'
|
||||||
},
|
},
|
||||||
template_manage: {
|
template_manage: {
|
||||||
name_already_exists_type: '分类名称已存在',
|
name_already_exists_type: '分类名称已存在',
|
||||||
|
|||||||
@ -102,6 +102,15 @@ const closeLoading = () => {
|
|||||||
const edit = list => {
|
const edit = list => {
|
||||||
state.settingList = list.map(item => {
|
state.settingList = list.map(item => {
|
||||||
const pkey = item.pkey
|
const pkey = item.pkey
|
||||||
|
if (pkey === 'basic.logLiveTime') {
|
||||||
|
rule[pkey.split('.')[1]] = [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t('common.require'),
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
item['label'] = `setting_${pkey}`
|
item['label'] = `setting_${pkey}`
|
||||||
item['pkey'] = pkey.split('.')[1]
|
item['pkey'] = pkey.split('.')[1]
|
||||||
let pval = item.pval
|
let pval = item.pval
|
||||||
@ -171,13 +180,26 @@ defineExpose({
|
|||||||
v-model="state.form.frontTimeOut"
|
v-model="state.form.frontTimeOut"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
step-strictly
|
step-strictly
|
||||||
class="text-left"
|
class="text-left edit-all-line"
|
||||||
:min="1"
|
:min="1"
|
||||||
:placeholder="t('common.inputText')"
|
:placeholder="t('common.inputText')"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="item.pkey === 'logLiveTime'">
|
||||||
|
<el-input-number
|
||||||
|
v-model="state.form[item.pkey]"
|
||||||
|
autocomplete="off"
|
||||||
|
step-strictly
|
||||||
|
class="text-left edit-all-line"
|
||||||
|
:min="1"
|
||||||
|
:max="4000"
|
||||||
|
:placeholder="t('common.inputText')"
|
||||||
|
controls-position="right"
|
||||||
|
type="number"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<v-else />
|
<v-else />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -215,6 +237,9 @@ defineExpose({
|
|||||||
.is-error {
|
.is-error {
|
||||||
margin-bottom: 40px !important;
|
margin-bottom: 40px !important;
|
||||||
}
|
}
|
||||||
|
.edit-all-line {
|
||||||
|
width: 552px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.setting-hidden-item {
|
.setting-hidden-item {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
|||||||
@ -45,7 +45,6 @@ const search = cb => {
|
|||||||
item.pval = item.pval
|
item.pval = item.pval
|
||||||
}
|
}
|
||||||
item.pkey = 'setting_' + item.pkey
|
item.pkey = 'setting_' + item.pkey
|
||||||
console.log(item.pkey)
|
|
||||||
state.templateList.push(item)
|
state.templateList.push(item)
|
||||||
}
|
}
|
||||||
cb && cb()
|
cb && cb()
|
||||||
|
|||||||
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit a177d2aafe0a2dc871fc4b8d202ebc4edbb75f6a
|
Subproject commit f57ed3cd02aee601d47a755a44358ced6c504b5e
|
||||||
@ -6,6 +6,7 @@ import io.swagger.v3.oas.annotations.Hidden;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
@ -22,4 +23,8 @@ public interface PerSettingApi {
|
|||||||
@Operation(summary = "保存设置")
|
@Operation(summary = "保存设置")
|
||||||
@PostMapping("/baisc/save")
|
@PostMapping("/baisc/save")
|
||||||
void saveBasic(@RequestBody List<Object> settings);
|
void saveBasic(@RequestBody List<Object> settings);
|
||||||
|
|
||||||
|
@Hidden
|
||||||
|
@GetMapping("/baisc/single/{key}")
|
||||||
|
String singleValue(@PathVariable("key") String key);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,5 +3,6 @@ package io.dataease.constant;
|
|||||||
public class XpackSettingConstants {
|
public class XpackSettingConstants {
|
||||||
|
|
||||||
public static final String AUTO_CREATE_USER = "basic.autoCreateUser";
|
public static final String AUTO_CREATE_USER = "basic.autoCreateUser";
|
||||||
|
public static final String LOG_LIVE_TIME = "basic.logLiveTime";
|
||||||
public static final String Front_Time_Out = "basic.frontTimeOut";
|
public static final String Front_Time_Out = "basic.frontTimeOut";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ public class SystemSettingUtils {
|
|||||||
|
|
||||||
public static boolean xpackSetting(String pkey) {
|
public static boolean xpackSetting(String pkey) {
|
||||||
|
|
||||||
List<String> xpackSettingList = List.of(XpackSettingConstants.AUTO_CREATE_USER);
|
List<String> xpackSettingList = List.of(XpackSettingConstants.AUTO_CREATE_USER, XpackSettingConstants.LOG_LIVE_TIME);
|
||||||
return xpackSettingList.contains(pkey);
|
return xpackSettingList.contains(pkey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user