@blueking/monitor-trace-log 2.0.12 → 2.0.14

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,16 +70738,23 @@ 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
- console.log('window.__IS_MONITOR_COMPONENT__ = ', window.__IS_MONITOR_COMPONENT__);
70427
- console.log('setIndexsetId !!!', idList, type, fireEvent);
70428
70745
  // 监控下的关联日志需要再浏览器本地记住最近一次使用的索引集
70429
70746
  if (window.__IS_MONITOR_COMPONENT__) {
70430
- console.log('设置到本地');
70431
- 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
+ memoryObj = JSON.parse(storageStr);
70753
+ }
70754
+ Object.assign(memoryObj, {
70755
+ [bizAppKey]: idList
70756
+ });
70757
+ localStorage.setItem('MONITOR_LOG_RECENT_INDEX_SET_ID', JSON.stringify(memoryObj));
70432
70758
  }
70433
70759
  this.indexSetIdList = idList;
70434
70760
  this.indexSetType = type;
@@ -174726,8 +175052,8 @@ var search_result_panelvue_type_template_id_06235de0_render = function render()
174726
175052
  };
174727
175053
  var search_result_panelvue_type_template_id_06235de0_staticRenderFns = [];
174728
175054
 
174729
- ;// ./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
174730
- var no_index_setvue_type_template_id_8c9135ae_scoped_true_render = function render() {
175055
+ ;// ./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
175056
+ var no_index_setvue_type_template_id_76cff062_scoped_true_render = function render() {
174731
175057
  var _vm = this,
174732
175058
  _c = _vm._self._c;
174733
175059
  return _c('div', {
@@ -174768,13 +175094,14 @@ var no_index_setvue_type_template_id_8c9135ae_scoped_true_render = function rend
174768
175094
  staticClass: "side-tip"
174769
175095
  }, [_vm._v("\n " + _vm._s(_vm.$t('请联系业务运维配索引集')) + "\n ")])]);
174770
175096
  };
174771
- var no_index_setvue_type_template_id_8c9135ae_scoped_true_staticRenderFns = [];
175097
+ var no_index_setvue_type_template_id_76cff062_scoped_true_staticRenderFns = [];
174772
175098
 
174773
175099
  ;// ./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
174774
175100
 
174775
175101
  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; }
174776
175102
  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; }
174777
175103
 
175104
+
174778
175105
  /* harmony default export */ const no_index_setvue_type_script_lang_js = ({
174779
175106
  computed: no_index_setvue_type_script_lang_js_objectSpread({}, mapGetters({
174780
175107
  space: 'space'
@@ -174789,7 +175116,7 @@ function no_index_setvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r
174789
175116
  });
174790
175117
  },
174791
175118
  goToCreateCollection: function goToCreateCollection() {
174792
- if (window.FEATURE_TOGGLE.scenario_log === 'on') {
175119
+ if (isFeatureToggleOn('scenario_log', [String(this.$store.state.bkBizId), String(this.$store.state.spaceUid)])) {
174793
175120
  this.$router.push({
174794
175121
  path: '/manage/log-collection',
174795
175122
  query: {
@@ -174815,11 +175142,11 @@ function no_index_setvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r
174815
175142
 
174816
175143
  var no_index_set_component = normalizeComponent(
174817
175144
  result_comp_no_index_setvue_type_script_lang_js,
174818
- no_index_setvue_type_template_id_8c9135ae_scoped_true_render,
174819
- no_index_setvue_type_template_id_8c9135ae_scoped_true_staticRenderFns,
175145
+ no_index_setvue_type_template_id_76cff062_scoped_true_render,
175146
+ no_index_setvue_type_template_id_76cff062_scoped_true_staticRenderFns,
174820
175147
  false,
174821
175148
  null,
174822
- "8c9135ae",
175149
+ "76cff062",
174823
175150
  null
174824
175151
 
174825
175152
  )
@@ -182877,8 +183204,8 @@ var fields_config_component = normalizeComponent(
182877
183204
  )
182878
183205
 
182879
183206
  /* harmony default export */ const fields_config = (fields_config_component.exports);
182880
- ;// ./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
182881
- var log_viewvue_type_template_id_00538cfa_render = function render() {
183207
+ ;// ./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
183208
+ var log_viewvue_type_template_id_d23869f4_render = function render() {
182882
183209
  var _vm = this,
182883
183210
  _c = _vm._self._c;
182884
183211
  return _c('section', {
@@ -182938,7 +183265,7 @@ var log_viewvue_type_template_id_00538cfa_render = function render() {
182938
183265
  }), _vm._v("\n ")], 1);
182939
183266
  }), _vm._v("\n ")], 2)]);
182940
183267
  };
182941
- var log_viewvue_type_template_id_00538cfa_staticRenderFns = [];
183268
+ var log_viewvue_type_template_id_d23869f4_staticRenderFns = [];
182942
183269
 
182943
183270
  ;// ./src/components/log-view/highlight-html.js
182944
183271
 
@@ -183166,8 +183493,10 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183166
183493
  }
183167
183494
  },
