mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
优化日志异常展示
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
<el-form-item :label="$t('Status')">
|
||||
<status-tag :status="taskForm.status"/>
|
||||
<el-badge
|
||||
v-if="errorLogData.length > 0"
|
||||
:value="errorLogData.length"
|
||||
v-if="taskForm.error_log_count > 0"
|
||||
:value="taskForm.error_log_count"
|
||||
style="margin-left:10px; cursor:pointer;"
|
||||
>
|
||||
<el-tag type="danger" @click="onClickLogWithErrors">
|
||||
|
||||
@@ -488,6 +488,7 @@ export default {
|
||||
'Enable Tutorial': '启用教程',
|
||||
'Error Regex Pattern': '异常正则表达式',
|
||||
'By default: ': '默认: ',
|
||||
'Max Error Logs Display': '最大异常日志展示',
|
||||
|
||||
// 挑战
|
||||
'Challenge': '挑战',
|
||||
@@ -627,6 +628,7 @@ docker run -d --restart always --name crawlab_worker \\
|
||||
'Please enter your Wechat account': '请输入您的微信账号',
|
||||
'Please enter your feedback content': '请输入您的反馈内容',
|
||||
'No response from the server. Please make sure your server is running correctly. You can also refer to the documentation to solve this issue.': '服务器无响应,请保证您的服务器正常运行。您也可以参考文档来解决这个问题(文档链接在下方)',
|
||||
'Are you sure to restart this task?': '确认重新运行该任务?',
|
||||
|
||||
// 其他
|
||||
'Star crawlab-team/crawlab on GitHub': '在 GitHub 上为 Crawlab 加星吧'
|
||||
|
||||
@@ -87,6 +87,10 @@ const user = {
|
||||
getInfo ({ commit, state }) {
|
||||
return request.get('/me')
|
||||
.then(response => {
|
||||
// ensure compatibility
|
||||
if (!response.data.data.setting.max_error_log) {
|
||||
response.data.data.setting.max_error_log = 1000
|
||||
}
|
||||
commit('SET_USER_INFO', response.data.data)
|
||||
window.localStorage.setItem('user_info', JSON.stringify(response.data.data))
|
||||
})
|
||||
|
||||
@@ -129,6 +129,18 @@
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Max Error Logs Display')" prop="setting.max_error_log">
|
||||
<el-select
|
||||
v-model="userInfo.setting.max_error_log"
|
||||
clearable
|
||||
>
|
||||
<el-option :value="100" label="100"/>
|
||||
<el-option :value="500" label="500"/>
|
||||
<el-option :value="1000" label="1000"/>
|
||||
<el-option :value="5000" label="5000"/>
|
||||
<el-option :value="10000" label="10000"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div style="text-align: right">
|
||||
<el-button type="success" size="small" @click="saveUserInfo">
|
||||
|
||||
Reference in New Issue
Block a user