From 888ab7bb74bc2b2f974da3e0e62fad7b9c1c5bfd Mon Sep 17 00:00:00 2001 From: gc_huwumiao <2199202809@qq.com> Date: Mon, 20 Jan 2025 16:26:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9B=91=E6=8E=A7=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BB=A5=E5=8F=8A=E5=8A=9F=E8=83=BD=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/retrieve-v2/monitor/monitor.scss | 32 +++++++- .../src/views/retrieve-v2/monitor/monitor.vue | 16 ++-- .../search-result-panel/log-result/index.vue | 26 +++--- .../components/common-page-new.tsx | 80 ++++++++++--------- .../monitor-retrieve/monitor-retrieve.tsx | 2 +- .../src/trace/pages/main/span-details.scss | 2 - 6 files changed, 98 insertions(+), 60 deletions(-) diff --git a/bklog/web/src/views/retrieve-v2/monitor/monitor.scss b/bklog/web/src/views/retrieve-v2/monitor/monitor.scss index a6b61f2fa9..92c11c9a73 100644 --- a/bklog/web/src/views/retrieve-v2/monitor/monitor.scss +++ b/bklog/web/src/views/retrieve-v2/monitor/monitor.scss @@ -5,11 +5,36 @@ background: #f5f7fa; &.scroll-y { - height: calc(100vh - 52px); + height: 100%; overflow-x: hidden; overflow-y: auto; } + &.is-sticky-top { + .search-bar-wrapper { + margin-left: 0; + } + + .search-result-panel { + &.flex { + .field-list-sticky { + &.is-show { + height: calc(100% - var(--offset-search-bar) - 0); + + .search-field-filter-new { + .field-filter-box { + .field-filter-container-new { + height: calc(100% - var(--offset-search-bar) - 128px); + } + } + } + } + } + } + } + } + + .sub-head { position: relative; z-index: 5; @@ -108,6 +133,11 @@ align-self: start; overflow: visible; } + + + .search-result-panel.flex .field-list-sticky.is-show { + height: calc(100% - var(--offset-search-bar) - 48px); + } } .retrieve-v2-content { diff --git a/bklog/web/src/views/retrieve-v2/monitor/monitor.vue b/bklog/web/src/views/retrieve-v2/monitor/monitor.vue index d71a5dd0ea..e23a9e435f 100644 --- a/bklog/web/src/views/retrieve-v2/monitor/monitor.vue +++ b/bklog/web/src/views/retrieve-v2/monitor/monitor.vue @@ -36,14 +36,14 @@ import RouteUrlResolver, { RetrieveUrlResolver } from '@/store/url-resolver'; import { isEqual } from 'lodash'; import { useRoute, useRouter } from 'vue-router/composables'; +import useResizeObserve from '../../../hooks/use-resize-observe'; +import useScroll from '../../../hooks/use-scroll'; import SelectIndexSet from '../condition-comp/select-index-set.tsx'; import { getInputQueryIpSelectItem } from '../search-bar/const.common'; import SearchBar from '../search-bar/index.vue'; import QueryHistory from '../search-bar/query-history.vue'; import SearchResultPanel from '../search-result-panel/index.vue'; -import useScroll from '../../../hooks/use-scroll'; import { GLOBAL_SCROLL_SELECTOR } from '../search-result-panel/log-result/log-row-attributes'; -import useResizeObserve from '../../../hooks/use-resize-observe'; const props = defineProps({ indexSetApi: { type: Function, @@ -295,6 +295,12 @@ watch( }, ); +const stickyStyle = computed(() => { + return { + '--offset-search-bar': `${searchBarHeight.value + 8}px`, + }; + }); + const contentStyle = computed(() => { return { '--left-width': `0px`, @@ -337,11 +343,11 @@ const isScrollY = computed(() => { return !window.__IS_MONITOR_TRACE__ }) -/*** 结束计算 ***/ +/** * 结束计算 ***/