183168
183495
  filterKey: {
183169
- type: String,
183170
- "default": ""
183496
+ type: [String, Array],
183497
+ "default": function _default() {
183498
+ return [];
183499
+ }
183171
183500
  },
183172
183501
  isRealTimeLog: {
183173
183502
  type: Boolean,
@@ -183226,14 +183555,20 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183226
183555
  isIncludeFilter: function isIncludeFilter() {
183227
183556
  return this.filterType === "include";
183228
183557
  },
183558
+ normalizedFilterKey: function normalizedFilterKey() {
183559
+ if (Array.isArray(this.filterKey)) return this.filterKey;
183560
+ return this.filterKey ? [this.filterKey] : [];
183561
+ },
183229
183562
  getViewLightList: function getViewLightList() {
183230
183563
  var _this = this;
183231
183564
  var list = [];
183232
- if (this.filterKey) {
183233
- list.push({
183234
- str: this.filterKey,
183235
- style: "color: #FF5656; font-size: 12px; font-weight: 700;",
183236
- isUnique: true
183565
+ if (this.normalizedFilterKey.length && this.isIncludeFilter) {
183566
+ this.normalizedFilterKey.forEach(function (key) {
183567
+ list.push({
183568
+ str: key,
183569
+ style: "color: #FF5656; font-size: 12px; font-weight: 700;",
183570
+ isUnique: true
183571
+ });
183237
183572
  });
183238
183573
  }
183239
183574
  list.push.apply(list, toConsumableArray_toConsumableArray(this.lightList.map(function (item) {
@@ -183271,12 +183606,13 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183271
183606
  }
183272
183607
  },
183273
183608
  escapedReverseLogList: function escapedReverseLogList() {
183274
- if (this.filterKey.length) {
183609
+ if (this.normalizedFilterKey.length) {
183275
183610
  this.setResRange();
183276
183611
  }
183277
183612
  },
183278
183613
  filterKey: function filterKey(val) {
183279
- if (val.length) {
183614
+ var normalized = Array.isArray(val) ? val : val ? [val] : [];
183615
+ if (normalized.length) {
183280
183616
  this.setResRange();
183281
183617
  } else {
183282
183618
  this.reverseResRangeIndexs.splice(0, this.reverseResRangeIndexs.length);
@@ -183289,7 +183625,7 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183289
183625
  var _this3 = this;
183290
183626
  clearTimeout(this.intervalTime);
183291
183627
  this.intervalTime = setTimeout(function () {
183292
- if (_this3.filterKey.length) {
183628
+ if (_this3.normalizedFilterKey.length) {
183293
183629
  _this3.setResRange();
183294
183630
  }
183295
183631
  }, 500);
@@ -183301,21 +183637,25 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183301
183637
  },
183302
183638
  methods: {
183303
183639
  checkLineShow: function checkLineShow(item, index, field) {
183640
+ if (!this.normalizedFilterKey.length) return true;
183304
183641
  if (this.isIncludeFilter) {
183305
- var list = field === "reverse" ? this.reverseResRangeIndexs : this.resRangeIndexs;
183642
+ var list = field === 'reverse' ? this.reverseResRangeIndexs : this.resRangeIndexs;
183306
183643
  return this.handleMatch(item) || list.includes(index);
183307
183644
  }
183308
- return this.filterKey.length ? !this.handleMatch(item) : true;
183645
+ return !this.handleMatch(item);
183309
183646
  },
183310
183647
  handleMatch: function handleMatch(item) {
183311
- var valStr = Object.values(item).join(" ");
183312
- var filterKey = this.filterKey;
183313
- var keyVal = this.ignoreCase ? valStr : valStr.toLowerCase();
183314
- filterKey = this.ignoreCase ? filterKey : filterKey.toLowerCase();
183315
- return keyVal.includes(filterKey);
183648
+ var _this4 = this;
183649
+ var valStr = Object.values(item).join(' ');
183650
+ if (!this.normalizedFilterKey.length) return false;
183651
+ return this.normalizedFilterKey.every(function (key) {
183652
+ var keyVal = _this4.ignoreCase ? valStr : valStr.toLowerCase();
183653
+ var filterKeyVal = _this4.ignoreCase ? key : key.toLowerCase();
183654
+ return keyVal.includes(filterKeyVal);
183655
+ });
183316
183656
  },
183317
183657
  lineMatch: function lineMatch(item) {
183318
- if (!this.filterKey) return false;
183658
+ if (!this.normalizedFilterKey.length) return false;
183319
183659
  return this.handleMatch(item) && Object.values(this.interval).some(Boolean);
183320
183660
  },
183321
183661
  escapeString: function escapeString(item) {
@@ -183337,7 +183677,7 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183337
183677
  return escapeObj;
183338
183678
  },
183339
183679
  setResRange: function setResRange() {
183340
- var _this4 = this;
183680
+ var _this5 = this;
183341
183681
  this.resRangeIndexs.splice(0, this.resRangeIndexs.length);
183342
183682
  this.reverseResRangeIndexs.splice(0, this.reverseResRangeIndexs.length);
183343
183683
  var reverListLen = this.escapedReverseLogList.length;
@@ -183347,28 +183687,28 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183347
183687
 
183348
183688
  // 根据前后行数缓存索引
183349
183689
  this.escapedReverseLogList.forEach(function (item, index) {
183350
- if (_this4.handleMatch(item)) {
183351
- var min = index - Number(_this4.interval.prev);
183352
- var max = index + Number(_this4.interval.next);
183690
+ if (_this5.handleMatch(item)) {
183691
+ var min = index - Number(_this5.interval.prev);
183692
+ var max = index + Number(_this5.interval.next);
183353
183693
  var minVal = min < 0 ? 0 : min;
183354
183694
  var maxVal = max >= reverListLen ? reverListLen - 1 : max;
183355
183695
  if (max >= reverListLen) resExtra = Math.abs(max - index);
183356
183696
  for (var i = minVal; i <= maxVal; i++) {
183357
- _this4.reverseResRangeIndexs.push(i);
183697
+ _this5.reverseResRangeIndexs.push(i);
183358
183698
  }
183359
183699
  }
183360
183700
  });
183361
183701
 
183362
183702
  // 根据前后行数缓存索引
183363
183703
  this.escapedLogList.forEach(function (item, index) {
183364
- if (_this4.handleMatch(item)) {
183365
- var min = index - Number(_this4.interval.prev);
183366
- var max = index + Number(_this4.interval.next);
183704
+ if (_this5.handleMatch(item)) {
183705
+ var min = index - Number(_this5.interval.prev);
183706
+ var max = index + Number(_this5.interval.next);
183367
183707
  var minVal = min < 0 ? 0 : min;
183368
183708
  var maxVal = max >= listLen ? listLen - 1 : max;
183369
183709
  if (min < 0) reverseResExtra = Math.abs(min);
183370
183710
  for (var i = minVal; i <= maxVal; i++) {
183371
- _this4.resRangeIndexs.push(i);
183711
+ _this5.resRangeIndexs.push(i);
183372
183712
  }
183373
183713
  }
183374
183714
  });
@@ -183406,8 +183746,8 @@ function highlight_html_arrayLikeToArray(r, a) { (null == a || a > r.length) &&
183406
183746
 
183407
183747
  var log_view_component = normalizeComponent(
183408
183748
  components_log_viewvue_type_script_lang_js,
183409
- log_viewvue_type_template_id_00538cfa_render,
183410
- log_viewvue_type_template_id_00538cfa_staticRenderFns,
183749
+ log_viewvue_type_template_id_d23869f4_render,
183750
+ log_viewvue_type_template_id_d23869f4_staticRenderFns,
183411
183751
  false,
183412
183752
  null,
183413
183753
  null,
@@ -183754,6 +184094,10 @@ var lodash = __webpack_require__(2543);
183754
184094
  lightList: {
183755
184095
  type: Array,
183756
184096
  default: () => []
184097
+ },
184098
+ containerSelector: {
184099
+ type: String,
184100
+ default: '.dialog-log-markdown'
183757
184101
  }
183758
184102
  },
183759
184103
  setup(props, _ref) {
@@ -183785,7 +184129,8 @@ var lodash = __webpack_require__(2543);
183785
184129
  highlightHtmlList = document.querySelectorAll('[data-index="light"]');
183786
184130
  lightSize.value = highlightHtmlList.length;
183787
184131
  if (lightSize.value) {
183788
- const markDom = document.querySelector('.dialog-log-markdown');
184132
+ const markDom = document.querySelector(props.containerSelector);
184133
+ if (!markDom) return;
183789
184134
  const markTop = markDom.getBoundingClientRect().top;
183790
184135
  let isFindShow = false;
183791
184136
  for (let index = 0; index < highlightHtmlList.length; index++) {
@@ -184015,8 +184360,8 @@ var lodash = __webpack_require__(2543);
184015
184360
  const highlightControlRef = (0,vue_esm.ref)(null);
184016
184361
  const tagInputRef = (0,vue_esm.ref)(null);
184017
184362
  const filterType = (0,vue_esm.ref)('include');
184018
- const filterKey = (0,vue_esm.ref)('');
184019
- const catchFilterKey = (0,vue_esm.ref)('');
184363
+ const filterKey = (0,vue_esm.ref)([]);
184364
+ const catchFilterKey = (0,vue_esm.ref)([]);
184020
184365
  const ignoreCase = (0,vue_esm.ref)(false);
184021
184366
  const highlightList = (0,vue_esm.ref)([]);
184022
184367
  const colorHighlightList = (0,vue_esm.ref)([]);
@@ -184060,11 +184405,11 @@ var lodash = __webpack_require__(2543);
184060
184405
  });
184061
184406
  const catchColorIndexList = (0,vue_esm.computed)(() => colorHighlightList.value.map(item => item.colorIndex));
184062
184407
  const filterLog = () => {
184063
- catchFilterKey.value = filterKey.value;
184408
+ catchFilterKey.value = [...filterKey.value];
184064
184409
  emit('handle-filter', 'filterKey', filterKey.value);
184065
184410
  };
184066
184411
  const blurFilterLog = () => {
184067
- if (!catchFilterKey.value && !filterKey.value) return;
184412
+ if (catchFilterKey.value.length === 0 && filterKey.value.length === 0) return;
184068
184413
  filterLog();
184069
184414
  };
184070
184415
  const changeLightList = () => {
@@ -184100,6 +184445,15 @@ var lodash = __webpack_require__(2543);
184100
184445
  emit('handle-filter', 'interval', state ? interval.value : baseInterval);
184101
184446
  };
184102
184447
  // 粘贴过滤条件
184448
+ const filterPasteFn = pasteValue => {
184449
+ const trimPasteValue = pasteValue.trim();
184450
+ if (!filterKey.value.includes(trimPasteValue)) {
184451
+ filterKey.value.push(trimPasteValue);
184452
+ filterLog();
184453
+ }
184454
+ return [];
184455
+ };
184456
+ // 粘贴高亮条件
184103
184457
  const pasteFn = pasteValue => {
184104
184458
  const trimPasteValue = pasteValue.trim();
184105
184459
  if (!highlightList.value.includes(trimPasteValue) && highlightList.value.length < 5) {
@@ -184152,7 +184506,7 @@ var lodash = __webpack_require__(2543);
184152
184506
  highlightList.value = [];
184153
184507
  interval.value = (0,lodash.cloneDeep)(baseInterval);
184154
184508
  ignoreCase.value = false;
184155
- filterKey.value = '';
184509
+ filterKey.value = [];
184156
184510
  showType.value = 'log';
184157
184511
  filterType.value = 'include';
184158
184512
  fieldConfigPopoverInstance?.hide();
@@ -184180,21 +184534,20 @@ var lodash = __webpack_require__(2543);
184180
184534
  "name": option.name
184181
184535
  },
184182
184536
  "key": index
184183
- }))]), (0,vue_esm.h)("bk-input", {
184537
+ }))]), (0,vue_esm.h)("bk-tag-input", {
184184
184538
  "class": 'filter-key-input',
184185
184539
  "attrs": {
184186
184540
  "placeholder": t('输入关键字进行过滤'),
184187
- "right-icon": 'bk-icon icon-search',
184188
184541
  "value": filterKey.value,
184189
- "clearable": true
184542
+ "allow-create": true,
184543
+ "has-delete-icon": true,
184544
+ "paste-fn": filterPasteFn
184190
184545
  },
184191
184546
  "on": {
184192
- "blur": blurFilterLog,
184193
184547
  "change": value => {
184194
184548
  filterKey.value = value;
184195
- },
184196
- "clear": filterLog,
184197
- "enter": filterLog
184549
+ filterLog();
184550
+ }
184198
184551
  }
184199
184552
  })]), (0,vue_esm.h)("div", {
184200
184553
  "class": 'highlight-main'
@@ -188004,7 +188357,7 @@ function cloneDeep(value) {
188004
188357
  const prevBegin = (0,vue_esm.ref)(0);
188005
188358
  const nextBegin = (0,vue_esm.ref)(0);
188006
188359
  const filterType = (0,vue_esm.ref)('include');
188007
- const activeFilterKey = (0,vue_esm.ref)('');
188360
+ const activeFilterKey = (0,vue_esm.ref)([]);
188008
188361
  const ignoreCase = (0,vue_esm.ref)(false);
188009
188362
  const showType = (0,vue_esm.ref)('log');
188010
188363
  const highlightList = (0,vue_esm.ref)([]);
@@ -188070,7 +188423,7 @@ function cloneDeep(value) {
188070
188423
  next: 0
188071
188424
  };
188072
188425
  ignoreCase.value = false;
188073
- activeFilterKey.value = '';
188426
+ activeFilterKey.value = [];
188074
188427
  showType.value = 'log';
188075
188428
  filterType.value = 'include';
188076
188429
  initLogValues();
@@ -188312,7 +188665,7 @@ function cloneDeep(value) {
188312
188665
  activeFilterKey.value = value;
188313
188666
  clearTimeout(throttleTimer);
188314
188667
  throttleTimer = setTimeout(() => {
188315
- if (!value) {
188668
+ if (!value.length) {
188316
188669
  (0,vue_esm.nextTick)(() => {
188317
188670
  initLogScrollPosition();
188318
188671
  });
@@ -188516,7 +188869,7 @@ function cloneDeep(value) {
188516
188869
  const prevBegin = (0,vue_esm.ref)(0);
188517
188870
  const nextBegin = (0,vue_esm.ref)(0);
188518
188871
  const filterType = (0,vue_esm.ref)('include');
188519
- const activeFilterKey = (0,vue_esm.ref)('');
188872
+ const activeFilterKey = (0,vue_esm.ref)([]);
188520
188873
  const ignoreCase = (0,vue_esm.ref)(false);
188521
188874
  const showType = (0,vue_esm.ref)('log');
188522
188875
  const highlightList = (0,vue_esm.ref)([]);
@@ -188586,7 +188939,7 @@ function cloneDeep(value) {
188586
188939
  next: 0
188587
188940
  };
188588
188941
  ignoreCase.value = false;
188589
- activeFilterKey.value = '';
188942
+ activeFilterKey.value = [];
188590
188943
  showType.value = 'log';
188591
188944
  filterType.value = 'include';
188592
188945
  initLogValues();
@@ -188746,7 +189099,7 @@ function cloneDeep(value) {
188746
189099
  activeFilterKey.value = value;
188747
189100
  clearTimeout(throttleTimer);
188748
189101
  throttleTimer = setTimeout(() => {
188749
- if (!value) {
189102
+ if (!value.length) {
188750
189103
  (0,vue_esm.nextTick)(() => {
188751
189104
  initLogScrollPosition();
188752
189105
  });
@@ -224456,56 +224809,6 @@ const getRuleMessage = rule => {
224456
224809
  }, [t('取消')])])])]);
224457
224810
  }
224458
224811
  }));
224459
- ;// ./src/utils/decode.ts
224460
- /*
224461
- * Tencent is pleased to support the open source community by making
224462
- * 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
224463
- *
224464
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
224465
- *
224466
- * 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
224467
- *
224468
- * License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
224469
- *
224470
- * ---------------------------------------------------
224471
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
224472
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
224473
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
224474
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
224475
- *
224476
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
224477
- * the Software.
224478
- *
224479
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
224480
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
224481
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
224482
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
224483
- * IN THE SOFTWARE.
224484
- */
224485
-
224486
- // base64转规则列表
224487
- function base64ToRuleList(str) {
224488
- if (!str) {
224489
- return [];
224490
- }
224491
- try {
224492
- const ruleList = JSON.parse(base64Decode(str));
224493
- const ruleNewList = ruleList.reduce((pre, cur, index) => {
224494
- const itemObj = {};
224495
- const matchVal = cur.match(/:(.*)/);
224496
- const key = cur.substring(0, matchVal.index);
224497
- itemObj[key] = matchVal[1];
224498
- itemObj.__Index__ = index;
224499
- pre.push(itemObj);
224500
- return pre;
224501
- }, []);
224502
- return ruleNewList;
224503
- } catch {
224504
- return [];
224505
- }
224506
- }
224507
- ;// ./src/utils/index.ts
224508
-
224509
224812
  ;// ./src/views/retrieve-v3/search-result/log-clustering/log-table/content-table/cluster-popover/regex-match/index.tsx
224510
224813
  /*
224511
224814
  * Tencent is pleased to support the open source community by making
@@ -229627,8 +229930,8 @@ const SearchResultTab = () => null;
229627
229930
  }), renderTabContent()]);
229628
229931
  }
229629
229932
  }));
229630
- ;// ./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
229631
- var sub_barvue_type_template_id_2a8cbac2_render = function render() {
229933
+ ;// ./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
229934
+ var sub_barvue_type_template_id_08eba3c6_render = function render() {
229632
229935
  var _vm = this,
229633
229936
  _c = _vm._self._c,
229634
229937
  _setup = _vm._self._setupProxy;
@@ -229708,7 +230011,7 @@ var sub_barvue_type_template_id_2a8cbac2_render = function render() {
229708
230011
  }
229709
230012
  })], 1) : _vm._e()]);
229710
230013
  };
229711
- var sub_barvue_type_template_id_2a8cbac2_staticRenderFns = [];
230014
+ var sub_barvue_type_template_id_08eba3c6_staticRenderFns = [];
229712
230015
 
229713
230016
  ;// ./src/components/ellipsis-tag-list/index.tsx
229714
230017
  /*
@@ -231840,14 +232143,7 @@ var AutoRefresh = function AutoRefresh() {
231840
232143
  /**
231841
232144
  * 根据当前索引ID和pid生成唯一ID
231842
232145
  */
231843
- // window.__IS_MONITOR_COMPONENT__ = true;
231844
232146
  var indexSetUid = (0,vue_esm.computed)(function () {
231845
- // if (window.__IS_MONITOR_COMPONENT__) {
231846
- // const dataValidItem = indexSetList.value.find((item) => item.tags.every((tag) => tag.tag_id !== 4));
231847
- // if (dataValidItem) {
231848
- // return [`#_${dataValidItem.index_set_id}`];
231849
- // }
231850
- // }
231851
232147
  return indexSetValue.value.map(function (v, index) {
231852
232148
  var _indexSetPid$value$in;
231853
232149
  return "".concat((_indexSetPid$value$in = indexSetPid.value[index]) !== null && _indexSetPid$value$in !== void 0 ? _indexSetPid$value$in : '#', "_").concat(v);
@@ -232178,8 +232474,8 @@ var AutoRefresh = function AutoRefresh() {
232178
232474
 
232179
232475
  var sub_bar_component = normalizeComponent(
232180
232476
  retrieve_v2_sub_barvue_type_script_setup_true_lang_js,
232181
- sub_barvue_type_template_id_2a8cbac2_render,
232182
- sub_barvue_type_template_id_2a8cbac2_staticRenderFns,
232477
+ sub_barvue_type_template_id_08eba3c6_render,
232478
+ sub_barvue_type_template_id_08eba3c6_staticRenderFns,
232183
232479
  false,
232184
232480
  null,
232185
232481
  null,
@@ -232286,6 +232582,7 @@ var sub_bar_component = normalizeComponent(
232286
232582
 
232287
232583
 
232288
232584
 
232585
+
232289
232586
  /* harmony default export */ const use_monitor_app_init = (indexSetApi => {
232290
232587
  const store = use_store();
232291
232588
  const router = useRouter();
@@ -232403,26 +232700,33 @@ var sub_bar_component = normalizeComponent(
232403
232700
  if (!resp?.length) {
232404
232701
  return;
232405
232702
  }
232406
- // 如果当前地址参数没有indexSetId,先读取本地 MONITOR_LOG_RECENT_INDEX_SET_IDS,有的话设置
232703
+ // 如果当前地址参数没有indexSetId,先读取本地 MONITOR_LOG_RECENT_INDEX_SET_ID,有的话设置
232407
232704
  // 本地如果没有 MONITOR_LOG_RECENT_INDEX_SET_IDS,则默认取第一个有数据的索引集
232408
232705
  // 同时,更新索引信息到store中
232409
232706
  if (!indexSetIdList.value.length) {
232410
- const memoryIdStr = localStorage.getItem('MONITOR_LOG_RECENT_INDEX_SET_ID');
232707
+ const query = getLocationQueryParams();
232708
+ const bizAppKey = `${query.bizId} ${query['filter-app_name']}`;
232709
+ const memoryStr = localStorage.getItem('MONITOR_LOG_RECENT_INDEX_SET_ID');
232411
232710
  let defaultId = '';
232412
- if (memoryIdStr) {
232413
- const memoryId = JSON.parse(memoryIdStr)[0];
232414
- console.log('init defaultId = ', memoryId);
232415
- const defaultValidItem = resp.find(item => item.index_set_id === memoryId);
232416
- console.log('defaultValidItem = ', defaultValidItem);
232417
- if (defaultValidItem) {
232418
- defaultId = memoryId;
232711
+ if (memoryStr) {
232712
+ const memoryObj = JSON.parse(memoryStr);
232713
+ const memoryIds = memoryObj[bizAppKey];
232714
+ if (memoryIds) {
232715
+ const memoryId = memoryIds[0];
232716
+ const defaultValidItem = resp.find(item => item.index_set_id === memoryId && item.tags.every(tag => tag.tag_id !== 4));
232717
+ if (defaultValidItem) {
232718
+ defaultId = memoryId;
232719
+ }
232419
232720
  }
232420
232721
  }
232421
232722
  if (!defaultId) {
232422
232723
  const dataValidItem = resp.find(item => item.tags.every(tag => tag.tag_id !== 4));
232423
- console.log('dataValidItem = ', dataValidItem);
232424
- defaultId = `${dataValidItem.index_set_id}`;
232425
- console.log('默认id = ', defaultId);
232724
+ if (dataValidItem) {
232725
+ defaultId = `${dataValidItem.index_set_id}`;
232726
+ } else {
232727
+ // 也可能存在只有无数据的采集项,这种情况取第一个即可
232728
+ defaultId = `${resp[0].index_set_id}`;
232729
+ }
232426
232730
  }
232427
232731
  store.commit('updateIndexItem', {
232428
232732
  ids: [defaultId],