@blueking/monitor-trace-log 2.0.20 → 2.0.21
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 +358 -113
- 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() {
|
|
@@ -132198,6 +132176,11 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132198
132176
|
getScrollElement,
|
|
132199
132177
|
hasScrollX,
|
|
132200
132178
|
computeRect: debounceComputeRect,
|
|
132179
|
+
/**
|
|
132180
|
+
* 同步执行版 computeRect,供外部在需要立即刷新尺寸的场景调用(如字段设置展开/收起)。
|
|
132181
|
+
* 注意:不要用于频繁 resize 场景,会失去防抖保护。
|
|
132182
|
+
*/
|
|
132183
|
+
computeRectSync: computeRect,
|
|
132201
132184
|
scrollDirection,
|
|
132202
132185
|
offsetWidth,
|
|
132203
132186
|
scrollWidth
|
|
@@ -132408,6 +132391,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132408
132391
|
|
|
132409
132392
|
|
|
132410
132393
|
|
|
132394
|
+
|
|
132411
132395
|
|
|
132412
132396
|
|
|
132413
132397
|
/* harmony default export */ const log_rows = ((0,vue_esm.defineComponent)({
|
|
@@ -132478,6 +132462,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132478
132462
|
const isRending = (0,vue_esm.ref)(false);
|
|
132479
132463
|
const tableRowConfig = new WeakMap();
|
|
132480
132464
|
const isPageLoading = (0,vue_esm.ref)(retrieve_helper.isSearching);
|
|
132465
|
+
const isPaginationLoading = (0,vue_esm.ref)(false);
|
|
132481
132466
|
// 前端本地分页loadmore触发器
|
|
132482
132467
|
// renderList 没有使用响应式,这里需要手动触发更新,所以这里使用一个计数器来触发更新
|
|
132483
132468
|
const localUpdateCounter = (0,vue_esm.ref)(0);
|
|
@@ -132503,8 +132488,6 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132503
132488
|
});
|
|
132504
132489
|
const indexSetType = (0,vue_esm.computed)(() => store.state.indexItem.isUnionIndex);
|
|
132505
132490
|
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
132491
|
const exceptionMsg = (0,vue_esm.computed)(() => {
|
|
132509
132492
|
if (/^cancel$/gi.test(indexSetQueryResult.value?.exception_msg)) {
|
|
132510
132493
|
return $t('检索结果为空');
|
|
@@ -132514,18 +132497,27 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132514
132497
|
const isShowSourceField = (0,vue_esm.computed)(() => store.state.storage[store_type_BK_LOG_STORAGE.TABLE_SHOW_SOURCE_FIELD]);
|
|
132515
132498
|
const fullColumns = (0,vue_esm.ref)([]);
|
|
132516
132499
|
const showCtxType = (0,vue_esm.ref)(props.contentType);
|
|
132500
|
+
const columnLayoutVersion = (0,vue_esm.ref)(0);
|
|
132501
|
+
const isFirstPageLayoutPending = (0,vue_esm.ref)(false);
|
|
132502
|
+
let firstPageLayoutToken = 0;
|
|
132517
132503
|
/**
|
|
132518
132504
|
* 重置分页状态
|
|
132505
|
+
* 新查询首屏需要先展示骨架屏,等待列宽布局稳定后再渲染真实行,避免 monitor 包外部挂载时首帧列宽抖动。
|
|
132519
132506
|
*/
|
|
132520
132507
|
const resetPageState = () => {
|
|
132521
132508
|
pageIndex.value = 1;
|
|
132522
132509
|
hasMoreList.value = true;
|
|
132510
|
+
isFirstPageLayoutPending.value = true;
|
|
132511
|
+
firstPageLayoutToken += 1;
|
|
132523
132512
|
};
|
|
132524
132513
|
const {
|
|
132525
132514
|
addEvent
|
|
132526
132515
|
} = use_retrieve_event();
|
|
132527
132516
|
addEvent(retrieve_events.SEARCHING_CHANGE, isSearching => {
|
|
132528
132517
|
isPageLoading.value = isSearching;
|
|
132518
|
+
if (isSearching && tableDataSize.value === 0 && !isPaginationLoading.value) {
|
|
132519
|
+
resetPageState();
|
|
132520
|
+
}
|
|
132529
132521
|
});
|
|
132530
132522
|
addEvent([retrieve_events.SEARCH_VALUE_CHANGE, retrieve_events.SEARCH_TIME_CHANGE, retrieve_events.TREND_GRAPH_SEARCH, retrieve_events.SORT_LIST_CHANGED], () => {
|
|
132531
132523
|
resetPageState();
|
|
@@ -132618,6 +132610,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132618
132610
|
title: field.field_name,
|
|
132619
132611
|
width: field.width,
|
|
132620
132612
|
minWidth: field.minWidth,
|
|
132613
|
+
field_type: field.field_type,
|
|
132621
132614
|
align: 'top',
|
|
132622
132615
|
resize: true,
|
|
132623
132616
|
renderBodyCell: _ref5 => {
|
|
@@ -132676,12 +132669,62 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132676
132669
|
}
|
|
132677
132670
|
};
|
|
132678
132671
|
};
|
|
132679
|
-
const
|
|
132680
|
-
|
|
132681
|
-
|
|
132672
|
+
const getNumericWidth = function (width) {
|
|
132673
|
+
let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
132674
|
+
if (typeof width === 'number') {
|
|
132675
|
+
return width;
|
|
132676
|
+
}
|
|
132677
|
+
if (typeof width === 'string' && width.includes('%')) {
|
|
132678
|
+
return fallback;
|
|
132679
|
+
}
|
|
132680
|
+
const parsedWidth = Number.parseFloat(width);
|
|
132681
|
+
return Number.isNaN(parsedWidth) ? fallback : parsedWidth;
|
|
132682
|
+
};
|
|
132683
|
+
const TABLE_WIDTH_SAFE_GAP = 4;
|
|
132684
|
+
const getFixedColumnsWidth = () => {
|
|
132685
|
+
const expandColumnWidth = 36;
|
|
132686
|
+
const rowIndexColumnWidth = tableShowRowIndex.value ? 50 : 0;
|
|
132687
|
+
const sourceColumnWidth = isShowSourceField.value && indexSetType.value ? 230 : 0;
|
|
132688
|
+
return expandColumnWidth + rowIndexColumnWidth + sourceColumnWidth + operatorToolsWidth.value;
|
|
132689
|
+
};
|
|
132690
|
+
const getFieldsAvailableWidth = () => offsetWidth.value - getFixedColumnsWidth() - TABLE_WIDTH_SAFE_GAP;
|
|
132691
|
+
const getColumnWidthTotal = columnList => {
|
|
132692
|
+
return columnList.reduce((total, item) => total + getNumericWidth(item.width, item.minWidth), 0);
|
|
132693
|
+
};
|
|
132694
|
+
const getExtraWidthTargetColumns = columnList => {
|
|
132695
|
+
const longTextColumns = columnList.filter(item => {
|
|
132696
|
+
return item.field === 'log' || item.field_type === 'text' || getNumericWidth(item.width) >= 800;
|
|
132697
|
+
});
|
|
132698
|
+
return longTextColumns;
|
|
132699
|
+
};
|
|
132700
|
+
const distributeExtraWidthToLongTextColumns = columnList => {
|
|
132701
|
+
const availableWidth = getFieldsAvailableWidth();
|
|
132702
|
+
if (availableWidth <= 0 || columnList.length === 0) {
|
|
132703
|
+
return;
|
|
132704
|
+
}
|
|
132705
|
+
const columnWidth = getColumnWidthTotal(columnList);
|
|
132706
|
+
if (columnWidth >= availableWidth) {
|
|
132707
|
+
return;
|
|
132708
|
+
}
|
|
132709
|
+
const targetColumns = getExtraWidthTargetColumns(columnList);
|
|
132710
|
+
if (targetColumns.length === 0) {
|
|
132711
|
+
return;
|
|
132712
|
+
}
|
|
132713
|
+
const extraWidth = availableWidth - columnWidth;
|
|
132714
|
+
const addWidth = Math.floor(extraWidth / targetColumns.length);
|
|
132715
|
+
let restWidth = extraWidth - addWidth * targetColumns.length;
|
|
132716
|
+
targetColumns.forEach(item => {
|
|
132717
|
+
const nextWidth = getNumericWidth(item.width, item.minWidth) + addWidth + (restWidth > 0 ? 1 : 0);
|
|
132718
|
+
restWidth -= 1;
|
|
132719
|
+
item.width = nextWidth;
|
|
132720
|
+
});
|
|
132721
|
+
};
|
|
132722
|
+
const triggerColumnLayoutReflow = () => {
|
|
132723
|
+
columnLayoutVersion.value += 1;
|
|
132682
132724
|
};
|
|
132683
132725
|
// 性能优化:使用 computed 缓存列配置,避免每次渲染都重新计算
|
|
132684
132726
|
const getFieldColumns = (0,vue_esm.computed)(() => {
|
|
132727
|
+
columnLayoutVersion.value;
|
|
132685
132728
|
if (showCtxType.value === 'table') {
|
|
132686
132729
|
const columnList = [];
|
|
132687
132730
|
const columns = visibleFields.value.length > 0 ? visibleFields.value : fullColumns.value;
|
|
@@ -132701,8 +132744,9 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132701
132744
|
logField = columnList[columnList.length - 1];
|
|
132702
132745
|
}
|
|
132703
132746
|
if (logField && offsetWidth.value > maxColWidth) {
|
|
132704
|
-
|
|
132747
|
+
logField.width = getNumericWidth(logField.width, logField.minWidth);
|
|
132705
132748
|
}
|
|
132749
|
+
distributeExtraWidthToLongTextColumns(columnList);
|
|
132706
132750
|
return columnList;
|
|
132707
132751
|
}
|
|
132708
132752
|
return originalColumns.value;
|
|
@@ -132725,9 +132769,10 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132725
132769
|
fixed: 'left',
|
|
132726
132770
|
renderBodyCell: _ref7 => {
|
|
132727
132771
|
let {
|
|
132728
|
-
row
|
|
132772
|
+
row,
|
|
132773
|
+
rowIndex
|
|
132729
132774
|
} = _ref7;
|
|
132730
|
-
const config =
|
|
132775
|
+
const config = ensureTableRowConfig(row, rowIndex).value;
|
|
132731
132776
|
return (0,vue_esm.h)("span", {
|
|
132732
132777
|
"class": ['bklog-expand-icon', {
|
|
132733
132778
|
'is-expaned': config.expand
|
|
@@ -132751,9 +132796,10 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132751
132796
|
class: tableShowRowIndex.value ? 'is-show' : 'is-hidden',
|
|
132752
132797
|
renderBodyCell: _ref8 => {
|
|
132753
132798
|
let {
|
|
132754
|
-
row
|
|
132799
|
+
row,
|
|
132800
|
+
rowIndex
|
|
132755
132801
|
} = _ref8;
|
|
132756
|
-
return
|
|
132802
|
+
return ensureTableRowConfig(row, rowIndex).value[ROW_INDEX] + 1;
|
|
132757
132803
|
}
|
|
132758
132804
|
}, {
|
|
132759
132805
|
field: '',
|
|
@@ -132781,13 +132827,13 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132781
132827
|
}, [indeSetName]);
|
|
132782
132828
|
}
|
|
132783
132829
|
}]);
|
|
132784
|
-
const handleRowAIClcik = (e, row) => {
|
|
132785
|
-
const
|
|
132830
|
+
const handleRowAIClcik = (e, row, rowIndex) => {
|
|
132831
|
+
const displayRowIndex = ensureTableRowConfig(row, rowIndex).value[ROW_INDEX] + 1;
|
|
132786
132832
|
const targetRow = e.target.closest('.bklog-row-container');
|
|
132787
132833
|
const oldRow = targetRow?.parentElement.querySelector('.bklog-row-container.ai-active');
|
|
132788
132834
|
oldRow?.classList.remove('ai-active');
|
|
132789
132835
|
targetRow?.classList.add('ai-active');
|
|
132790
|
-
props.handleClickTools('ai', row, indexSetOperatorConfig.value,
|
|
132836
|
+
props.handleClickTools('ai', row, indexSetOperatorConfig.value, displayRowIndex);
|
|
132791
132837
|
};
|
|
132792
132838
|
const rightColumns = (0,vue_esm.computed)(() => {
|
|
132793
132839
|
if (window?.__IS_MONITOR_TRACE__) {
|
|
@@ -132802,17 +132848,18 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132802
132848
|
resize: false,
|
|
132803
132849
|
renderBodyCell: _ref10 => {
|
|
132804
132850
|
let {
|
|
132805
|
-
row
|
|
132851
|
+
row,
|
|
132852
|
+
rowIndex
|
|
132806
132853
|
} = _ref10;
|
|
132807
132854
|
return (// @ts-expect-error
|
|
132808
132855
|
(0,vue_esm.h)(operator_tools, {
|
|
132809
132856
|
"attrs": {
|
|
132810
132857
|
"handle-click": (type, event) => {
|
|
132811
132858
|
if (type === 'ai') {
|
|
132812
|
-
handleRowAIClcik(event, row);
|
|
132859
|
+
handleRowAIClcik(event, row, rowIndex);
|
|
132813
132860
|
return;
|
|
132814
132861
|
}
|
|
132815
|
-
props.handleClickTools(type, row, indexSetOperatorConfig.value,
|
|
132862
|
+
props.handleClickTools(type, row, indexSetOperatorConfig.value, ensureTableRowConfig(row, rowIndex).value[ROW_INDEX] + 1);
|
|
132816
132863
|
},
|
|
132817
132864
|
"index": row[ROW_INDEX],
|
|
132818
132865
|
"operator-config": indexSetOperatorConfig.value,
|
|
@@ -132889,30 +132936,31 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132889
132936
|
return cfg;
|
|
132890
132937
|
}, {});
|
|
132891
132938
|
};
|
|
132892
|
-
const
|
|
132893
|
-
|
|
132894
|
-
|
|
132895
|
-
|
|
132896
|
-
|
|
132897
|
-
|
|
132898
|
-
|
|
132899
|
-
|
|
132900
|
-
|
|
132901
|
-
|
|
132902
|
-
|
|
132903
|
-
|
|
132904
|
-
}
|
|
132905
|
-
}
|
|
132939
|
+
const createRowConfigRef = index => {
|
|
132940
|
+
const rowIndex = index >= 0 ? index : -1;
|
|
132941
|
+
const rowKey = `${ROW_KEY}_${rowIndex}`;
|
|
132942
|
+
return (0,vue_esm.ref)({
|
|
132943
|
+
[ROW_KEY]: rowKey,
|
|
132944
|
+
[ROW_INDEX]: rowIndex,
|
|
132945
|
+
...getRowConfigWithCache()
|
|
132946
|
+
});
|
|
132947
|
+
};
|
|
132948
|
+
const ensureTableRowConfig = (row, index) => {
|
|
132949
|
+
if (!row) {
|
|
132950
|
+
return createRowConfigRef(index);
|
|
132906
132951
|
}
|
|
132907
|
-
|
|
132908
|
-
|
|
132909
|
-
|
|
132910
|
-
|
|
132911
|
-
|
|
132952
|
+
let config = tableRowConfig.get(row);
|
|
132953
|
+
if (!config) {
|
|
132954
|
+
config = createRowConfigRef(index);
|
|
132955
|
+
tableRowConfig.set(row, config);
|
|
132956
|
+
} else if (index >= 0 && config.value[ROW_INDEX] !== index) {
|
|
132957
|
+
config.value[ROW_INDEX] = index;
|
|
132912
132958
|
}
|
|
132959
|
+
return config;
|
|
132913
132960
|
};
|
|
132914
132961
|
const isRequesting = (0,vue_esm.ref)(false);
|
|
132915
132962
|
let requestingTimer = null;
|
|
132963
|
+
let skipNextLoadingEndReset = false;
|
|
132916
132964
|
const debounceSetLoading = function () {
|
|
132917
132965
|
let delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 120;
|
|
132918
132966
|
requestingTimer && clearTimeout(requestingTimer);
|
|
@@ -132923,10 +132971,11 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132923
132971
|
const expandOption = {
|
|
132924
132972
|
render: _ref11 => {
|
|
132925
132973
|
let {
|
|
132926
|
-
row
|
|
132974
|
+
row,
|
|
132975
|
+
rowIndex
|
|
132927
132976
|
} = _ref11;
|
|
132928
|
-
const config =
|
|
132929
|
-
const
|
|
132977
|
+
const config = ensureTableRowConfig(row, rowIndex);
|
|
132978
|
+
const realRowIndex = config.value[ROW_INDEX];
|
|
132930
132979
|
// // 性能监控:记录展开渲染耗时
|
|
132931
132980
|
// perfStart('log-rows:expand-render', {
|
|
132932
132981
|
// rowIndex,
|
|
@@ -132944,7 +132993,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132944
132993
|
"data": row,
|
|
132945
132994
|
"kv-show-fields-list": kvShowFieldsList.value,
|
|
132946
132995
|
"list-data": row,
|
|
132947
|
-
"row-index":
|
|
132996
|
+
"row-index": realRowIndex
|
|
132948
132997
|
},
|
|
132949
132998
|
"on": {
|
|
132950
132999
|
"value-click": (type, content, isLink, field, depth, isNestedField) => {
|
|
@@ -132954,13 +133003,22 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132954
133003
|
});
|
|
132955
133004
|
}
|
|
132956
133005
|
};
|
|
132957
|
-
|
|
133006
|
+
let syncResultBoxRectBeforeRender = () => {};
|
|
133007
|
+
let scheduleFirstPageTableReveal = () => {};
|
|
133008
|
+
const resetRowListState = () => {
|
|
133009
|
+
const shouldWaitFirstPageLayout = isFirstPageLayoutPending.value && tableDataSize.value > 0;
|
|
133010
|
+
if (shouldWaitFirstPageLayout) {
|
|
133011
|
+
syncResultBoxRectBeforeRender();
|
|
133012
|
+
}
|
|
132958
133013
|
setRenderList(null);
|
|
132959
133014
|
debounceSetLoading();
|
|
132960
|
-
|
|
132961
|
-
if (tableDataSize.value <=
|
|
133015
|
+
localUpdateCounter.value += 1;
|
|
133016
|
+
if (tableDataSize.value <= pageSize.value) {
|
|
132962
133017
|
(0,vue_esm.nextTick)(retrieve_helper.updateMarkElement.bind(retrieve_helper));
|
|
132963
133018
|
}
|
|
133019
|
+
if (shouldWaitFirstPageLayout) {
|
|
133020
|
+
scheduleFirstPageTableReveal();
|
|
133021
|
+
}
|
|
132964
133022
|
};
|
|
132965
133023
|
/**
|
|
132966
133024
|
* 同步指定字段的排序状态
|
|
@@ -132997,7 +133055,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
132997
133055
|
}
|
|
132998
133056
|
return updatedSortList;
|
|
132999
133057
|
};
|
|
133000
|
-
(0,vue_esm.watch)(() => [tableShowRowIndex.value], () => {
|
|
133058
|
+
(0,vue_esm.watch)(() => [tableShowRowIndex.value, isShowSourceField.value, indexSetType.value, operatorToolsWidth.value], () => {
|
|
133001
133059
|
computeRect();
|
|
133002
133060
|
});
|
|
133003
133061
|
/**
|
|
@@ -133026,20 +133084,49 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133026
133084
|
}
|
|
133027
133085
|
handleResultBoxResize();
|
|
133028
133086
|
});
|
|
133029
|
-
(0,vue_esm.watch)(() => [tableDataSize.value],
|
|
133030
|
-
|
|
133087
|
+
(0,vue_esm.watch)(() => [tableDataSize.value], _ref14 => {
|
|
133088
|
+
let [size] = _ref14;
|
|
133089
|
+
if (size === 0) {
|
|
133090
|
+
resetPageState();
|
|
133091
|
+
if (!isLoading.value) {
|
|
133092
|
+
isFirstPageLayoutPending.value = false;
|
|
133093
|
+
}
|
|
133094
|
+
}
|
|
133095
|
+
resetRowListState();
|
|
133031
133096
|
}, {
|
|
133032
133097
|
immediate: true
|
|
133033
133098
|
});
|
|
133034
133099
|
use_resize_observe(() => refResultRowBox.value, () => {
|
|
133035
|
-
handleResultBoxResize();
|
|
133100
|
+
handleResultBoxResize(!isColumnWidthChanging);
|
|
133036
133101
|
retrieve_helper.fire(retrieve_events.RESULT_ROW_BOX_RESIZE);
|
|
133037
133102
|
}, 60);
|
|
133038
|
-
addEvent([retrieve_events.FAVORITE_WIDTH_CHANGE, retrieve_events.
|
|
133103
|
+
addEvent([retrieve_events.FAVORITE_WIDTH_CHANGE, retrieve_events.FAVORITE_SHOWN_CHANGE], handleResultBoxResize);
|
|
133039
133104
|
addEvent(retrieve_events.AI_CLOSE, () => {
|
|
133040
133105
|
refResultRowBox.value?.querySelector('.ai-active')?.classList.remove('ai-active');
|
|
133041
133106
|
});
|
|
133107
|
+
let isColumnWidthChanging = false;
|
|
133108
|
+
let columnWidthChangeTimer;
|
|
133109
|
+
const markColumnWidthChanging = () => {
|
|
133110
|
+
isColumnWidthChanging = true;
|
|
133111
|
+
window.clearTimeout(columnWidthChangeTimer);
|
|
133112
|
+
columnWidthChangeTimer = window.setTimeout(() => {
|
|
133113
|
+
isColumnWidthChanging = false;
|
|
133114
|
+
}, 300);
|
|
133115
|
+
};
|
|
133116
|
+
const preserveHorizontalScrollAfterColumnResize = preferredScrollLeft => {
|
|
133117
|
+
(0,vue_esm.nextTick)(() => {
|
|
133118
|
+
requestAnimationFrame(() => {
|
|
133119
|
+
computeRectSync(refResultRowBox.value);
|
|
133120
|
+
const maxOffset = Math.max(0, scrollWidth.value - offsetWidth.value);
|
|
133121
|
+
scrollXOffsetLeft = Math.min(preferredScrollLeft, maxOffset);
|
|
133122
|
+
refScrollXBar.value?.scrollLeft(scrollXOffsetLeft);
|
|
133123
|
+
setRowboxTransform();
|
|
133124
|
+
});
|
|
133125
|
+
});
|
|
133126
|
+
};
|
|
133042
133127
|
const handleColumnWidthChange = (w, col) => {
|
|
133128
|
+
const prevScrollLeft = scrollXOffsetLeft;
|
|
133129
|
+
markColumnWidthChanging();
|
|
133043
133130
|
const width = w > 40 ? w : 40;
|
|
133044
133131
|
const longFiels = visibleFields.value.filter(item => item.width >= 800 || item.field_name === 'log' || item.field_type === 'text');
|
|
133045
133132
|
const logField = longFiels.find(item => item.field_name === 'log');
|
|
@@ -133070,6 +133157,22 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133070
133157
|
fieldsWidth: newFieldsWidthObj
|
|
133071
133158
|
});
|
|
133072
133159
|
store.commit('updateVisibleFields', visibleFields.value);
|
|
133160
|
+
preserveHorizontalScrollAfterColumnResize(prevScrollLeft);
|
|
133161
|
+
};
|
|
133162
|
+
const getPaginationResponseSize = resp => {
|
|
133163
|
+
if (typeof resp?.length === 'number') {
|
|
133164
|
+
return resp.length;
|
|
133165
|
+
}
|
|
133166
|
+
if (typeof resp?.size === 'number') {
|
|
133167
|
+
return resp.size;
|
|
133168
|
+
}
|
|
133169
|
+
if (Array.isArray(resp)) {
|
|
133170
|
+
return resp.length;
|
|
133171
|
+
}
|
|
133172
|
+
if (Array.isArray(resp?.data?.list)) {
|
|
133173
|
+
return resp.data.list.length;
|
|
133174
|
+
}
|
|
133175
|
+
return null;
|
|
133073
133176
|
};
|
|
133074
133177
|
const loadMoreTableData = () => {
|
|
133075
133178
|
// tableDataSize.value === 0 用于判定是否是第一次渲染导致触发的请求
|
|
@@ -133090,15 +133193,19 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133090
133193
|
}
|
|
133091
133194
|
if (hasMoreList.value) {
|
|
133092
133195
|
isRequesting.value = true;
|
|
133196
|
+
isPaginationLoading.value = true;
|
|
133197
|
+
skipNextLoadingEndReset = true;
|
|
133093
133198
|
return store.dispatch('requestIndexSetQuery', {
|
|
133094
133199
|
isPagination: true
|
|
133095
133200
|
}).then(resp => {
|
|
133201
|
+
const responseSize = getPaginationResponseSize(resp);
|
|
133096
133202
|
pageIndex.value += 1;
|
|
133097
133203
|
handleResultBoxResize(false);
|
|
133098
|
-
if (
|
|
133204
|
+
if (responseSize !== null && responseSize < pageSize.value) {
|
|
133099
133205
|
hasMoreList.value = false;
|
|
133100
133206
|
}
|
|
133101
133207
|
}).finally(() => {
|
|
133208
|
+
isPaginationLoading.value = false;
|
|
133102
133209
|
debounceSetLoading(0);
|
|
133103
133210
|
(0,vue_esm.nextTick)(retrieve_helper.updateMarkElement.bind(retrieve_helper));
|
|
133104
133211
|
});
|
|
@@ -133122,6 +133229,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133122
133229
|
offsetWidth,
|
|
133123
133230
|
scrollWidth,
|
|
133124
133231
|
computeRect,
|
|
133232
|
+
computeRectSync,
|
|
133125
133233
|
getScrollElement
|
|
133126
133234
|
} = use_lazy_render({
|
|
133127
133235
|
loadMoreFn: loadMoreTableData,
|
|
@@ -133129,6 +133237,35 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133129
133237
|
rootElement: refRootElement,
|
|
133130
133238
|
refLoadMoreElement
|
|
133131
133239
|
});
|
|
133240
|
+
syncResultBoxRectBeforeRender = () => {
|
|
133241
|
+
computeRectSync(refResultRowBox.value);
|
|
133242
|
+
triggerColumnLayoutReflow();
|
|
133243
|
+
};
|
|
133244
|
+
scheduleFirstPageTableReveal = () => {
|
|
133245
|
+
const token = firstPageLayoutToken;
|
|
133246
|
+
(0,vue_esm.nextTick)(() => {
|
|
133247
|
+
requestAnimationFrame(() => {
|
|
133248
|
+
if (token !== firstPageLayoutToken || tableDataSize.value === 0) {
|
|
133249
|
+
return;
|
|
133250
|
+
}
|
|
133251
|
+
computeRectSync(refResultRowBox.value);
|
|
133252
|
+
triggerColumnLayoutReflow();
|
|
133253
|
+
(0,vue_esm.nextTick)(() => {
|
|
133254
|
+
requestAnimationFrame(() => {
|
|
133255
|
+
if (token !== firstPageLayoutToken || tableDataSize.value === 0) {
|
|
133256
|
+
return;
|
|
133257
|
+
}
|
|
133258
|
+
computeRectSync(refResultRowBox.value);
|
|
133259
|
+
isFirstPageLayoutPending.value = false;
|
|
133260
|
+
(0,vue_esm.nextTick)(() => {
|
|
133261
|
+
computeRectSync(refResultRowBox.value);
|
|
133262
|
+
setRowboxTransform();
|
|
133263
|
+
});
|
|
133264
|
+
});
|
|
133265
|
+
});
|
|
133266
|
+
});
|
|
133267
|
+
});
|
|
133268
|
+
};
|
|
133132
133269
|
const setRowboxTransform = () => {
|
|
133133
133270
|
if (refResultRowBox.value && refRootElement.value) {
|
|
133134
133271
|
refResultRowBox.value.scrollLeft = scrollXOffsetLeft;
|
|
@@ -133145,6 +133282,39 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133145
133282
|
const hasScrollX = (0,vue_esm.computed)(() => {
|
|
133146
133283
|
return showCtxType.value === 'table' && scrollWidth.value > offsetWidth.value;
|
|
133147
133284
|
});
|
|
133285
|
+
const syncResultBoxLayout = () => {
|
|
133286
|
+
(0,vue_esm.nextTick)(() => {
|
|
133287
|
+
requestAnimationFrame(() => {
|
|
133288
|
+
triggerColumnLayoutReflow();
|
|
133289
|
+
(0,vue_esm.nextTick)(() => {
|
|
133290
|
+
requestAnimationFrame(() => {
|
|
133291
|
+
computeRectSync(refResultRowBox.value);
|
|
133292
|
+
if (scrollWidth.value <= offsetWidth.value && scrollXOffsetLeft !== 0) {
|
|
133293
|
+
scrollXOffsetLeft = 0;
|
|
133294
|
+
refScrollXBar.value?.scrollLeft(0);
|
|
133295
|
+
}
|
|
133296
|
+
setRowboxTransform();
|
|
133297
|
+
});
|
|
133298
|
+
});
|
|
133299
|
+
});
|
|
133300
|
+
});
|
|
133301
|
+
};
|
|
133302
|
+
const handleFieldSettingLayoutChange = () => {
|
|
133303
|
+
scrollXOffsetLeft = 0;
|
|
133304
|
+
refScrollXBar.value?.scrollLeft(0);
|
|
133305
|
+
computeRectSync(refResultRowBox.value);
|
|
133306
|
+
syncResultBoxLayout();
|
|
133307
|
+
window.setTimeout(syncResultBoxLayout, 120);
|
|
133308
|
+
window.setTimeout(syncResultBoxLayout, 320);
|
|
133309
|
+
};
|
|
133310
|
+
addEvent([retrieve_events.LEFT_FIELD_SETTING_WIDTH_CHANGE, retrieve_events.LEFT_FIELD_SETTING_SHOWN_CHANGE], handleFieldSettingLayoutChange);
|
|
133311
|
+
(0,vue_esm.watch)(() => [offsetWidth.value, showCtxType.value], (_ref15, _ref16) => {
|
|
133312
|
+
let [width] = _ref15;
|
|
133313
|
+
let [oldWidth] = _ref16;
|
|
133314
|
+
if (width !== oldWidth) {
|
|
133315
|
+
syncResultBoxLayout();
|
|
133316
|
+
}
|
|
133317
|
+
});
|
|
133148
133318
|
const isPreloading = (0,vue_esm.ref)(false); // 是否正在预加载
|
|
133149
133319
|
const preloadThreshold = 32 * 50; // 距离底部多少 px 开始预加载
|
|
133150
133320
|
let lastPreloadTime = 0;
|
|
@@ -133162,7 +133332,11 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133162
133332
|
const clientHeight = scrollElement?.clientHeight ?? 0;
|
|
133163
133333
|
const scrollHeight = scrollElement?.scrollHeight ?? 0;
|
|
133164
133334
|
const distanceToBottom = scrollHeight - (scrollTop + clientHeight);
|
|
133165
|
-
|
|
133335
|
+
const shouldPreload = distanceToBottom <= preloadThreshold;
|
|
133336
|
+
if (shouldPreload) {
|
|
133337
|
+
lastPreloadTime = now;
|
|
133338
|
+
}
|
|
133339
|
+
return shouldPreload;
|
|
133166
133340
|
};
|
|
133167
133341
|
let isAnimating = false;
|
|
133168
133342
|
use_wheel({
|
|
@@ -133224,20 +133398,45 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133224
133398
|
const showHeader = (0,vue_esm.computed)(() => {
|
|
133225
133399
|
return showCtxType.value === 'table' && tableList.value.length > 0;
|
|
133226
133400
|
});
|
|
133401
|
+
const hasResultException = (0,vue_esm.computed)(() => {
|
|
133402
|
+
const rawExceptionMsg = indexSetQueryResult.value?.exception_msg ?? '';
|
|
133403
|
+
return indexSetQueryResult.value?.is_error || !!rawExceptionMsg && !/^cancel$/gi.test(rawExceptionMsg);
|
|
133404
|
+
});
|
|
133405
|
+
/**
|
|
133406
|
+
* 字段信息重新加载期间 visibleFields 会被清空。
|
|
133407
|
+
* monitor 独立包切换 timeRange 时,字段接口返回前如果继续渲染旧 renderList,
|
|
133408
|
+
* 表格会只剩固定列(序号/操作列),形成错误中间态。这里仅在字段加载中接管为首屏骨架屏,
|
|
133409
|
+
* 字段加载完成后的错误/空态仍交给 LogResultException 渲染。
|
|
133410
|
+
*/
|
|
133411
|
+
const isFieldLoadingForFirstPage = (0,vue_esm.computed)(() => {
|
|
133412
|
+
return indexFieldInfo.value.is_loading && visibleFields.value.length === 0;
|
|
133413
|
+
});
|
|
133414
|
+
const shouldEnterFirstPageSkeleton = (0,vue_esm.computed)(() => {
|
|
133415
|
+
return !hasResultException.value && !isPaginationLoading.value && tableDataSize.value === 0 && (isLoading.value || isPageLoading.value || isRequesting.value);
|
|
133416
|
+
});
|
|
133417
|
+
const shouldShowFirstPageSkeleton = (0,vue_esm.computed)(() => {
|
|
133418
|
+
if (hasResultException.value || isPaginationLoading.value) {
|
|
133419
|
+
return false;
|
|
133420
|
+
}
|
|
133421
|
+
return shouldEnterFirstPageSkeleton.value || isFieldLoadingForFirstPage.value || isFirstPageLayoutPending.value;
|
|
133422
|
+
});
|
|
133423
|
+
const shouldBlockTableRender = (0,vue_esm.computed)(() => {
|
|
133424
|
+
return shouldShowFirstPageSkeleton.value;
|
|
133425
|
+
});
|
|
133227
133426
|
const renderHeadVNode = () => {
|
|
133228
|
-
if (
|
|
133427
|
+
if (shouldBlockTableRender.value) {
|
|
133229
133428
|
return null;
|
|
133230
133429
|
}
|
|
133231
|
-
const columnLength = allColumns.value.length;
|
|
133232
133430
|
let hasFullWidth = false;
|
|
133233
133431
|
return (0,vue_esm.h)("div", {
|
|
133234
133432
|
"ref": refTableHead,
|
|
133235
133433
|
"class": ['bklog-row-container row-header']
|
|
133236
133434
|
}, [(0,vue_esm.h)("div", {
|
|
133237
133435
|
"class": 'bklog-list-row'
|
|
133238
|
-
}, [allColumns.value.map(
|
|
133239
|
-
const
|
|
133240
|
-
|
|
133436
|
+
}, [allColumns.value.map(column => {
|
|
133437
|
+
const isFullWidthColumn = !hasFullWidth && column.width === '100%';
|
|
133438
|
+
const cellStyle = getColumnWidth(column, isFullWidthColumn);
|
|
133439
|
+
hasFullWidth = hasFullWidth || column.width === '100%';
|
|
133241
133440
|
return (0,vue_esm.h)(log_cell, {
|
|
133242
133441
|
"key": column.key,
|
|
133243
133442
|
"attrs": {
|
|
@@ -133288,8 +133487,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133288
133487
|
const renderRowCells = (row, rowIndex) => {
|
|
133289
133488
|
const {
|
|
133290
133489
|
expand
|
|
133291
|
-
} =
|
|
133292
|
-
const columnLength = allColumns.value.length;
|
|
133490
|
+
} = ensureTableRowConfig(row, rowIndex).value;
|
|
133293
133491
|
let hasFullWidth = false;
|
|
133294
133492
|
return [(0,vue_esm.h)("div", {
|
|
133295
133493
|
"key": `${rowIndex}-row`,
|
|
@@ -133298,9 +133496,10 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133298
133496
|
"data-row-index": rowIndex,
|
|
133299
133497
|
"data-row-click": true
|
|
133300
133498
|
}
|
|
133301
|
-
}, [allColumns.value.map(
|
|
133302
|
-
const
|
|
133303
|
-
|
|
133499
|
+
}, [allColumns.value.map(column => {
|
|
133500
|
+
const isFullWidthColumn = !hasFullWidth && column.width === '100%';
|
|
133501
|
+
const cellStyle = getColumnWidth(column, isFullWidthColumn);
|
|
133502
|
+
hasFullWidth = hasFullWidth || column.width === '100%';
|
|
133304
133503
|
return (0,vue_esm.h)("div", {
|
|
133305
133504
|
"key": `${rowIndex}-${column.key}`,
|
|
133306
133505
|
"style": cellStyle,
|
|
@@ -133311,7 +133510,8 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133311
133510
|
rowIndex
|
|
133312
133511
|
}, vue_esm.h) ?? column.title]);
|
|
133313
133512
|
})]), expand ? expandOption.render({
|
|
133314
|
-
row
|
|
133513
|
+
row,
|
|
133514
|
+
rowIndex
|
|
133315
133515
|
}) : ''];
|
|
133316
133516
|
};
|
|
133317
133517
|
const handleRowMousedown = e => {
|
|
@@ -133323,7 +133523,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133323
133523
|
retrieve_helper.setMousedownEvent(e);
|
|
133324
133524
|
savedSelection = null;
|
|
133325
133525
|
};
|
|
133326
|
-
const handleRowMouseup = (e, item) => {
|
|
133526
|
+
const handleRowMouseup = (e, item, rowIndex) => {
|
|
133327
133527
|
if (!mousedownOnRow) {
|
|
133328
133528
|
retrieve_helper.setMousedownEvent(null);
|
|
133329
133529
|
return;
|
|
@@ -133350,7 +133550,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133350
133550
|
retrieve_helper.setMousedownEvent(null);
|
|
133351
133551
|
return;
|
|
133352
133552
|
}
|
|
133353
|
-
const config =
|
|
133553
|
+
const config = ensureTableRowConfig(item, rowIndex).value;
|
|
133354
133554
|
const isExpanding = !config.expand;
|
|
133355
133555
|
config.expand = isExpanding;
|
|
133356
133556
|
retrieve_helper.setMousedownEvent(null);
|
|
@@ -133373,7 +133573,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133373
133573
|
});
|
|
133374
133574
|
};
|
|
133375
133575
|
const renderRowVNode = () => {
|
|
133376
|
-
if (
|
|
133576
|
+
if (shouldBlockTableRender.value) {
|
|
133377
133577
|
return null;
|
|
133378
133578
|
}
|
|
133379
133579
|
return renderList.map((row, rowIndex) => {
|
|
@@ -133386,7 +133586,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133386
133586
|
},
|
|
133387
133587
|
"on": {
|
|
133388
133588
|
"row-mousedown": handleRowMousedown,
|
|
133389
|
-
"row-mouseup": e => handleRowMouseup(e, row.item)
|
|
133589
|
+
"row-mouseup": e => handleRowMouseup(e, row.item, rowIndex)
|
|
133390
133590
|
}
|
|
133391
133591
|
}, [renderRowCells(row.item, rowIndex)])];
|
|
133392
133592
|
});
|
|
@@ -133408,10 +133608,10 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133408
133608
|
});
|
|
133409
133609
|
};
|
|
133410
133610
|
const loadingText = (0,vue_esm.computed)(() => {
|
|
133411
|
-
if (isLoading.value && !isRequesting.value) {
|
|
133611
|
+
if (isLoading.value && !isRequesting.value && !isPaginationLoading.value) {
|
|
133412
133612
|
return '';
|
|
133413
133613
|
}
|
|
133414
|
-
if (hasMoreList.value && (isLoading.value || isRending.value)) {
|
|
133614
|
+
if (hasMoreList.value && (isLoading.value || isRending.value || isPaginationLoading.value)) {
|
|
133415
133615
|
return 'Loading ...';
|
|
133416
133616
|
}
|
|
133417
133617
|
if (!(isRequesting.value || hasMoreList.value) || tableDataSize.value < pageSize.value) {
|
|
@@ -133441,12 +133641,21 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133441
133641
|
updateRootElementClass();
|
|
133442
133642
|
});
|
|
133443
133643
|
(0,vue_esm.watch)(() => indexSetQueryResult.value.is_loading, (newVal, oldVal) => {
|
|
133444
|
-
if (oldVal && !newVal
|
|
133445
|
-
(0
|
|
133446
|
-
|
|
133447
|
-
|
|
133448
|
-
|
|
133449
|
-
|
|
133644
|
+
if (oldVal && !newVal) {
|
|
133645
|
+
if (tableDataSize.value === 0) {
|
|
133646
|
+
isFirstPageLayoutPending.value = false;
|
|
133647
|
+
}
|
|
133648
|
+
if (skipNextLoadingEndReset) {
|
|
133649
|
+
skipNextLoadingEndReset = false;
|
|
133650
|
+
return;
|
|
133651
|
+
}
|
|
133652
|
+
if (!isRequesting.value) {
|
|
133653
|
+
(0,vue_esm.nextTick)(() => {
|
|
133654
|
+
scrollXOffsetLeft = 0;
|
|
133655
|
+
refScrollXBar.value?.scrollLeft(0);
|
|
133656
|
+
computeRect(refResultRowBox.value);
|
|
133657
|
+
});
|
|
133658
|
+
}
|
|
133450
133659
|
}
|
|
133451
133660
|
});
|
|
133452
133661
|
const renderLoader = () => {
|
|
@@ -133469,11 +133678,14 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133469
133678
|
return null;
|
|
133470
133679
|
};
|
|
133471
133680
|
const isTableLoading = (0,vue_esm.computed)(() => {
|
|
133472
|
-
return tableDataSize.value === 0 && (isRequesting.value || isRending.value || isPageLoading.value || isLoading.value);
|
|
133681
|
+
return !shouldShowFirstPageSkeleton.value && tableDataSize.value === 0 && (isRequesting.value || isRending.value || isPageLoading.value || isLoading.value);
|
|
133473
133682
|
});
|
|
133474
133683
|
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: reason
|
|
133475
133684
|
const exceptionType = (0,vue_esm.computed)(() => {
|
|
133476
133685
|
if (tableDataSize.value === 0 || indexFieldInfo.value.is_loading) {
|
|
133686
|
+
if (shouldShowFirstPageSkeleton.value) {
|
|
133687
|
+
return 'hidden';
|
|
133688
|
+
}
|
|
133477
133689
|
if (isRequesting.value || isLoading.value || isPageLoading.value) {
|
|
133478
133690
|
return 'loading';
|
|
133479
133691
|
}
|
|
@@ -133491,6 +133703,9 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133491
133703
|
return 'hidden';
|
|
133492
133704
|
});
|
|
133493
133705
|
const getExceptionRender = () => {
|
|
133706
|
+
if (shouldShowFirstPageSkeleton.value) {
|
|
133707
|
+
return null;
|
|
133708
|
+
}
|
|
133494
133709
|
return (0,vue_esm.h)(log_result_exception, {
|
|
133495
133710
|
"attrs": {
|
|
133496
133711
|
"message": exceptionMsg.value,
|
|
@@ -133498,6 +133713,21 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133498
133713
|
}
|
|
133499
133714
|
});
|
|
133500
133715
|
};
|
|
133716
|
+
const renderFirstPageSkeleton = () => {
|
|
133717
|
+
if (!shouldShowFirstPageSkeleton.value) {
|
|
133718
|
+
return null;
|
|
133719
|
+
}
|
|
133720
|
+
return (0,vue_esm.h)(retrieve_loader, {
|
|
133721
|
+
"class": 'bklog-first-page-skeleton',
|
|
133722
|
+
"attrs": {
|
|
133723
|
+
"isLoading": true,
|
|
133724
|
+
"isOriginalField": showCtxType.value !== 'table',
|
|
133725
|
+
"maxLength": 12,
|
|
133726
|
+
"static": true,
|
|
133727
|
+
"visibleFields": visibleFields.value.length ? visibleFields.value : fullColumns.value
|
|
133728
|
+
}
|
|
133729
|
+
});
|
|
133730
|
+
};
|
|
133501
133731
|
const renderDelineatePopContent = () => {
|
|
133502
133732
|
return (0,vue_esm.h)("div", {
|
|
133503
133733
|
"style": 'display: none;'
|
|
@@ -133505,7 +133735,8 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133505
133735
|
};
|
|
133506
133736
|
(0,vue_esm.onBeforeUnmount)(() => {
|
|
133507
133737
|
popInstanceUtil.uninstallInstance();
|
|
133508
|
-
|
|
133738
|
+
window.clearTimeout(columnWidthChangeTimer);
|
|
133739
|
+
renderList = Object.freeze([]);
|
|
133509
133740
|
});
|
|
133510
133741
|
return {
|
|
133511
133742
|
refRootElement,
|
|
@@ -133518,6 +133749,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133518
133749
|
renderScrollXBar,
|
|
133519
133750
|
renderLoader,
|
|
133520
133751
|
renderHeadVNode,
|
|
133752
|
+
renderFirstPageSkeleton,
|
|
133521
133753
|
getExceptionRender,
|
|
133522
133754
|
tableDataSize,
|
|
133523
133755
|
resultContainerId,
|
|
@@ -133539,7 +133771,7 @@ function use_lazy_render_deepQueryShadowSelector(selector) {
|
|
|
133539
133771
|
},
|
|
133540
133772
|
"ref": 'refResultRowBox',
|
|
133541
133773
|
"class": 'bklog-row-box'
|
|
133542
|
-
}, [this.renderRowVNode()]), this.getExceptionRender(), this.renderFixRightShadow(), this.renderScrollXBar(), this.renderLoader(), this.renderScrollTop(), this.renderDelineatePopContent(), (0,vue_esm.h)("div", {
|
|
133774
|
+
}, [this.renderRowVNode()]), this.renderFirstPageSkeleton(), this.getExceptionRender(), this.renderFixRightShadow(), this.renderScrollXBar(), this.renderLoader(), this.renderScrollTop(), this.renderDelineatePopContent(), (0,vue_esm.h)("div", {
|
|
133543
133775
|
"class": 'resize-guide-line'
|
|
133544
133776
|
})]);
|
|
133545
133777
|
}
|
|
@@ -134171,8 +134403,8 @@ var LogClustering = function LogClustering() {
|
|
|
134171
134403
|
|
|
134172
134404
|
var search_result_panel_component = normalizeComponent(
|
|
134173
134405
|
retrieve_v2_search_result_panelvue_type_script_setup_true_lang_js,
|
|
134174
|
-
|
|
134175
|
-
|
|
134406
|
+
search_result_panelvue_type_template_id_8d8d194c_render,
|
|
134407
|
+
search_result_panelvue_type_template_id_8d8d194c_staticRenderFns,
|
|
134176
134408
|
false,
|
|
134177
134409
|
null,
|
|
134178
134410
|
null,
|
|
@@ -154853,8 +155085,8 @@ const SearchResultTab = () => null;
|
|
|
154853
155085
|
}), renderTabContent()]);
|
|
154854
155086
|
}
|
|
154855
155087
|
}));
|
|
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
|
|
155088
|
+
;// ./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
|
|
155089
|
+
var sub_barvue_type_template_id_01b0e69f_render = function render() {
|
|
154858
155090
|
var _vm = this,
|
|
154859
155091
|
_c = _vm._self._c,
|
|
154860
155092
|
_setup = _vm._self._setupProxy;
|
|
@@ -154934,7 +155166,7 @@ var sub_barvue_type_template_id_08eba3c6_render = function render() {
|
|
|
154934
155166
|
}
|
|
154935
155167
|
})], 1) : _vm._e()]);
|
|
154936
155168
|
};
|
|
154937
|
-
var
|
|
155169
|
+
var sub_barvue_type_template_id_01b0e69f_staticRenderFns = [];
|
|
154938
155170
|
|
|
154939
155171
|
;// ./src/components/ellipsis-tag-list/index.tsx
|
|
154940
155172
|
/*
|
|
@@ -157152,7 +157384,7 @@ var AutoRefresh = function AutoRefresh() {
|
|
|
157152
157384
|
};
|
|
157153
157385
|
var handleIndexSetSelected = /*#__PURE__*/function () {
|
|
157154
157386
|
var _ref = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(payload) {
|
|
157155
|
-
var _payload$ids, indexSetDefaultCondition, _payload$items$, _payload$items$2, _payload$pid;
|
|
157387
|
+
var _payload$ids, indexSetDefaultCondition, _payload$items$, _payload$items$2, _payload$items$3, _payload$pid;
|
|
157156
157388
|
return regenerator_default().wrap(function _callee$(_context) {
|
|
157157
157389
|
while (1) switch (_context.prev = _context.next) {
|
|
157158
157390
|
case 0:
|
|
@@ -157175,6 +157407,13 @@ var AutoRefresh = function AutoRefresh() {
|
|
|
157175
157407
|
search_mode: 'ui',
|
|
157176
157408
|
keyword: ''
|
|
157177
157409
|
};
|
|
157410
|
+
} else if (!((_payload$items$3 = payload.items[0]) !== null && _payload$items$3 !== void 0 && _payload$items$3.addition) && isMonitorComponent) {
|
|
157411
|
+
// 监控下当切换采集项没有addtion时,要置空addition
|
|
157412
|
+
indexSetDefaultCondition = {
|
|
157413
|
+
addition: [],
|
|
157414
|
+
search_mode: 'ui',
|
|
157415
|
+
keyword: ''
|
|
157416
|
+
};
|
|
157178
157417
|
}
|
|
157179
157418
|
if (indexSetDefaultCondition.search_mode) {
|
|
157180
157419
|
store.commit('updateStorage', defineProperty_defineProperty({}, store_type_BK_LOG_STORAGE.SEARCH_TYPE, ['ui', 'sql'].indexOf(indexSetDefaultCondition.search_mode)));
|
|
@@ -157397,8 +157636,8 @@ var AutoRefresh = function AutoRefresh() {
|
|
|
157397
157636
|
|
|
157398
157637
|
var sub_bar_component = normalizeComponent(
|
|
157399
157638
|
retrieve_v2_sub_barvue_type_script_setup_true_lang_js,
|
|
157400
|
-
|
|
157401
|
-
|
|
157639
|
+
sub_barvue_type_template_id_01b0e69f_render,
|
|
157640
|
+
sub_barvue_type_template_id_01b0e69f_staticRenderFns,
|
|
157402
157641
|
false,
|
|
157403
157642
|
null,
|
|
157404
157643
|
null,
|
|
@@ -157916,6 +158155,10 @@ var sub_bar_component = normalizeComponent(
|
|
|
157916
158155
|
if (!val) return;
|
|
157917
158156
|
getIndexSetList();
|
|
157918
158157
|
store.commit('updateIsSetDefaultTableColumn', false);
|
|
158158
|
+
store.commit('resetIndexSetQueryResult', {
|
|
158159
|
+
is_loading: true,
|
|
158160
|
+
search_count: store.state.indexSetQueryResult.search_count + 1
|
|
158161
|
+
});
|
|
157919
158162
|
const result = handleTransformToTimestamp(val, store.getters.retrieveParams.format);
|
|
157920
158163
|
store.commit('updateIndexItemParams', {
|
|
157921
158164
|
start_time: result[0],
|
|
@@ -157923,7 +158166,9 @@ var sub_bar_component = normalizeComponent(
|
|
|
157923
158166
|
datePickerValue: val
|
|
157924
158167
|
});
|
|
157925
158168
|
await store.dispatch('requestIndexSetFieldInfo');
|
|
157926
|
-
store.dispatch('requestIndexSetQuery'
|
|
158169
|
+
store.dispatch('requestIndexSetQuery', {
|
|
158170
|
+
searchCount: store.state.indexSetQueryResult.search_count
|
|
158171
|
+
});
|
|
157927
158172
|
});
|
|
157928
158173
|
(0,vue_esm.watch)(() => props.timezone, val => {
|
|
157929
158174
|
if (!val) return;
|