style: 修改日志审计-网站日志样式 (#1185)

This commit is contained in:
zhengkunwang223 2023-05-30 11:02:56 +08:00 committed by GitHub
parent 800f9e2d38
commit f51b09dc40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 15 deletions

View File

@ -49,12 +49,6 @@
</template>
<template #main>
<div class="update-prompt" v-if="data == null">
<span>{{ mode === 'upgrade' ? $t('app.updatePrompt') : $t('app.installPrompt') }}</span>
<div>
<img src="@/assets/images/no_update_app.svg" />
</div>
</div>
<el-alert type="info" :closable="false" v-if="mode === 'installed'">
<template #default>
<span>
@ -70,6 +64,12 @@
</span>
</template>
</el-alert>
<div class="update-prompt" v-if="data == null">
<span>{{ mode === 'upgrade' ? $t('app.updatePrompt') : $t('app.installPrompt') }}</span>
<div>
<img src="@/assets/images/no_update_app.svg" />
</div>
</div>
<el-row :gutter="5">
<el-col
v-for="(installed, index) in data"

View File

@ -4,14 +4,22 @@
<template #toolbar>
<el-row>
<el-col :span="16">
<el-radio-group v-model="logReq.logType" @change="search()">
<el-radio-button :label="'access.log'">
{{ $t('logs.runLog') }}
</el-radio-button>
<el-radio-button :label="'error.log'" style="margin-left: 10px">
{{ $t('logs.errLog') }}
</el-radio-button>
</el-radio-group>
<el-button
class="tag-button"
:label="'access.log'"
:type="logReq.logType === 'access.log' ? 'primary' : ''"
@click="changeType('access.log')"
>
{{ $t('logs.runLog') }}
</el-button>
<el-button
class="tag-button"
:label="'error.log'"
:type="logReq.logType === 'error.log' ? 'primary' : ''"
@click="changeType('error.log')"
>
{{ $t('logs.errLog') }}
</el-button>
</el-col>
</el-row>
</template>
@ -72,7 +80,7 @@ const extensions = [javascript(), oneDark];
const loading = ref(false);
const websites = ref();
const logReq = reactive({
id: 0,
id: undefined,
operate: 'get',
logType: 'access.log',
});
@ -102,6 +110,13 @@ const handleReady = (payload) => {
view.value = payload.view;
};
const changeType = (type: string) => {
logReq.logType = type;
if (logReq.id != undefined) {
search();
}
};
const search = () => {
loading.value = true;
OpWebsiteLog(logReq)