@blueking/monitor-trace-log 2.0.20 → 2.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/main.css +2 -2
- package/main.js +388 -116
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -54205,32 +54205,9 @@ var setDefaultTableWidth = function setDefaultTableWidth(visibleFields, tableDat
|
|
|
54205
54205
|
(0,vue_esm.set)(item, 'minWidth', minWidth);
|
|
54206
54206
|
});
|
|
54207
54207
|
});
|
|
54208
|
-
var columnsWidth = visibleFields.reduce(function (prev, next) {
|
|
54209
|
-
return prev + next.width;
|
|
54210
|
-
}, 0);
|
|
54211
|
-
var tableElem = document.querySelector('.original-log-panel');
|
|
54212
|
-
if (!tableElem) {
|
|
54213
|
-
return true;
|
|
54214
|
-
}
|
|
54215
54208
|
|
|
54216
|
-
//
|
|
54217
|
-
|
|
54218
|
-
if (tableElem && columnsWidth && columnsWidth < availableWidth) {
|
|
54219
|
-
var longFiels = visibleFields.filter(function (item) {
|
|
54220
|
-
return item.width >= 800;
|
|
54221
|
-
});
|
|
54222
|
-
if (longFiels.length) {
|
|
54223
|
-
var addWidth = (availableWidth - columnsWidth) / longFiels.length;
|
|
54224
|
-
longFiels.forEach(function (item) {
|
|
54225
|
-
(0,vue_esm.set)(item, 'width', item.width + Math.ceil(addWidth));
|
|
54226
|
-
});
|
|
54227
|
-
} else {
|
|
54228
|
-
var _addWidth = (availableWidth - columnsWidth) / visibleFields.length;
|
|
54229
|
-
visibleFields.forEach(function (field) {
|
|
54230
|
-
(0,vue_esm.set)(field, 'width', field.width + Math.ceil(_addWidth));
|
|
54231
|
-
});
|
|
54232
|
-
}
|
|
54233
|
-
}
|
|
54209
|
+
// Keep only default/user configured base width here.
|
|
54210
|
+
// Extra width is distributed at render time based on the current result container.
|
|
54234
54211
|
}
|
|
54235
54212
|
return true;
|
|
54236
54213
|
} catch (error) {
|
|
@@ -114894,8 +114871,8 @@ const DEFAULT_AI_QUERY_RESULT = {
|
|
|
114894
114871
|
};
|
|
114895
114872
|
}
|
|
114896
114873
|
}));
|
|
114897
|
-
;// ./node_modules/thread-loader/dist/cjs.js??clonedRuleSet-3.use[0]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-3.use[1]!./node_modules/ifdef-loader/ifdef-loader.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/views/retrieve-v2/search-result-panel/index.vue?vue&type=template&id=
|
|
114898
|
-
var
|
|
114874
|
+
;// ./node_modules/thread-loader/dist/cjs.js??clonedRuleSet-3.use[0]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-3.use[1]!./node_modules/ifdef-loader/ifdef-loader.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/views/retrieve-v2/search-result-panel/index.vue?vue&type=template&id=8d8d194c
|
|
114875
|
+
var search_result_panelvue_type_template_id_8d8d194c_render = function render() {
|
|
114899
114876
|
var _vm = this,
|
|
114900
114877
|
_c = _vm._self._c,
|
|
114901
114878
|
_setup = _vm._self._setupProxy;
|
|
@@ -114905,7 +114882,8 @@ var search_result_panelvue_type_template_id_06235de0_render = function render()
|
|
|
114905
114882
|
}]
|
|
114906
114883
|
}, [!_setup.pageLoading && _setup.isNoIndexSet ? _c(_setup.NoIndexSet) : [_c('div', {
|
|
114907
114884
|
"class": ['field-list-sticky', {
|
|
114908
|
-
'is-show': _setup.isShowFieldStatistics
|
|
114885
|
+
'is-show': _setup.isShowFieldStatistics,
|
|
114886
|
+
'is-close': !_setup.isShowFieldStatistics
|
|
114909
114887
|
}]
|
|
114910
114888
|
}, [_c(_setup.FieldFilter, {
|
|
114911
114889
|
directives: [{
|
|
@@ -114991,7 +114969,7 @@ var search_result_panelvue_type_template_id_06235de0_render = function render()
|
|
|
114991
114969
|
}
|
|
114992
114970
|
}) : _vm._e()], 1)], 1)]], 2);
|
|
114993
114971
|
};
|
|
114994
|
-
var
|
|
114972
|
+
var search_result_panelvue_type_template_id_8d8d194c_staticRenderFns = [];
|
|
114995
114973
|
|
|
114996
114974
|
;// ./node_modules/thread-loader/dist/cjs.js??clonedRuleSet-3.use[0]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-3.use[1]!./node_modules/ifdef-loader/ifdef-loader.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/views/retrieve-v2/result-comp/no-index-set.vue?vue&type=template&id=76cff062&scoped=true
|
|
114997
114975
|
var no_index_setvue_type_template_id_76cff062_scoped_true_render = function render() {
|
|
@@ -125527,9 +125505,18 @@ class TaskEventManager {
|
|
|
125527
125505
|
}
|
|
125528
125506
|
const taskEventManager = new TaskEventManager();
|
|
125529
125507
|
class UseSegmentProp {
|
|
125508
|
+
/**
|
|
125509
|
+
* 全局实例递增计数器。
|
|
125510
|
+
* 同一页面可能同时加载多个检索包(例如 apm + trace),它们会共享 document.body。
|
|
125511
|
+
* 这里通过递增计数为每个 UseSegmentProp 实例生成稳定且唯一的 owner id,
|
|
125512
|
+
* 用于隔离弹层 DOM 的查询与复用,避免“后加载包误复用先加载包节点”。
|
|
125513
|
+
*/
|
|
125514
|
+
static instanceCounter = 0;
|
|
125530
125515
|
className = 'bklog-segment-pop-content';
|
|
125531
125516
|
wrapperClassName = 'bklog-pop-wrapper';
|
|
125532
125517
|
wrapperIdName = 'bklog_pop_wrapper';
|
|
125518
|
+
/** 当前实例的 owner id,用于把弹层内容与实例绑定 */
|
|
125519
|
+
instanceId;
|
|
125533
125520
|
refContent;
|
|
125534
125521
|
delineate;
|
|
125535
125522
|
$t;
|
|
@@ -125548,6 +125535,9 @@ class UseSegmentProp {
|
|
|
125548
125535
|
const {
|
|
125549
125536
|
$t
|
|
125550
125537
|
} = use_locale();
|
|
125538
|
+
// 生成实例唯一 owner,后续会写到 DOM data 属性中做精确定位。
|
|
125539
|
+
UseSegmentProp.instanceCounter += 1;
|
|
125540
|
+
this.instanceId = `segment-pop-${UseSegmentProp.instanceCounter}`;
|
|
125551
125541
|
this.$t = $t;
|
|
125552
125542
|
this.refContent = (0,vue_esm.ref)();
|
|
125553
125543
|
this.delineate = delineate;
|
|
@@ -125648,7 +125638,15 @@ class UseSegmentProp {
|
|
|
125648
125638
|
});
|
|
125649
125639
|
return (0,vue_esm.h)('div', {
|
|
125650
125640
|
class: 'segment-event-icons event-tippy-content',
|
|
125651
|
-
ref: refName
|
|
125641
|
+
ref: refName,
|
|
125642
|
+
attrs: {
|
|
125643
|
+
/**
|
|
125644
|
+
* 将弹层内容显式声明为“属于哪个 UseSegmentProp 实例”。
|
|
125645
|
+
* 当多个独立包并存时,后续 mounted/query 会基于该属性做实例级选择,
|
|
125646
|
+
* 避免跨包共享节点造成事件上下文错配,进而出现点击无响应。
|
|
125647
|
+
*/
|
|
125648
|
+
'data-segment-owner': this.instanceId
|
|
125649
|
+
}
|
|
125652
125650
|
}, [eventBoxList.map(item => (0,vue_esm.h)('div', {
|
|
125653
125651
|
class: 'segment-event-box',
|
|
125654
125652
|
attrs: {
|
|
@@ -125694,7 +125692,13 @@ class UseSegmentProp {
|
|
|
125694
125692
|
target.classList.add(this.wrapperClassName);
|
|
125695
125693
|
document.body.appendChild(target);
|
|
125696
125694
|
}
|
|
125697
|
-
|
|
125695
|
+
/**
|
|
125696
|
+
* 仅匹配“当前实例拥有”的弹层节点:
|
|
125697
|
+
* - 不再使用通配 `.event-tippy-content`,避免命中其他包创建的节点
|
|
125698
|
+
* - 如果当前实例节点不存在才创建,存在则直接复用(幂等)
|
|
125699
|
+
*/
|
|
125700
|
+
const ownContentSelector = `.${this.className} .event-tippy-content[data-segment-owner="${this.instanceId}"]`;
|
|
125701
|
+
if (!target.querySelector(ownContentSelector)) {
|
|
125698
125702
|
const app = new vue_esm["default"]({
|
|
125699
125703
|
render: () => {
|
|
125700
125704
|
return (0,vue_esm.h)('div', {
|
|
@@ -125708,7 +125712,8 @@ class UseSegmentProp {
|
|
|
125708
125712
|
target.append(app.$el);
|
|
125709
125713
|
}
|
|
125710
125714
|
if (!this.refContent.value) {
|
|
125711
|
-
|
|
125715
|
+
// refContent 只缓存当前实例节点,保证 getSegmentContent 的引用与事件绑定一致。
|
|
125716
|
+
this.refContent.value = target.querySelector(ownContentSelector);
|
|
125712
125717
|
}
|
|
125713
125718
|
};
|
|
125714
125719
|
getSegmentContent(keyRef, onSegmentEnumClick) {
|
|
@@ -132198,6 +132203,11 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132198
132203
|
getScrollElement,
|
|
132199
132204
|
hasScrollX,
|
|
132200
132205
|
computeRect: debounceComputeRect,
|
|
132206
|
+
/**
|
|
132207
|
+
* 同步执行版 computeRect,供外部在需要立即刷新尺寸的场景调用(如字段设置展开/收起)。
|
|
132208
|
+
* 注意:不要用于频繁 resize 场景,会失去防抖保护。
|
|
132209
|
+
*/
|
|
132210
|
+
computeRectSync: computeRect,
|
|
132201
132211
|
scrollDirection,
|
|
132202
132212
|
offsetWidth,
|
|
132203
132213
|
scrollWidth
|
|
@@ -132408,6 +132418,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132408
132418
|
|
|
132409
132419
|
|
|
132410
132420
|
|
|
132421
|
+
|
|
132411
132422
|
|
|
132412
132423
|
|
|
132413
132424
|
/* harmony default export */ const log_rows = ((0,vue_esm.defineComponent)({
|
|
@@ -132478,6 +132489,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132478
132489
|
const isRending = (0,vue_esm.ref)(false);
|
|
132479
132490
|
const tableRowConfig = new WeakMap();
|
|
132480
132491
|
const isPageLoading = (0,vue_esm.ref)(retrieve_helper.isSearching);
|
|
132492
|
+
const isPaginationLoading = (0,vue_esm.ref)(false);
|
|
132481
132493
|
// 前端本地分页loadmore触发器
|
|
132482
132494
|
// renderList 没有使用响应式,这里需要手动触发更新,所以这里使用一个计数器来触发更新
|
|
132483
132495
|
const localUpdateCounter = (0,vue_esm.ref)(0);
|
|
@@ -132503,8 +132515,6 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132503
132515
|
});
|
|
132504
132516
|
const indexSetType = (0,vue_esm.computed)(() => store.state.indexItem.isUnionIndex);
|
|
132505
132517
|
const limitRow = (0,vue_esm.computed)(() => store.state.storage[store_type_BK_LOG_STORAGE.RESULT_DISPLAY_LINES]);
|
|
132506
|
-
// 检索第一页数据时,loading状态
|
|
132507
|
-
const isFirstPageLoading = (0,vue_esm.computed)(() => isLoading.value && !isRequesting.value);
|
|
132508
132518
|
const exceptionMsg = (0,vue_esm.computed)(() => {
|
|
132509
132519
|
if (/^cancel$/gi.test(indexSetQueryResult.value?.exception_msg)) {
|
|
132510
132520
|
return $t('检索结果为空');
|
|
@@ -132514,18 +132524,27 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132514
132524
|
const isShowSourceField = (0,vue_esm.computed)(() => store.state.storage[store_type_BK_LOG_STORAGE.TABLE_SHOW_SOURCE_FIELD]);
|
|
132515
132525
|
const fullColumns = (0,vue_esm.ref)([]);
|
|
132516
132526
|
const showCtxType = (0,vue_esm.ref)(props.contentType);
|
|
132527
|
+
const columnLayoutVersion = (0,vue_esm.ref)(0);
|
|
132528
|
+
const isFirstPageLayoutPending = (0,vue_esm.ref)(false);
|
|
132529
|
+
let firstPageLayoutToken = 0;
|
|
132517
132530
|
/**
|
|
132518
132531
|
* 重置分页状态
|
|
132532
|
+
* 新查询首屏需要先展示骨架屏,等待列宽布局稳定后再渲染真实行,避免 monitor 包外部挂载时首帧列宽抖动。
|
|
132519
132533
|
*/
|
|
132520
132534
|
const resetPageState = () => {
|
|
132521
132535
|
pageIndex.value = 1;
|
|
132522
132536
|
hasMoreList.value = true;
|
|
132537
|
+
isFirstPageLayoutPending.value = true;
|
|
132538
|
+
firstPageLayoutToken += 1;
|
|
132523
132539
|
};
|
|
132524
132540
|
const {
|
|
132525
132541
|
addEvent
|
|
132526
132542
|
} = use_retrieve_event();
|
|
132527
132543
|
addEvent(retrieve_events.SEARCHING_CHANGE, isSearching => {
|
|
132528
132544
|
isPageLoading.value = isSearching;
|
|
132545
|
+
if (isSearching && tableDataSize.value === 0 && !isPaginationLoading.value) {
|
|
132546
|
+
resetPageState();
|
|
132547
|
+
}
|
|
132529
132548
|
});
|
|
132530
132549
|
addEvent([retrieve_events.SEARCH_VALUE_CHANGE, retrieve_events.SEARCH_TIME_CHANGE, retrieve_events.TREND_GRAPH_SEARCH, retrieve_events.SORT_LIST_CHANGED], () => {
|
|
132531
132550
|
resetPageState();
|
|
@@ -132618,6 +132637,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132618
132637
|
title: field.field_name,
|
|
132619
132638
|
width: field.width,
|
|
132620
132639
|
minWidth: field.minWidth,
|
|
132640
|
+
field_type: field.field_type,
|
|
132621
132641
|
align: 'top',
|
|
132622
132642
|
resize: true,
|
|
132623
132643
|
renderBodyCell: _ref5 => {
|
|
@@ -132676,12 +132696,62 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132676
132696
|
}
|
|
132677
132697
|
};
|
|
132678
132698
|
};
|
|
132679
|
-
const
|
|
132680
|
-
|
|
132681
|
-
|
|
132699
|
+
const getNumericWidth = function (width) {
|
|
132700
|
+
let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
132701
|
+
if (typeof width === 'number') {
|
|
132702
|
+
return width;
|
|
132703
|
+
}
|
|
132704
|
+
if (typeof width === 'string' && width.includes('%')) {
|
|
132705
|
+
return fallback;
|
|
132706
|
+
}
|
|
132707
|
+
const parsedWidth = Number.parseFloat(width);
|
|
132708
|
+
return Number.isNaN(parsedWidth) ? fallback : parsedWidth;
|
|
132709
|
+
};
|
|
132710
|
+
const TABLE_WIDTH_SAFE_GAP = 4;
|
|
132711
|
+
const getFixedColumnsWidth = () => {
|
|
132712
|
+
const expandColumnWidth = 36;
|
|
132713
|
+
const rowIndexColumnWidth = tableShowRowIndex.value ? 50 : 0;
|
|
132714
|
+
const sourceColumnWidth = isShowSourceField.value && indexSetType.value ? 230 : 0;
|
|
132715
|
+
return expandColumnWidth + rowIndexColumnWidth + sourceColumnWidth + operatorToolsWidth.value;
|
|
132716
|
+
};
|
|
132717
|
+
const getFieldsAvailableWidth = () => offsetWidth.value - getFixedColumnsWidth() - TABLE_WIDTH_SAFE_GAP;
|
|
132718
|
+
const getColumnWidthTotal = columnList => {
|
|
132719
|
+
return columnList.reduce((total, item) => total + getNumericWidth(item.width, item.minWidth), 0);
|
|
132720
|
+
};
|
|
132721
|
+
const getExtraWidthTargetColumns = columnList => {
|
|
132722
|
+
const longTextColumns = columnList.filter(item => {
|
|
132723
|
+
return item.field === 'log' || item.field_type === 'text' || getNumericWidth(item.width) >= 800;
|
|
132724
|
+
});
|
|
132725
|
+
return longTextColumns;
|
|
132726
|
+
};
|
|
132727
|
+
const distributeExtraWidthToLongTextColumns = columnList => {
|
|
132728
|
+
const availableWidth = getFieldsAvailableWidth();
|
|
132729
|
+
if (availableWidth <= 0 || columnList.length === 0) {
|
|
132730
|
+
return;
|
|
132731
|
+
}
|
|
132732
|
+
const columnWidth = getColumnWidthTotal(columnList);
|
|
132733
|
+
if (columnWidth >= availableWidth) {
|
|
132734
|
+
return;
|
|
132735
|
+
}
|
|
132736
|
+
const targetColumns = getExtraWidthTargetColumns(columnList);
|
|
132737
|
+
if (targetColumns.length === 0) {
|
|
132738
|
+
return;
|
|
132739
|
+
}
|
|
132740
|
+
const extraWidth = availableWidth - columnWidth;
|
|
132741
|
+
const addWidth = Math.floor(extraWidth / targetColumns.length);
|
|
132742
|
+
let restWidth = extraWidth - addWidth * targetColumns.length;
|
|
132743
|
+
targetColumns.forEach(item => {
|
|
132744
|
+
const nextWidth = getNumericWidth(item.width, item.minWidth) + addWidth + (restWidth > 0 ? 1 : 0);
|
|
132745
|
+
restWidth -= 1;
|
|
132746
|
+
item.width = nextWidth;
|
|
132747
|
+
});
|
|
132748
|
+
};
|
|
132749
|
+
const triggerColumnLayoutReflow = () => {
|
|
132750
|
+
columnLayoutVersion.value += 1;
|
|
132682
132751
|
};
|
|
132683
132752
|
// 性能优化:使用 computed 缓存列配置,避免每次渲染都重新计算
|
|
132684
132753
|
const getFieldColumns = (0,vue_esm.computed)(() => {
|
|
132754
|
+
columnLayoutVersion.value;
|
|
132685
132755
|
if (showCtxType.value === 'table') {
|
|
132686
132756
|
const columnList = [];
|
|
132687
132757
|
const columns = visibleFields.value.length > 0 ? visibleFields.value : fullColumns.value;
|
|
@@ -132701,8 +132771,9 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132701
132771
|
logField = columnList[columnList.length - 1];
|
|
132702
132772
|
}
|
|
132703
132773
|
if (logField && offsetWidth.value > maxColWidth) {
|
|
132704
|
-
|
|
132774
|
+
logField.width = getNumericWidth(logField.width, logField.minWidth);
|
|
132705
132775
|
}
|
|
132776
|
+
distributeExtraWidthToLongTextColumns(columnList);
|
|
132706
132777
|
return columnList;
|
|
132707
132778
|
}
|
|
132708
132779
|
return originalColumns.value;
|
|
@@ -132725,9 +132796,10 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132725
132796
|
fixed: 'left',
|
|
132726
132797
|
renderBodyCell: _ref7 => {
|
|
132727
132798
|
let {
|
|
132728
|
-
row
|
|
132799
|
+
row,
|
|
132800
|
+
rowIndex
|
|
132729
132801
|
} = _ref7;
|
|
132730
|
-
const config =
|
|
132802
|
+
const config = ensureTableRowConfig(row, rowIndex).value;
|
|
132731
132803
|
return (0,vue_esm.h)("span", {
|
|
132732
132804
|
"class": ['bklog-expand-icon', {
|
|
132733
132805
|
'is-expaned': config.expand
|
|
@@ -132751,9 +132823,10 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132751
132823
|
class: tableShowRowIndex.value ? 'is-show' : 'is-hidden',
|
|
132752
132824
|
renderBodyCell: _ref8 => {
|
|
132753
132825
|
let {
|
|
132754
|
-
row
|
|
132826
|
+
row,
|
|
132827
|
+
rowIndex
|
|
132755
132828
|
} = _ref8;
|
|
132756
|
-
return
|
|
132829
|
+
return ensureTableRowConfig(row, rowIndex).value[ROW_INDEX] + 1;
|
|
132757
132830
|
}
|
|
132758
132831
|
}, {
|
|
132759
132832
|
field: '',
|
|
@@ -132781,13 +132854,13 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132781
132854
|
}, [indeSetName]);
|
|
132782
132855
|
}
|
|
132783
132856
|
}]);
|
|
132784
|
-
const handleRowAIClcik = (e, row) => {
|
|
132785
|
-
const
|
|
132857
|
+
const handleRowAIClcik = (e, row, rowIndex) => {
|
|
132858
|
+
const displayRowIndex = ensureTableRowConfig(row, rowIndex).value[ROW_INDEX] + 1;
|
|
132786
132859
|
const targetRow = e.target.closest('.bklog-row-container');
|
|
132787
132860
|
const oldRow = targetRow?.parentElement.querySelector('.bklog-row-container.ai-active');
|
|
132788
132861
|
oldRow?.classList.remove('ai-active');
|
|
132789
132862
|
targetRow?.classList.add('ai-active');
|
|
132790
|
-
props.handleClickTools('ai', row, indexSetOperatorConfig.value,
|
|
132863
|
+
props.handleClickTools('ai', row, indexSetOperatorConfig.value, displayRowIndex);
|
|
132791
132864
|
};
|
|
132792
132865
|
const rightColumns = (0,vue_esm.computed)(() => {
|
|
132793
132866
|
if (window?.__IS_MONITOR_TRACE__) {
|
|
@@ -132802,17 +132875,18 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132802
132875
|
resize: false,
|
|
132803
132876
|
renderBodyCell: _ref10 => {
|
|
132804
132877
|
let {
|
|
132805
|
-
row
|
|
132878
|
+
row,
|
|
132879
|
+
rowIndex
|
|
132806
132880
|
} = _ref10;
|
|
132807
132881
|
return (// @ts-expect-error
|
|
132808
132882
|
(0,vue_esm.h)(operator_tools, {
|
|
132809
132883
|
"attrs": {
|
|
132810
132884
|
"handle-click": (type, event) => {
|
|
132811
132885
|
if (type === 'ai') {
|
|
132812
|
-
handleRowAIClcik(event, row);
|
|
132886
|
+
handleRowAIClcik(event, row, rowIndex);
|
|
132813
132887
|
return;
|
|
132814
132888
|
}
|
|
132815
|
-
props.handleClickTools(type, row, indexSetOperatorConfig.value,
|
|
132889
|
+
props.handleClickTools(type, row, indexSetOperatorConfig.value, ensureTableRowConfig(row, rowIndex).value[ROW_INDEX] + 1);
|
|
132816
132890
|
},
|
|
132817
132891
|
"index": row[ROW_INDEX],
|
|
132818
132892
|
"operator-config": indexSetOperatorConfig.value,
|
|
@@ -132889,30 +132963,31 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132889
132963
|
return cfg;
|
|
132890
132964
|
}, {});
|
|
132891
132965
|
};
|
|
132892
|
-
const
|
|
132893
|
-
|
|
132894
|
-
|
|
132895
|
-
|
|
132896
|
-
|
|
132897
|
-
|
|
132898
|
-
|
|
132899
|
-
|
|
132900
|
-
|
|
132901
|
-
|
|
132902
|
-
|
|
132903
|
-
|
|
132904
|
-
}
|
|
132905
|
-
}
|
|
132966
|
+
const createRowConfigRef = index => {
|
|
132967
|
+
const rowIndex = index >= 0 ? index : -1;
|
|
132968
|
+
const rowKey = `${ROW_KEY}_${rowIndex}`;
|
|
132969
|
+
return (0,vue_esm.ref)({
|
|
132970
|
+
[ROW_KEY]: rowKey,
|
|
132971
|
+
[ROW_INDEX]: rowIndex,
|
|
132972
|
+
...getRowConfigWithCache()
|
|
132973
|
+
});
|
|
132974
|
+
};
|
|
132975
|
+
const ensureTableRowConfig = (row, index) => {
|
|
132976
|
+
if (!row) {
|
|
132977
|
+
return createRowConfigRef(index);
|
|
132906
132978
|
}
|
|
132907
|
-
|
|
132908
|
-
|
|
132909
|
-
|
|
132910
|
-
|
|
132911
|
-
|
|
132979
|
+
let config = tableRowConfig.get(row);
|
|
132980
|
+
if (!config) {
|
|
132981
|
+
config = createRowConfigRef(index);
|
|
132982
|
+
tableRowConfig.set(row, config);
|
|
132983
|
+
} else if (index >= 0 && config.value[ROW_INDEX] !== index) {
|
|
132984
|
+
config.value[ROW_INDEX] = index;
|
|
132912
132985
|
}
|
|
132986
|
+
return config;
|
|
132913
132987
|
};
|
|
132914
132988
|
const isRequesting = (0,vue_esm.ref)(false);
|
|
132915
132989
|
let requestingTimer = null;
|
|
132990
|
+
let skipNextLoadingEndReset = false;
|
|
132916
132991
|
const debounceSetLoading = function () {
|
|
132917
132992
|
let delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 120;
|
|
132918
132993
|
requestingTimer && clearTimeout(requestingTimer);
|
|
@@ -132923,10 +132998,11 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132923
132998
|
const expandOption = {
|
|
132924
132999
|
render: _ref11 => {
|
|
132925
133000
|
let {
|
|
132926
|
-
row
|
|
133001
|
+
row,
|
|
133002
|
+
rowIndex
|
|
132927
133003
|
} = _ref11;
|
|
132928
|
-
const config =
|
|
132929
|
-
const
|
|
133004
|
+
const config = ensureTableRowConfig(row, rowIndex);
|
|
133005
|
+
const realRowIndex = config.value[ROW_INDEX];
|
|
132930
133006
|
// // 性能监控:记录展开渲染耗时
|
|
132931
133007
|
// perfStart('log-rows:expand-render', {
|
|
132932
133008
|
// rowIndex,
|
|
@@ -132944,7 +133020,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132944
133020
|
"data": row,
|
|
132945
133021
|
"kv-show-fields-list": kvShowFieldsList.value,
|
|
132946
133022
|
"list-data": row,
|
|
132947
|
-
"row-index":
|
|
133023
|
+
"row-index": realRowIndex
|
|
132948
133024
|
},
|
|
132949
133025
|
"on": {
|
|
132950
133026
|
"value-click": (type, content, isLink, field, depth, isNestedField) => {
|
|
@@ -132954,13 +133030,22 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132954
133030
|
});
|
|
132955
133031
|
}
|
|
132956
133032
|
};
|
|
132957
|
-
|
|
133033
|
+
let syncResultBoxRectBeforeRender = () => {};
|
|
133034
|
+
let scheduleFirstPageTableReveal = () => {};
|
|
133035
|
+
const resetRowListState = () => {
|
|
133036
|
+
const shouldWaitFirstPageLayout = isFirstPageLayoutPending.value && tableDataSize.value > 0;
|
|
133037
|
+
if (shouldWaitFirstPageLayout) {
|
|
133038
|
+
syncResultBoxRectBeforeRender();
|
|
133039
|
+
}
|
|
132958
133040
|
setRenderList(null);
|
|
132959
133041
|
debounceSetLoading();
|
|
132960
|
-
|
|
132961
|
-
if (tableDataSize.value <=
|
|
133042
|
+
localUpdateCounter.value += 1;
|
|
133043
|
+
if (tableDataSize.value <= pageSize.value) {
|
|
132962
133044
|
(0,vue_esm.nextTick)(retrieve_helper.updateMarkElement.bind(retrieve_helper));
|
|
132963
133045
|
}
|
|
133046
|
+
if (shouldWaitFirstPageLayout) {
|
|
133047
|
+
scheduleFirstPageTableReveal();
|
|
133048
|
+
}
|
|
132964
133049
|
};
|
|
132965
133050
|
/**
|
|
132966
133051
|
* 同步指定字段的排序状态
|
|
@@ -132997,7 +133082,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132997
133082
|
}
|
|
132998
133083
|
return updatedSortList;
|
|
132999
133084
|
};
|
|
133000
|
-
(0,vue_esm.watch)(() => [tableShowRowIndex.value], () => {
|
|
133085
|
+
(0,vue_esm.watch)(() => [tableShowRowIndex.value, isShowSourceField.value, indexSetType.value, operatorToolsWidth.value], () => {
|
|
133001
133086
|
computeRect();
|
|
133002
133087
|
});
|
|
133003
133088
|
/**
|
|
@@ -133026,20 +133111,49 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133026
133111
|
}
|
|
133027
133112
|
handleResultBoxResize();
|
|
133028
133113
|
});
|
|
133029
|
-
(0,vue_esm.watch)(() => [tableDataSize.value],
|
|
133030
|
-
|
|
133114
|
+
(0,vue_esm.watch)(() => [tableDataSize.value], _ref14 => {
|
|
133115
|
+
let [size] = _ref14;
|
|
133116
|
+
if (size === 0) {
|
|
133117
|
+
resetPageState();
|
|
133118
|
+
if (!isLoading.value) {
|
|
133119
|
+
isFirstPageLayoutPending.value = false;
|
|
133120
|
+
}
|
|
133121
|
+
}
|
|
133122
|
+
resetRowListState();
|
|
133031
133123
|
}, {
|
|
133032
133124
|
immediate: true
|
|
133033
133125
|
});
|
|
133034
133126
|
use_resize_observe(() => refResultRowBox.value, () => {
|
|
133035
|
-
handleResultBoxResize();
|
|
133127
|
+
handleResultBoxResize(!isColumnWidthChanging);
|
|
133036
133128
|
retrieve_helper.fire(retrieve_events.RESULT_ROW_BOX_RESIZE);
|
|
133037
133129
|
}, 60);
|
|
133038
|
-
addEvent([retrieve_events.FAVORITE_WIDTH_CHANGE, retrieve_events.
|
|
133130
|
+
addEvent([retrieve_events.FAVORITE_WIDTH_CHANGE, retrieve_events.FAVORITE_SHOWN_CHANGE], handleResultBoxResize);
|
|
133039
133131
|
addEvent(retrieve_events.AI_CLOSE, () => {
|
|
133040
133132
|
refResultRowBox.value?.querySelector('.ai-active')?.classList.remove('ai-active');
|
|
133041
133133
|
});
|
|
133134
|
+
let isColumnWidthChanging = false;
|
|
133135
|
+
let columnWidthChangeTimer;
|
|
133136
|
+
const markColumnWidthChanging = () => {
|
|
133137
|
+
isColumnWidthChanging = true;
|
|
133138
|
+
window.clearTimeout(columnWidthChangeTimer);
|
|
133139
|
+
columnWidthChangeTimer = window.setTimeout(() => {
|
|
133140
|
+
isColumnWidthChanging = false;
|
|
133141
|
+
}, 300);
|
|
133142
|
+
};
|
|
133143
|
+
const preserveHorizontalScrollAfterColumnResize = preferredScrollLeft => {
|
|
133144
|
+
(0,vue_esm.nextTick)(() => {
|
|
133145
|
+
requestAnimationFrame(() => {
|
|
133146
|
+
computeRectSync(refResultRowBox.value);
|
|
133147
|
+
const maxOffset = Math.max(0, scrollWidth.value - offsetWidth.value);
|
|
133148
|
+
scrollXOffsetLeft = Math.min(preferredScrollLeft, maxOffset);
|
|
133149
|
+
refScrollXBar.value?.scrollLeft(scrollXOffsetLeft);
|
|
133150
|
+
setRowboxTransform();
|
|
133151
|
+
});
|
|
133152
|
+
});
|
|
133153
|
+
};
|
|
133042
133154
|
const handleColumnWidthChange = (w, col) => {
|
|
133155
|
+
const prevScrollLeft = scrollXOffsetLeft;
|
|
133156
|
+
markColumnWidthChanging();
|
|
133043
133157
|
const width = w > 40 ? w : 40;
|
|
133044
133158
|
const longFiels = visibleFields.value.filter(item => item.width >= 800 || item.field_name === 'log' || item.field_type === 'text');
|
|
133045
133159
|
const logField = longFiels.find(item => item.field_name === 'log');
|
|
@@ -133070,6 +133184,22 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133070
133184
|
fieldsWidth: newFieldsWidthObj
|
|
133071
133185
|
});
|
|
133072
133186
|
store.commit('updateVisibleFields', visibleFields.value);
|
|
133187
|
+
preserveHorizontalScrollAfterColumnResize(prevScrollLeft);
|
|
133188
|
+
};
|
|
133189
|
+
const getPaginationResponseSize = resp => {
|
|
133190
|
+
if (typeof resp?.length === 'number') {
|
|
133191
|
+
return resp.length;
|
|
133192
|
+
}
|
|
133193
|
+
if (typeof resp?.size === 'number') {
|
|
133194
|
+
return resp.size;
|
|
133195
|
+
}
|
|
133196
|
+
if (Array.isArray(resp)) {
|
|
133197
|
+
return resp.length;
|
|
133198
|
+
}
|
|
133199
|
+
if (Array.isArray(resp?.data?.list)) {
|
|
133200
|
+
return resp.data.list.length;
|
|
133201
|
+
}
|
|
133202
|
+
return null;
|
|
133073
133203
|
};
|
|
133074
133204
|
const loadMoreTableData = () => {
|
|
133075
133205
|
// tableDataSize.value === 0 用于判定是否是第一次渲染导致触发的请求
|
|
@@ -133090,15 +133220,19 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133090
133220
|
}
|
|
133091
133221
|
if (hasMoreList.value) {
|
|
133092
133222
|
isRequesting.value = true;
|
|
133223
|
+
isPaginationLoading.value = true;
|
|
133224
|
+
skipNextLoadingEndReset = true;
|
|
133093
133225
|
return store.dispatch('requestIndexSetQuery', {
|
|
133094
133226
|
isPagination: true
|
|
133095
133227
|
}).then(resp => {
|
|
133228
|
+
const responseSize = getPaginationResponseSize(resp);
|
|
133096
133229
|
pageIndex.value += 1;
|
|
133097
133230
|
handleResultBoxResize(false);
|
|
133098
|
-
if (
|
|
133231
|
+
if (responseSize !== null && responseSize < pageSize.value) {
|
|
133099
133232
|
hasMoreList.value = false;
|
|
133100
133233
|
}
|
|
133101
133234
|
}).finally(() => {
|
|
133235
|
+
isPaginationLoading.value = false;
|
|
133102
133236
|
debounceSetLoading(0);
|
|
133103
133237
|
(0,vue_esm.nextTick)(retrieve_helper.updateMarkElement.bind(retrieve_helper));
|
|
133104
133238
|
});
|
|
@@ -133122,6 +133256,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133122
133256
|
offsetWidth,
|
|
133123
133257
|
scrollWidth,
|
|
133124
133258
|
computeRect,
|
|
133259
|
+
computeRectSync,
|
|
133125
133260
|
getScrollElement
|
|
133126
133261
|
} = use_lazy_render({
|
|
133127
133262
|
loadMoreFn: loadMoreTableData,
|
|
@@ -133129,6 +133264,35 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133129
133264
|
rootElement: refRootElement,
|
|
133130
133265
|
refLoadMoreElement
|
|
133131
133266
|
});
|
|
133267
|
+
syncResultBoxRectBeforeRender = () => {
|
|
133268
|
+
computeRectSync(refResultRowBox.value);
|
|
133269
|
+
triggerColumnLayoutReflow();
|
|
133270
|
+
};
|
|
133271
|
+
scheduleFirstPageTableReveal = () => {
|
|
133272
|
+
const token = firstPageLayoutToken;
|
|
133273
|
+
(0,vue_esm.nextTick)(() => {
|
|
133274
|
+
requestAnimationFrame(() => {
|
|
133275
|
+
if (token !== firstPageLayoutToken || tableDataSize.value === 0) {
|
|
133276
|
+
return;
|
|
133277
|
+
}
|
|
133278
|
+
computeRectSync(refResultRowBox.value);
|
|
133279
|
+
triggerColumnLayoutReflow();
|
|
133280
|
+
(0,vue_esm.nextTick)(() => {
|
|
133281
|
+
requestAnimationFrame(() => {
|
|
133282
|
+
if (token !== firstPageLayoutToken || tableDataSize.value === 0) {
|
|
133283
|
+
return;
|
|
133284
|
+
}
|
|
133285
|
+
computeRectSync(refResultRowBox.value);
|
|
133286
|
+
isFirstPageLayoutPending.value = false;
|
|
133287
|
+
(0,vue_esm.nextTick)(() => {
|
|
133288
|
+
computeRectSync(refResultRowBox.value);
|
|
133289
|
+
setRowboxTransform();
|
|
133290
|
+
});
|
|
133291
|
+
});
|
|
133292
|
+
});
|
|
133293
|
+
});
|
|
133294
|
+
});
|
|
133295
|
+
};
|
|
133132
133296
|
const setRowboxTransform = () => {
|
|
133133
133297
|
if (refResultRowBox.value && refRootElement.value) {
|
|
133134
133298
|
refResultRowBox.value.scrollLeft = scrollXOffsetLeft;
|
|
@@ -133145,6 +133309,39 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133145
133309
|
const hasScrollX = (0,vue_esm.computed)(() => {
|
|
133146
133310
|
return showCtxType.value === 'table' && scrollWidth.value > offsetWidth.value;
|
|
133147
133311
|
});
|
|
133312
|
+
const syncResultBoxLayout = () => {
|
|
133313
|
+
(0,vue_esm.nextTick)(() => {
|
|
133314
|
+
requestAnimationFrame(() => {
|
|
133315
|
+
triggerColumnLayoutReflow();
|
|
133316
|
+
(0,vue_esm.nextTick)(() => {
|
|
133317
|
+
requestAnimationFrame(() => {
|
|
133318
|
+
computeRectSync(refResultRowBox.value);
|
|
133319
|
+
if (scrollWidth.value <= offsetWidth.value && scrollXOffsetLeft !== 0) {
|
|
133320
|
+
scrollXOffsetLeft = 0;
|
|
133321
|
+
refScrollXBar.value?.scrollLeft(0);
|
|
133322
|
+
}
|
|
133323
|
+
setRowboxTransform();
|
|
133324
|
+
});
|
|
133325
|
+
});
|
|
133326
|
+
});
|
|
133327
|
+
});
|
|
133328
|
+
};
|
|
133329
|
+
const handleFieldSettingLayoutChange = () => {
|
|
133330
|
+
scrollXOffsetLeft = 0;
|
|
133331
|
+
refScrollXBar.value?.scrollLeft(0);
|
|
133332
|
+
computeRectSync(refResultRowBox.value);
|
|
133333
|
+
syncResultBoxLayout();
|
|
133334
|
+
window.setTimeout(syncResultBoxLayout, 120);
|
|
133335
|
+
window.setTimeout(syncResultBoxLayout, 320);
|
|
133336
|
+
};
|
|
133337
|
+
addEvent([retrieve_events.LEFT_FIELD_SETTING_WIDTH_CHANGE, retrieve_events.LEFT_FIELD_SETTING_SHOWN_CHANGE], handleFieldSettingLayoutChange);
|
|
133338
|
+
(0,vue_esm.watch)(() => [offsetWidth.value, showCtxType.value], (_ref15, _ref16) => {
|
|
133339
|
+
let [width] = _ref15;
|
|
133340
|
+
let [oldWidth] = _ref16;
|
|
133341
|
+
if (width !== oldWidth) {
|
|
133342
|
+
syncResultBoxLayout();
|
|
133343
|
+
}
|
|
133344
|
+
});
|
|
133148
133345
|
const isPreloading = (0,vue_esm.ref)(false); // 是否正在预加载
|
|
133149
133346
|
const preloadThreshold = 32 * 50; // 距离底部多少 px 开始预加载
|
|
133150
133347
|
let lastPreloadTime = 0;
|
|
@@ -133162,7 +133359,11 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133162
133359
|
const clientHeight = scrollElement?.clientHeight ?? 0;
|
|
133163
133360
|
const scrollHeight = scrollElement?.scrollHeight ?? 0;
|
|
133164
133361
|
const distanceToBottom = scrollHeight - (scrollTop + clientHeight);
|
|
133165
|
-
|
|
133362
|
+
const shouldPreload = distanceToBottom <= preloadThreshold;
|
|
133363
|
+
if (shouldPreload) {
|
|
133364
|
+
lastPreloadTime = now;
|
|
133365
|
+
}
|
|
133366
|
+
return shouldPreload;
|
|
133166
133367
|
};
|
|
133167
133368
|
let isAnimating = false;
|
|
133168
133369
|
use_wheel({
|
|
@@ -133224,20 +133425,45 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133224
133425
|
const showHeader = (0,vue_esm.computed)(() => {
|
|
133225
133426
|
return showCtxType.value === 'table' && tableList.value.length > 0;
|
|
133226
133427
|
});
|
|
133428
|
+
const hasResultException = (0,vue_esm.computed)(() => {
|
|
133429
|
+
const rawExceptionMsg = indexSetQueryResult.value?.exception_msg ?? '';
|
|
133430
|
+
return indexSetQueryResult.value?.is_error || !!rawExceptionMsg && !/^cancel$/gi.test(rawExceptionMsg);
|
|
133431
|
+
});
|
|
133432
|
+
/**
|
|
133433
|
+
* 字段信息重新加载期间 visibleFields 会被清空。
|
|
133434
|
+
* monitor 独立包切换 timeRange 时,字段接口返回前如果继续渲染旧 renderList,
|
|
133435
|
+
* 表格会只剩固定列(序号/操作列),形成错误中间态。这里仅在字段加载中接管为首屏骨架屏,
|
|
133436
|
+
* 字段加载完成后的错误/空态仍交给 LogResultException 渲染。
|
|
133437
|
+
*/
|
|
133438
|
+
const isFieldLoadingForFirstPage = (0,vue_esm.computed)(() => {
|
|
133439
|
+
return indexFieldInfo.value.is_loading && visibleFields.value.length === 0;
|
|
133440
|
+
});
|
|
133441
|
+
const shouldEnterFirstPageSkeleton = (0,vue_esm.computed)(() => {
|
|
133442
|
+
return !hasResultException.value && !isPaginationLoading.value && tableDataSize.value === 0 && (isLoading.value || isPageLoading.value || isRequesting.value);
|
|
133443
|
+
});
|
|
133444
|
+
const shouldShowFirstPageSkeleton = (0,vue_esm.computed)(() => {
|
|
133445
|
+
if (hasResultException.value || isPaginationLoading.value) {
|
|
133446
|
+
return false;
|
|
133447
|
+
}
|
|
133448
|
+
return shouldEnterFirstPageSkeleton.value || isFieldLoadingForFirstPage.value || isFirstPageLayoutPending.value;
|
|
133449
|
+
});
|
|
133450
|
+
const shouldBlockTableRender = (0,vue_esm.computed)(() => {
|
|
133451
|
+
return shouldShowFirstPageSkeleton.value;
|
|
133452
|
+
});
|
|
133227
133453
|
const renderHeadVNode = () => {
|
|
133228
|
-
if (
|
|
133454
|
+
if (shouldBlockTableRender.value) {
|
|
133229
133455
|
return null;
|
|
133230
133456
|
}
|
|
133231
|
-
const columnLength = allColumns.value.length;
|
|
133232
133457
|
let hasFullWidth = false;
|
|
133233
133458
|
return (0,vue_esm.h)("div", {
|
|
133234
133459
|
"ref": refTableHead,
|
|
133235
133460
|
"class": ['bklog-row-container row-header']
|
|
133236
133461
|
}, [(0,vue_esm.h)("div", {
|
|
133237
133462
|
"class": 'bklog-list-row'
|
|
133238
|
-
}, [allColumns.value.map(
|
|
133239
|
-
const
|
|
133240
|
-
|
|
133463
|
+
}, [allColumns.value.map(column => {
|
|
133464
|
+
const isFullWidthColumn = !hasFullWidth && column.width === '100%';
|
|
133465
|
+
const cellStyle = getColumnWidth(column, isFullWidthColumn);
|
|
133466
|
+
hasFullWidth = hasFullWidth || column.width === '100%';
|
|
133241
133467
|
return (0,vue_esm.h)(log_cell, {
|
|
133242
133468
|
"key": column.key,
|
|
133243
133469
|
"attrs": {
|
|
@@ -133288,8 +133514,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133288
133514
|
const renderRowCells = (row, rowIndex) => {
|
|
133289
133515
|
const {
|
|
133290
133516
|
expand
|
|
133291
|
-
} =
|
|
133292
|
-
const columnLength = allColumns.value.length;
|
|
133517
|
+
} = ensureTableRowConfig(row, rowIndex).value;
|
|
133293
133518
|
let hasFullWidth = false;
|
|
133294
133519
|
return [(0,vue_esm.h)("div", {
|
|
133295
133520
|
"key": `${rowIndex}-row`,
|
|
@@ -133298,9 +133523,10 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133298
133523
|
"data-row-index": rowIndex,
|
|
133299
133524
|
"data-row-click": true
|
|
133300
133525
|
}
|
|
133301
|
-
}, [allColumns.value.map(
|
|
133302
|
-
const
|
|
133303
|
-
|
|
133526
|
+
}, [allColumns.value.map(column => {
|
|
133527
|
+
const isFullWidthColumn = !hasFullWidth && column.width === '100%';
|
|
133528
|
+
const cellStyle = getColumnWidth(column, isFullWidthColumn);
|
|
133529
|
+
hasFullWidth = hasFullWidth || column.width === '100%';
|
|
133304
133530
|
return (0,vue_esm.h)("div", {
|
|
133305
133531
|
"key": `${rowIndex}-${column.key}`,
|
|
133306
133532
|
"style": cellStyle,
|
|
@@ -133311,7 +133537,8 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133311
133537
|
rowIndex
|
|
133312
133538
|
}, vue_esm.h) ?? column.title]);
|
|
133313
133539
|
})]), expand ? expandOption.render({
|
|
133314
|
-
row
|
|
133540
|
+
row,
|
|
133541
|
+
rowIndex
|
|
133315
133542
|
}) : ''];
|
|
133316
133543
|
};
|
|
133317
133544
|
const handleRowMousedown = e => {
|
|
@@ -133323,7 +133550,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133323
133550
|
retrieve_helper.setMousedownEvent(e);
|
|
133324
133551
|
savedSelection = null;
|
|
133325
133552
|
};
|
|
133326
|
-
const handleRowMouseup = (e, item) => {
|
|
133553
|
+
const handleRowMouseup = (e, item, rowIndex) => {
|
|
133327
133554
|
if (!mousedownOnRow) {
|
|
133328
133555
|
retrieve_helper.setMousedownEvent(null);
|
|
133329
133556
|
return;
|
|
@@ -133350,7 +133577,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133350
133577
|
retrieve_helper.setMousedownEvent(null);
|
|
133351
133578
|
return;
|
|
133352
133579
|
}
|
|
133353
|
-
const config =
|
|
133580
|
+
const config = ensureTableRowConfig(item, rowIndex).value;
|
|
133354
133581
|
const isExpanding = !config.expand;
|
|
133355
133582
|
config.expand = isExpanding;
|
|
133356
133583
|
retrieve_helper.setMousedownEvent(null);
|
|
@@ -133373,7 +133600,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133373
133600
|
});
|
|
133374
133601
|
};
|
|
133375
133602
|
const renderRowVNode = () => {
|
|
133376
|
-
if (
|
|
133603
|
+
if (shouldBlockTableRender.value) {
|
|
133377
133604
|
return null;
|
|
133378
133605
|
}
|
|
133379
133606
|
return renderList.map((row, rowIndex) => {
|
|
@@ -133386,7 +133613,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133386
133613
|
},
|
|
133387
133614
|
"on": {
|
|
133388
133615
|
"row-mousedown": handleRowMousedown,
|
|
133389
|
-
"row-mouseup": e => handleRowMouseup(e, row.item)
|
|
133616
|
+
"row-mouseup": e => handleRowMouseup(e, row.item, rowIndex)
|
|
133390
133617
|
}
|
|
133391
133618
|
}, [renderRowCells(row.item, rowIndex)])];
|
|
133392
133619
|
});
|
|
@@ -133408,10 +133635,10 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133408
133635
|
});
|
|
133409
133636
|
};
|
|
133410
133637
|
const loadingText = (0,vue_esm.computed)(() => {
|
|
133411
|
-
if (isLoading.value && !isRequesting.value) {
|
|
133638
|
+
if (isLoading.value && !isRequesting.value && !isPaginationLoading.value) {
|
|
133412
133639
|
return '';
|
|
133413
133640
|
}
|
|
133414
|
-
if (hasMoreList.value && (isLoading.value || isRending.value)) {
|
|
133641
|
+
if (hasMoreList.value && (isLoading.value || isRending.value || isPaginationLoading.value)) {
|
|
133415
133642
|
return 'Loading ...';
|
|
133416
133643
|
}
|
|
133417
133644
|
if (!(isRequesting.value || hasMoreList.value) || tableDataSize.value < pageSize.value) {
|
|
@@ -133441,12 +133668,21 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133441
133668
|
updateRootElementClass();
|
|
133442
133669
|
});
|
|
133443
133670
|
(0,vue_esm.watch)(() => indexSetQueryResult.value.is_loading, (newVal, oldVal) => {
|
|
133444
|
-
if (oldVal && !newVal
|
|
133445
|
-
(0
|
|
133446
|
-
|
|
133447
|
-
|
|
133448
|
-
|
|
133449
|
-
|
|
133671
|
+
if (oldVal && !newVal) {
|
|
133672
|
+
if (tableDataSize.value === 0) {
|
|
133673
|
+
isFirstPageLayoutPending.value = false;
|
|
133674
|
+
}
|
|
133675
|
+
if (skipNextLoadingEndReset) {
|
|
133676
|
+
skipNextLoadingEndReset = false;
|
|
133677
|
+
return;
|
|
133678
|
+
}
|
|
133679
|
+
if (!isRequesting.value) {
|
|
133680
|
+
(0,vue_esm.nextTick)(() => {
|
|
133681
|
+
scrollXOffsetLeft = 0;
|
|
133682
|
+
refScrollXBar.value?.scrollLeft(0);
|
|
133683
|
+
computeRect(refResultRowBox.value);
|
|
133684
|
+
});
|
|
133685
|
+
}
|
|
133450
133686
|
}
|
|
133451
133687
|
});
|
|
133452
133688
|
const renderLoader = () => {
|
|
@@ -133469,11 +133705,14 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133469
133705
|
return null;
|
|
133470
133706
|
};
|
|
133471
133707
|
const isTableLoading = (0,vue_esm.computed)(() => {
|
|
133472
|
-
return tableDataSize.value === 0 && (isRequesting.value || isRending.value || isPageLoading.value || isLoading.value);
|
|
133708
|
+
return !shouldShowFirstPageSkeleton.value && tableDataSize.value === 0 && (isRequesting.value || isRending.value || isPageLoading.value || isLoading.value);
|
|
133473
133709
|
});
|
|
133474
133710
|
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: reason
|
|
133475
133711
|
const exceptionType = (0,vue_esm.computed)(() => {
|
|
133476
133712
|
if (tableDataSize.value === 0 || indexFieldInfo.value.is_loading) {
|
|
133713
|
+
if (shouldShowFirstPageSkeleton.value) {
|
|
133714
|
+
return 'hidden';
|
|
133715
|
+
}
|
|
133477
133716
|
if (isRequesting.value || isLoading.value || isPageLoading.value) {
|
|
133478
133717
|
return 'loading';
|
|
133479
133718
|
}
|
|
@@ -133491,6 +133730,9 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133491
133730
|
return 'hidden';
|
|
133492
133731
|
});
|
|
133493
133732
|
const getExceptionRender = () => {
|
|
133733
|
+
if (shouldShowFirstPageSkeleton.value) {
|
|
133734
|
+
return null;
|
|
133735
|
+
}
|
|
133494
133736
|
return (0,vue_esm.h)(log_result_exception, {
|
|
133495
133737
|
"attrs": {
|
|
133496
133738
|
"message": exceptionMsg.value,
|
|
@@ -133498,6 +133740,21 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133498
133740
|
}
|
|
133499
133741
|
});
|
|
133500
133742
|
};
|
|
133743
|
+
const renderFirstPageSkeleton = () => {
|
|
133744
|
+
if (!shouldShowFirstPageSkeleton.value) {
|
|
133745
|
+
return null;
|
|
133746
|
+
}
|
|
133747
|
+
return (0,vue_esm.h)(retrieve_loader, {
|
|
133748
|
+
"class": 'bklog-first-page-skeleton',
|
|
133749
|
+
"attrs": {
|
|
133750
|
+
"isLoading": true,
|
|
133751
|
+
"isOriginalField": showCtxType.value !== 'table',
|
|
133752
|
+
"maxLength": 12,
|
|
133753
|
+
"static": true,
|
|
133754
|
+
"visibleFields": visibleFields.value.length ? visibleFields.value : fullColumns.value
|
|
133755
|
+
}
|
|
133756
|
+
});
|
|
133757
|
+
};
|
|
133501
133758
|
const renderDelineatePopContent = () => {
|
|
133502
133759
|
return (0,vue_esm.h)("div", {
|
|
133503
133760
|
"style": 'display: none;'
|
|
@@ -133505,7 +133762,8 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133505
133762
|
};
|
|
133506
133763
|
(0,vue_esm.onBeforeUnmount)(() => {
|
|
133507
133764
|
popInstanceUtil.uninstallInstance();
|
|
133508
|
-
|
|
133765
|
+
window.clearTimeout(columnWidthChangeTimer);
|
|
133766
|
+
renderList = Object.freeze([]);
|
|
133509
133767
|
});
|
|
133510
133768
|
return {
|
|
133511
133769
|
refRootElement,
|
|
@@ -133518,6 +133776,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133518
133776
|
renderScrollXBar,
|
|
133519
133777
|
renderLoader,
|
|
133520
133778
|
renderHeadVNode,
|
|
133779
|
+
renderFirstPageSkeleton,
|
|
133521
133780
|
getExceptionRender,
|
|
133522
133781
|
tableDataSize,
|
|
133523
133782
|
resultContainerId,
|
|
@@ -133539,7 +133798,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133539
133798
|
},
|
|
133540
133799
|
"ref": 'refResultRowBox',
|
|
133541
133800
|
"class": 'bklog-row-box'
|
|
133542
|
-
}, [this.renderRowVNode()]), this.getExceptionRender(), this.renderFixRightShadow(), this.renderScrollXBar(), this.renderLoader(), this.renderScrollTop(), this.renderDelineatePopContent(), (0,vue_esm.h)("div", {
|
|
133801
|
+
}, [this.renderRowVNode()]), this.renderFirstPageSkeleton(), this.getExceptionRender(), this.renderFixRightShadow(), this.renderScrollXBar(), this.renderLoader(), this.renderScrollTop(), this.renderDelineatePopContent(), (0,vue_esm.h)("div", {
|
|
133543
133802
|
"class": 'resize-guide-line'
|
|
133544
133803
|
})]);
|
|
133545
133804
|
}
|
|
@@ -134171,8 +134430,8 @@ var LogClustering = function LogClustering() {
|
|
|
134171
134430
|
|
|
134172
134431
|
var search_result_panel_component = normalizeComponent(
|
|
134173
134432
|
retrieve_v2_search_result_panelvue_type_script_setup_true_lang_js,
|
|
134174
|
-
|
|
134175
|
-
|
|
134433
|
+
search_result_panelvue_type_template_id_8d8d194c_render,
|
|
134434
|
+
search_result_panelvue_type_template_id_8d8d194c_staticRenderFns,
|
|
134176
134435
|
false,
|
|
134177
134436
|
null,
|
|
134178
134437
|
null,
|
|
@@ -154853,8 +155112,8 @@ const SearchResultTab = () => null;
|
|
|
154853
155112
|
}), renderTabContent()]);
|
|
154854
155113
|
}
|
|
154855
155114
|
}));
|
|
154856
|
-
;// ./node_modules/thread-loader/dist/cjs.js??clonedRuleSet-3.use[0]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-3.use[1]!./node_modules/ifdef-loader/ifdef-loader.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/views/retrieve-v2/sub-bar/index.vue?vue&type=template&id=
|
|
154857
|
-
var
|
|
155115
|
+
;// ./node_modules/thread-loader/dist/cjs.js??clonedRuleSet-3.use[0]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-3.use[1]!./node_modules/ifdef-loader/ifdef-loader.js??clonedRuleSet-3.use[2]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/views/retrieve-v2/sub-bar/index.vue?vue&type=template&id=01b0e69f
|
|
155116
|
+
var sub_barvue_type_template_id_01b0e69f_render = function render() {
|
|
154858
155117
|
var _vm = this,
|
|
154859
155118
|
_c = _vm._self._c,
|
|
154860
155119
|
_setup = _vm._self._setupProxy;
|
|
@@ -154934,7 +155193,7 @@ var sub_barvue_type_template_id_08eba3c6_render = function render() {
|
|
|
154934
155193
|
}
|
|
154935
155194
|
})], 1) : _vm._e()]);
|
|
154936
155195
|
};
|
|
154937
|
-
var
|
|
155196
|
+
var sub_barvue_type_template_id_01b0e69f_staticRenderFns = [];
|
|
154938
155197
|
|
|
154939
155198
|
;// ./src/components/ellipsis-tag-list/index.tsx
|
|
154940
155199
|
/*
|
|
@@ -157152,7 +157411,7 @@ var AutoRefresh = function AutoRefresh() {
|
|
|
157152
157411
|
};
|
|
157153
157412
|
var handleIndexSetSelected = /*#__PURE__*/function () {
|
|
157154
157413
|
var _ref = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(payload) {
|
|
157155
|
-
var _payload$ids, indexSetDefaultCondition, _payload$items$, _payload$items$2, _payload$pid;
|
|
157414
|
+
var _payload$ids, indexSetDefaultCondition, _payload$items$, _payload$items$2, _payload$items$3, _payload$pid;
|
|
157156
157415
|
return regenerator_default().wrap(function _callee$(_context) {
|
|
157157
157416
|
while (1) switch (_context.prev = _context.next) {
|
|
157158
157417
|
case 0:
|
|
@@ -157175,6 +157434,13 @@ var AutoRefresh = function AutoRefresh() {
|
|
|
157175
157434
|
search_mode: 'ui',
|
|
157176
157435
|
keyword: ''
|
|
157177
157436
|
};
|
|
157437
|
+
} else if (!((_payload$items$3 = payload.items[0]) !== null && _payload$items$3 !== void 0 && _payload$items$3.addition) && isMonitorComponent) {
|
|
157438
|
+
// 监控下当切换采集项没有addtion时,要置空addition
|
|
157439
|
+
indexSetDefaultCondition = {
|
|
157440
|
+
addition: [],
|
|
157441
|
+
search_mode: 'ui',
|
|
157442
|
+
keyword: ''
|
|
157443
|
+
};
|
|
157178
157444
|
}
|
|
157179
157445
|
if (indexSetDefaultCondition.search_mode) {
|
|
157180
157446
|
store.commit('updateStorage', defineProperty_defineProperty({}, store_type_BK_LOG_STORAGE.SEARCH_TYPE, ['ui', 'sql'].indexOf(indexSetDefaultCondition.search_mode)));
|
|
@@ -157397,8 +157663,8 @@ var AutoRefresh = function AutoRefresh() {
|
|
|
157397
157663
|
|
|
157398
157664
|
var sub_bar_component = normalizeComponent(
|
|
157399
157665
|
retrieve_v2_sub_barvue_type_script_setup_true_lang_js,
|
|
157400
|
-
|
|
157401
|
-
|
|
157666
|
+
sub_barvue_type_template_id_01b0e69f_render,
|
|
157667
|
+
sub_barvue_type_template_id_01b0e69f_staticRenderFns,
|
|
157402
157668
|
false,
|
|
157403
157669
|
null,
|
|
157404
157670
|
null,
|
|
@@ -157916,6 +158182,10 @@ var sub_bar_component = normalizeComponent(
|
|
|
157916
158182
|
if (!val) return;
|
|
157917
158183
|
getIndexSetList();
|
|
157918
158184
|
store.commit('updateIsSetDefaultTableColumn', false);
|
|
158185
|
+
store.commit('resetIndexSetQueryResult', {
|
|
158186
|
+
is_loading: true,
|
|
158187
|
+
search_count: store.state.indexSetQueryResult.search_count + 1
|
|
158188
|
+
});
|
|
157919
158189
|
const result = handleTransformToTimestamp(val, store.getters.retrieveParams.format);
|
|
157920
158190
|
store.commit('updateIndexItemParams', {
|
|
157921
158191
|
start_time: result[0],
|
|
@@ -157923,7 +158193,9 @@ var sub_bar_component = normalizeComponent(
|
|
|
157923
158193
|
datePickerValue: val
|
|
157924
158194
|
});
|
|
157925
158195
|
await store.dispatch('requestIndexSetFieldInfo');
|
|
157926
|
-
store.dispatch('requestIndexSetQuery'
|
|
158196
|
+
store.dispatch('requestIndexSetQuery', {
|
|
158197
|
+
searchCount: store.state.indexSetQueryResult.search_count
|
|
158198
|
+
});
|
|
157927
158199
|
});
|
|
157928
158200
|
(0,vue_esm.watch)(() => props.timezone, val => {
|
|
157929
158201
|
if (!val) return;
|