diff --git a/web/src/stores/los.ts b/web/src/stores/los.ts new file mode 100644 index 0000000000000000000000000000000000000000..b18bb92005fcbed5768147b408dfb36dce8849b4 --- /dev/null +++ b/web/src/stores/los.ts @@ -0,0 +1,24 @@ +import { ref } from 'vue' +import { defineStore } from 'pinia' +interface LogSearchObj { + timeRange:[Date,Date]; + level:string; + service:{label:string,value:string;} +} +interface LogSearchList { + ip:string; + search_obj:LogSearchObj; +} +export const useLogStore = defineStore('log', () => { + const search_list = ref([] as LogSearchList[]); + + const updateLogList = (param:any) => { + let ip_index = search_list.value.findIndex(item => item.ip === param.ip); + ip_index !== -1 ? search_list.value[ip_index] = param : search_list.value.push(param); + } + + const $reset = () => { + search_list.value = []; + } + return {search_list,updateLogList,$reset} +}) \ No newline at end of file diff --git a/web/src/stores/topo.ts b/web/src/stores/topo.ts index 02f00f1eb12d96b0e914c6f8610fc77a0c51f7d5..1ad0e9ca0b6498f6e0b620690210833ac29ba2ab 100644 --- a/web/src/stores/topo.ts +++ b/web/src/stores/topo.ts @@ -19,7 +19,6 @@ export const useTopoStore = defineStore('topo', () => { node_click_info.value.node_id = ''; node_click_info.value.process_name = ''; node_click_info.value.target_ip = ''; - console.log('置空节点信息',node_click_info.value.target_ip) } return {nodeData, node_log_id,node_click_info,topo_data, edgeData,$reset} }) diff --git a/web/src/views/TopoDisplay.vue b/web/src/views/TopoDisplay.vue index b905e77995cc41dddadba8b7320a5771787fb5ce..b21951700964212241b0ead62efc30d47800e00f 100644 --- a/web/src/views/TopoDisplay.vue +++ b/web/src/views/TopoDisplay.vue @@ -77,6 +77,7 @@ import { useConfigStore } from "@/stores/config"; import router from "@/router"; import socket from "@/utils/socket"; import { formatDate } from "@/utils/dateFormat"; +import { useLogStore } from "@/stores/los"; const graphMode = ref("default"); const timeInterval = ref("关闭"); @@ -101,6 +102,7 @@ onMounted(() => { onBeforeUnmount(() => { // 离开页面,清空点击事件缓存数据 useTopoStore().$reset(); + useLogStore().$reset(); }); // 点击画布关闭日志tab @@ -436,6 +438,11 @@ watch( height: 100%; margin: 0 auto; position: relative; + // 设置文字双击不能选中 + -webkit-user-select: none; /* Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE/Edge */ + user-select: none; /* 标准语法 */ @keyframes bounce { 0%,