mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
Merge pull request #7926 from dataease/pr@dev-v2@feat_log_live_time
feat(X-Pack): 日志保留时间
This commit is contained in:
commit
84afe65d8f
@ -2133,7 +2133,8 @@ export default {
|
||||
autoCreateUser: '第三方自动创建用户',
|
||||
dsIntervalTime: '数据源检测时间间隔',
|
||||
dsExecuteTime: '数据源检测频率',
|
||||
frontTimeOut: '请求超时时间(秒)'
|
||||
frontTimeOut: '请求超时时间(秒)',
|
||||
logLiveTime: '日志保留时间(天)'
|
||||
},
|
||||
template_manage: {
|
||||
name_already_exists_type: '分类名称已存在',
|
||||
|
@ -102,6 +102,15 @@ const closeLoading = () => {
|
||||
const edit = list => {
|
||||
state.settingList = list.map(item => {
|
||||
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['pkey'] = pkey.split('.')[1]
|
||||
let pval = item.pval
|
||||
@ -171,13 +180,26 @@ defineExpose({
|
||||
v-model="state.form.frontTimeOut"
|
||||
autocomplete="off"
|
||||
step-strictly
|
||||
class="text-left"
|
||||
class="text-left edit-all-line"
|
||||
:min="1"
|
||||
:placeholder="t('common.inputText')"
|
||||
controls-position="right"
|
||||
type="number"
|
||||
/>
|
||||
</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 />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -215,6 +237,9 @@ defineExpose({
|
||||
.is-error {
|
||||
margin-bottom: 40px !important;
|
||||
}
|
||||
.edit-all-line {
|
||||
width: 552px !important;
|
||||
}
|
||||
}
|
||||
.setting-hidden-item {
|
||||
display: none !important;
|
||||
|
@ -45,7 +45,6 @@ const search = cb => {
|
||||
item.pval = item.pval
|
||||
}
|
||||
item.pkey = 'setting_' + item.pkey
|
||||
console.log(item.pkey)
|
||||
state.templateList.push(item)
|
||||
}
|
||||
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.tags.Tag;
|
||||
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.RequestBody;
|
||||
|
||||
@ -22,4 +23,8 @@ public interface PerSettingApi {
|
||||
@Operation(summary = "保存设置")
|
||||
@PostMapping("/baisc/save")
|
||||
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 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";
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ public class SystemSettingUtils {
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user