diff --git a/glc/go.mod b/glc/go.mod
index 96fe519..bc91308 100644
--- a/glc/go.mod
+++ b/glc/go.mod
@@ -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
diff --git a/glc/go.sum b/glc/go.sum
index 426f33d..0cf272e 100644
--- a/glc/go.sum
+++ b/glc/go.sum
@@ -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=
diff --git a/glc/onstart/version.go b/glc/onstart/version.go
index dd8e641..d721755 100644
--- a/glc/onstart/version.go
+++ b/glc/onstart/version.go
@@ -1,3 +1,3 @@
package onstart
-const VERSION = "glogcenter 0.11.6"
+const VERSION = "glogcenter 0.11.7"
diff --git a/glc/www/web/.env b/glc/www/web/.env
index 1d095e8..ba46cb4 100644
--- a/glc/www/web/.env
+++ b/glc/www/web/.env
@@ -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】
diff --git a/glc/www/web/src/assets/icons/play.svg b/glc/www/web/src/assets/icons/play.svg
new file mode 100644
index 0000000..ec621a7
--- /dev/null
+++ b/glc/www/web/src/assets/icons/play.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/glc/www/web/src/assets/icons/stop.svg b/glc/www/web/src/assets/icons/stop.svg
new file mode 100644
index 0000000..0fe16c4
--- /dev/null
+++ b/glc/www/web/src/assets/icons/stop.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/glc/www/web/src/views/glc/search/GlcMain.vue b/glc/www/web/src/views/glc/search/GlcMain.vue
index fd58b3e..e3156ca 100644
--- a/glc/www/web/src/views/glc/search/GlcMain.vue
+++ b/glc/www/web/src/views/glc/search/GlcMain.vue
@@ -35,6 +35,12 @@
+
+
+
+
+
+
@@ -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');