This commit is contained in:
gotoeasy 2023-10-16 19:51:47 +08:00
parent 574c748089
commit 1b96e92aa5
7 changed files with 30 additions and 5 deletions

View File

@ -6,7 +6,7 @@ require (
github.com/gin-contrib/cors v1.4.0
github.com/gin-contrib/gzip v0.0.6
github.com/gin-gonic/gin v1.9.1
github.com/gotoeasy/glang v0.10.10
github.com/gotoeasy/glang v0.10.11
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/streadway/amqp v1.1.0
github.com/syndtr/goleveldb v1.0.0

View File

@ -268,6 +268,8 @@ github.com/gotoeasy/glang v0.9.8 h1:NaSM2AGyMM0NsEF4iLFGrp3sy5YUx/ln2VV6coClpLY=
github.com/gotoeasy/glang v0.9.8/go.mod h1:yfd1MWPdZMKF6yykUxAFkEyPTgf+lxlSfOCyxjS5sXI=
github.com/gotoeasy/glang v0.10.10 h1:yle2A/j+Vi2zFx6OimJSqFgm6cQGyk32FueJ27QvO9o=
github.com/gotoeasy/glang v0.10.10/go.mod h1:yfd1MWPdZMKF6yykUxAFkEyPTgf+lxlSfOCyxjS5sXI=
github.com/gotoeasy/glang v0.10.11 h1:bfgVMiPMUjt6u3wqpYsQNojijd74CmEfO61uEStnh1g=
github.com/gotoeasy/glang v0.10.11/go.mod h1:yfd1MWPdZMKF6yykUxAFkEyPTgf+lxlSfOCyxjS5sXI=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=

View File

@ -1,3 +1,3 @@
package onstart
const VERSION = "glogcenter 0.11.6"
const VERSION = "glogcenter 0.11.7"

View File

@ -9,7 +9,7 @@ VITE_PRD_DROP_DEBUGGER = true
VITE_DEV_MOCK = false
# Logo提示
VITE_GLC_INFO = "v0.11.6"
VITE_GLC_INFO = "v0.11.7"
# --------------------------------------------------------
# 【例1】

View File

@ -0,0 +1 @@
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M817.088 484.96l-512-323.744C295.232 154.976 282.752 154.592 272.576 160.224 262.336 165.856 256 176.608 256 188.256l0 647.328c0 11.648 6.336 22.4 16.576 28.032 4.8 2.656 10.112 3.968 15.424 3.968 5.952 0 11.904-1.664 17.088-4.928l512-323.616C826.368 533.184 832 522.976 832 512 832 501.024 826.368 490.816 817.088 484.96z"></path></svg>

After

Width:  |  Height:  |  Size: 430 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M797.8 797.8H226.2V226.2h571.5v571.6z"></path></svg>

After

Width:  |  Height:  |  Size: 145 B

View File

@ -35,6 +35,12 @@
</template>
<template #right>
<el-tooltip :content="autoSearchMode ? '停止自动查询' : '开始自动查询'" placement="top">
<el-button circle @click="switchAutoSearchMode">
<SvgIcon v-if="!autoSearchMode" name="play" />
<SvgIcon v-if="autoSearchMode" name="stop" />
</el-button>
</el-tooltip>
<el-tooltip content="缩放" placement="top">
<el-button circle @click="emitter.emit('main:switchMaximizePage')">
<SvgIcon name="zoom" />
@ -77,6 +83,7 @@ const opt = {
};
const { formData, visible, tableData, tableHeight, pageSettingStore, showTableLoadding } = usePageMainHooks(opt);
const autoSearchMode = ref(false); //
const table = ref(); //
const tid = ref('glcSearchMain'); // ID
const info = ref(''); //
@ -169,7 +176,6 @@ const shortcuts = ref([
//
onMounted(() => {
showTableLoadding.value = true;
const configStore = $emitter.emit('$table:config', { id: tid.value });
!configStore.columns.length && $emitter.emit('$table:config', { id: tid.value, update: true }); // 使
//
@ -201,8 +207,22 @@ onMounted(() => {
search();
});
function isAutoSearchMode() {
return autoSearchMode.value
}
function switchAutoSearchMode(changMode = true) {
changMode && (autoSearchMode.value = !autoSearchMode.value);
if (autoSearchMode.value) {
search();
setTimeout(() => {
isAutoSearchMode() && switchAutoSearchMode(false);
}, 5000);
}
}
function search() {
showTableLoadding.value = true;
autoSearchMode.value ? (showTableLoadding.value = false) : (showTableLoadding.value = true);
const url = `/v1/log/search`;
const data = {};
data.searchKey = formData.value.searchKeys;
@ -232,6 +252,7 @@ function search() {
info.value = `日志总量 ${rs.result.total} 条,当前条件最多匹配 ${rs.result.count} 条,正展示前 ${tableData.value.length}`
}
});
} else if (rs.code == 403) {
userLogout(); // 403
router.push('/login');