1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

fix: 调整病毒扫描设置界面样式 (#5713)

This commit is contained in:
ssongliu 2024-07-08 18:21:23 +08:00 committed by GitHub
parent 1c167e828a
commit 047d49e0eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 18 additions and 8 deletions

View File

@ -121,7 +121,7 @@ export const searchClamFile = (name: string, tail: string) => {
return http.post<string>(`/toolbox/clam/file/search`, { name: name, tail: tail }); return http.post<string>(`/toolbox/clam/file/search`, { name: name, tail: tail });
}; };
export const updateClamFile = (name: string, file: string) => { export const updateClamFile = (name: string, file: string) => {
return http.post(`/toolbox/clam/file/update`, { name: name, file: file }); return http.post(`/toolbox/clam/file/update`, { name: name, file: file }, TimeoutEnum.T_60S);
}; };
export const searchClamBaseInfo = () => { export const searchClamBaseInfo = () => {
return http.post<Toolbox.ClamBaseInfo>(`/toolbox/clam/base`); return http.post<Toolbox.ClamBaseInfo>(`/toolbox/clam/base`);

View File

@ -1099,6 +1099,7 @@ const message = {
infectedDir: 'Infected Directory', infectedDir: 'Infected Directory',
scanDate: 'Scan Date', scanDate: 'Scan Date',
scanResult: 'Scan log tail', scanResult: 'Scan log tail',
tail: 'Lines',
scanTime: 'Time Taken', scanTime: 'Time Taken',
infectedFiles: 'Infected Files', infectedFiles: 'Infected Files',
log: 'Details', log: 'Details',

View File

@ -1040,6 +1040,7 @@ const message = {
infectedDir: '隔離目錄', infectedDir: '隔離目錄',
scanDate: '掃描時間', scanDate: '掃描時間',
scanResult: '掃描報告條數', scanResult: '掃描報告條數',
tail: '日誌顯示行數',
scanTime: '耗時', scanTime: '耗時',
infectedFiles: '感染文件數', infectedFiles: '感染文件數',
log: '詳情', log: '詳情',

View File

@ -1042,6 +1042,7 @@ const message = {
infectedDir: '隔离目录', infectedDir: '隔离目录',
scanDate: '扫描时间', scanDate: '扫描时间',
scanResult: '扫描报告条数', scanResult: '扫描报告条数',
tail: '日志显示行数',
scanTime: '耗时', scanTime: '耗时',
infectedFiles: '感染文件数', infectedFiles: '感染文件数',
log: '详情', log: '详情',

View File

@ -82,12 +82,14 @@
> >
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button
v-if="row.infectedStrategy === 'copy' || row.infectedStrategy === 'move'"
link link
type="primary" type="primary"
@click="toFolder(row.infectedDir + '/1panel-infected/' + row.name)" @click="toFolder(row.infectedDir + '/1panel-infected/' + row.name)"
> >
{{ row.infectedDir + '/1panel-infected/' + row.name }} {{ row.infectedDir + '/1panel-infected/' + row.name }}
</el-button> </el-button>
<span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column

View File

@ -29,8 +29,13 @@
<template #main> <template #main>
<div> <div>
<el-select style="width: 20%" @change="search" v-model.number="tail"> <el-select
<template #prefix>{{ $t('toolbox.clam.scanResult') }}</template> v-if="!canUpdate()"
style="width: 20%"
@change="search(activeName)"
v-model.number="tail"
>
<template #prefix>{{ $t('toolbox.clam.tail') }}</template>
<el-option :value="0" :label="$t('commons.table.all')" /> <el-option :value="0" :label="$t('commons.table.all')" />
<el-option :value="10" :label="10" /> <el-option :value="10" :label="10" />
<el-option :value="100" :label="100" /> <el-option :value="100" :label="100" />
@ -51,9 +56,9 @@
@ready="handleReady" @ready="handleReady"
:extensions="extensions" :extensions="extensions"
v-model="content" v-model="content"
:disabled="canUpdate()" :disabled="!canUpdate()"
/> />
<el-button type="primary" style="margin-top: 10px" v-if="!canUpdate()" @click="onSave"> <el-button type="primary" style="margin-top: 10px" v-if="canUpdate()" @click="onSave">
{{ $t('commons.button.save') }} {{ $t('commons.button.save') }}
</el-button> </el-button>
</div> </div>
@ -89,15 +94,15 @@ const content = ref();
const confirmRef = ref(); const confirmRef = ref();
const loadHeight = () => { const loadHeight = () => {
let height = globalStore.openMenuTabs ? '425px' : '395px'; let height = globalStore.openMenuTabs ? '405px' : '375px';
if (canUpdate()) { if (!canUpdate()) {
height = globalStore.openMenuTabs ? '383px' : '353px'; height = globalStore.openMenuTabs ? '383px' : '353px';
} }
return height; return height;
}; };
const canUpdate = () => { const canUpdate = () => {
return activeName.value.indexOf('-log') !== -1; return activeName.value.indexOf('-log') === -1;
}; };
const search = async (itemName: string) => { const search = async (itemName: string) => {