@blueking/monitor-trace-log 2.0.13 → 2.0.15

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/main.js CHANGED
@@ -41442,6 +41442,17 @@ __webpack_require__.d(custom_namespaceObject, {
41442
41442
  setCustom: () => (setCustom)
41443
41443
  });
41444
41444
 
41445
+ // NAMESPACE OBJECT: ./src/services/client-log.ts
41446
+ var client_log_namespaceObject = {};
41447
+ __webpack_require__.r(client_log_namespaceObject);
41448
+ __webpack_require__.d(client_log_namespaceObject, {
41449
+ getClientInfo: () => (getClientInfo),
41450
+ getOpenidList: () => (getOpenidList),
41451
+ getTaskList: () => (getTaskList),
41452
+ getTaskStatus: () => (getTaskStatus),
41453
+ syncTask: () => (syncTask)
41454
+ });
41455
+
41445
41456
  // NAMESPACE OBJECT: ./src/services/docs.js
41446
41457
  var docs_namespaceObject = {};
41447
41458
  __webpack_require__.r(docs_namespaceObject);
@@ -41467,7 +41478,7 @@ __webpack_require__.d(extract_namespaceObject, {
41467
41478
  getExtractLinkList: () => (getExtractLinkList),
41468
41479
  getIpListDisplayName: () => (getIpListDisplayName),
41469
41480
  getTaskDetail: () => (getTaskDetail),
41470
- getTaskList: () => (getTaskList),
41481
+ getTaskList: () => (extract_getTaskList),
41471
41482
  getTopoIpList: () => (getTopoIpList),
41472
41483
  pollingTaskStatus: () => (pollingTaskStatus),
41473
41484
  queryHostIdInfos: () => (queryHostIdInfos),
@@ -41522,6 +41533,18 @@ __webpack_require__.d(graph_analysis_namespaceObject, {
41522
41533
  searchSQL: () => (searchSQL)
41523
41534
  });
41524
41535
 
41536
+ // NAMESPACE OBJECT: ./src/services/grok.js
41537
+ var grok_namespaceObject = {};
41538
+ __webpack_require__.r(grok_namespaceObject);
41539
+ __webpack_require__.d(grok_namespaceObject, {
41540
+ createGrok: () => (createGrok),
41541
+ debugGrok: () => (debugGrok),
41542
+ deleteGrok: () => (deleteGrok),
41543
+ getGrokList: () => (getGrokList),
41544
+ getUpdatedByList: () => (getUpdatedByList),
41545
+ updateGrok: () => (updateGrok)
41546
+ });
41547
+
41525
41548
  // NAMESPACE OBJECT: ./src/services/indexSet.js
41526
41549
  var indexSet_namespaceObject = {};
41527
41550
  __webpack_require__.r(indexSet_namespaceObject);
@@ -45678,7 +45701,36 @@ const updateTimezone = newTz => {
45678
45701
  前往日志检索: 'Go to Log Search',
45679
45702
  整体趋势: 'Overall Trend',
45680
45703
  相关样本: 'Related Samples',
45681
- '当前选中日志暂无trace字段,请检查日志内容': 'The currently selected log has no trace field. Please check the log content'
45704
+ '当前选中日志暂无trace字段,请检查日志内容': 'The currently selected log has no trace field. Please check the log content',
45705
+ '未找到与 "{keyword}" 匹配的用户或任务': 'No user or task matching "{keyword}" was found',
45706
+ 请检查任务ID和用户ID是否输入错误: 'Please check if the task ID and user ID are entered incorrectly',
45707
+ '平台默认保存 90 天的任务记录,请检查 ID 是否过期': 'The platform keeps task records for 90 days by default, please check if the ID has expired',
45708
+ '若检查均无问题,请联系': 'If no issues are found after checking, please contact',
45709
+ 蓝鲸助手: 'BlueKing Assistant',
45710
+ 未找到匹配的用户或任务: 'No matching user or task found',
45711
+ '暂未采集,无法获取日志': 'No collection, unable to obtain logs',
45712
+ '正在采集目标日志文件,预计2-3分钟': 'Collecting target log file, estimated 2-3 minutes',
45713
+ '日志采集失败,请重新采集': 'Log collection failed, please collect again',
45714
+ '搜索 名称、描述、更新人、定义': 'Search by name, description, updater, or definition',
45715
+ 内置Grok模式不可编辑: 'Built-in Grok patterns are not editable',
45716
+ 内置Grok模式不可删除: 'Built-in Grok patterns cannot be deleted',
45717
+ '新建 Grok 模式': 'New Grok pattern',
45718
+ '编辑 Grok 模式': 'Edit Grok pattern',
45719
+ 选填: 'Optional',
45720
+ 'Grok 定义(可引用其他模式)': 'Grok definition (can reference other patterns)',
45721
+ 例如: 'For example:',
45722
+ '当前Grok名称为{n},确认要删除?': 'The current Grok name is {n}. Are you sure you want to delete it?',
45723
+ 'Grok 模式更新成功': 'Grok pattern updated successfully',
45724
+ 'Grok 模式删除成功': 'Grok pattern deleted successfully',
45725
+ 'Grok 模式创建成功': 'Grok pattern created successfully',
45726
+ 请输入需要调试的样例: 'Please enter the sample you need to debug',
45727
+ '请先完成调试,方可提交': 'Please complete the debugging process before submitting',
45728
+ 调试成功: 'Debugging successful',
45729
+ 调试失败: 'Debugging failed',
45730
+ '内容有变更,请重新调试': 'The content has changed; please reconfigure the settings',
45731
+ 没有更多数据: 'No more data',
45732
+ 'Grok 模式': 'Grok pattern',
45733
+ '当检测到 %{PATTERN} 就按 Grok 处理,否则按传统正则': 'When %{PATTERN} is detected, process it with Grok; otherwise, process it with traditional regular expressions'
45682
45734
  });
45683
45735
  ;// ./src/language/lang/en/label.ts
45684
45736
  /*
@@ -46637,12 +46689,27 @@ const updateTimezone = newTz => {
46637
46689
  系统类型: 'System type',
46638
46690
  上传状态: 'Upload status',
46639
46691
  未上传: 'Not uploaded',
46692
+ 定义: 'Definition',
46640
46693
  英文名称: 'English name',
46641
46694
  '搜索名称、英文名称、地址、创建人': 'Search by name, English name, address, or creator',
46642
46695
  集群英文名称: 'Cluster English Name',
46643
46696
  '最大自定义天数为{n}': 'Maximum custom days is {n}',
46644
46697
  选中值: 'Selected Value',
46645
- 整体: 'Overall'
46698
+ 整体: 'Overall',
46699
+ 用户: 'User',
46700
+ 设备型号: 'Device Model',
46701
+ 最近活跃: 'Last Active',
46702
+ 累计上报: 'Total Uploads',
46703
+ 检索时间范围下: 'within retrieval time range',
46704
+ 任务列表: 'Task List',
46705
+ 日志详情: 'Log Details',
46706
+ 立即采集: 'Collect Now',
46707
+ 已采集: 'Collected',
46708
+ 未采集: 'Not Collected',
46709
+ 采集中: 'Collecting',
46710
+ 采集失败: 'Collection Failed',
46711
+ 根目录: 'Root Directory',
46712
+ 输入样例: 'Input example'
46646
46713
  });
46647
46714
  ;// ./src/language/lang/en/route.ts
46648
46715
  /*
@@ -46675,6 +46742,7 @@ const updateTimezone = newTz => {
46675
46742
  归档: 'Archive',
46676
46743
  提取: 'Extract',
46677
46744
  检索: 'Explore',
46745
+ 客户端日志: 'Client Log',
46678
46746
  清洗: 'Parsing',
46679
46747
  集群: 'Cluster',
46680
46748
  设置: 'Settings',
@@ -54605,6 +54673,10 @@ const MENU_LISTS = [{
54605
54673
  name: language_i18n.t('检索'),
54606
54674
  id: 'retrieve',
54607
54675
  level: 1
54676
+ }, {
54677
+ name: language_i18n.t('客户端日志'),
54678
+ id: 'client-log-search',
54679
+ level: 1
54608
54680
  }, {
54609
54681
  name: language_i18n.t('仪表盘'),
54610
54682
  id: 'dashboard',
@@ -57205,6 +57277,58 @@ var setCustom = {
57205
57277
  method: 'post'
57206
57278
  };
57207
57279
 
57280
+ ;// ./src/services/client-log.ts
57281
+ /*
57282
+ * Tencent is pleased to support the open source community by making
57283
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
57284
+ *
57285
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
57286
+ *
57287
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
57288
+ *
57289
+ * License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
57290
+ *
57291
+ * ---------------------------------------------------
57292
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
57293
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
57294
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
57295
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
57296
+ *
57297
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
57298
+ * the Software.
57299
+ *
57300
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
57301
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57302
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
57303
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
57304
+ * IN THE SOFTWARE.
57305
+ */
57306
+ /** 获取 openid 列表 */
57307
+ const getOpenidList = {
57308
+ url: '/tgpa/openid_list/',
57309
+ method: 'get'
57310
+ };
57311
+ /** 获取任务列表 */
57312
+ const getTaskList = {
57313
+ url: '/tgpa/task_list/',
57314
+ method: 'get'
57315
+ };
57316
+ /** 获取用户信息 */
57317
+ const getClientInfo = {
57318
+ url: '/tgpa/client_info/',
57319
+ method: 'get'
57320
+ };
57321
+ /** 任务采集 */
57322
+ const syncTask = {
57323
+ url: '/tgpa/task/sync/',
57324
+ method: 'post'
57325
+ };
57326
+ /** 任务状态查询 */
57327
+ const getTaskStatus = {
57328
+ url: '/tgpa/task/status/',
57329
+ method: 'post'
57330
+ };
57331
+
57208
57332
  ;// ./src/services/docs.js
57209
57333
  /*
57210
57334
  * Tencent is pleased to support the open source community by making
@@ -57296,7 +57420,7 @@ var getTest = {
57296
57420
  * IN THE SOFTWARE.
57297
57421
  */
57298
57422
 
57299
- var getTaskList = {
57423
+ var extract_getTaskList = {
57300
57424
  url: '/log_extract/tasks/',
57301
57425
  method: 'get'
57302
57426
  };
@@ -57627,6 +57751,69 @@ var asyncDownload = {
57627
57751
  method: 'post'
57628
57752
  };
57629
57753
 
57754
+ ;// ./src/services/grok.js
57755
+ /*
57756
+ * Tencent is pleased to support the open source community by making
57757
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
57758
+ *
57759
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
57760
+ *
57761
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
57762
+ *
57763
+ * License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
57764
+ *
57765
+ * ---------------------------------------------------
57766
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
57767
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
57768
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
57769
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
57770
+ *
57771
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
57772
+ * the Software.
57773
+ *
57774
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
57775
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57776
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
57777
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
57778
+ * IN THE SOFTWARE.
57779
+ */
57780
+
57781
+ // 获取Grok列表
57782
+ var getGrokList = {
57783
+ url: '/databus/grok/',
57784
+ method: 'get'
57785
+ };
57786
+
57787
+ // 创建Grok
57788
+ var createGrok = {
57789
+ url: '/databus/grok/',
57790
+ method: 'post'
57791
+ };
57792
+
57793
+ // 更新Grok
57794
+ var updateGrok = {
57795
+ url: '/databus/grok/:id/',
57796
+ method: 'put'
57797
+ };
57798
+
57799
+ // 删除Grok
57800
+ var deleteGrok = {
57801
+ url: '/databus/grok/:id/',
57802
+ method: 'delete'
57803
+ };
57804
+
57805
+ // 获取更新人列表
57806
+ var getUpdatedByList = {
57807
+ url: '/databus/grok/updated_by_list/',
57808
+ method: 'get'
57809
+ };
57810
+
57811
+ // Grok调试
57812
+ var debugGrok = {
57813
+ url: '/databus/grok/debug/',
57814
+ method: 'post'
57815
+ };
57816
+
57630
57817
  ;// ./src/services/indexSet.js
57631
57818
  /*
57632
57819
  * Tencent is pleased to support the open source community by making
@@ -59346,6 +59533,8 @@ var save_to_dashboard = {
59346
59533
 
59347
59534
 
59348
59535
 
59536
+
59537
+
59349
59538
 
59350
59539
 
59351
59540
 
@@ -59401,8 +59590,10 @@ var frontendEventReport = {
59401
59590
  unionSearch: union_search_namespaceObject,
59402
59591
  newReport: new_report_namespaceObject,
59403
59592
  graphAnalysis: graph_analysis_namespaceObject,
59593
+ grok: grok_namespaceObject,
59404
59594
  alertStrategy: alert_strategy_namespaceObject,
59405
- dashboard: dashboard_namespaceObject
59595
+ dashboard: dashboard_namespaceObject,
59596
+ clientLog: client_log_namespaceObject
59406
59597
  });
59407
59598
  ;// ./node_modules/@blueking/login-modal/dist/login-modal.js
59408
59599
  let i = !1, n = null, s = -1, login_modal_t = null;
@@ -64543,7 +64734,7 @@ var lineColor = (/* unused pure expression or super */ null && (['#A3C5FD',
64543
64734
  },
64544
64735
  actions: {}
64545
64736
  });
64546
- ;// ./src/store/helper.ts
64737
+ ;// ./src/hooks/use-feature-toggle.ts
64547
64738
  /*
64548
64739
  * Tencent is pleased to support the open source community by making
64549
64740
  * 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
@@ -64569,18 +64760,76 @@ var lineColor = (/* unused pure expression or super */ null && (['#A3C5FD',
64569
64760
  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
64570
64761
  * IN THE SOFTWARE.
64571
64762
  */
64572
-
64573
- const isFeatureToggleOn = (key, value) => {
64574
- const featureToggle = window.FEATURE_TOGGLE?.[key];
64575
- if (featureToggle === 'debug') {
64576
- const whiteList = (window.FEATURE_TOGGLE_WHITE_LIST?.[key] ?? []).map(id => `${id}`);
64577
- if (Array.isArray(value)) {
64578
- return value.some(v => whiteList.includes(v));
64763
+ const normalizeFeatureToggleList = list => {
64764
+ return (list ?? []).map(id => `${id}`);
64765
+ };
64766
+ const normalizeFeatureToggleValues = value => {
64767
+ if (Array.isArray(value)) {
64768
+ return value.map(id => `${id}`);
64769
+ }
64770
+ if (value === undefined || value === null) {
64771
+ return [];
64772
+ }
64773
+ return [`${value}`];
64774
+ };
64775
+ const isHitList = (list, values) => {
64776
+ return values.length > 0 && values.some(value => list.includes(value));
64777
+ };
64778
+ const getFeatureToggleStatus = key => {
64779
+ return window.FEATURE_TOGGLE?.[key];
64780
+ };
64781
+ const isFeatureToggleOn = function (key, value) {
64782
+ let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
64783
+ const status = getFeatureToggleStatus(key);
64784
+ const values = normalizeFeatureToggleValues(value);
64785
+ const whiteList = normalizeFeatureToggleList(window.FEATURE_TOGGLE_WHITE_LIST?.[key]);
64786
+ const blackList = normalizeFeatureToggleList(window.FEATURE_TOGGLE_BLACK_LIST?.[key]);
64787
+ if (status === 'on') {
64788
+ return true;
64789
+ }
64790
+ if (status === 'off') {
64791
+ return false;
64792
+ }
64793
+ if (status === 'debug') {
64794
+ if (whiteList.length > 0) {
64795
+ return isHitList(whiteList, values);
64579
64796
  }
64580
- return whiteList.includes(value);
64797
+ if (blackList.length > 0) {
64798
+ return !isHitList(blackList, values);
64799
+ }
64800
+ return false;
64581
64801
  }
64582
- return featureToggle === 'on';
64802
+ return options.defaultEnabled ?? false;
64583
64803
  };
64804
+ ;// ./src/store/helper.ts
64805
+ /*
64806
+ * Tencent is pleased to support the open source community by making
64807
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
64808
+ *
64809
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
64810
+ *
64811
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
64812
+ *
64813
+ * License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
64814
+ *
64815
+ * ---------------------------------------------------
64816
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
64817
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
64818
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
64819
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
64820
+ *
64821
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
64822
+ * the Software.
64823
+ *
64824
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
64825
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
64826
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
64827
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
64828
+ * IN THE SOFTWARE.
64829
+ */
64830
+
64831
+
64832
+
64584
64833
  const SESSION_STORAGE_KEY = 'CommonFilterAddition';
64585
64834
  const isAiAssistantActive = val => {
64586
64835
  return isFeatureToggleOn('ai_assistant', val);
@@ -65676,7 +65925,7 @@ var store_store = new vuex_esm.Store({
65676
65925
  },
65677
65926
  /** 脱敏灰度判断 */
65678
65927
  isShowMaskingTemplate: function isShowMaskingTemplate(state) {
65679
- return state.maskingToggle.toggleString === 'on' || state.maskingToggle.toggleList.includes(Number(state.bkBizId));
65928
+ return isFeatureToggleOn('log_desensitize', state.bkBizId);
65680
65929
  },
65681
65930
  isLimitExpandView: function isLimitExpandView(state) {
65682
65931
  return state.storage[store_type_BK_LOG_STORAGE.IS_LIMIT_EXPAND_VIEW];
@@ -68002,6 +68251,75 @@ function throttle(func, wait, options) {
68002
68251
 
68003
68252
  /* harmony default export */ const lodash_es_throttle = (throttle);
68004
68253
 
68254
+ ;// ./src/utils/decode.ts
68255
+ /*
68256
+ * Tencent is pleased to support the open source community by making
68257
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
68258
+ *
68259
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
68260
+ *
68261
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
68262
+ *
68263
+ * License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
68264
+ *
68265
+ * ---------------------------------------------------
68266
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
68267
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
68268
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
68269
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
68270
+ *
68271
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
68272
+ * the Software.
68273
+ *
68274
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
68275
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
68276
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
68277
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
68278
+ * IN THE SOFTWARE.
68279
+ */
68280
+
68281
+ // base64转规则列表
68282
+ function base64ToRuleList(str) {
68283
+ if (!str) {
68284
+ return [];
68285
+ }
68286
+ try {
68287
+ const ruleList = JSON.parse(base64Decode(str));
68288
+ const ruleNewList = ruleList.reduce((pre, cur, index) => {
68289
+ const itemObj = {};
68290
+ const matchVal = cur.match(/:(.*)/);
68291
+ const key = cur.substring(0, matchVal.index);
68292
+ itemObj[key] = matchVal[1];
68293
+ itemObj.__Index__ = index;
68294
+ pre.push(itemObj);
68295
+ return pre;
68296
+ }, []);
68297
+ return ruleNewList;
68298
+ } catch {
68299
+ return [];
68300
+ }
68301
+ }
68302
+ ;// ./src/utils/url.ts
68303
+ /** 读取当前 URL 中的全部 query(兼容 hash 路由与 location.search) */
68304
+ const getLocationQueryParams = () => {
68305
+ const query = {};
68306
+ const merge = source => {
68307
+ if (!source) {
68308
+ return;
68309
+ }
68310
+ const search = source.startsWith('?') ? source : `?${source}`;
68311
+ new URLSearchParams(search).forEach((value, key) => {
68312
+ query[key] = value;
68313
+ });
68314
+ };
68315
+ merge(window.location.search);
68316
+ const hashQuery = window.location.hash.includes('?') ? window.location.hash.split('?').slice(1).join('?') : '';
68317
+ merge(hashQuery);
68318
+ return query;
68319
+ };
68320
+ ;// ./src/utils/index.ts
68321
+
68322
+
68005
68323
  ;// ./src/global/utils/path.ts
68006
68324
  // 实现 path.join 功能, 组合为一个合法路径, 并且去掉重复的 /
68007
68325
  // 例如: a/, /b/ -> a/b
@@ -70306,6 +70624,7 @@ var RouteQueryTab;
70306
70624
 
70307
70625
 
70308
70626
 
70627
+
70309
70628
  var STORAGE_KEY;
70310
70629
  (function (STORAGE_KEY) {
70311
70630
  // eslint-disable-next-line no-unused-vars
@@ -70419,13 +70738,27 @@ class RetrieveHelper extends base {
70419
70738
  }
70420
70739
  /**
70421
70740
  * 更新索引集id
70422
- * @param id window.__IS_MONITOR_COMPONENT__
70741
+ * @param id
70423
70742
  */
70424
70743
  setIndexsetId(idList, type) {
70425
70744
  let fireEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
70426
70745
  // 监控下的关联日志需要再浏览器本地记住最近一次使用的索引集
70427
70746
  if (window.__IS_MONITOR_COMPONENT__) {
70428
- localStorage.setItem('MONITOR_LOG_RECENT_INDEX_SET_ID', JSON.stringify(idList));
70747
+ const query = getLocationQueryParams();
70748
+ const bizAppKey = `${query.bizId} ${query['filter-app_name']}`;
70749
+ let memoryObj = {};
70750
+ const storageStr = localStorage.getItem('MONITOR_LOG_RECENT_INDEX_SET_ID');
70751
+ if (storageStr) {
70752
+ // 兼容旧的代码,后期可以去除
70753
+ const parseValue = JSON.parse(storageStr);
70754
+ if (!Array.isArray(parseValue)) {
70755
+ memoryObj = parseValue;
70756
+ }
70757
+ }
70758
+ Object.assign(memoryObj, {
70759
+ [bizAppKey]: idList
70760
+ });
70761
+ localStorage.setItem('MONITOR_LOG_RECENT_INDEX_SET_ID', JSON.stringify(memoryObj));
70429
70762
  }
70430
70763
  this.indexSetIdList = idList;
70431
70764
  this.indexSetType = type;
@@ -174723,8 +175056,8 @@ var search_result_panelvue_type_template_id_06235de0_render = function render()
174723
175056
  };
174724
175057
  var search_result_panelvue_type_template_id_06235de0_staticRenderFns = [];
174725
175058
 
174726
- ;// ./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=8c9135ae&scoped=true
174727
- var no_index_setvue_type_template_id_8c9135ae_scoped_true_render = function render() {
175059
+ ;// ./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
175060
+ var no_index_setvue_type_template_id_76cff062_scoped_true_render = function render() {
174728
175061
  var _vm = this,
174729
175062
  _c = _vm._self._c;
174730
175063
  return _c('div', {
@@ -174765,13 +175098,14 @@ var no_index_setvue_type_template_id_8c9135ae_scoped_true_render = function rend
174765
175098
  staticClass: "side-tip"
174766
175099
  }, [_vm._v("\n " + _vm._s(_vm.$t('请联系业务运维配索引集')) + "\n ")])]);
174767
175100
  };
174768
- var no_index_setvue_type_template_id_8c9135ae_scoped_true_staticRenderFns = [];
175101
+ var no_index_setvue_type_template_id_76cff062_scoped_true_staticRenderFns = [];
174769
175102
 
174770
175103
  ;// ./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/result-comp/no-index-set.vue?vue&type=script&lang=js
174771
175104
 
174772
175105
  function no_index_setvue_type_script_lang_js_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
174773
175106
  function no_index_setvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? no_index_setvue_type_script_lang_js_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : no_index_setvue_type_script_lang_js_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
174774
175107
 
175108
+
174775
175109
  /* harmony default export */ const no_index_setvue_type_script_lang_js = ({
174776
175110
  computed: no_index_setvue_type_script_lang_js_objectSpread({}, mapGetters({
174777
175111
  space: 'space'
@@ -174786,7 +175120,7 @@ function no_index_setvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r
174786
175120
  });
174787
175121
  },
174788
175122
  goToCreateCollection: function goToCreateCollection() {
174789
- if (window.FEATURE_TOGGLE.scenario_log === 'on') {
175123
+ if (isFeatureToggleOn('scenario_log', [String(this.$store.state.bkBizId), String(this.$store.state.spaceUid)])) {
174790
175124
  this.$router.push({
174791
175125
  path: '/manage/log-collection',
174792
175126
  query: {
@@ -174812,11 +175146,11 @@ function no_index_setvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r
174812
175146
 
174813
175147
  var no_index_set_component = normalizeComponent(
174814
175148
  result_comp_no_index_setvue_type_script_lang_js,
174815
- no_index_setvue_type_template_id_8c9135ae_scoped_true_render,
174816
- no_index_setvue_type_template_id_8c9135ae_scoped_true_staticRenderFns,
175149
+ no_index_setvue_type_template_id_76cff062_scoped_true_render,
175150
+ no_index_setvue_type_template_id_76cff062_scoped_true_staticRenderFns,
174817
175151
  false,
174818
175152
  null,
174819
- "8c9135ae",
175153
+ "76cff062",
174820
175154
  null
174821
175155
 
174822
175156
  )
@@ -182874,8 +183208,8 @@ var fields_config_component = normalizeComponent(
182874
183208
  )
182875
183209
 
182876
183210
  /* harmony default export */ const fields_config = (fields_config_component.exports);
182877
- ;// ./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/components/log-view/index.vue?vue&type=template&id=00538cfa
182878
- var log_viewvue_type_template_id_00538cfa_render = function render() {
183211
+ ;// ./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/components/log-view/index.vue?vue&type=template&id=d23869f4
183212
+ var log_viewvue_type_template_id_d23869f4_render = function render() {
182879
183213
  var _vm = this,
182880
183214
  _c = _vm._self._c;
182881
183215
  return _c('section', {
@@ -182935,7 +183269,7 @@ var log_viewvue_type_template_id_00538cfa_render = function render() {
182935
183269
  }), _vm._v("\n ")], 1);
182936
183270
  }), _vm._v("\n ")], 2)]);
182937
183271
  };
182938
- var log_viewvue_type_template_id_00538cfa_staticRenderFns = [];
183272
+ var log_viewvue_type_template_id_d23869f4_staticRenderFns = [];
182939
183273
 
182940
183274
  ;// ./src/components/log-view/highlight-html.js
182941
183275
 
@@ -183163,8 +183497,10 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183163
183497
  }
183164
183498
  },
183165
183499
  filterKey: {
183166
- type: String,
183167
- "default": ""
183500
+ type: [String, Array],
183501
+ "default": function _default() {
183502
+ return [];
183503
+ }
183168
183504
  },
183169
183505
  isRealTimeLog: {
183170
183506
  type: Boolean,
@@ -183223,14 +183559,20 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183223
183559
  isIncludeFilter: function isIncludeFilter() {
183224
183560
  return this.filterType === "include";
183225
183561
  },
183562
+ normalizedFilterKey: function normalizedFilterKey() {
183563
+ if (Array.isArray(this.filterKey)) return this.filterKey;
183564
+ return this.filterKey ? [this.filterKey] : [];
183565
+ },
183226
183566
  getViewLightList: function getViewLightList() {
183227
183567
  var _this = this;
183228
183568
  var list = [];
183229
- if (this.filterKey) {
183230
- list.push({
183231
- str: this.filterKey,
183232
- style: "color: #FF5656; font-size: 12px; font-weight: 700;",
183233
- isUnique: true
183569
+ if (this.normalizedFilterKey.length && this.isIncludeFilter) {
183570
+ this.normalizedFilterKey.forEach(function (key) {
183571
+ list.push({
183572
+ str: key,
183573
+ style: "color: #FF5656; font-size: 12px; font-weight: 700;",
183574
+ isUnique: true
183575
+ });
183234
183576
  });
183235
183577
  }
183236
183578
  list.push.apply(list, toConsumableArray_toConsumableArray(this.lightList.map(function (item) {
@@ -183268,12 +183610,13 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183268
183610
  }
183269
183611
  },
183270
183612
  escapedReverseLogList: function escapedReverseLogList() {
183271
- if (this.filterKey.length) {
183613
+ if (this.normalizedFilterKey.length) {
183272
183614
  this.setResRange();
183273
183615
  }
183274
183616
  },
183275
183617
  filterKey: function filterKey(val) {
183276
- if (val.length) {
183618
+ var normalized = Array.isArray(val) ? val : val ? [val] : [];
183619
+ if (normalized.length) {
183277
183620
  this.setResRange();
183278
183621
  } else {
183279
183622
  this.reverseResRangeIndexs.splice(0, this.reverseResRangeIndexs.length);
@@ -183286,7 +183629,7 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183286
183629
  var _this3 = this;
183287
183630
  clearTimeout(this.intervalTime);
183288
183631
  this.intervalTime = setTimeout(function () {
183289
- if (_this3.filterKey.length) {
183632
+ if (_this3.normalizedFilterKey.length) {
183290
183633
  _this3.setResRange();
183291
183634
  }
183292
183635
  }, 500);
@@ -183298,21 +183641,25 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183298
183641
  },
183299
183642
  methods: {
183300
183643
  checkLineShow: function checkLineShow(item, index, field) {
183644
+ if (!this.normalizedFilterKey.length) return true;
183301
183645
  if (this.isIncludeFilter) {
183302
- var list = field === "reverse" ? this.reverseResRangeIndexs : this.resRangeIndexs;
183646
+ var list = field === 'reverse' ? this.reverseResRangeIndexs : this.resRangeIndexs;
183303
183647
  return this.handleMatch(item) || list.includes(index);
183304
183648
  }
183305
- return this.filterKey.length ? !this.handleMatch(item) : true;
183649
+ return !this.handleMatch(item);
183306
183650
  },
183307
183651
  handleMatch: function handleMatch(item) {
183308
- var valStr = Object.values(item).join(" ");
183309
- var filterKey = this.filterKey;
183310
- var keyVal = this.ignoreCase ? valStr : valStr.toLowerCase();
183311
- filterKey = this.ignoreCase ? filterKey : filterKey.toLowerCase();
183312
- return keyVal.includes(filterKey);
183652
+ var _this4 = this;
183653
+ var valStr = Object.values(item).join(' ');
183654
+ if (!this.normalizedFilterKey.length) return false;
183655
+ return this.normalizedFilterKey.every(function (key) {
183656
+ var keyVal = _this4.ignoreCase ? valStr : valStr.toLowerCase();
183657
+ var filterKeyVal = _this4.ignoreCase ? key : key.toLowerCase();
183658
+ return keyVal.includes(filterKeyVal);
183659
+ });
183313
183660
  },
183314
183661
  lineMatch: function lineMatch(item) {
183315
- if (!this.filterKey) return false;
183662
+ if (!this.normalizedFilterKey.length) return false;
183316
183663
  return this.handleMatch(item) && Object.values(this.interval).some(Boolean);
183317
183664
  },
183318
183665
  escapeString: function escapeString(item) {
@@ -183334,7 +183681,7 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183334
183681
  return escapeObj;
183335
183682
  },
183336
183683
  setResRange: function setResRange() {
183337
- var _this4 = this;
183684
+ var _this5 = this;
183338
183685
  this.resRangeIndexs.splice(0, this.resRangeIndexs.length);
183339
183686
  this.reverseResRangeIndexs.splice(0, this.reverseResRangeIndexs.length);
183340
183687
  var reverListLen = this.escapedReverseLogList.length;
@@ -183344,28 +183691,28 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183344
183691
 
183345
183692
  // 根据前后行数缓存索引
183346
183693
  this.escapedReverseLogList.forEach(function (item, index) {
183347
- if (_this4.handleMatch(item)) {
183348
- var min = index - Number(_this4.interval.prev);
183349
- var max = index + Number(_this4.interval.next);
183694
+ if (_this5.handleMatch(item)) {
183695
+ var min = index - Number(_this5.interval.prev);
183696
+ var max = index + Number(_this5.interval.next);
183350
183697
  var minVal = min < 0 ? 0 : min;
183351
183698
  var maxVal = max >= reverListLen ? reverListLen - 1 : max;
183352
183699
  if (max >= reverListLen) resExtra = Math.abs(max - index);
183353
183700
  for (var i = minVal; i <= maxVal; i++) {
183354
- _this4.reverseResRangeIndexs.push(i);
183701
+ _this5.reverseResRangeIndexs.push(i);
183355
183702
  }
183356
183703
  }
183357
183704
  });
183358
183705
 
183359
183706
  // 根据前后行数缓存索引
183360
183707
  this.escapedLogList.forEach(function (item, index) {
183361
- if (_this4.handleMatch(item)) {
183362
- var min = index - Number(_this4.interval.prev);
183363
- var max = index + Number(_this4.interval.next);
183708
+ if (_this5.handleMatch(item)) {
183709
+ var min = index - Number(_this5.interval.prev);
183710
+ var max = index + Number(_this5.interval.next);
183364
183711
  var minVal = min < 0 ? 0 : min;
183365
183712
  var maxVal = max >= listLen ? listLen - 1 : max;
183366
183713
  if (min < 0) reverseResExtra = Math.abs(min);
183367
183714
  for (var i = minVal; i <= maxVal; i++) {
183368
- _this4.resRangeIndexs.push(i);
183715
+ _this5.resRangeIndexs.push(i);
183369
183716
  }
183370
183717
  }
183371
183718
  });
@@ -183403,8 +183750,8 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183403
183750
 
183404
183751
  var log_view_component = normalizeComponent(
183405
183752
  components_log_viewvue_type_script_lang_js,
183406
- log_viewvue_type_template_id_00538cfa_render,
183407
- log_viewvue_type_template_id_00538cfa_staticRenderFns,
183753
+ log_viewvue_type_template_id_d23869f4_render,
183754
+ log_viewvue_type_template_id_d23869f4_staticRenderFns,
183408
183755
  false,
183409
183756
  null,
183410
183757
  null,
@@ -183751,6 +184098,10 @@ var lodash = __webpack_require__(2543);
183751
184098
  lightList: {
183752
184099
  type: Array,
183753
184100
  default: () => []
184101
+ },
184102
+ containerSelector: {
184103
+ type: String,
184104
+ default: '.dialog-log-markdown'
183754
184105
  }
183755
184106
  },
183756
184107
  setup(props, _ref) {
@@ -183782,7 +184133,8 @@ var lodash = __webpack_require__(2543);
183782
184133
  highlightHtmlList = document.querySelectorAll('[data-index="light"]');
183783
184134
  lightSize.value = highlightHtmlList.length;
183784
184135
  if (lightSize.value) {
183785
- const markDom = document.querySelector('.dialog-log-markdown');
184136
+ const markDom = document.querySelector(props.containerSelector);
184137
+ if (!markDom) return;
183786
184138
  const markTop = markDom.getBoundingClientRect().top;
183787
184139
  let isFindShow = false;
183788
184140
  for (let index = 0; index < highlightHtmlList.length; index++) {
@@ -184012,8 +184364,8 @@ var lodash = __webpack_require__(2543);
184012
184364
  const highlightControlRef = (0,vue_esm.ref)(null);
184013
184365
  const tagInputRef = (0,vue_esm.ref)(null);
184014
184366
  const filterType = (0,vue_esm.ref)('include');
184015
- const filterKey = (0,vue_esm.ref)('');
184016
- const catchFilterKey = (0,vue_esm.ref)('');
184367
+ const filterKey = (0,vue_esm.ref)([]);
184368
+ const catchFilterKey = (0,vue_esm.ref)([]);
184017
184369
  const ignoreCase = (0,vue_esm.ref)(false);
184018
184370
  const highlightList = (0,vue_esm.ref)([]);
184019
184371
  const colorHighlightList = (0,vue_esm.ref)([]);
@@ -184057,11 +184409,11 @@ var lodash = __webpack_require__(2543);
184057
184409
  });
184058
184410
  const catchColorIndexList = (0,vue_esm.computed)(() => colorHighlightList.value.map(item => item.colorIndex));
184059
184411
  const filterLog = () => {
184060
- catchFilterKey.value = filterKey.value;
184412
+ catchFilterKey.value = [...filterKey.value];
184061
184413
  emit('handle-filter', 'filterKey', filterKey.value);
184062
184414
  };
184063
184415
  const blurFilterLog = () => {
184064
- if (!catchFilterKey.value && !filterKey.value) return;
184416
+ if (catchFilterKey.value.length === 0 && filterKey.value.length === 0) return;
184065
184417
  filterLog();
184066
184418
  };
184067
184419
  const changeLightList = () => {
@@ -184097,6 +184449,15 @@ var lodash = __webpack_require__(2543);
184097
184449
  emit('handle-filter', 'interval', state ? interval.value : baseInterval);
184098
184450
  };
184099
184451
  // 粘贴过滤条件
184452
+ const filterPasteFn = pasteValue => {
184453
+ const trimPasteValue = pasteValue.trim();
184454
+ if (!filterKey.value.includes(trimPasteValue)) {
184455
+ filterKey.value.push(trimPasteValue);
184456
+ filterLog();
184457
+ }
184458
+ return [];
184459
+ };
184460
+ // 粘贴高亮条件
184100
184461
  const pasteFn = pasteValue => {
184101
184462
  const trimPasteValue = pasteValue.trim();
184102
184463
  if (!highlightList.value.includes(trimPasteValue) && highlightList.value.length < 5) {
@@ -184149,7 +184510,7 @@ var lodash = __webpack_require__(2543);
184149
184510
  highlightList.value = [];
184150
184511
  interval.value = (0,lodash.cloneDeep)(baseInterval);
184151
184512
  ignoreCase.value = false;
184152
- filterKey.value = '';
184513
+ filterKey.value = [];
184153
184514
  showType.value = 'log';
184154
184515
  filterType.value = 'include';
184155
184516
  fieldConfigPopoverInstance?.hide();
@@ -184177,21 +184538,20 @@ var lodash = __webpack_require__(2543);
184177
184538
  "name": option.name
184178
184539
  },
184179
184540
  "key": index
184180
- }))]), (0,vue_esm.h)("bk-input", {
184541
+ }))]), (0,vue_esm.h)("bk-tag-input", {
184181
184542
  "class": 'filter-key-input',
184182
184543
  "attrs": {
184183
184544
  "placeholder": t('输入关键字进行过滤'),
184184
- "right-icon": 'bk-icon icon-search',
184185
184545
  "value": filterKey.value,
184186
- "clearable": true
184546
+ "allow-create": true,
184547
+ "has-delete-icon": true,
184548
+ "paste-fn": filterPasteFn
184187
184549
  },
184188
184550
  "on": {
184189
- "blur": blurFilterLog,
184190
184551
  "change": value => {
184191
184552
  filterKey.value = value;
184192
- },
184193
- "clear": filterLog,
184194
- "enter": filterLog
184553
+ filterLog();
184554
+ }
184195
184555
  }
184196
184556
  })]), (0,vue_esm.h)("div", {
184197
184557
  "class": 'highlight-main'
@@ -188001,7 +188361,7 @@ function cloneDeep(value) {
188001
188361
  const prevBegin = (0,vue_esm.ref)(0);
188002
188362
  const nextBegin = (0,vue_esm.ref)(0);
188003
188363
  const filterType = (0,vue_esm.ref)('include');
188004
- const activeFilterKey = (0,vue_esm.ref)('');
188364
+ const activeFilterKey = (0,vue_esm.ref)([]);
188005
188365
  const ignoreCase = (0,vue_esm.ref)(false);
188006
188366
  const showType = (0,vue_esm.ref)('log');
188007
188367
  const highlightList = (0,vue_esm.ref)([]);
@@ -188067,7 +188427,7 @@ function cloneDeep(value) {
188067
188427
  next: 0
188068
188428
  };
188069
188429
  ignoreCase.value = false;
188070
- activeFilterKey.value = '';
188430
+ activeFilterKey.value = [];
188071
188431
  showType.value = 'log';
188072
188432
  filterType.value = 'include';
188073
188433
  initLogValues();
@@ -188309,7 +188669,7 @@ function cloneDeep(value) {
188309
188669
  activeFilterKey.value = value;
188310
188670
  clearTimeout(throttleTimer);
188311
188671
  throttleTimer = setTimeout(() => {
188312
- if (!value) {
188672
+ if (!value.length) {
188313
188673
  (0,vue_esm.nextTick)(() => {
188314
188674
  initLogScrollPosition();
188315
188675
  });
@@ -188513,7 +188873,7 @@ function cloneDeep(value) {
188513
188873
  const prevBegin = (0,vue_esm.ref)(0);
188514
188874
  const nextBegin = (0,vue_esm.ref)(0);
188515
188875
  const filterType = (0,vue_esm.ref)('include');
188516
- const activeFilterKey = (0,vue_esm.ref)('');
188876
+ const activeFilterKey = (0,vue_esm.ref)([]);
188517
188877
  const ignoreCase = (0,vue_esm.ref)(false);
188518
188878
  const showType = (0,vue_esm.ref)('log');
188519
188879
  const highlightList = (0,vue_esm.ref)([]);
@@ -188583,7 +188943,7 @@ function cloneDeep(value) {
188583
188943
  next: 0
188584
188944
  };
188585
188945
  ignoreCase.value = false;
188586
- activeFilterKey.value = '';
188946
+ activeFilterKey.value = [];
188587
188947
  showType.value = 'log';
188588
188948
  filterType.value = 'include';
188589
188949
  initLogValues();
@@ -188743,7 +189103,7 @@ function cloneDeep(value) {
188743
189103
  activeFilterKey.value = value;
188744
189104
  clearTimeout(throttleTimer);
188745
189105
  throttleTimer = setTimeout(() => {
188746
- if (!value) {
189106
+ if (!value.length) {
188747
189107
  (0,vue_esm.nextTick)(() => {
188748
189108
  initLogScrollPosition();
188749
189109
  });
@@ -224453,56 +224813,6 @@ const getRuleMessage = rule => {
224453
224813
  }, [t('取消')])])])]);
224454
224814
  }
224455
224815
  }));
224456
- ;// ./src/utils/decode.ts
224457
- /*
224458
- * Tencent is pleased to support the open source community by making
224459
- * 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
224460
- *
224461
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
224462
- *
224463
- * 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
224464
- *
224465
- * License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
224466
- *
224467
- * ---------------------------------------------------
224468
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
224469
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
224470
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
224471
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
224472
- *
224473
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
224474
- * the Software.
224475
- *
224476
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
224477
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
224478
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
224479
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
224480
- * IN THE SOFTWARE.
224481
- */
224482
-
224483
- // base64转规则列表
224484
- function base64ToRuleList(str) {
224485
- if (!str) {
224486
- return [];
224487
- }
224488
- try {
224489
- const ruleList = JSON.parse(base64Decode(str));
224490
- const ruleNewList = ruleList.reduce((pre, cur, index) => {
224491
- const itemObj = {};
224492
- const matchVal = cur.match(/:(.*)/);
224493
- const key = cur.substring(0, matchVal.index);
224494
- itemObj[key] = matchVal[1];
224495
- itemObj.__Index__ = index;
224496
- pre.push(itemObj);
224497
- return pre;
224498
- }, []);
224499
- return ruleNewList;
224500
- } catch {
224501
- return [];
224502
- }
224503
- }
224504
- ;// ./src/utils/index.ts
224505
-
224506
224816
  ;// ./src/views/retrieve-v3/search-result/log-clustering/log-table/content-table/cluster-popover/regex-match/index.tsx
224507
224817
  /*
224508
224818
  * Tencent is pleased to support the open source community by making
@@ -229624,8 +229934,8 @@ const SearchResultTab = () => null;
229624
229934
  }), renderTabContent()]);
229625
229935
  }
229626
229936
  }));
229627
- ;// ./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=2a8cbac2
229628
- var sub_barvue_type_template_id_2a8cbac2_render = function render() {
229937
+ ;// ./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=08eba3c6
229938
+ var sub_barvue_type_template_id_08eba3c6_render = function render() {
229629
229939
  var _vm = this,
229630
229940
  _c = _vm._self._c,
229631
229941
  _setup = _vm._self._setupProxy;
@@ -229705,7 +230015,7 @@ var sub_barvue_type_template_id_2a8cbac2_render = function render() {
229705
230015
  }
229706
230016
  })], 1) : _vm._e()]);
229707
230017
  };
229708
- var sub_barvue_type_template_id_2a8cbac2_staticRenderFns = [];
230018
+ var sub_barvue_type_template_id_08eba3c6_staticRenderFns = [];
229709
230019
 
229710
230020
  ;// ./src/components/ellipsis-tag-list/index.tsx
229711
230021
  /*
@@ -231837,14 +232147,7 @@ var AutoRefresh = function AutoRefresh() {
231837
232147
  /**
231838
232148
  * 根据当前索引ID和pid生成唯一ID
231839
232149
  */
231840
- // window.__IS_MONITOR_COMPONENT__ = true;
231841
232150
  var indexSetUid = (0,vue_esm.computed)(function () {
231842
- // if (window.__IS_MONITOR_COMPONENT__) {
231843
- // const dataValidItem = indexSetList.value.find((item) => item.tags.every((tag) => tag.tag_id !== 4));
231844
- // if (dataValidItem) {
231845
- // return [`#_${dataValidItem.index_set_id}`];
231846
- // }
231847
- // }
231848
232151
  return indexSetValue.value.map(function (v, index) {
231849
232152
  var _indexSetPid$value$in;
231850
232153
  return "".concat((_indexSetPid$value$in = indexSetPid.value[index]) !== null && _indexSetPid$value$in !== void 0 ? _indexSetPid$value$in : '#', "_").concat(v);
@@ -232175,8 +232478,8 @@ var AutoRefresh = function AutoRefresh() {
232175
232478
 
232176
232479
  var sub_bar_component = normalizeComponent(
232177
232480
  retrieve_v2_sub_barvue_type_script_setup_true_lang_js,
232178
- sub_barvue_type_template_id_2a8cbac2_render,
232179
- sub_barvue_type_template_id_2a8cbac2_staticRenderFns,
232481
+ sub_barvue_type_template_id_08eba3c6_render,
232482
+ sub_barvue_type_template_id_08eba3c6_staticRenderFns,
232180
232483
  false,
232181
232484
  null,
232182
232485
  null,
@@ -232283,6 +232586,7 @@ var sub_bar_component = normalizeComponent(
232283
232586
 
232284
232587
 
232285
232588
 
232589
+
232286
232590
  /* harmony default export */ const use_monitor_app_init = (indexSetApi => {
232287
232591
  const store = use_store();
232288
232592
  const router = useRouter();
@@ -232400,22 +232704,37 @@ var sub_bar_component = normalizeComponent(
232400
232704
  if (!resp?.length) {
232401
232705
  return;
232402
232706
  }
232403
- // 如果当前地址参数没有indexSetId,先读取本地 MONITOR_LOG_RECENT_INDEX_SET_IDS,有的话设置
232707
+ // 如果当前地址参数没有indexSetId,先读取本地 MONITOR_LOG_RECENT_INDEX_SET_ID,有的话设置
232404
232708
  // 本地如果没有 MONITOR_LOG_RECENT_INDEX_SET_IDS,则默认取第一个有数据的索引集
232405
232709
  // 同时,更新索引信息到store中
232406
232710
  if (!indexSetIdList.value.length) {
232407
- const memoryIdStr = localStorage.getItem('MONITOR_LOG_RECENT_INDEX_SET_ID');
232711
+ const query = getLocationQueryParams();
232712
+ const bizAppKey = `${query.bizId} ${query['filter-app_name']}`;
232713
+ const memoryStr = localStorage.getItem('MONITOR_LOG_RECENT_INDEX_SET_ID');
232408
232714
  let defaultId = '';
232409
- if (memoryIdStr) {
232410
- const memoryId = JSON.parse(memoryIdStr)[0];
232411
- const defaultValidItem = resp.find(item => item.index_set_id === memoryId);
232412
- if (defaultValidItem) {
232413
- defaultId = memoryId;
232715
+ if (memoryStr) {
232716
+ const parseValue = JSON.parse(memoryStr);
232717
+ // 兼容旧的代码,后期可以去除
232718
+ if (!Array.isArray(parseValue)) {
232719
+ const memoryObj = parseValue;
232720
+ const memoryIds = memoryObj[bizAppKey];
232721
+ if (memoryIds) {
232722
+ const memoryId = memoryIds[0];
232723
+ const defaultValidItem = resp.find(item => item.index_set_id === memoryId && item.tags.every(tag => tag.tag_id !== 4));
232724
+ if (defaultValidItem) {
232725
+ defaultId = memoryId;
232726
+ }
232727
+ }
232414
232728
  }
232415
232729
  }
232416
232730
  if (!defaultId) {
232417
232731
  const dataValidItem = resp.find(item => item.tags.every(tag => tag.tag_id !== 4));
232418
- defaultId = `${dataValidItem.index_set_id}`;
232732
+ if (dataValidItem) {
232733
+ defaultId = `${dataValidItem.index_set_id}`;
232734
+ } else {
232735
+ // 也可能存在只有无数据的采集项,这种情况取第一个即可
232736
+ defaultId = `${resp[0].index_set_id}`;
232737
+ }
232419
232738
  }
232420
232739
  store.commit('updateIndexItem', {
232421
232740
  ids: [defaultId],