@blueking/monitor-trace-log 2.0.0-beta.7 → 2.0.2
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 +4 -4
- package/main.js +507 -254
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -17442,6 +17442,7 @@ __webpack_require__.d(retrieve_namespaceObject, {
|
|
|
17442
17442
|
saveTitleInfo: () => (saveTitleInfo),
|
|
17443
17443
|
setIndexSetCustomConfig: () => (setIndexSetCustomConfig),
|
|
17444
17444
|
unionDownloadLog: () => (unionDownloadLog),
|
|
17445
|
+
unionExportAsync: () => (unionExportAsync),
|
|
17445
17446
|
updateClusteringConfig: () => (updateClusteringConfig),
|
|
17446
17447
|
updateFieldsConfig: () => (updateFieldsConfig),
|
|
17447
17448
|
updateUserFiledTableConfig: () => (updateUserFiledTableConfig),
|
|
@@ -27687,6 +27688,35 @@ const DEFAULT_TIME_RANGE = (/* unused pure expression or super */ null && (['now
|
|
|
27687
27688
|
const getTimeDisplay = timeRange => {
|
|
27688
27689
|
return new DateRange(timeRange, 'YYYY-MM-DD HH:mm:ss', window.timezone).toDisplayString();
|
|
27689
27690
|
};
|
|
27691
|
+
;// ./src/const/index.js
|
|
27692
|
+
/*
|
|
27693
|
+
* Tencent is pleased to support the open source community by making
|
|
27694
|
+
* 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
|
|
27695
|
+
*
|
|
27696
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
27697
|
+
*
|
|
27698
|
+
* 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
|
|
27699
|
+
*
|
|
27700
|
+
* License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
|
|
27701
|
+
*
|
|
27702
|
+
* ---------------------------------------------------
|
|
27703
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
27704
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
27705
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
27706
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
27707
|
+
*
|
|
27708
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
27709
|
+
* the Software.
|
|
27710
|
+
*
|
|
27711
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
27712
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27713
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
27714
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
27715
|
+
* IN THE SOFTWARE.
|
|
27716
|
+
*/
|
|
27717
|
+
|
|
27718
|
+
// 固定的内置字段
|
|
27719
|
+
var builtInInitHiddenList = ['gseIndex', 'gseindex', 'iterationIndex', 'iterationindex', '_iteration_idx', '__dist_01', '__dist_03', '__dist_05', '__dist_07', '__dist_09', '__ipv6__', '__parse_failure', 'time', '__module__', '__set__', '__ipv6__'];
|
|
27690
27720
|
;// ./node_modules/vuex/dist/vuex.esm.js
|
|
27691
27721
|
/*!
|
|
27692
27722
|
* vuex v3.6.2
|
|
@@ -36292,6 +36322,10 @@ var exportAsync = {
|
|
|
36292
36322
|
url: '/search/index_set/:index_set_id/async_export/',
|
|
36293
36323
|
method: 'post'
|
|
36294
36324
|
};
|
|
36325
|
+
var unionExportAsync = {
|
|
36326
|
+
url: '/search/index_set/union_async_export/',
|
|
36327
|
+
method: 'post'
|
|
36328
|
+
};
|
|
36295
36329
|
var getRealTimeLog = {
|
|
36296
36330
|
url: '/search/index_set/:index_set_id/tail_f/',
|
|
36297
36331
|
method: 'post'
|
|
@@ -38057,35 +38091,6 @@ function retrieve_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r
|
|
|
38057
38091
|
}
|
|
38058
38092
|
}
|
|
38059
38093
|
});
|
|
38060
|
-
;// ./src/const/index.js
|
|
38061
|
-
/*
|
|
38062
|
-
* Tencent is pleased to support the open source community by making
|
|
38063
|
-
* 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
|
|
38064
|
-
*
|
|
38065
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
|
38066
|
-
*
|
|
38067
|
-
* 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
|
|
38068
|
-
*
|
|
38069
|
-
* License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
|
|
38070
|
-
*
|
|
38071
|
-
* ---------------------------------------------------
|
|
38072
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
38073
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
38074
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
|
38075
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
38076
|
-
*
|
|
38077
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
|
38078
|
-
* the Software.
|
|
38079
|
-
*
|
|
38080
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
38081
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
38082
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
38083
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
38084
|
-
* IN THE SOFTWARE.
|
|
38085
|
-
*/
|
|
38086
|
-
|
|
38087
|
-
// 固定的内置字段
|
|
38088
|
-
var builtInInitHiddenList = ['gseIndex', 'gseindex', 'iterationIndex', 'iterationindex', '_iteration_idx', '__dist_01', '__dist_03', '__dist_05', '__dist_07', '__dist_09', '__ipv6__', '__parse_failure', 'time', '__module__', '__set__', '__ipv6__'];
|
|
38089
38094
|
;// ./src/store/index.js
|
|
38090
38095
|
|
|
38091
38096
|
|
|
@@ -38413,6 +38418,24 @@ var store_store = new vuex_esm.Store({
|
|
|
38413
38418
|
}
|
|
38414
38419
|
return addition;
|
|
38415
38420
|
});
|
|
38421
|
+
|
|
38422
|
+
// 格式化 addition value
|
|
38423
|
+
// 如果字段类型为 text & is_case_sensitive = false 则将 value 转换为小写
|
|
38424
|
+
// 操作符为"=~", "&=~", "!=~", "&!=~" 四者之一
|
|
38425
|
+
filterAddition.forEach(function (item) {
|
|
38426
|
+
if (['=~', '&=~', '!=~', '&!=~'].includes(item.operator)) {
|
|
38427
|
+
var _state$indexFieldInfo, _state$indexFieldInfo2, _field$is_case_sensit;
|
|
38428
|
+
var field = ((_state$indexFieldInfo = (_state$indexFieldInfo2 = state.indexFieldInfo) === null || _state$indexFieldInfo2 === void 0 ? void 0 : _state$indexFieldInfo2.fields) !== null && _state$indexFieldInfo !== void 0 ? _state$indexFieldInfo : []).find(function (f) {
|
|
38429
|
+
return f.field_name === item.field;
|
|
38430
|
+
});
|
|
38431
|
+
if ((field === null || field === void 0 ? void 0 : field.field_type) === 'text' && !((_field$is_case_sensit = field === null || field === void 0 ? void 0 : field.is_case_sensitive) !== null && _field$is_case_sensit !== void 0 ? _field$is_case_sensit : true)) {
|
|
38432
|
+
item.value = item.value.map(function (v) {
|
|
38433
|
+
var _v$toLowerCase;
|
|
38434
|
+
return (_v$toLowerCase = v === null || v === void 0 ? void 0 : v.toLowerCase()) !== null && _v$toLowerCase !== void 0 ? _v$toLowerCase : '';
|
|
38435
|
+
});
|
|
38436
|
+
}
|
|
38437
|
+
}
|
|
38438
|
+
});
|
|
38416
38439
|
var searchParams = search_mode === 'sql' ? {
|
|
38417
38440
|
keyword: keyword,
|
|
38418
38441
|
addition: []
|
|
@@ -38825,7 +38848,11 @@ var store_store = new vuex_esm.Store({
|
|
|
38825
38848
|
}
|
|
38826
38849
|
var aWeight = HIDDEN_FIELDS.has(a.field_name) ? 1 : 0;
|
|
38827
38850
|
var bWeight = HIDDEN_FIELDS.has(b.field_name) ? 1 : 0;
|
|
38828
|
-
return aWeight - bWeight;
|
|
38851
|
+
if (aWeight !== bWeight) return aWeight - bWeight;
|
|
38852
|
+
if (a.is_built_in !== b.is_built_in) {
|
|
38853
|
+
return a.is_built_in ? 1 : -1;
|
|
38854
|
+
}
|
|
38855
|
+
return 0;
|
|
38829
38856
|
});
|
|
38830
38857
|
}
|
|
38831
38858
|
// Object.assign(state.indexFieldInfo, processedData);
|
|
@@ -39703,8 +39730,8 @@ var store_store = new vuex_esm.Store({
|
|
|
39703
39730
|
return isDefaultQuery ? !field.is_built_in : true;
|
|
39704
39731
|
};
|
|
39705
39732
|
var filterFn = function filterFn(field) {
|
|
39706
|
-
var _state$
|
|
39707
|
-
return !((_state$
|
|
39733
|
+
var _state$indexFieldInfo3;
|
|
39734
|
+
return !((_state$indexFieldInfo3 = state.indexFieldInfo.aggs_items[field.field_name]) !== null && _state$indexFieldInfo3 !== void 0 && _state$indexFieldInfo3.length) && field.es_doc_values && filterBuildIn(field) && ['keyword'].includes(field.field_type) && !/^__dist_/.test(field.field_name);
|
|
39708
39735
|
};
|
|
39709
39736
|
var mapFn = function mapFn(field) {
|
|
39710
39737
|
return field.field_name;
|
|
@@ -48298,6 +48325,7 @@ let CollectGroup = class CollectGroup extends api_Component {
|
|
|
48298
48325
|
this.handleUserOperate(type, this.data);
|
|
48299
48326
|
this.groupListPopoverInstance?.hide();
|
|
48300
48327
|
// 进行完操作时 清除组或者操作列表实例
|
|
48328
|
+
this.operatePopoverInstance?.hide?.(300);
|
|
48301
48329
|
this.operatePopoverInstance?.destroy?.();
|
|
48302
48330
|
this.operatePopoverInstance = null;
|
|
48303
48331
|
this.groupListPopoverInstance?.destroy?.();
|
|
@@ -48338,6 +48366,7 @@ let CollectGroup = class CollectGroup extends api_Component {
|
|
|
48338
48366
|
onHiddenFn: () => {
|
|
48339
48367
|
this.operatePopoverInstance?.destroy?.();
|
|
48340
48368
|
this.operatePopoverInstance = null;
|
|
48369
|
+
this.groupListPopoverInstance?.hide();
|
|
48341
48370
|
this.groupListPopoverInstance = null;
|
|
48342
48371
|
this.clearStatus(); // 清空状态
|
|
48343
48372
|
return true;
|
|
@@ -51473,16 +51502,26 @@ let CollectIndex = class CollectIndex extends api_Component {
|
|
|
51473
51502
|
}
|
|
51474
51503
|
const cloneValue = _deepClone(value);
|
|
51475
51504
|
this.activeFavorite = _deepClone(value);
|
|
51505
|
+
const isUnionIndex = cloneValue.index_set_ids.length > 0;
|
|
51506
|
+
const keyword = cloneValue.params.keyword;
|
|
51507
|
+
const addition = cloneValue.params.addition ?? [];
|
|
51508
|
+
const getSearchMode = () => {
|
|
51509
|
+
if (addition.length > 0 && keyword.length > 0) {
|
|
51510
|
+
return cloneValue.search_mode;
|
|
51511
|
+
}
|
|
51512
|
+
if (addition.length > 0) {
|
|
51513
|
+
return 'ui';
|
|
51514
|
+
}
|
|
51515
|
+
return 'sql';
|
|
51516
|
+
};
|
|
51517
|
+
const search_mode = getSearchMode();
|
|
51476
51518
|
this.$store.commit('resetIndexsetItemParams');
|
|
51477
51519
|
this.$store.commit('updateIndexId', cloneValue.index_set_id);
|
|
51478
51520
|
this.$store.commit('updateIsSetDefaultTableColumn', false);
|
|
51479
51521
|
this.$store.commit('updateStorage', {
|
|
51480
51522
|
[BK_LOG_STORAGE.INDEX_SET_ACTIVE_TAB]: value.index_set_type,
|
|
51481
|
-
[BK_LOG_STORAGE.SEARCH_TYPE]: ['ui', 'sql'].indexOf(
|
|
51523
|
+
[BK_LOG_STORAGE.SEARCH_TYPE]: ['ui', 'sql'].indexOf(search_mode ?? 'ui')
|
|
51482
51524
|
});
|
|
51483
|
-
const isUnionIndex = cloneValue.index_set_ids.length > 0;
|
|
51484
|
-
const keyword = cloneValue.params.keyword;
|
|
51485
|
-
const addition = cloneValue.params.addition ?? [];
|
|
51486
51525
|
const ip_chooser = Object.assign({}, cloneValue.params.ip_chooser ?? {});
|
|
51487
51526
|
if (isUnionIndex) {
|
|
51488
51527
|
this.$store.commit('updateUnionIndexList', cloneValue.index_set_ids.map(item => String(item)));
|
|
@@ -51503,7 +51542,7 @@ let CollectIndex = class CollectIndex extends api_Component {
|
|
|
51503
51542
|
ids,
|
|
51504
51543
|
items: ids.map(id => this.indexSetList.find(item => item.index_set_id === `${id}`)),
|
|
51505
51544
|
isUnionIndex,
|
|
51506
|
-
search_mode:
|
|
51545
|
+
search_mode: search_mode
|
|
51507
51546
|
});
|
|
51508
51547
|
this.setRouteParams(value);
|
|
51509
51548
|
this.$store.commit('updateChartParams', {
|
|
@@ -51515,7 +51554,10 @@ let CollectIndex = class CollectIndex extends api_Component {
|
|
|
51515
51554
|
list: []
|
|
51516
51555
|
});
|
|
51517
51556
|
this.$store.dispatch('requestIndexSetFieldInfo').then(() => {
|
|
51518
|
-
retrieve_helper.setFavoriteActive(
|
|
51557
|
+
retrieve_helper.setFavoriteActive({
|
|
51558
|
+
...this.activeFavorite,
|
|
51559
|
+
search_mode
|
|
51560
|
+
});
|
|
51519
51561
|
this.$store.dispatch('requestIndexSetQuery');
|
|
51520
51562
|
});
|
|
51521
51563
|
}
|
|
@@ -54753,8 +54795,8 @@ var common_filter_select_component = normalizeComponent(
|
|
|
54753
54795
|
)
|
|
54754
54796
|
|
|
54755
54797
|
/* harmony default export */ const common_filter_select = (common_filter_select_component.exports);
|
|
54756
|
-
;// ./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-bar/sql-query.vue?vue&type=template&id=
|
|
54757
|
-
var
|
|
54798
|
+
;// ./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-bar/sql-query.vue?vue&type=template&id=14470a82
|
|
54799
|
+
var sql_queryvue_type_template_id_14470a82_render = function render() {
|
|
54758
54800
|
var _vm = this,
|
|
54759
54801
|
_c = _vm._self._c,
|
|
54760
54802
|
_setup = _vm._self._setupProxy;
|
|
@@ -54793,29 +54835,7 @@ var sql_queryvue_type_template_id_f721999a_render = function render() {
|
|
|
54793
54835
|
}
|
|
54794
54836
|
})], 1)]);
|
|
54795
54837
|
};
|
|
54796
|
-
var
|
|
54797
|
-
|
|
54798
|
-
;// ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
54799
|
-
function _setPrototypeOf(t, e) {
|
|
54800
|
-
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
54801
|
-
return t.__proto__ = e, t;
|
|
54802
|
-
}, _setPrototypeOf(t, e);
|
|
54803
|
-
}
|
|
54804
|
-
|
|
54805
|
-
;// ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
54806
|
-
|
|
54807
|
-
function _inherits(t, e) {
|
|
54808
|
-
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
54809
|
-
t.prototype = Object.create(e && e.prototype, {
|
|
54810
|
-
constructor: {
|
|
54811
|
-
value: t,
|
|
54812
|
-
writable: !0,
|
|
54813
|
-
configurable: !0
|
|
54814
|
-
}
|
|
54815
|
-
}), Object.defineProperty(t, "prototype", {
|
|
54816
|
-
writable: !1
|
|
54817
|
-
}), e && _setPrototypeOf(t, e);
|
|
54818
|
-
}
|
|
54838
|
+
var sql_queryvue_type_template_id_14470a82_staticRenderFns = [];
|
|
54819
54839
|
|
|
54820
54840
|
;// ./node_modules/@lezer/common/dist/index.js
|
|
54821
54841
|
/**
|
|
@@ -82515,11 +82535,16 @@ function highlightNotKeywords() {
|
|
|
82515
82535
|
var _onKeyEnter;
|
|
82516
82536
|
return (_onKeyEnter = onKeyEnter === null || onKeyEnter === void 0 ? void 0 : onKeyEnter(view)) !== null && _onKeyEnter !== void 0 ? _onKeyEnter : false;
|
|
82517
82537
|
}
|
|
82518
|
-
}].concat(toConsumableArray_toConsumableArray(stopKeyboardList))), minimalSetup, sql(), highlightNotKeywords(),
|
|
82519
|
-
// 添加自定义高亮扩展
|
|
82520
|
-
dist_EditorView.lineWrapping, dist_EditorView.focusChangeEffect.of(function (state, focusing) {
|
|
82538
|
+
}].concat(toConsumableArray_toConsumableArray(stopKeyboardList))), minimalSetup, sql(), highlightNotKeywords(), dist_EditorView.lineWrapping, dist_EditorView.focusChangeEffect.of(function (state, focusing) {
|
|
82521
82539
|
onFocusChange === null || onFocusChange === void 0 || onFocusChange(state, focusing);
|
|
82522
|
-
}), dist_EditorView.updateListener.of(
|
|
82540
|
+
}), dist_EditorView.updateListener.of(function (update) {
|
|
82541
|
+
if (update.selectionSet) {
|
|
82542
|
+
onFocusPosChange === null || onFocusPosChange === void 0 || onFocusPosChange(update.state);
|
|
82543
|
+
}
|
|
82544
|
+
if (update.docChanged) {
|
|
82545
|
+
debouncedTrack(update);
|
|
82546
|
+
}
|
|
82547
|
+
})]
|
|
82523
82548
|
});
|
|
82524
82549
|
var view = new dist_EditorView({
|
|
82525
82550
|
state: state,
|
|
@@ -82536,62 +82561,79 @@ function highlightNotKeywords() {
|
|
|
82536
82561
|
var setValue = function setValue(value) {
|
|
82537
82562
|
var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
82538
82563
|
var to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
82539
|
-
|
|
82564
|
+
var currentValue = view.state.doc.toString();
|
|
82565
|
+
if (currentValue === value) {
|
|
82540
82566
|
return;
|
|
82541
82567
|
}
|
|
82568
|
+
|
|
82569
|
+
// 处理替换全部内容的情况
|
|
82542
82570
|
if (to === Infinity) {
|
|
82571
|
+
var docLength = view.state.doc.length;
|
|
82543
82572
|
view.dispatch({
|
|
82544
82573
|
changes: {
|
|
82545
|
-
from:
|
|
82546
|
-
to:
|
|
82574
|
+
from: 0,
|
|
82575
|
+
to: docLength,
|
|
82547
82576
|
insert: value
|
|
82548
|
-
}
|
|
82549
|
-
|
|
82550
|
-
view.dispatch({
|
|
82551
|
-
selection: dist_EditorSelection.cursor(view.state.doc.length)
|
|
82577
|
+
},
|
|
82578
|
+
selection: dist_EditorSelection.cursor(value.length)
|
|
82552
82579
|
});
|
|
82553
82580
|
return;
|
|
82554
82581
|
}
|
|
82555
|
-
|
|
82582
|
+
|
|
82583
|
+
// 处理插入新内容的情况
|
|
82584
|
+
if (to === undefined) {
|
|
82585
|
+
// 确保 from 不超过文档长度
|
|
82586
|
+
var safeFrom = Math.min(from, view.state.doc.length);
|
|
82556
82587
|
view.dispatch({
|
|
82557
82588
|
changes: {
|
|
82558
|
-
from:
|
|
82589
|
+
from: safeFrom,
|
|
82559
82590
|
insert: value
|
|
82560
|
-
}
|
|
82561
|
-
|
|
82562
|
-
|
|
82563
|
-
selection: dist_EditorSelection.cursor(from + value.length)
|
|
82591
|
+
},
|
|
82592
|
+
selection: dist_EditorSelection.cursor(safeFrom + value.length),
|
|
82593
|
+
userEvent: 'input'
|
|
82564
82594
|
});
|
|
82565
82595
|
return;
|
|
82566
82596
|
}
|
|
82597
|
+
|
|
82598
|
+
// 处理替换指定范围内容的情况
|
|
82567
82599
|
if (typeof to === 'number') {
|
|
82568
|
-
|
|
82600
|
+
// 确保 from 和 to 在有效范围内
|
|
82601
|
+
var _docLength = view.state.doc.length;
|
|
82602
|
+
var _safeFrom = Math.min(from, _docLength);
|
|
82603
|
+
var safeTo = Math.min(to, _docLength);
|
|
82604
|
+
|
|
82605
|
+
// 如果 from 大于等于 to,当作插入处理
|
|
82606
|
+
if (_safeFrom >= safeTo) {
|
|
82569
82607
|
view.dispatch({
|
|
82570
82608
|
changes: {
|
|
82571
|
-
from:
|
|
82572
|
-
to: view.state.doc.length,
|
|
82609
|
+
from: _safeFrom,
|
|
82573
82610
|
insert: value
|
|
82574
|
-
}
|
|
82575
|
-
|
|
82576
|
-
|
|
82577
|
-
selection: dist_EditorSelection.cursor(from + value.length)
|
|
82611
|
+
},
|
|
82612
|
+
selection: dist_EditorSelection.cursor(_safeFrom + value.length),
|
|
82613
|
+
userEvent: 'input'
|
|
82578
82614
|
});
|
|
82579
82615
|
return;
|
|
82580
82616
|
}
|
|
82581
82617
|
view.dispatch({
|
|
82582
82618
|
changes: {
|
|
82583
|
-
from:
|
|
82584
|
-
to:
|
|
82619
|
+
from: _safeFrom,
|
|
82620
|
+
to: safeTo,
|
|
82585
82621
|
insert: value
|
|
82586
|
-
}
|
|
82587
|
-
|
|
82588
|
-
|
|
82589
|
-
selection: dist_EditorSelection.cursor(from + value.length)
|
|
82622
|
+
},
|
|
82623
|
+
selection: dist_EditorSelection.cursor(_safeFrom + value.length),
|
|
82624
|
+
userEvent: 'input'
|
|
82590
82625
|
});
|
|
82591
82626
|
}
|
|
82592
82627
|
};
|
|
82593
82628
|
var setFocus = function setFocus() {
|
|
82629
|
+
if (!view) return;
|
|
82594
82630
|
view.focus();
|
|
82631
|
+
// 确保光标位置正确
|
|
82632
|
+
var pos = view.state.selection.main.to;
|
|
82633
|
+
view.dispatch({
|
|
82634
|
+
selection: dist_EditorSelection.cursor(pos),
|
|
82635
|
+
userEvent: 'focus'
|
|
82636
|
+
});
|
|
82595
82637
|
};
|
|
82596
82638
|
var getValue = function getValue() {
|
|
82597
82639
|
var _view$state$doc$toStr;
|
|
@@ -82606,8 +82648,8 @@ function highlightNotKeywords() {
|
|
|
82606
82648
|
getValue: getValue
|
|
82607
82649
|
};
|
|
82608
82650
|
});
|
|
82609
|
-
;// ./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-bar/sql-query-options.vue?vue&type=template&id=
|
|
82610
|
-
var
|
|
82651
|
+
;// ./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-bar/sql-query-options.vue?vue&type=template&id=16eb2332&scoped=true
|
|
82652
|
+
var sql_query_optionsvue_type_template_id_16eb2332_scoped_true_render = function render() {
|
|
82611
82653
|
var _vm = this,
|
|
82612
82654
|
_c = _vm._self._c,
|
|
82613
82655
|
_setup = _vm._self._setupProxy;
|
|
@@ -82905,7 +82947,7 @@ var sql_query_optionsvue_type_template_id_27700276_scoped_true_render = function
|
|
|
82905
82947
|
}, [_vm._v(_vm._s(item.value))])]);
|
|
82906
82948
|
})], 2)])])]);
|
|
82907
82949
|
};
|
|
82908
|
-
var
|
|
82950
|
+
var sql_query_optionsvue_type_template_id_16eb2332_scoped_true_staticRenderFns = [function () {
|
|
82909
82951
|
var _vm = this,
|
|
82910
82952
|
_c = _vm._self._c,
|
|
82911
82953
|
_setup = _vm._self._setupProxy;
|
|
@@ -82979,7 +83021,7 @@ var sql_query_optionsvue_type_template_id_27700276_scoped_true_staticRenderFns =
|
|
|
82979
83021
|
})]);
|
|
82980
83022
|
}];
|
|
82981
83023
|
|
|
82982
|
-
;// ./src/views/retrieve-v2/search-bar/sql-query-options.vue?vue&type=template&id=
|
|
83024
|
+
;// ./src/views/retrieve-v2/search-bar/sql-query-options.vue?vue&type=template&id=16eb2332&scoped=true
|
|
82983
83025
|
|
|
82984
83026
|
;// ./src/hooks/use-field-name.ts
|
|
82985
83027
|
/*
|
|
@@ -83557,8 +83599,8 @@ var OptionItemType;
|
|
|
83557
83599
|
}
|
|
83558
83600
|
// ctrl + enter e.ctrlKey || e.metaKey兼容Mac的Command键
|
|
83559
83601
|
if ((e.ctrlKey || e.metaKey) && e.keyCode === 13) {
|
|
83560
|
-
|
|
83561
|
-
|
|
83602
|
+
stopEventPreventDefault(e);
|
|
83603
|
+
handleRetrieve();
|
|
83562
83604
|
emits('cancel');
|
|
83563
83605
|
return;
|
|
83564
83606
|
}
|
|
@@ -83578,9 +83620,9 @@ var OptionItemType;
|
|
|
83578
83620
|
dropdownList[activeIndex.value].click();
|
|
83579
83621
|
} else {
|
|
83580
83622
|
emitValueChange(props.value, false, true);
|
|
83581
|
-
|
|
83582
|
-
|
|
83583
|
-
});
|
|
83623
|
+
// nextTick(() => {
|
|
83624
|
+
// handleRetrieve();
|
|
83625
|
+
// });
|
|
83584
83626
|
}
|
|
83585
83627
|
}
|
|
83586
83628
|
if (code === 'ArrowUp') {
|
|
@@ -83746,11 +83788,11 @@ var OptionItemType;
|
|
|
83746
83788
|
|
|
83747
83789
|
var sql_query_options_component = normalizeComponent(
|
|
83748
83790
|
search_bar_sql_query_optionsvue_type_script_lang_ts_setup_true,
|
|
83749
|
-
|
|
83750
|
-
|
|
83791
|
+
sql_query_optionsvue_type_template_id_16eb2332_scoped_true_render,
|
|
83792
|
+
sql_query_optionsvue_type_template_id_16eb2332_scoped_true_staticRenderFns,
|
|
83751
83793
|
false,
|
|
83752
83794
|
null,
|
|
83753
|
-
"
|
|
83795
|
+
"16eb2332",
|
|
83754
83796
|
null
|
|
83755
83797
|
|
|
83756
83798
|
)
|
|
@@ -83991,11 +84033,146 @@ var sql_query_options_component = normalizeComponent(
|
|
|
83991
84033
|
isInstanceShown
|
|
83992
84034
|
};
|
|
83993
84035
|
});
|
|
83994
|
-
;// ./
|
|
84036
|
+
;// ./src/views/retrieve-v2/search-bar/use-input-state.js
|
|
84037
|
+
|
|
84038
|
+
function useInputState() {
|
|
84039
|
+
// 记录输入状态
|
|
84040
|
+
var inputState = (0,vue_esm.ref)({
|
|
84041
|
+
focusPos: null,
|
|
84042
|
+
// focus时的光标位置
|
|
84043
|
+
newContent: '',
|
|
84044
|
+
// focus后新增的内容
|
|
84045
|
+
hasNewInput: false,
|
|
84046
|
+
// 是否有新增输入
|
|
84047
|
+
hasSpace: false,
|
|
84048
|
+
// 是否包含空格
|
|
84049
|
+
lastSpacePos: null,
|
|
84050
|
+
// 最后一个空格的位置
|
|
84051
|
+
isSelecting: false // 是否正在选择填充
|
|
84052
|
+
});
|
|
84053
|
+
|
|
84054
|
+
// 重置输入状态
|
|
84055
|
+
var resetInputState = function resetInputState() {
|
|
84056
|
+
inputState.value = {
|
|
84057
|
+
focusPos: null,
|
|
84058
|
+
newContent: '',
|
|
84059
|
+
hasNewInput: false,
|
|
84060
|
+
hasSpace: false,
|
|
84061
|
+
lastSpacePos: null,
|
|
84062
|
+
isSelecting: false
|
|
84063
|
+
};
|
|
84064
|
+
};
|
|
83995
84065
|
|
|
84066
|
+
// 更新输入状态
|
|
84067
|
+
var updateInputState = function updateInputState(state) {
|
|
84068
|
+
var currentPos = state.selection.main.to;
|
|
84069
|
+
var currentValue = state.doc.toString();
|
|
84070
|
+
|
|
84071
|
+
// 如果是新的focus,记录位置
|
|
84072
|
+
if (inputState.value.focusPos === null) {
|
|
84073
|
+
inputState.value.focusPos = currentPos;
|
|
84074
|
+
inputState.value.hasNewInput = false;
|
|
84075
|
+
inputState.value.hasSpace = false;
|
|
84076
|
+
inputState.value.lastSpacePos = null;
|
|
84077
|
+
inputState.value.isSelecting = false;
|
|
84078
|
+
return;
|
|
84079
|
+
}
|
|
83996
84080
|
|
|
84081
|
+
// 如果正在选择填充,不更新输入状态
|
|
84082
|
+
if (inputState.value.isSelecting) {
|
|
84083
|
+
return;
|
|
84084
|
+
}
|
|
84085
|
+
|
|
84086
|
+
// 如果光标位置在focus位置之后,说明有新增内容
|
|
84087
|
+
if (currentPos > inputState.value.focusPos) {
|
|
84088
|
+
var newContent = currentValue.slice(inputState.value.focusPos, currentPos);
|
|
84089
|
+
// 检查是否包含空格
|
|
84090
|
+
var hasSpace = /\s/.test(newContent);
|
|
84091
|
+
inputState.value.newContent = newContent;
|
|
84092
|
+
inputState.value.hasNewInput = true;
|
|
84093
|
+
inputState.value.hasSpace = hasSpace;
|
|
84094
|
+
|
|
84095
|
+
// 如果包含空格,找到最后一个空格的位置
|
|
84096
|
+
if (hasSpace) {
|
|
84097
|
+
var spaceMatch = newContent.match(/\s+$/);
|
|
84098
|
+
if (spaceMatch) {
|
|
84099
|
+
// 计算最后一个空格在文档中的位置
|
|
84100
|
+
inputState.value.lastSpacePos = inputState.value.focusPos + spaceMatch.index;
|
|
84101
|
+
}
|
|
84102
|
+
}
|
|
84103
|
+
} else if (currentPos < inputState.value.focusPos) {
|
|
84104
|
+
// 如果光标位置在focus位置之前,说明用户移动了光标,重置状态
|
|
84105
|
+
resetInputState();
|
|
84106
|
+
inputState.value.focusPos = currentPos;
|
|
84107
|
+
}
|
|
84108
|
+
};
|
|
84109
|
+
|
|
84110
|
+
// 获取选择范围
|
|
84111
|
+
var getSelectionRange = function getSelectionRange(editorFocusPosition) {
|
|
84112
|
+
var replace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
84113
|
+
// 如果是替换模式,替换全部内容
|
|
84114
|
+
if (replace) {
|
|
84115
|
+
return {
|
|
84116
|
+
from: 0,
|
|
84117
|
+
to: Infinity
|
|
84118
|
+
};
|
|
84119
|
+
}
|
|
84120
|
+
|
|
84121
|
+
// 如果是选择填充,替换当前光标位置的内容
|
|
84122
|
+
if (inputState.value.isSelecting) {
|
|
84123
|
+
return {
|
|
84124
|
+
from: editorFocusPosition,
|
|
84125
|
+
to: editorFocusPosition
|
|
84126
|
+
};
|
|
84127
|
+
}
|
|
84128
|
+
|
|
84129
|
+
// 如果有focus位置且有新增输入,只替换新增的部分
|
|
84130
|
+
if (inputState.value.focusPos !== null && inputState.value.hasNewInput) {
|
|
84131
|
+
// 如果有空格,在最后一个空格的位置插入
|
|
84132
|
+
if (inputState.value.hasSpace && inputState.value.lastSpacePos !== null) {
|
|
84133
|
+
// 在最后一个空格的位置插入,保留空格
|
|
84134
|
+
return {
|
|
84135
|
+
from: inputState.value.lastSpacePos + 1,
|
|
84136
|
+
// 在空格后插入
|
|
84137
|
+
to: inputState.value.focusPos + inputState.value.newContent.length,
|
|
84138
|
+
insertSpace: false
|
|
84139
|
+
};
|
|
84140
|
+
}
|
|
84141
|
+
|
|
84142
|
+
// 如果没有空格,替换整个新增内容
|
|
84143
|
+
return {
|
|
84144
|
+
from: inputState.value.focusPos,
|
|
84145
|
+
to: inputState.value.focusPos + inputState.value.newContent.length
|
|
84146
|
+
};
|
|
84147
|
+
}
|
|
84148
|
+
|
|
84149
|
+
// 如果没有新增输入,在光标位置追加
|
|
84150
|
+
return {
|
|
84151
|
+
from: editorFocusPosition,
|
|
84152
|
+
to: editorFocusPosition
|
|
84153
|
+
};
|
|
84154
|
+
};
|
|
84155
|
+
|
|
84156
|
+
// 开始选择填充
|
|
84157
|
+
var startSelecting = function startSelecting() {
|
|
84158
|
+
inputState.value.isSelecting = true;
|
|
84159
|
+
};
|
|
84160
|
+
|
|
84161
|
+
// 结束选择填充
|
|
84162
|
+
var endSelecting = function endSelecting() {
|
|
84163
|
+
inputState.value.isSelecting = false;
|
|
84164
|
+
};
|
|
84165
|
+
return {
|
|
84166
|
+
inputState: inputState,
|
|
84167
|
+
resetInputState: resetInputState,
|
|
84168
|
+
updateInputState: updateInputState,
|
|
84169
|
+
getSelectionRange: getSelectionRange,
|
|
84170
|
+
startSelecting: startSelecting,
|
|
84171
|
+
endSelecting: endSelecting
|
|
84172
|
+
};
|
|
84173
|
+
}
|
|
84174
|
+
;// ./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/index.js??vue-loader-options!./src/views/retrieve-v2/search-bar/sql-query.vue?vue&type=script&setup=true&lang=js
|
|
83997
84175
|
|
|
83998
|
-
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { if ("" === t) return e; var p = o[r]; return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof_typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
|
|
83999
84176
|
|
|
84000
84177
|
|
|
84001
84178
|
|
|
@@ -84030,6 +84207,15 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new B
|
|
|
84030
84207
|
var editorInstance = null;
|
|
84031
84208
|
var isSelectedText = false;
|
|
84032
84209
|
|
|
84210
|
+
// 使用输入状态管理 hook
|
|
84211
|
+
var _useInputState = useInputState(),
|
|
84212
|
+
inputState = _useInputState.inputState,
|
|
84213
|
+
resetInputState = _useInputState.resetInputState,
|
|
84214
|
+
updateInputState = _useInputState.updateInputState,
|
|
84215
|
+
getSelectionRange = _useInputState.getSelectionRange,
|
|
84216
|
+
startSelecting = _useInputState.startSelecting,
|
|
84217
|
+
endSelecting = _useInputState.endSelecting;
|
|
84218
|
+
|
|
84033
84219
|
/**
|
|
84034
84220
|
* 更新编辑器内容
|
|
84035
84221
|
* @param val 更新值
|
|
@@ -84141,104 +84327,38 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new B
|
|
|
84141
84327
|
// 此时执行查询操作,如果有联想提示,关闭提示弹出
|
|
84142
84328
|
if (!((_getTippyInstance$sta2 = (_getTippyInstance2 = getTippyInstance()) === null || _getTippyInstance2 === void 0 || (_getTippyInstance2 = _getTippyInstance2.state) === null || _getTippyInstance2 === void 0 ? void 0 : _getTippyInstance2.isShown) !== null && _getTippyInstance$sta2 !== void 0 ? _getTippyInstance$sta2 : false) || sqlActiveParamsIndex.value === null) {
|
|
84143
84329
|
hideTippyInstance();
|
|
84144
|
-
debounceRetrieve(value);
|
|
84145
84330
|
}
|
|
84146
|
-
|
|
84147
|
-
var onFocusPosChange = function onFocusPosChange(state) {
|
|
84148
|
-
editorFocusPosition.value = state.selection.main.to;
|
|
84149
|
-
isSelectedText = state.selection.main.to > state.selection.main.from;
|
|
84150
|
-
};
|
|
84151
|
-
var createEditorInstance = function createEditorInstance() {
|
|
84152
|
-
editorInstance = codemirror_lucene({
|
|
84153
|
-
value: /^\s*\*\s*$/.test(modelValue.value) ? '' : modelValue.value,
|
|
84154
|
-
target: refEditorParent.value,
|
|
84155
|
-
stopDefaultKeyboard: function stopDefaultKeyboard() {
|
|
84156
|
-
var _getTippyInstance$sta3, _getTippyInstance3;
|
|
84157
|
-
return (_getTippyInstance$sta3 = (_getTippyInstance3 = getTippyInstance()) === null || _getTippyInstance3 === void 0 || (_getTippyInstance3 = _getTippyInstance3.state) === null || _getTippyInstance3 === void 0 ? void 0 : _getTippyInstance3.isShown) !== null && _getTippyInstance$sta3 !== void 0 ? _getTippyInstance$sta3 : false;
|
|
84158
|
-
},
|
|
84159
|
-
onChange: function onChange(e) {
|
|
84160
|
-
return onEditorContextChange(e);
|
|
84161
|
-
},
|
|
84162
|
-
onKeyEnter: function onKeyEnter() {
|
|
84163
|
-
debounceRetrieve();
|
|
84164
|
-
return true;
|
|
84165
|
-
},
|
|
84166
|
-
onFocusChange: function onFocusChange(_, isFocusing) {
|
|
84167
|
-
var _getTippyInstance$sta4, _getTippyInstance4;
|
|
84168
|
-
if (isFocusing && !((_getTippyInstance$sta4 = (_getTippyInstance4 = getTippyInstance()) === null || _getTippyInstance4 === void 0 || (_getTippyInstance4 = _getTippyInstance4.state) === null || _getTippyInstance4 === void 0 ? void 0 : _getTippyInstance4.isShown) !== null && _getTippyInstance$sta4 !== void 0 ? _getTippyInstance$sta4 : false)) {
|
|
84169
|
-
delayShowInstance(refEditorParent.value);
|
|
84170
|
-
return;
|
|
84171
|
-
}
|
|
84172
|
-
},
|
|
84173
|
-
onFocusPosChange: onFocusPosChange
|
|
84174
|
-
});
|
|
84175
|
-
};
|
|
84176
|
-
var handleEditorClick = function handleEditorClick() {
|
|
84177
|
-
var _getTippyInstance$sta5, _getTippyInstance5;
|
|
84178
|
-
if (editorInstance === null) {
|
|
84179
|
-
createEditorInstance();
|
|
84180
|
-
}
|
|
84181
|
-
if (!((_getTippyInstance$sta5 = (_getTippyInstance5 = getTippyInstance()) === null || _getTippyInstance5 === void 0 || (_getTippyInstance5 = _getTippyInstance5.state) === null || _getTippyInstance5 === void 0 ? void 0 : _getTippyInstance5.isShown) !== null && _getTippyInstance$sta5 !== void 0 ? _getTippyInstance$sta5 : false)) {
|
|
84182
|
-
delayShowInstance(refEditorParent.value);
|
|
84183
|
-
}
|
|
84184
|
-
};
|
|
84185
|
-
|
|
84186
|
-
/**
|
|
84187
|
-
* @description 获取当前输入框左侧内容
|
|
84188
|
-
*/
|
|
84189
|
-
var getFocusLeftValue = function getFocusLeftValue() {
|
|
84190
|
-
if (editorFocusPosition.value !== null && editorFocusPosition.value >= 0) {
|
|
84191
|
-
return modelValue.value.slice(0, modelValue.focusPosition);
|
|
84192
|
-
}
|
|
84193
|
-
return modelValue.value;
|
|
84194
|
-
};
|
|
84195
|
-
var separator = /\s+(AND\s+NOT|OR|AND)\s+/i; // 区分查询语句条件
|
|
84196
|
-
var getMatchFieldLength = function getMatchFieldLength() {
|
|
84197
|
-
var _lastFragments, _exec, _inputField$length;
|
|
84198
|
-
var leftValue = getFocusLeftValue();
|
|
84199
|
-
var lastFragments = leftValue.split(separator);
|
|
84200
|
-
var lastFragment = (_lastFragments = lastFragments[lastFragments.length - 1]) !== null && _lastFragments !== void 0 ? _lastFragments : '';
|
|
84201
|
-
var inputField = (_exec = /*#__PURE__*/_wrapRegExp(/^\s*([\w.]+)$/, {
|
|
84202
|
-
field: 1
|
|
84203
|
-
}).exec(lastFragment)) === null || _exec === void 0 || (_exec = _exec.groups) === null || _exec === void 0 ? void 0 : _exec.field;
|
|
84204
|
-
return (_inputField$length = inputField === null || inputField === void 0 ? void 0 : inputField.length) !== null && _inputField$length !== void 0 ? _inputField$length : 0;
|
|
84205
|
-
};
|
|
84206
|
-
var getSelectionRenage = function getSelectionRenage(value, replace, type) {
|
|
84207
|
-
var matchLen = type === 'field' ? getMatchFieldLength(value) : 0;
|
|
84208
|
-
if (replace) {
|
|
84209
|
-
return {
|
|
84210
|
-
from: 0,
|
|
84211
|
-
to: Infinity,
|
|
84212
|
-
buffer: undefined
|
|
84213
|
-
};
|
|
84214
|
-
}
|
|
84215
|
-
return {
|
|
84216
|
-
from: editorFocusPosition.value - matchLen,
|
|
84217
|
-
to: editorFocusPosition.value + value.length,
|
|
84218
|
-
buffer: matchLen > 0 ? matchLen : undefined
|
|
84219
|
-
};
|
|
84331
|
+
debounceRetrieve(value);
|
|
84220
84332
|
};
|
|
84221
84333
|
var handleQueryChange = function handleQueryChange(value, retrieve) {
|
|
84222
84334
|
var replace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
84223
84335
|
var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
|
|
84224
|
-
var _getSelectionRenage = getSelectionRenage(value, replace, type),
|
|
84225
|
-
from = _getSelectionRenage.from,
|
|
84226
|
-
buffer = _getSelectionRenage.buffer,
|
|
84227
|
-
to = _getSelectionRenage.to;
|
|
84228
|
-
var toValue = undefined;
|
|
84229
|
-
if (to === Infinity) {
|
|
84230
|
-
toValue = to;
|
|
84231
|
-
}
|
|
84232
84336
|
if (modelValue.value !== value) {
|
|
84233
|
-
|
|
84234
|
-
|
|
84337
|
+
// 确保编辑器实例存在
|
|
84338
|
+
if (!editorInstance) {
|
|
84339
|
+
return;
|
|
84235
84340
|
}
|
|
84236
|
-
|
|
84341
|
+
|
|
84342
|
+
// 标记为选择填充状态
|
|
84343
|
+
startSelecting();
|
|
84344
|
+
var range = getSelectionRange(editorFocusPosition.value, replace);
|
|
84345
|
+
var from = range.from,
|
|
84346
|
+
to = range.to,
|
|
84347
|
+
insertSpace = range.insertSpace;
|
|
84348
|
+
|
|
84349
|
+
// 如果需要插入空格,在值后面添加空格
|
|
84350
|
+
var finalValue = insertSpace ? "".concat(value, " ") : value;
|
|
84351
|
+
setEditorContext(finalValue, from, to);
|
|
84352
|
+
|
|
84353
|
+
// 更新光标位置
|
|
84237
84354
|
(0,vue_esm.nextTick)(function () {
|
|
84238
|
-
if (
|
|
84239
|
-
|
|
84240
|
-
|
|
84241
|
-
|
|
84355
|
+
if (editorInstance) {
|
|
84356
|
+
if (retrieve) {
|
|
84357
|
+
var resolvedValue = editorInstance.getValue();
|
|
84358
|
+
closeAndRetrieve(resolvedValue);
|
|
84359
|
+
}
|
|
84360
|
+
// 重置选择状态
|
|
84361
|
+
endSelecting();
|
|
84242
84362
|
}
|
|
84243
84363
|
});
|
|
84244
84364
|
}
|
|
@@ -84260,6 +84380,47 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new B
|
|
|
84260
84380
|
}
|
|
84261
84381
|
hideTippyInstance();
|
|
84262
84382
|
};
|
|
84383
|
+
var handleEditorClick = function handleEditorClick() {
|
|
84384
|
+
var _getTippyInstance$sta3, _getTippyInstance3;
|
|
84385
|
+
if (editorInstance === null) {
|
|
84386
|
+
createEditorInstance();
|
|
84387
|
+
}
|
|
84388
|
+
if (!((_getTippyInstance$sta3 = (_getTippyInstance3 = getTippyInstance()) === null || _getTippyInstance3 === void 0 || (_getTippyInstance3 = _getTippyInstance3.state) === null || _getTippyInstance3 === void 0 ? void 0 : _getTippyInstance3.isShown) !== null && _getTippyInstance$sta3 !== void 0 ? _getTippyInstance$sta3 : false)) {
|
|
84389
|
+
delayShowInstance(refEditorParent.value);
|
|
84390
|
+
}
|
|
84391
|
+
};
|
|
84392
|
+
var createEditorInstance = function createEditorInstance() {
|
|
84393
|
+
editorInstance = codemirror_lucene({
|
|
84394
|
+
value: /^\s*\*\s*$/.test(modelValue.value) ? '' : modelValue.value,
|
|
84395
|
+
target: refEditorParent.value,
|
|
84396
|
+
stopDefaultKeyboard: function stopDefaultKeyboard() {
|
|
84397
|
+
var _getTippyInstance$sta4, _getTippyInstance4;
|
|
84398
|
+
return (_getTippyInstance$sta4 = (_getTippyInstance4 = getTippyInstance()) === null || _getTippyInstance4 === void 0 || (_getTippyInstance4 = _getTippyInstance4.state) === null || _getTippyInstance4 === void 0 ? void 0 : _getTippyInstance4.isShown) !== null && _getTippyInstance$sta4 !== void 0 ? _getTippyInstance$sta4 : false;
|
|
84399
|
+
},
|
|
84400
|
+
onChange: function onChange(e) {
|
|
84401
|
+
onEditorContextChange(e);
|
|
84402
|
+
},
|
|
84403
|
+
onKeyEnter: function onKeyEnter() {
|
|
84404
|
+
debounceRetrieve();
|
|
84405
|
+
return true;
|
|
84406
|
+
},
|
|
84407
|
+
onFocusChange: function onFocusChange(state, isFocusing) {
|
|
84408
|
+
if (isFocusing) {
|
|
84409
|
+
var _getTippyInstance$sta5, _getTippyInstance5;
|
|
84410
|
+
if (!((_getTippyInstance$sta5 = (_getTippyInstance5 = getTippyInstance()) === null || _getTippyInstance5 === void 0 || (_getTippyInstance5 = _getTippyInstance5.state) === null || _getTippyInstance5 === void 0 ? void 0 : _getTippyInstance5.isShown) !== null && _getTippyInstance$sta5 !== void 0 ? _getTippyInstance$sta5 : false)) {
|
|
84411
|
+
delayShowInstance(refEditorParent.value);
|
|
84412
|
+
}
|
|
84413
|
+
// 重置选择状态
|
|
84414
|
+
endSelecting();
|
|
84415
|
+
}
|
|
84416
|
+
},
|
|
84417
|
+
onFocusPosChange: function onFocusPosChange(state) {
|
|
84418
|
+
editorFocusPosition.value = state.selection.main.to;
|
|
84419
|
+
isSelectedText = state.selection.main.to > state.selection.main.from;
|
|
84420
|
+
updateInputState(state);
|
|
84421
|
+
}
|
|
84422
|
+
});
|
|
84423
|
+
};
|
|
84263
84424
|
(0,vue_esm.onMounted)(function () {
|
|
84264
84425
|
createEditorInstance();
|
|
84265
84426
|
document.addEventListener('click', handleDocumentClick);
|
|
@@ -84281,6 +84442,12 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new B
|
|
|
84281
84442
|
sqlActiveParamsIndex: sqlActiveParamsIndex,
|
|
84282
84443
|
editorInstance: editorInstance,
|
|
84283
84444
|
isSelectedText: isSelectedText,
|
|
84445
|
+
inputState: inputState,
|
|
84446
|
+
resetInputState: resetInputState,
|
|
84447
|
+
updateInputState: updateInputState,
|
|
84448
|
+
getSelectionRange: getSelectionRange,
|
|
84449
|
+
startSelecting: startSelecting,
|
|
84450
|
+
endSelecting: endSelecting,
|
|
84284
84451
|
setEditorContext: setEditorContext,
|
|
84285
84452
|
formatModelValueItem: formatModelValueItem,
|
|
84286
84453
|
handleWrapperClickCapture: handleWrapperClickCapture,
|
|
@@ -84293,17 +84460,12 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new B
|
|
|
84293
84460
|
isEmptySqlString: isEmptySqlString,
|
|
84294
84461
|
debounceRetrieve: debounceRetrieve,
|
|
84295
84462
|
closeAndRetrieve: closeAndRetrieve,
|
|
84296
|
-
onFocusPosChange: onFocusPosChange,
|
|
84297
|
-
createEditorInstance: createEditorInstance,
|
|
84298
|
-
handleEditorClick: handleEditorClick,
|
|
84299
|
-
getFocusLeftValue: getFocusLeftValue,
|
|
84300
|
-
separator: separator,
|
|
84301
|
-
getMatchFieldLength: getMatchFieldLength,
|
|
84302
|
-
getSelectionRenage: getSelectionRenage,
|
|
84303
84463
|
handleQueryChange: handleQueryChange,
|
|
84304
84464
|
handleSqlParamsActiveChange: handleSqlParamsActiveChange,
|
|
84305
84465
|
handleCancel: handleCancel,
|
|
84306
84466
|
handleDocumentClick: handleDocumentClick,
|
|
84467
|
+
handleEditorClick: handleEditorClick,
|
|
84468
|
+
createEditorInstance: createEditorInstance,
|
|
84307
84469
|
SqlQueryOptions: sql_query_options
|
|
84308
84470
|
};
|
|
84309
84471
|
}
|
|
@@ -84323,8 +84485,8 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new B
|
|
|
84323
84485
|
|
|
84324
84486
|
var sql_query_component = normalizeComponent(
|
|
84325
84487
|
search_bar_sql_queryvue_type_script_setup_true_lang_js,
|
|
84326
|
-
|
|
84327
|
-
|
|
84488
|
+
sql_queryvue_type_template_id_14470a82_render,
|
|
84489
|
+
sql_queryvue_type_template_id_14470a82_staticRenderFns,
|
|
84328
84490
|
false,
|
|
84329
84491
|
null,
|
|
84330
84492
|
null,
|
|
@@ -84333,8 +84495,8 @@ var sql_query_component = normalizeComponent(
|
|
|
84333
84495
|
)
|
|
84334
84496
|
|
|
84335
84497
|
/* harmony default export */ const sql_query = (sql_query_component.exports);
|
|
84336
|
-
;// ./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-bar/ui-input.vue?vue&type=template&id=
|
|
84337
|
-
var
|
|
84498
|
+
;// ./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-bar/ui-input.vue?vue&type=template&id=66443671
|
|
84499
|
+
var ui_inputvue_type_template_id_66443671_render = function render() {
|
|
84338
84500
|
var _vm = this,
|
|
84339
84501
|
_c = _vm._self._c,
|
|
84340
84502
|
_setup = _vm._self._setupProxy;
|
|
@@ -84357,7 +84519,6 @@ var ui_inputvue_type_template_id_5574ab16_render = function render() {
|
|
|
84357
84519
|
return _c('li', {
|
|
84358
84520
|
key: "".concat(item.field, "-").concat(index),
|
|
84359
84521
|
"class": ['search-item', 'tag-item', {
|
|
84360
|
-
disabled: item.disabled,
|
|
84361
84522
|
'is-common-fixed': item.isCommonFixed
|
|
84362
84523
|
}],
|
|
84363
84524
|
on: {
|
|
@@ -84616,7 +84777,7 @@ var ui_inputvue_type_template_id_5574ab16_render = function render() {
|
|
|
84616
84777
|
}
|
|
84617
84778
|
})], 1)], 2);
|
|
84618
84779
|
};
|
|
84619
|
-
var
|
|
84780
|
+
var ui_inputvue_type_template_id_66443671_staticRenderFns = [];
|
|
84620
84781
|
|
|
84621
84782
|
;// ./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-bar/ip-selector.vue?vue&type=template&id=e85fcaf4
|
|
84622
84783
|
var ip_selectorvue_type_template_id_e85fcaf4_render = function render() {
|
|
@@ -86367,12 +86528,20 @@ function ui_inputvue_type_script_setup_true_lang_js_objectSpread(e) { for (var r
|
|
|
86367
86528
|
* @param {*} item
|
|
86368
86529
|
*/
|
|
86369
86530
|
var formatModelValueItem = function formatModelValueItem(item) {
|
|
86370
|
-
var _item$value;
|
|
86531
|
+
var _item$value, _item$showList, _item$showList2, _item$value2;
|
|
86371
86532
|
if (typeof (item === null || item === void 0 ? void 0 : item.value) === 'string') {
|
|
86372
86533
|
item.value = item.value.split(',');
|
|
86373
86534
|
}
|
|
86374
86535
|
item.showAll = (item === null || item === void 0 || (_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.length) < 3;
|
|
86375
86536
|
if (!(item !== null && item !== void 0 && item.relation)) item.relation = 'OR';
|
|
86537
|
+
if (item !== null && item !== void 0 && (_item$showList = item.showList) !== null && _item$showList !== void 0 && _item$showList.length && (item === null || item === void 0 || (_item$showList2 = item.showList) === null || _item$showList2 === void 0 ? void 0 : _item$showList2.length) !== ((_item$value2 = item.value) === null || _item$value2 === void 0 ? void 0 : _item$value2.length)) {
|
|
86538
|
+
item.showList = Array.from({
|
|
86539
|
+
length: item.value.length
|
|
86540
|
+
}, function (_, i) {
|
|
86541
|
+
var _item$showList3;
|
|
86542
|
+
return i < (((_item$showList3 = item.showList) === null || _item$showList3 === void 0 ? void 0 : _item$showList3.length) || 0) ? item.showList[i] : false;
|
|
86543
|
+
});
|
|
86544
|
+
}
|
|
86376
86545
|
return ui_inputvue_type_script_setup_true_lang_js_objectSpread({
|
|
86377
86546
|
disabled: false
|
|
86378
86547
|
}, item !== null && item !== void 0 ? item : {});
|
|
@@ -86547,9 +86716,7 @@ function ui_inputvue_type_script_setup_true_lang_js_objectSpread(e) { for (var r
|
|
|
86547
86716
|
};
|
|
86548
86717
|
var handleDisabledTagItem = function handleDisabledTagItem(item) {
|
|
86549
86718
|
(0,vue_esm.set)(item, 'disabled', !item.disabled);
|
|
86550
|
-
|
|
86551
|
-
(0,vue_esm.set)(item, 'showList', new Array(item.value.length).fill(false));
|
|
86552
|
-
}
|
|
86719
|
+
(0,vue_esm.set)(item, 'showList', new Array(item.value.length).fill(item.disabled));
|
|
86553
86720
|
emitChange(modelValue.value);
|
|
86554
86721
|
};
|
|
86555
86722
|
var handleDeleteTagItem = function handleDeleteTagItem(index, item) {
|
|
@@ -86683,12 +86850,21 @@ function ui_inputvue_type_script_setup_true_lang_js_objectSpread(e) { for (var r
|
|
|
86683
86850
|
(0,vue_esm.set)(item, 'showList', new Array(item.value.length).fill(false));
|
|
86684
86851
|
}
|
|
86685
86852
|
(0,vue_esm.set)(item.showList, childIndex, show);
|
|
86853
|
+
if (item.showList.every(function (f) {
|
|
86854
|
+
return f === false;
|
|
86855
|
+
})) {
|
|
86856
|
+
(0,vue_esm.set)(item, 'disabled', false);
|
|
86857
|
+
} else if (item.showList.every(function (f) {
|
|
86858
|
+
return f === true;
|
|
86859
|
+
})) {
|
|
86860
|
+
(0,vue_esm.set)(item, 'disabled', true);
|
|
86861
|
+
}
|
|
86686
86862
|
emitChange((0,external_lodash_namespaceObject.cloneDeep)(modelValue.value));
|
|
86687
86863
|
var popover = popoverRefs.value.get("".concat(parentIndex, "-").concat(childIndex));
|
|
86688
86864
|
popover === null || popover === void 0 || popover.hideHandler();
|
|
86689
86865
|
};
|
|
86690
86866
|
var onlyOptionShow = function onlyOptionShow(parentIndex, childIndex, item) {
|
|
86691
|
-
if (!item.showList) {
|
|
86867
|
+
if (!item.showList || item.showList.length !== item.value.length) {
|
|
86692
86868
|
(0,vue_esm.set)(item, 'showList', new Array(item.value.length).fill(true));
|
|
86693
86869
|
}
|
|
86694
86870
|
item.showList = item.showList.map(function (_, index) {
|
|
@@ -86782,8 +86958,8 @@ function ui_inputvue_type_script_setup_true_lang_js_objectSpread(e) { for (var r
|
|
|
86782
86958
|
|
|
86783
86959
|
var ui_input_component = normalizeComponent(
|
|
86784
86960
|
search_bar_ui_inputvue_type_script_setup_true_lang_js,
|
|
86785
|
-
|
|
86786
|
-
|
|
86961
|
+
ui_inputvue_type_template_id_66443671_render,
|
|
86962
|
+
ui_inputvue_type_template_id_66443671_staticRenderFns,
|
|
86787
86963
|
false,
|
|
86788
86964
|
null,
|
|
86789
86965
|
null,
|
|
@@ -87735,9 +87911,9 @@ var log_resultvue_type_template_id_d3fe274c_scoped_true_render = function render
|
|
|
87735
87911
|
};
|
|
87736
87912
|
var log_resultvue_type_template_id_d3fe274c_scoped_true_staticRenderFns = [];
|
|
87737
87913
|
|
|
87738
|
-
;// ./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/export-log.vue?vue&type=template&id=
|
|
87914
|
+
;// ./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/export-log.vue?vue&type=template&id=d9e8bdf6&scoped=true
|
|
87739
87915
|
|
|
87740
|
-
var
|
|
87916
|
+
var export_logvue_type_template_id_d9e8bdf6_scoped_true_render = function render() {
|
|
87741
87917
|
var _vm = this,
|
|
87742
87918
|
_c = _vm._self._c;
|
|
87743
87919
|
return _c('div', [_c('div', {
|
|
@@ -87906,7 +88082,7 @@ var export_logvue_type_template_id_0a38cd48_scoped_true_render = function render
|
|
|
87906
88082
|
});
|
|
87907
88083
|
}), 1) : _vm._e()], 1) : _vm._e(), _vm._v(" "), false ? 0 : _vm._e()])])], 1);
|
|
87908
88084
|
};
|
|
87909
|
-
var
|
|
88085
|
+
var export_logvue_type_template_id_d9e8bdf6_scoped_true_staticRenderFns = [];
|
|
87910
88086
|
|
|
87911
88087
|
;// ./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/export-history.vue?vue&type=template&id=59dbd144&scoped=true
|
|
87912
88088
|
var export_historyvue_type_template_id_59dbd144_scoped_true_render = function render() {
|
|
@@ -88782,7 +88958,7 @@ function export_logvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r <
|
|
|
88782
88958
|
begin: 0,
|
|
88783
88959
|
bk_biz_id: this.bkBizId
|
|
88784
88960
|
});
|
|
88785
|
-
var downRequestUrl = "/search/index_set/".concat(this.routerIndexSet, "/quick_export/");
|
|
88961
|
+
var downRequestUrl = this.isUnionSearch ? "/search/index_set/union_async_export/" : "/search/index_set/".concat(this.routerIndexSet, "/quick_export/");
|
|
88786
88962
|
var data = export_logvue_type_script_lang_js_objectSpread(export_logvue_type_script_lang_js_objectSpread({}, params), {}, {
|
|
88787
88963
|
size: this.totalCount,
|
|
88788
88964
|
time_range: 'customized',
|
|
@@ -88790,6 +88966,17 @@ function export_logvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r <
|
|
|
88790
88966
|
is_desensitize: this.desensitizeRadioType === 'desensitize',
|
|
88791
88967
|
file_type: this.documentType
|
|
88792
88968
|
});
|
|
88969
|
+
if (this.isUnionSearch) {
|
|
88970
|
+
Object.assign(data, {
|
|
88971
|
+
is_quick_export: true,
|
|
88972
|
+
union_configs: this.unionIndexList.map(function (item) {
|
|
88973
|
+
return {
|
|
88974
|
+
begin: 0,
|
|
88975
|
+
index_set_id: item
|
|
88976
|
+
};
|
|
88977
|
+
})
|
|
88978
|
+
});
|
|
88979
|
+
}
|
|
88793
88980
|
axiosInstance.post(downRequestUrl, data, {
|
|
88794
88981
|
originalResponse: true
|
|
88795
88982
|
}).then(function (res) {
|
|
@@ -88866,16 +89053,31 @@ function export_logvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r <
|
|
|
88866
89053
|
bk_biz_id: this.bkBizId
|
|
88867
89054
|
});
|
|
88868
89055
|
var data = export_logvue_type_script_lang_js_objectSpread({}, params);
|
|
89056
|
+
var downRequestUrl = this.isUnionSearch ? "retrieve/unionExportAsync" : 'retrieve/exportAsync';
|
|
88869
89057
|
data.size = this.totalCount;
|
|
88870
89058
|
data.export_fields = this.submitSelectFiledList;
|
|
88871
89059
|
data.is_desensitize = this.desensitizeRadioType === 'desensitize';
|
|
89060
|
+
if (this.isUnionSearch) {
|
|
89061
|
+
Object.assign(data, {
|
|
89062
|
+
is_quick_export: false,
|
|
89063
|
+
union_configs: this.unionIndexList.map(function (item) {
|
|
89064
|
+
return {
|
|
89065
|
+
begin: 0,
|
|
89066
|
+
index_set_id: item
|
|
89067
|
+
};
|
|
89068
|
+
})
|
|
89069
|
+
});
|
|
89070
|
+
}
|
|
88872
89071
|
this.exportLoading = true;
|
|
88873
|
-
this
|
|
89072
|
+
var requestConfig = this.isUnionSearch ? {
|
|
89073
|
+
data: data
|
|
89074
|
+
} : {
|
|
88874
89075
|
params: {
|
|
88875
89076
|
index_set_id: this.routerIndexSet
|
|
88876
89077
|
},
|
|
88877
89078
|
data: data
|
|
88878
|
-
}
|
|
89079
|
+
};
|
|
89080
|
+
this.$http.request(downRequestUrl, requestConfig).then(function (res) {
|
|
88879
89081
|
if (res.result) {
|
|
88880
89082
|
_this3.$bkMessage({
|
|
88881
89083
|
theme: 'success',
|
|
@@ -88924,18 +89126,18 @@ function export_logvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r <
|
|
|
88924
89126
|
|
|
88925
89127
|
var export_log_component = normalizeComponent(
|
|
88926
89128
|
result_comp_export_logvue_type_script_lang_js,
|
|
88927
|
-
|
|
88928
|
-
|
|
89129
|
+
export_logvue_type_template_id_d9e8bdf6_scoped_true_render,
|
|
89130
|
+
export_logvue_type_template_id_d9e8bdf6_scoped_true_staticRenderFns,
|
|
88929
89131
|
false,
|
|
88930
89132
|
null,
|
|
88931
|
-
"
|
|
89133
|
+
"d9e8bdf6",
|
|
88932
89134
|
null
|
|
88933
89135
|
|
|
88934
89136
|
)
|
|
88935
89137
|
|
|
88936
89138
|
/* harmony default export */ const export_log = (export_log_component.exports);
|
|
88937
|
-
;// ./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/update/fields-setting.vue?vue&type=template&id=
|
|
88938
|
-
var
|
|
89139
|
+
;// ./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/update/fields-setting.vue?vue&type=template&id=1fbf20ca&scoped=true
|
|
89140
|
+
var fields_settingvue_type_template_id_1fbf20ca_scoped_true_render = function render() {
|
|
88939
89141
|
var _vm = this,
|
|
88940
89142
|
_c = _vm._self._c;
|
|
88941
89143
|
return _c('div', {
|
|
@@ -89060,7 +89262,7 @@ var fields_settingvue_type_template_id_69915a90_scoped_true_render = function re
|
|
|
89060
89262
|
"overflow": "scroll"
|
|
89061
89263
|
},
|
|
89062
89264
|
attrs: {
|
|
89063
|
-
"init-data": _vm.
|
|
89265
|
+
"init-data": _vm.cachedSortFields,
|
|
89064
89266
|
"should-refresh": _vm.isShow
|
|
89065
89267
|
}
|
|
89066
89268
|
})], 1)])])]), _vm._v(" "), _c('div', {
|
|
@@ -89102,7 +89304,7 @@ var fields_settingvue_type_template_id_69915a90_scoped_true_render = function re
|
|
|
89102
89304
|
}
|
|
89103
89305
|
}, [_vm._v("\n " + _vm._s(_vm.$t('取消')) + "\n ")])], 1)])]);
|
|
89104
89306
|
};
|
|
89105
|
-
var
|
|
89307
|
+
var fields_settingvue_type_template_id_1fbf20ca_scoped_true_staticRenderFns = [];
|
|
89106
89308
|
|
|
89107
89309
|
;// ./src/common/field-resolver.ts
|
|
89108
89310
|
/**
|
|
@@ -90162,8 +90364,8 @@ var fields_setting_operate_component = normalizeComponent(
|
|
|
90162
90364
|
)
|
|
90163
90365
|
|
|
90164
90366
|
/* harmony default export */ const fields_setting_operate = (fields_setting_operate_component.exports);
|
|
90165
|
-
;// ./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/update/table-sort.vue?vue&type=template&id=
|
|
90166
|
-
var
|
|
90367
|
+
;// ./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/update/table-sort.vue?vue&type=template&id=57f7bad9&scoped=true
|
|
90368
|
+
var table_sortvue_type_template_id_57f7bad9_scoped_true_render = function render() {
|
|
90167
90369
|
var _vm = this,
|
|
90168
90370
|
_c = _vm._self._c,
|
|
90169
90371
|
_setup = _vm._self._setupProxy;
|
|
@@ -90288,7 +90490,7 @@ var table_sortvue_type_template_id_47109906_scoped_true_render = function render
|
|
|
90288
90490
|
}
|
|
90289
90491
|
}, [_vm._v("添加排序字段")])])], 1);
|
|
90290
90492
|
};
|
|
90291
|
-
var
|
|
90493
|
+
var table_sortvue_type_template_id_57f7bad9_scoped_true_staticRenderFns = [];
|
|
90292
90494
|
|
|
90293
90495
|
;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-2.use[0]!./node_modules/ts-loader/index.js??clonedRuleSet-2.use[1]!./node_modules/ifdef-loader/ifdef-loader.js??clonedRuleSet-2.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/views/retrieve-v2/result-comp/update/table-sort.vue?vue&type=script&setup=true&lang=ts
|
|
90294
90496
|
|
|
@@ -90360,9 +90562,11 @@ var table_sortvue_type_template_id_47109906_scoped_true_staticRenderFns = [];
|
|
|
90360
90562
|
const getFieldIcon = fieldType => {
|
|
90361
90563
|
return fieldTypeMap.value?.[fieldType] ? fieldTypeMap.value?.[fieldType]?.icon : 'bklog-icon bklog-unkown';
|
|
90362
90564
|
};
|
|
90363
|
-
(0,vue_esm.watch)(() => [props.initData, props.shouldRefresh],
|
|
90364
|
-
|
|
90365
|
-
|
|
90565
|
+
(0,vue_esm.watch)(() => [props.initData, props.shouldRefresh], _ref2 => {
|
|
90566
|
+
let [newInitData, newShouldRefresh] = _ref2;
|
|
90567
|
+
// 当有初始数据时,直接更新
|
|
90568
|
+
if (Array.isArray(newInitData) && newInitData.length) {
|
|
90569
|
+
sortList.value = _deepClone(newInitData).map(sorts => ({
|
|
90366
90570
|
key: random(8),
|
|
90367
90571
|
sorts
|
|
90368
90572
|
}));
|
|
@@ -90409,11 +90613,11 @@ var table_sortvue_type_template_id_47109906_scoped_true_staticRenderFns = [];
|
|
|
90409
90613
|
|
|
90410
90614
|
var table_sort_component = normalizeComponent(
|
|
90411
90615
|
update_table_sortvue_type_script_setup_true_lang_ts,
|
|
90412
|
-
|
|
90413
|
-
|
|
90616
|
+
table_sortvue_type_template_id_57f7bad9_scoped_true_render,
|
|
90617
|
+
table_sortvue_type_template_id_57f7bad9_scoped_true_staticRenderFns,
|
|
90414
90618
|
false,
|
|
90415
90619
|
null,
|
|
90416
|
-
"
|
|
90620
|
+
"57f7bad9",
|
|
90417
90621
|
null
|
|
90418
90622
|
|
|
90419
90623
|
)
|
|
@@ -90485,6 +90689,12 @@ var FIELD_CONFIG_FILENAME_PREFIX = 'log-field-';
|
|
|
90485
90689
|
// 是否点击保存
|
|
90486
90690
|
isInputError: false,
|
|
90487
90691
|
// 新建配置名称是否不合法
|
|
90692
|
+
cachedVisibleFields: [],
|
|
90693
|
+
// 缓存显示字段
|
|
90694
|
+
cachedSortFields: [],
|
|
90695
|
+
// 缓存排序字段
|
|
90696
|
+
shouldRefreshSort: false,
|
|
90697
|
+
// 控制排序组件刷新
|
|
90488
90698
|
fieldTabPanels: [{
|
|
90489
90699
|
name: 'visible',
|
|
90490
90700
|
label: this.$t('显示字段')
|
|
@@ -90563,7 +90773,7 @@ var FIELD_CONFIG_FILENAME_PREFIX = 'log-field-';
|
|
|
90563
90773
|
totalLength += 1;
|
|
90564
90774
|
}
|
|
90565
90775
|
});
|
|
90566
|
-
return totalLength - this.
|
|
90776
|
+
return totalLength - this.cachedSortFields.length;
|
|
90567
90777
|
},
|
|
90568
90778
|
filedSettingConfigID: function filedSettingConfigID() {
|
|
90569
90779
|
// 当前索引集的显示字段ID
|
|
@@ -90582,7 +90792,7 @@ var FIELD_CONFIG_FILENAME_PREFIX = 'log-field-';
|
|
|
90582
90792
|
},
|
|
90583
90793
|
currentSortList: function currentSortList() {
|
|
90584
90794
|
var _this$$refs;
|
|
90585
|
-
return ((_this$$refs = this.$refs) === null || _this$$refs === void 0 || (_this$$refs = _this$$refs.tableSortRef) === null || _this$$refs === void 0 ? void 0 : _this$$refs.shadowSort) || this.
|
|
90795
|
+
return ((_this$$refs = this.$refs) === null || _this$$refs === void 0 || (_this$$refs = _this$$refs.tableSortRef) === null || _this$$refs === void 0 ? void 0 : _this$$refs.shadowSort) || this.cachedSortFields;
|
|
90586
90796
|
},
|
|
90587
90797
|
currentVisibleList: function currentVisibleList() {
|
|
90588
90798
|
var _this$$refs2, _this$shadowVisible;
|
|
@@ -90626,17 +90836,23 @@ var FIELD_CONFIG_FILENAME_PREFIX = 'log-field-';
|
|
|
90626
90836
|
while (1) switch (_context.prev = _context.next) {
|
|
90627
90837
|
case 0:
|
|
90628
90838
|
if (_this4.isTemplateConfig) {
|
|
90629
|
-
_context.next =
|
|
90839
|
+
_context.next = 5;
|
|
90630
90840
|
break;
|
|
90631
90841
|
}
|
|
90632
90842
|
_this4.initShadowFields(_this4.localVisibleFields);
|
|
90843
|
+
// 在数据初始化后缓存,使用深拷贝
|
|
90844
|
+
_this4.cachedVisibleFields = JSON.parse(JSON.stringify(_this4.shadowVisible));
|
|
90845
|
+
_this4.cachedSortFields = JSON.parse(JSON.stringify(_this4.shadowSort));
|
|
90633
90846
|
return _context.abrupt("return");
|
|
90634
|
-
case 3:
|
|
90635
|
-
_context.next = 5;
|
|
90636
|
-
return _this4.getFiledConfigList();
|
|
90637
90847
|
case 5:
|
|
90848
|
+
_context.next = 7;
|
|
90849
|
+
return _this4.getFiledConfigList();
|
|
90850
|
+
case 7:
|
|
90638
90851
|
_this4.initShadowFields();
|
|
90639
|
-
|
|
90852
|
+
// 在数据初始化后缓存,使用深拷贝
|
|
90853
|
+
_this4.cachedVisibleFields = JSON.parse(JSON.stringify(_this4.shadowVisible));
|
|
90854
|
+
_this4.cachedSortFields = JSON.parse(JSON.stringify(_this4.shadowSort));
|
|
90855
|
+
case 10:
|
|
90640
90856
|
case "end":
|
|
90641
90857
|
return _context.stop();
|
|
90642
90858
|
}
|
|
@@ -90651,7 +90867,7 @@ var FIELD_CONFIG_FILENAME_PREFIX = 'log-field-';
|
|
|
90651
90867
|
return regenerator_default().wrap(function _callee2$(_context2) {
|
|
90652
90868
|
while (1) switch (_context2.prev = _context2.next) {
|
|
90653
90869
|
case 0:
|
|
90654
|
-
currentSortList = ((_this5$$refs = _this5.$refs) === null || _this5$$refs === void 0 || (_this5$$refs = _this5$$refs.tableSortRef) === null || _this5$$refs === void 0 ? void 0 : _this5$$refs.shadowSort) || _this5.
|
|
90870
|
+
currentSortList = ((_this5$$refs = _this5.$refs) === null || _this5$$refs === void 0 || (_this5$$refs = _this5$$refs.tableSortRef) === null || _this5$$refs === void 0 ? void 0 : _this5$$refs.shadowSort) || _this5.cachedSortFields;
|
|
90655
90871
|
currentVisibleList = _this5.$refs.fieldSettingRef.shadowVisible.map(function (item) {
|
|
90656
90872
|
return item.field_name;
|
|
90657
90873
|
});
|
|
@@ -90731,7 +90947,7 @@ var FIELD_CONFIG_FILENAME_PREFIX = 'log-field-';
|
|
|
90731
90947
|
index_set_ids: _this6.unionIndexList,
|
|
90732
90948
|
index_set_type: _this6.isUnionSearch ? 'union' : 'single',
|
|
90733
90949
|
display_fields: _this6.shadowVisible,
|
|
90734
|
-
sort_list: _this6.
|
|
90950
|
+
sort_list: _this6.cachedSortFields,
|
|
90735
90951
|
config_id: configID
|
|
90736
90952
|
}
|
|
90737
90953
|
})["catch"](function (e) {
|
|
@@ -90745,6 +90961,13 @@ var FIELD_CONFIG_FILENAME_PREFIX = 'log-field-';
|
|
|
90745
90961
|
}))();
|
|
90746
90962
|
},
|
|
90747
90963
|
cancelModifyFields: function cancelModifyFields() {
|
|
90964
|
+
// 取消时恢复缓存数据,使用深拷贝
|
|
90965
|
+
if (!this.isTemplateConfig) {
|
|
90966
|
+
// 只更新父组件的数据,子组件会通过 props 自动更新
|
|
90967
|
+
this.shadowVisible = JSON.parse(JSON.stringify(this.cachedVisibleFields));
|
|
90968
|
+
// this.shadowSort = JSON.parse(JSON.stringify(this.cachedSortFields));
|
|
90969
|
+
this.cachedSortFields = JSON.parse(JSON.stringify(this.shadowSort));
|
|
90970
|
+
}
|
|
90748
90971
|
this.$emit('cancel');
|
|
90749
90972
|
this.isSortFieldChanged = false;
|
|
90750
90973
|
},
|
|
@@ -91040,11 +91263,11 @@ var FIELD_CONFIG_FILENAME_PREFIX = 'log-field-';
|
|
|
91040
91263
|
|
|
91041
91264
|
var fields_setting_component = normalizeComponent(
|
|
91042
91265
|
update_fields_settingvue_type_script_lang_js,
|
|
91043
|
-
|
|
91044
|
-
|
|
91266
|
+
fields_settingvue_type_template_id_1fbf20ca_scoped_true_render,
|
|
91267
|
+
fields_settingvue_type_template_id_1fbf20ca_scoped_true_staticRenderFns,
|
|
91045
91268
|
false,
|
|
91046
91269
|
null,
|
|
91047
|
-
"
|
|
91270
|
+
"1fbf20ca",
|
|
91048
91271
|
null
|
|
91049
91272
|
|
|
91050
91273
|
)
|
|
@@ -97586,6 +97809,28 @@ TimeFormatterSwitcher = __decorate([vue_class_component_esm], TimeFormatterSwitc
|
|
|
97586
97809
|
"style": 'padding: 8px 0;'
|
|
97587
97810
|
}, ["1. \u70B9\u51FB\u5DE6\u4E0A\u89D2\u91CD\u65B0\u9009\u62E9\u7D22\u5F15\u96C6"]), (0,vue_esm.h)("div", ["2. \u8BF7\u68C0\u67E5\u9876\u90E8 URL \u4E2D\u7684ID \u662F\u5426\u6B63\u786E\u3002", (0,vue_esm.h)("br"), "\u53C2\u8003\u683C\u5F0F\uFF1A https://domain.com/#/retrieve/", (0,vue_esm.h)("mark", ["82600?"])])])])]);
|
|
97588
97811
|
}
|
|
97812
|
+
if (props.type === 'index-set-field-not-found') {
|
|
97813
|
+
return (0,vue_esm.h)("bk-exception", {
|
|
97814
|
+
"style": 'margin-top: 100px;',
|
|
97815
|
+
"class": 'exception-wrap-item exception-part',
|
|
97816
|
+
"attrs": {
|
|
97817
|
+
"scene": 'part',
|
|
97818
|
+
"type": '500'
|
|
97819
|
+
}
|
|
97820
|
+
}, [(0,vue_esm.h)("div", {
|
|
97821
|
+
"style": 'text-align: left; color: #313238;'
|
|
97822
|
+
}, [(0,vue_esm.h)("div", {
|
|
97823
|
+
"style": 'font-size: 14px; padding: 8px 0;'
|
|
97824
|
+
}, [`索引集字段列表查询失败,刷新页面尝试重新查询 `, (0,vue_esm.h)("span", {
|
|
97825
|
+
"style": {
|
|
97826
|
+
cursor: 'pointer',
|
|
97827
|
+
color: '#3a84ff'
|
|
97828
|
+
},
|
|
97829
|
+
"on": {
|
|
97830
|
+
"click": () => window.location.reload()
|
|
97831
|
+
}
|
|
97832
|
+
}, ["\u5237\u65B0"])])])]);
|
|
97833
|
+
}
|
|
97589
97834
|
if (props.type === 'error') {
|
|
97590
97835
|
return (0,vue_esm.h)("bk-exception", {
|
|
97591
97836
|
"style": 'margin-top: 100px;',
|
|
@@ -98564,6 +98809,9 @@ TimeFormatterSwitcher = __decorate([vue_class_component_esm], TimeFormatterSwitc
|
|
|
98564
98809
|
if (/^index-set-not-found/.test(exceptionMsg.value)) {
|
|
98565
98810
|
return 'index-set-not-found';
|
|
98566
98811
|
}
|
|
98812
|
+
if (/^index-set-field-not-found/.test(exceptionMsg.value)) {
|
|
98813
|
+
return 'index-set-field-not-found';
|
|
98814
|
+
}
|
|
98567
98815
|
return exceptionMsg.value.length ? 'error' : 'empty';
|
|
98568
98816
|
}
|
|
98569
98817
|
return 'hidden';
|
|
@@ -99610,7 +99858,9 @@ const SearchResultTab = () => null;
|
|
|
99610
99858
|
let triggerTrend = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
99611
99859
|
debounceUpdateTabValue(tab);
|
|
99612
99860
|
if (triggerTrend) {
|
|
99613
|
-
|
|
99861
|
+
setTimeout(() => {
|
|
99862
|
+
retrieve_helper.fire(retrieve_events.TREND_GRAPH_SEARCH);
|
|
99863
|
+
}, 300);
|
|
99614
99864
|
}
|
|
99615
99865
|
};
|
|
99616
99866
|
retrieve_helper.on(retrieve_events.FAVORITE_ACTIVE_CHANGE, item => {
|
|
@@ -100062,6 +100312,9 @@ var sub_barvue_type_template_id_74d2d0b1_staticRenderFns = [];
|
|
|
100062
100312
|
const propValueStrList = (0,vue_esm.computed)(() => props.value.map(id => `${id}`));
|
|
100063
100313
|
const valueList = (0,vue_esm.computed)(() => props.list.filter(item => propValueStrList.value.includes(`${item.index_set_id}`)));
|
|
100064
100314
|
const formatList = (0,vue_esm.computed)(() => {
|
|
100315
|
+
const filterFn = node => {
|
|
100316
|
+
return ['index_set_name', 'index_set_id', 'bk_biz_id', 'collector_config_id'].some(key => `${node[key]}`.indexOf(searchText.value) !== -1 || (node.indices ?? []).some(idc => `${idc.result_table_id}`.indexOf(searchText.value) !== -1));
|
|
100317
|
+
};
|
|
100065
100318
|
// 检查节点是否应该显示
|
|
100066
100319
|
const checkNodeShouldShow = function (node) {
|
|
100067
100320
|
let defaultIsShown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
@@ -100085,7 +100338,7 @@ var sub_barvue_type_template_id_74d2d0b1_staticRenderFns = [];
|
|
|
100085
100338
|
}
|
|
100086
100339
|
// 继续判定检索匹配是否满足匹配条件
|
|
100087
100340
|
if (searchText.value.length > 0) {
|
|
100088
|
-
is_shown_node = node
|
|
100341
|
+
is_shown_node = filterFn(node);
|
|
100089
100342
|
}
|
|
100090
100343
|
return is_shown_node;
|
|
100091
100344
|
};
|
|
@@ -102199,7 +102452,7 @@ window.__IS_MONITOR_APM__ = false;
|
|
|
102199
102452
|
|
|
102200
102453
|
if (!window.mainComponent?.$t) {
|
|
102201
102454
|
window.mainComponent = {
|
|
102202
|
-
$t: language_i18n.t,
|
|
102455
|
+
$t: language_i18n.t.bind(language_i18n),
|
|
102203
102456
|
$i18n: language_i18n
|
|
102204
102457
|
};
|
|
102205
102458
|
}
|