@blueking/monitor-apm-log 2.3.4 → 2.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/css/main.css CHANGED
@@ -117,10 +117,10 @@ ul.search-items{display:inline-flex;flex-wrap:wrap;width:100%;max-height:135px;p
117
117
 
118
118
  @font-face {
119
119
  font-family: "bklog";
120
- src: url(../img/iconcool556f70d.svg#iconcool) format("svg"),
121
- url(../fonts/iconcool3bad25e.ttf) format("truetype"),
122
- url(../fonts/iconcoola3538a4.woff) format("woff"),
123
- url(../fonts/iconcoolb62924b.eot?#iefix) format("embedded-opentype");
120
+ src: url(../img/iconcoolf2a250b.svg#iconcool) format("svg"),
121
+ url(../fonts/iconcoolf5880cc.ttf) format("truetype"),
122
+ url(../fonts/iconcoold83fad5.woff) format("woff"),
123
+ url(../fonts/iconcool31cdeea.eot?#iefix) format("embedded-opentype");
124
124
  font-weight: normal;
125
125
  font-style: normal;
126
126
  }
@@ -404,6 +404,9 @@ url(../fonts/iconcoolb62924b.eot?#iefix) format("embedded-opentype");
404
404
  .bklog-ext:before {
405
405
  content: "\e175";
406
406
  }
407
+ .bklog-share:before {
408
+ content: "\e212";
409
+ }
407
410
  .bklog-star-line:before {
408
411
  content: "\e194";
409
412
  }
@@ -809,5 +812,8 @@ url(../fonts/iconcoolb62924b.eot?#iefix) format("embedded-opentype");
809
812
  .bklog-tongpeifu:before {
810
813
  content: "\e210";
811
814
  }
815
+ .bklog-share-link:before {
816
+ content: "\e211";
817
+ }
812
818
 
813
819
  :root{--bklog-v3-row-tag-font: "RobotoMono-Medium";--bklog-v3-row-ctx-font: "RobotoMono-Regular";--bklog-v3-row-lbl-font: "Roboto-Regular"}.v3-bklog-root{display:flex;width:100%;height:100%}.v3-bklog-root .v3-bklog-content{display:flex;flex-direction:column;width:100%;height:100%;overflow-x:hidden;overflow-y:auto}.v3-bklog-root .search-result-panel.flex{justify-content:flex-end}.v3-bklog-root .search-result-panel.flex .field-list-sticky{top:0}.v3-bklog-root .search-result-panel.flex .field-list-sticky.is-show{position:relative;height:calc(100vh - var(--top-searchbar-height) - 150px)}.v3-bklog-root.is-sticky-top-result .search-result-panel.flex .search-result-content .original-log-panel .bklog-result-box .bklog-result-container.show-header{overflow:visible}.v3-bklog-root.is-sticky-top-result .search-result-panel.flex .search-result-content .original-log-panel .bklog-result-box .bklog-result-container.show-header .bklog-row-container{overflow:visible}.v3-bklog-root.is-sticky-top-result .search-result-panel.flex .search-result-content .original-log-panel .bklog-result-box .bklog-result-container.show-header .bklog-row-container.row-header{position:sticky;top:calc(var(--top-searchbar-height));left:calc(var(--left-collection-width) + var(--left-field-setting-width) + 8px)}.v3-bklog-root.is-sticky-top-result .search-result-panel.flex .search-result-content .original-log-panel .bklog-result-box .bklog-result-container.show-header .bklog-row-container.row-header .right{right:8px}.v3-bklog-root.is-sticky-top .search-result-panel.flex .field-list-sticky.is-show{position:fixed;top:calc(var(--top-searchbar-height) + var(--header-height));bottom:0;left:calc(var(--left-collection-width) + 8px);height:calc(100vh - var(--top-searchbar-height) - var(--header-height))}.v3-bklog-root.is-sticky-top .search-result-panel.flex .field-list-sticky.is-show .field-filter-box .field-filter-container-new{height:calc(100vh - var(--top-searchbar-height) - 100px)}.is-start-text-ellipsis .rtl-text{direction:rtl}[data-tippy-root] .tippy-box[data-theme=segment-light]{color:#26323d;background-color:#fff;box-shadow:0 0 6px 0 #dcdee5}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-arrow{color:#fff;background-color:#fff;box-shadow:#dcdee5 0px -12px 12px 0px}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content{padding:0}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content{margin-top:4px;margin-bottom:4px}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons{flex-direction:column;display:flex;align-items:center;justify-content:center}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .segment-event-box{display:flex;align-items:center;justify-content:space-between;min-width:240px;height:32px;padding:5px 13px 7px 12px;font-size:12px;color:#4d4f56;cursor:pointer}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .segment-event-box:hover{background:#f5f7fa}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .segment-new-link{display:flex;align-items:center;justify-content:right;width:24px;height:24px}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .segment-event-btn{display:flex;flex:1;align-items:center;justify-content:space-between}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .segment-event-btn .new-link{transform:translateY(1px)}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .tippy-tooltip{padding:6px 2px}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .icon{display:inline-block;font-size:16px;cursor:pointer}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .bklog-copy-3,[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .icon-minus-circle,[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .bklog-trace-view,[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .bklog-highlight,[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .icon-plus-circle{margin-right:4px}[data-tippy-root] .tippy-box[data-theme=segment-light] .tippy-content .event-tippy-content.segment-event-icons .bklog-copy{margin-left:-4px;font-size:24px}[data-tippy-root] [data-theme=log-light]{border:1px solid #dcdee5;border-radius:2px;box-shadow:0 2px 6px 0 rgba(0,0,0,.1019607843)}[data-tippy-root] [data-theme=log-light] .ui-value-select{width:314px;max-height:200px;overflow:auto;font-size:12px}[data-tippy-root] [data-theme=log-light] .ui-value-select .ui-value-option{display:flex;align-items:center;width:100%;height:32px;padding:0 12px;cursor:pointer;background:#fff}[data-tippy-root] [data-theme=log-light] .ui-value-select .ui-value-option:not(.active):hover{background:#f5f7fa}[data-tippy-root] [data-theme=log-light] .ui-value-select .ui-value-option.active{color:#3a84ff;background:#e1ecff}[data-tippy-root] [data-theme=log-light] .condition-value-options{display:inline-flex;flex-direction:column;width:314px;min-height:20px;max-height:300px;overflow:auto}[data-tippy-root] [data-theme=log-light] .condition-value-options>li{display:inline-block;width:100%;max-width:100%;height:32px;padding:6px 8px;font-size:12px;cursor:pointer}[data-tippy-root] [data-theme=log-light] .condition-value-options>li>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-tippy-root] [data-theme=log-light] .condition-value-options>li.empty-section{height:100px}[data-tippy-root] [data-theme=log-light] .condition-value-options>li.empty-section img{width:120px;height:60px}[data-tippy-root] [data-theme=log-light] .condition-value-options>li.empty-section .bk-exception .bk-exception-text{display:flex;justify-content:center}[data-tippy-root] [data-theme=log-light] .condition-value-options>li:not(.empty-section).active{background:#f5f7fa}[data-tippy-root] [data-theme=log-light] .condition-value-options>li:not(.empty-section).is-hover,[data-tippy-root] [data-theme=log-light] .condition-value-options>li:not(.empty-section):hover{background:#f5f7fa}[data-tippy-root] [data-theme=log-light] .condition-value-options>li:not(.empty-section).is-hidden-item{display:none}.v3-bklog-root{background:#f5f7fa}.v3-bklog-root.is-trace .search-bar-container{border:1px solid #dcdee5;border-radius:2px;box-shadow:none}.v3-bklog-root.is-trace .search-bar-container::before{background:#fff}.v3-bklog-root.is-trace .subbar-container{padding:0;box-shadow:none}.v3-bklog-root.is-trace .subbar-container .box-biz-select{margin-left:0 !important}.v3-bklog-root.is-trace .filter-container-wrap{box-shadow:none}.v3-bklog-root.is-trace .filter-container-wrap .btn-del-action{font-size:16px}.v3-bklog-root.is-trace .original-log-panel-tools{padding:0}.v3-bklog-root .v3-bklog-content{padding:0 16px}.v3-bklog-root .v3-bklog-content .v3-bklog-container .search-bar-wrapper{padding:0;margin:0 0 8px 0}.v3-bklog-root .v3-bklog-content .v3-bklog-body{width:100%;margin:0}.v3-bklog-root .v3-bklog-content .v3-bklog-body .search-result-panel .search-result-content .monitor-echarts-container .title-wrapper-new{width:100%}.v3-bklog-root.is-sticky-top .search-result-panel.flex .field-list-sticky.is-show{position:sticky;top:calc(var(--top-searchbar-height)) !important;left:0 !important}:root{--table-fount-family: Menlo, Monaco, Consolas, Courier, "PingFang SC", "Microsoft Yahei", monospace;--table-fount-size: 13px;--table-fount-color: #313238}
Binary file
@@ -293,6 +293,9 @@
293
293
  <glyph glyph-name="uniE175" unicode="&#xE175;" d="M330-132.4C362.8-132.4 392.2-129.2 418.2-122.8 466.6-111.6 507.2-90 540-58 559.6-39.6 577.3-15.9 593.1 13.1 608.9 42.1 618.2 68.4 621 92L621 92 514.8 92C506.8 63.6 493.2 38.6 474 17 440.4-20.2 395.4-38.8 339-38.8 278.6-38.8 234-19.1 205.2 20.3 176.4 59.7 161 112 159 177.2L159 177.2 630 177.2C630 242 626.8 289.2 620.4 318.8 613.2 362 598.8 399.8 577.2 432.2 554.8 466.2 522.2 493.9 479.4 515.3 436.6 536.7 392.4 547.4 346.8 547.4 256.4 547.4 183.2 515.2 127.2 450.8 71.2 386.4 43.2 302.6 43.2 199.4 43.2 94.6 71 13.1 126.6-45.1 182.2-103.3 250-132.4 330-132.4ZM519 263L162 263C164 318.2 181.8 363.7 215.4 399.5 249 435.3 290.6 453.2 340.2 453.2 409.4 453.2 458.8 427.2 488.4 375.2 504.4 347.2 514.6 309.8 519 263L519 263ZM826.8-109.6L981.6 131.6 1141.2-109.6 1279.2-109.6 1053 219.8 1269.6 530 1138.2 533 988.8 306.8 841.2 533 701.4 533 916.2 219.8 690-109.6 826.8-109.6ZM1528.2-119.8C1543.8-119.8 1558.3-119 1571.7-117.4 1585.1-115.8 1598-113.2 1610.4-109.6L1610.4-109.6 1610.4-24.4C1602.4-25.2 1595.4-25.7 1589.4-25.9 1583.4-26.1 1577.8-26.2 1572.6-26.2 1553-26.2 1539-24 1530.6-19.6 1515.4-12 1507.8 3 1507.8 25.4L1507.8 25.4 1507.8 444.8 1610.4 444.8 1610.4 533 1507.8 533 1507.8 712.4 1398.6 712.4 1398.6 533 1311.6 533 1311.6 444.8 1398.6 444.8 1398.6 19.4C1398.6-21.8 1407.6-55.3 1425.6-81.1 1443.6-106.9 1477.8-119.8 1528.2-119.8Z" horiz-adv-x="1638" vert-adv-y="1024" />
294
294
 
295
295
 
296
+ <glyph glyph-name="uniE212" unicode="&#xE212;" d="M372.9309 151.4384C313.9343 86.1083 222.1537 63.5555 140.491 94.322 58.8284 125.0885 3.4144 203.0969 0.1519 291.8832-3.1106 380.6695 46.4227 462.6955 125.598 499.6191 204.7734 536.5428 297.9512 521.0704 361.5766 460.4345L549.1201 585.2467C518.0916 662.7629 549.0586 751.7003 621.0553 791.845 693.052 831.9898 783.1049 810.5321 830.2449 741.9995 877.385 673.4669 866.5702 579.7278 805.1225 524.2467 743.6748 468.7656 651.2018 469.2463 590.311 525.3632L405.1314 402.1596C420.8914 371.6329 429.7742 336.9019 429.7742 300.0505 429.8088 270.0303 423.7857 240.3246 412.0801 212.7843L681.8978 57.8841C734.3692 122.2521 825.8375 136.1232 894.3771 90.1066 962.9167 44.0899 986.6579-47.1314 949.5273-121.799 912.3968-196.4666 826.2423-230.7553 749.392-201.4511 672.5417-172.1469 629.5171-88.6002 649.4466-7.3736L372.8951 151.4019 372.9309 151.4384Z" horiz-adv-x="967" vert-adv-y="1024" />
297
+
298
+
296
299
  <glyph glyph-name="uniE194" unicode="&#xE194;" d="M512 597.44L587.52 436.32A64 64 0 0 1 635.52 400.32L811.52 373.6 682.56 241.28A64 64 0 0 1 665.12 186.24L694.88 3.84 543.36 87.68A65.44 65.44 0 0 1 481.28 87.68L329.76 3.84 359.52 186.24A64 64 0 0 1 342.08 241.28L212.8 373.6 388.8 400.32A64 64 0 0 1 436.8 436.32L512 597.44M512 748L378.56 463.52 80 417.92 296 196.64 244.96-116 512 31.52 779.04-116 728 196.64 944 417.92 645.44 463.52 512 748Z" horiz-adv-x="1024" vert-adv-y="1024" />
297
300
 
298
301
 
@@ -698,6 +701,9 @@
698
701
  <glyph glyph-name="uniE210" unicode="&#xE210;" d="M160-52C195.3462-52 224-23.3462 224 12 224 47.3462 195.3462 76 160 76 124.6538 76 96 47.3462 96 12 96-23.3462 124.6538-52 160-52ZM577.3333 652L588 395.5616 349.3333 484.9863 320 398.1918 565.3333 325.863 400 132.5479 472 76 624 283.7808 776 76 848 132.5479 682.6667 325.863 928 398.1918 898.6667 484.9863 661.3333 395.5616 670.6667 652 577.3333 652Z" horiz-adv-x="1024" vert-adv-y="1024" />
699
702
 
700
703
 
704
+ <glyph glyph-name="uniE211" unicode="&#xE211;" d="M81.92 730.08L81.92-109.6A20.482 20.482 0 0 1 102.4-130.08L921.6-130.08A20.482 20.482 0 0 1 942.08-109.6L942.08 156.64 901.12 156.64 901.12-89.12 122.88-89.12 122.88 730.08 81.92 730.08ZM778.04 709.8A20.482 20.482 0 0 1 763.76 674.64L851.68 586.72 717.32 586.72C511.973 591.8305 378.905 537.6708 300.96 435.2 223.015 332.7292 201.3512 187.2176 204.8 12.88A20.4839 20.4839 0 1 1 245.76 13.68C242.389 184.0822 264.8477 320.067 333.56 410.4 402.2723 500.733 518.3963 550.6847 716.28 545.76L716.56 545.76 851.68 545.76 763.76 457.84A20.482 20.482 0 1 1 792.72 428.88L930.08 566.24 792.72 703.6A20.482 20.482 0 0 1 778.04 709.8Z" horiz-adv-x="1024" vert-adv-y="1024" />
705
+
706
+
701
707
 
702
708
  </font>
703
709
  </defs>
package/main.js CHANGED
@@ -5791,6 +5791,7 @@ __webpack_require__.r(retrieve_namespaceObject);
5791
5791
  __webpack_require__.d(retrieve_namespaceObject, {
5792
5792
  createClusteringConfig: () => (createClusteringConfig),
5793
5793
  createFieldsConfig: () => (createFieldsConfig),
5794
+ createOrUpdateToken: () => (createOrUpdateToken),
5794
5795
  deleteClusteringInfo: () => (deleteClusteringInfo),
5795
5796
  deleteFieldsConfig: () => (deleteFieldsConfig),
5796
5797
  deleteRetrieveFavorite: () => (deleteRetrieveFavorite),
@@ -5822,6 +5823,7 @@ __webpack_require__.d(retrieve_namespaceObject, {
5822
5823
  getRealTimeLog: () => (getRealTimeLog),
5823
5824
  getRetrieveFavorite: () => (getRetrieveFavorite),
5824
5825
  getSearchHistory: () => (getSearchHistory),
5826
+ getShareParams: () => (getShareParams),
5825
5827
  getWebConsoleUrl: () => (getWebConsoleUrl),
5826
5828
  newClsStrategy: () => (newClsStrategy),
5827
5829
  normalStrategy: () => (normalStrategy),
@@ -8130,7 +8132,17 @@ const updateTimezone = tz => {
8130
8132
  大小写匹配: 'Case sensitive matching',
8131
8133
  精确匹配: 'Exact match',
8132
8134
  Grep模式: 'Grep Mode',
8133
- 我的收藏: 'My favorites'
8135
+ 我的收藏: 'My favorites',
8136
+ 时间设置: 'Time Settings',
8137
+ 静态时间: 'Static Time',
8138
+ 动态时间: 'Dynamic Time',
8139
+ 时间示例: 'Time Example',
8140
+ 链接有效期: 'Link Validity Period',
8141
+ 生成并复制链接: 'Generate And Copy Link',
8142
+ '会将时间转换为时间戳,按照访问人的时间进行载入': "It will convert the time to a timestamp and load it according to the visitor's time",
8143
+ '会将近 xxx 这种时间保留,按照访问人的近 xxx 时间进行载入': 'It will keep the time like "last xxx" and load it according to the visitor\'s last xxx time',
8144
+ 临时分享: 'Temporary Share',
8145
+ 分享: 'Share'
8134
8146
  });
8135
8147
  ;// ./src/language/lang/en/route.ts
8136
8148
  /*
@@ -8319,6 +8331,7 @@ const i18n = new external_vue_i18n_namespaceObject["default"]({
8319
8331
  }
8320
8332
  });
8321
8333
  external_bk_magic_vue_namespaceObject.locale.i18n((key, value) => i18n.t(key, value));
8334
+ window.$t = i18n.t.bind(i18n);
8322
8335
  /* harmony default export */ const language_i18n = (i18n);
8323
8336
  ;// ./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/global/json-format-wrapper.vue?vue&type=template&id=7c213b72
8324
8337
  var render = function render() {
@@ -21525,6 +21538,14 @@ var requestGrepResult = {
21525
21538
  url: '/search/index_set/$index_set_id/grep_query/',
21526
21539
  method: 'post'
21527
21540
  };
21541
+ var createOrUpdateToken = {
21542
+ url: '/share/create_or_update_token/',
21543
+ method: 'post'
21544
+ };
21545
+ var getShareParams = {
21546
+ url: 'share/get_share_params/',
21547
+ method: 'get'
21548
+ };
21528
21549
 
21529
21550
  ;// ./src/services/source.js
21530
21551
  /*
@@ -26025,74 +26046,74 @@ var RetrieveEvent;
26025
26046
  * 收藏栏是否展示
26026
26047
  */
26027
26048
  RetrieveEvent["FAVORITE_SHOWN_CHANGE"] = "favorite-shown-change";
26028
- /**
26029
- * 收藏栏宽度变化
26030
- */
26031
- RetrieveEvent["FAVORITE_WIDTH_CHANGE"] = "favorite-width-change";
26032
26049
  /**
26033
26050
  * 收藏栏是否仅查看当前索引集
26034
26051
  */
26035
26052
  RetrieveEvent["FAVORITE_VIEW_CURRENT_CHANGE"] = "favorite-view-current-change";
26036
26053
  /**
26037
- * 左侧字段信息初始化
26038
- */
26039
- RetrieveEvent["LEFT_FIELD_INFO_UPDATE"] = "left-field-info-update";
26040
- /**
26041
- * 左侧字段设置宽度变化
26054
+ * 收藏栏宽度变化
26042
26055
  */
26043
- RetrieveEvent["LEFT_FIELD_SETTING_WIDTH_CHANGE"] = "left-field-setting-width-change";
26056
+ RetrieveEvent["FAVORITE_WIDTH_CHANGE"] = "favorite-width-change";
26044
26057
  /**
26045
- * 左侧字段设置是否展示
26058
+ * 全局滚动
26046
26059
  */
26047
- RetrieveEvent["LEFT_FIELD_SETTING_SHOWN_CHANGE"] = "left-field-setting-shown-change";
26060
+ RetrieveEvent["GLOBAL_SCROLL"] = "global-scroll";
26048
26061
  /**
26049
- * 搜索栏高度变化
26062
+ * 触发高亮设置
26050
26063
  */
26051
- RetrieveEvent["SEARCHBAR_HEIGHT_CHANGE"] = "searchbar-height-change";
26064
+ RetrieveEvent["HILIGHT_TRIGGER"] = "hilight-trigger";
26052
26065
  /**
26053
- * 趋势图高度变化
26066
+ * 打开索引配置
26054
26067
  */
26055
- RetrieveEvent["TREND_GRAPH_HEIGHT_CHANGE"] = "trend-graph-height-change";
26068
+ RetrieveEvent["INDEX_CONFIG_OPEN"] = "index-config-open";
26056
26069
  /**
26057
- * 趋势图搜索
26070
+ * 索引集id 变化
26058
26071
  */
26059
- RetrieveEvent["TREND_GRAPH_SEARCH"] = "trend-graph-search";
26072
+ RetrieveEvent["INDEX_SET_ID_CHANGE"] = "index-set-id-change";
26060
26073
  /**
26061
- * 趋势图缩放
26074
+ * 左侧字段信息更新
26062
26075
  */
26063
- RetrieveEvent["TREND_GRAPH_ZOOM"] = "trend-graph-zoom";
26076
+ RetrieveEvent["LEFT_FIELD_INFO_UPDATE"] = "left-field-info-update";
26064
26077
  /**
26065
- * localStorage 变化
26078
+ * 左侧字段设置是否展示
26066
26079
  */
26067
- RetrieveEvent["STORAGE_CHANGE"] = "storage-change";
26080
+ RetrieveEvent["LEFT_FIELD_SETTING_SHOWN_CHANGE"] = "left-field-setting-shown-change";
26068
26081
  /**
26069
- * 打开索引配置
26082
+ * 左侧字段设置宽度变化
26070
26083
  */
26071
- RetrieveEvent["INDEX_CONFIG_OPEN"] = "index-config-open";
26084
+ RetrieveEvent["LEFT_FIELD_SETTING_WIDTH_CHANGE"] = "left-field-setting-width-change";
26072
26085
  /**
26073
- * 触发高亮设置
26086
+ * 搜索时间变化
26074
26087
  */
26075
- RetrieveEvent["HILIGHT_TRIGGER"] = "hilight-trigger";
26088
+ RetrieveEvent["SEARCH_TIME_CHANGE"] = "search-time-change";
26076
26089
  /**
26077
26090
  * 搜索条件改变
26078
26091
  */
26079
26092
  RetrieveEvent["SEARCH_VALUE_CHANGE"] = "search-value-change";
26080
26093
  /**
26081
- * 搜索时间变化
26094
+ * 搜索栏高度变化
26082
26095
  */
26083
- RetrieveEvent["SEARCH_TIME_CHANGE"] = "search-time-change";
26096
+ RetrieveEvent["SEARCHBAR_HEIGHT_CHANGE"] = "searchbar-height-change";
26084
26097
  /**
26085
- * 全局滚动
26098
+ * 搜索中时间改变
26086
26099
  */
26087
- RetrieveEvent["GLOBAL_SCROLL"] = "global-scroll";
26100
+ RetrieveEvent["SEARCHING_CHANGE"] = "searching-change";
26088
26101
  /**
26089
- * 索引集id 变化
26102
+ * localStorage 变化
26090
26103
  */
26091
- RetrieveEvent["INDEX_SET_ID_CHANGE"] = "index-set-id-change";
26104
+ RetrieveEvent["STORAGE_CHANGE"] = "storage-change";
26092
26105
  /**
26093
- * 搜索中时间改变
26106
+ * 趋势图高度变化
26094
26107
  */
26095
- RetrieveEvent["SEARCHING_CHANGE"] = "searching-change";
26108
+ RetrieveEvent["TREND_GRAPH_HEIGHT_CHANGE"] = "trend-graph-height-change";
26109
+ /**
26110
+ * 趋势图搜索
26111
+ */
26112
+ RetrieveEvent["TREND_GRAPH_SEARCH"] = "trend-graph-search";
26113
+ /**
26114
+ * 趋势图缩放
26115
+ */
26116
+ RetrieveEvent["TREND_GRAPH_ZOOM"] = "trend-graph-zoom";
26096
26117
  })(RetrieveEvent || (RetrieveEvent = {}));
26097
26118
  /* harmony default export */ const retrieve_events = (RetrieveEvent);
26098
26119
  ;// ./src/views/retrieve-core/interface.ts
@@ -87106,6 +87127,7 @@ var panel_util_excluded = ["ip_chooser", "addition", "keyword"];
87106
87127
  */
87107
87128
 
87108
87129
  function getConditionRouterParams(searchList, searchMode, isNewLink) {
87130
+ var append = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
87109
87131
  var indexItem = window.mainComponent.$store.state.indexItem;
87110
87132
  var getIPChooserStr = function getIPChooserStr(ipChooser) {
87111
87133
  if (typeof_typeof(ipChooser) === 'object') return JSON.stringify(ipChooser);
@@ -87159,7 +87181,7 @@ function getConditionRouterParams(searchList, searchMode, isNewLink) {
87159
87181
  ip_chooser: getIPChooserStr(newIPChooser)
87160
87182
  });
87161
87183
  }
87162
- Object.assign(filterQuery, newQueryObj);
87184
+ Object.assign(filterQuery, newQueryObj, append !== null && append !== void 0 ? append : {});
87163
87185
  var routeData = {
87164
87186
  name: 'retrieve',
87165
87187
  params: params,
@@ -91399,11 +91421,13 @@ const SearchResultTab = () => null;
91399
91421
 
91400
91422
 
91401
91423
 
91424
+
91402
91425
  /* harmony default export */ const search_result = ((0,external_vue_namespaceObject.defineComponent)({
91403
91426
  name: 'V3ResultContainer',
91404
91427
  setup() {
91405
91428
  const router = useRouter();
91406
91429
  const route = useRoute();
91430
+ const store = use_store();
91407
91431
  const debounceUpdateTabValue = (0,external_lodash_namespaceObject.debounce)(value => {
91408
91432
  const isClustering = value === 'clustering';
91409
91433
  router.replace({
@@ -91424,6 +91448,7 @@ const SearchResultTab = () => null;
91424
91448
  let triggerTrend = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
91425
91449
  debounceUpdateTabValue(tab);
91426
91450
  if (triggerTrend) {
91451
+ store.dispatch('requestIndexSetQuery');
91427
91452
  setTimeout(() => {
91428
91453
  retrieve_helper.fire(retrieve_events.TREND_GRAPH_SEARCH);
91429
91454
  }, 300);
@@ -91460,8 +91485,8 @@ const SearchResultTab = () => null;
91460
91485
  }), renderTabContent()]);
91461
91486
  }
91462
91487
  }));
91463
- ;// ./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=74d2d0b1
91464
- var sub_barvue_type_template_id_74d2d0b1_render = function render() {
91488
+ ;// ./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=6680cc42
91489
+ var sub_barvue_type_template_id_6680cc42_render = function render() {
91465
91490
  var _vm = this,
91466
91491
  _c = _vm._self._c,
91467
91492
  _setup = _vm._self._setupProxy;
@@ -91495,7 +91520,7 @@ var sub_barvue_type_template_id_74d2d0b1_render = function render() {
91495
91520
  staticClass: "box-right-option"
91496
91521
  }, [_c(_setup.TimeSetting, {
91497
91522
  staticClass: "custom-border-right"
91498
- }), _vm._v(" "), _setup.isFieldSettingShow && _setup.store.state.spaceUid && _setup.hasCollectorConfigId ? _c(_setup.FieldSetting, {
91523
+ }), _vm._v(" "), !_setup.isExternal ? _c(_setup.ShareLink) : _vm._e(), _vm._v(" "), _setup.isFieldSettingShow && _setup.store.state.spaceUid && _setup.hasCollectorConfigId ? _c(_setup.FieldSetting, {
91499
91524
  ref: "fieldSettingRef",
91500
91525
  staticClass: "custom-border-right"
91501
91526
  }) : _vm._e(), _vm._v(" "), !_setup.isExternal ? _c(_setup.WarningSetting, {
@@ -91537,7 +91562,7 @@ var sub_barvue_type_template_id_74d2d0b1_render = function render() {
91537
91562
  }
91538
91563
  })], 1) : _vm._e()]);
91539
91564
  };
91540
- var sub_barvue_type_template_id_74d2d0b1_staticRenderFns = [];
91565
+ var sub_barvue_type_template_id_6680cc42_staticRenderFns = [];
91541
91566
 
91542
91567
  ;// ./src/components/ellipsis-tag-list/index.tsx
91543
91568
  /*
@@ -93436,10 +93461,321 @@ var query_history_component = normalizeComponent(
93436
93461
  )
93437
93462
 
93438
93463
  /* harmony default export */ const query_history = (query_history_component.exports);
93464
+ ;// ./src/views/retrieve-v2/sub-bar/share-link.tsx
93465
+
93466
+ /*
93467
+ * Tencent is pleased to support the open source community by making
93468
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) available.
93469
+ *
93470
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
93471
+ *
93472
+ * 蓝鲸智云PaaS平台 (BlueKing PaaS) is licensed under the MIT License.
93473
+ *
93474
+ * License for 蓝鲸智云PaaS平台 (BlueKing PaaS):
93475
+ *
93476
+ * ---------------------------------------------------
93477
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
93478
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
93479
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
93480
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
93481
+ *
93482
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
93483
+ * the Software.
93484
+ *
93485
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
93486
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
93487
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
93488
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
93489
+ * IN THE SOFTWARE.
93490
+ */
93491
+
93492
+
93493
+
93494
+
93495
+
93496
+
93497
+
93498
+
93499
+
93500
+
93501
+ /* harmony default export */ const share_link = ((0,external_vue_namespaceObject.defineComponent)({
93502
+ setup() {
93503
+ const store = use_store();
93504
+ const route = useRoute();
93505
+ const {
93506
+ t
93507
+ } = use_locale();
93508
+ const timezone = (0,external_vue_namespaceObject.computed)(() => store.state.indexItem.timezone);
93509
+ const timeRange = (0,external_vue_namespaceObject.computed)(() => store.state.indexItem.datePickerValue);
93510
+ const format = (0,external_vue_namespaceObject.computed)(() => store.getters.retrieveParams.format);
93511
+ const startTime = (0,external_vue_namespaceObject.computed)(() => store.getters.retrieveParams.start_time);
93512
+ const endTime = (0,external_vue_namespaceObject.computed)(() => store.getters.retrieveParams.end_time);
93513
+ const expireTime = (0,external_vue_namespaceObject.ref)('1d');
93514
+ const expireTimeList = (0,external_vue_namespaceObject.ref)([{
93515
+ id: '1d',
93516
+ name: '1天'
93517
+ }, {
93518
+ id: '1w',
93519
+ name: '1周'
93520
+ }, {
93521
+ id: '1m',
93522
+ name: '1月'
93523
+ }]);
93524
+ const link = (0,external_vue_namespaceObject.ref)('');
93525
+ const formatTimeRange = (0,external_vue_namespaceObject.ref)([store.getters.retrieveParams.start_time, store.getters.retrieveParams.end_time]);
93526
+ const timeValueType = (0,external_vue_namespaceObject.ref)('static');
93527
+ let isDatePickerChange = false;
93528
+ const handleTimeValueTypeChange = value => {
93529
+ timeValueType.value = value;
93530
+ if (value === 'static') {
93531
+ formatTimeRange.value = [startTime.value, endTime.value];
93532
+ }
93533
+ if (value === 'dynamic') {
93534
+ formatTimeRange.value = [timeRange.value[0], timeRange.value[1]];
93535
+ }
93536
+ };
93537
+ handleTimeValueTypeChange(timeValueType.value);
93538
+ const placeholder = (0,external_vue_namespaceObject.computed)(() => {
93539
+ if (timeValueType.value === 'static') {
93540
+ return `"?start_time=${(0,external_dayjs_namespaceObject["default"])(formatTimeRange.value[0]).format(format.value)}&end_time=${(0,external_dayjs_namespaceObject["default"])(formatTimeRange.value[1]).format(format.value)}"`;
93541
+ }
93542
+ return `"?start_time=${formatTimeRange.value[0]}&end_time=${formatTimeRange.value[1]}"`;
93543
+ });
93544
+ const getExpireEndTime = expire => {
93545
+ // expire = '1d' | '1w' | '1m' | '\d+(d|w|m)'
93546
+ const match = expire.match(/^(\d+)([dw]|m)$/);
93547
+ if (!match) return (0,external_dayjs_namespaceObject["default"])().add(1, 'day').unix();
93548
+ const num = parseInt(match[1], 10);
93549
+ const unit = match[2];
93550
+ let duration;
93551
+ switch (unit) {
93552
+ case 'd':
93553
+ duration = num * 24 * 60 * 60 * 1000; // days to milliseconds
93554
+ break;
93555
+ case 'w':
93556
+ duration = num * 7 * 24 * 60 * 60 * 1000; // weeks to milliseconds
93557
+ break;
93558
+ case 'm':
93559
+ duration = num * 30 * 24 * 60 * 60 * 1000; // months to milliseconds
93560
+ break;
93561
+ default:
93562
+ return num * 24 * 60 * 60 * 1000;
93563
+ }
93564
+ return (0,external_dayjs_namespaceObject["default"])().add(duration, 'millisecond').unix();
93565
+ };
93566
+ const handleShareLinkClick = () => {
93567
+ const result = handleTransformToTimestamp(formatTimeRange.value, format.value);
93568
+ const params = {
93569
+ route: {
93570
+ name: route.name,
93571
+ path: route.path,
93572
+ params: {
93573
+ ...route.params
93574
+ },
93575
+ query: {
93576
+ ...route.query,
93577
+ start_time: formatTimeRange.value[0],
93578
+ end_time: formatTimeRange.value[1],
93579
+ timezone: timezone.value,
93580
+ format: format.value
93581
+ }
93582
+ },
93583
+ store: {
93584
+ storage: store.state.storage,
93585
+ indexItem: {
93586
+ ...store.state.indexItem,
93587
+ items: [],
93588
+ datePickerValue: formatTimeRange.value
93589
+ },
93590
+ catchFieldCustomConfig: store.state.retrieve.catchFieldCustomConfig
93591
+ }
93592
+ };
93593
+ src_api.request('retrieve/createOrUpdateToken', {
93594
+ data: {
93595
+ type: 'search',
93596
+ expire_time: getExpireEndTime(expireTime.value),
93597
+ // 默认1天
93598
+ expire_period: expireTime.value,
93599
+ lock_search: false,
93600
+ start_time: result[0],
93601
+ end_time: result[1],
93602
+ timezone: timezone.value,
93603
+ default_time_range: timeRange.value,
93604
+ space_uid: store.state.spaceUid,
93605
+ data: params
93606
+ }
93607
+ }).then(resp => {
93608
+ if (resp.result) {
93609
+ link.value = `${window.location.origin}/#/share/${resp.data.token}`;
93610
+ copyMessage(link.value, '复制成功!');
93611
+ return;
93612
+ }
93613
+ messageError(resp.message || t('生成链接失败,请稍后重试'));
93614
+ }).catch(err => {
93615
+ messageError(err.message || t('生成链接失败,请稍后重试'));
93616
+ console.error(err);
93617
+ });
93618
+ };
93619
+ const beforePopoverHide = e => {
93620
+ if (isDatePickerChange) {
93621
+ isDatePickerChange = false;
93622
+ return false;
93623
+ }
93624
+ return !e.target.closest('.bklog-v3-select-popover');
93625
+ };
93626
+ const beforeShow = () => {
93627
+ handleTimeValueTypeChange(timeValueType.value);
93628
+ return true;
93629
+ };
93630
+ /**
93631
+ * 处理链接有效期变化
93632
+ * @param val 链接有效期
93633
+ */
93634
+ const handleExpireTimeChange = val => {
93635
+ // val = '1d' | '1w' | '1m' | '\d+(d|w|m)'
93636
+ expireTime.value = val;
93637
+ };
93638
+ const handleCutomExpireTimeChange = val => {
93639
+ // 处理自定义链接有效期变化
93640
+ // val = '\d+(d|w|m)'
93641
+ if (/^\d+(d|w|m)$/.test(val)) {
93642
+ expireTime.value = val;
93643
+ const customNum = parseInt(val.slice(0, -1), 10);
93644
+ const customUnit = val.slice(-1);
93645
+ const validUnits = {
93646
+ d: 1,
93647
+ w: 7,
93648
+ m: 30
93649
+ };
93650
+ const count = validUnits[customUnit] * customNum;
93651
+ if (count > 90) {
93652
+ messageError(t('链接有效期不能超过90天,请重新输入'));
93653
+ return;
93654
+ }
93655
+ expireTime.value = val;
93656
+ expireTimeList.value.push({
93657
+ id: val,
93658
+ name: val
93659
+ });
93660
+ } else {
93661
+ messageError(t('链接有效期格式错误,请输入数字和单位[{number}d|w|m]'));
93662
+ }
93663
+ };
93664
+ const getContentView = () => {
93665
+ return (0,external_vue_namespaceObject.h)("div", {
93666
+ "style": 'width: 600px; padding: 20px; display: flex; flex-direction: column; font-size: 12px;'
93667
+ }, [(0,external_vue_namespaceObject.h)("div", {
93668
+ "style": 'font-size: 20px; margin-bottom: 30px;'
93669
+ }, [(0,external_vue_namespaceObject.h)("span", {
93670
+ "class": 'bklog-icon bklog-share'
93671
+ }), (0,external_vue_namespaceObject.h)("span", {
93672
+ "style": 'margin-left: 6px;'
93673
+ }, [t('临时分享')])]), (0,external_vue_namespaceObject.h)("div", {
93674
+ "style": 'display: flex; align-items: flex-start; margin-bottom: 10px;'
93675
+ }, [(0,external_vue_namespaceObject.h)("span", {
93676
+ "style": 'display: inline-block; min-width: fit-content;'
93677
+ }, [t('时间格式'), "\uFF1A"]), (0,external_vue_namespaceObject.h)("div", [(0,external_vue_namespaceObject.h)("div", {
93678
+ "style": 'margin-bottom: 6px;'
93679
+ }, [(0,external_vue_namespaceObject.h)("bk-radio", {
93680
+ "style": 'font-size: 12px;',
93681
+ "attrs": {
93682
+ "checked": timeValueType.value === 'static'
93683
+ },
93684
+ "on": {
93685
+ "change": val => val && handleTimeValueTypeChange('static')
93686
+ }
93687
+ }, [t('静态时间')]), (0,external_vue_namespaceObject.h)("span", {
93688
+ "style": 'margin-left: 8px; font-size: 10px; color: #979BA5;'
93689
+ }, [t('会将时间转换为时间戳,按照访问人的时间进行载入')])]), (0,external_vue_namespaceObject.h)("div", [(0,external_vue_namespaceObject.h)("bk-radio", {
93690
+ "style": 'font-size: 12px;',
93691
+ "attrs": {
93692
+ "checked": timeValueType.value === 'dynamic'
93693
+ },
93694
+ "on": {
93695
+ "change": val => val && handleTimeValueTypeChange('dynamic')
93696
+ }
93697
+ }, [t('动态时间')]), (0,external_vue_namespaceObject.h)("span", {
93698
+ "style": 'margin-left: 8px; font-size: 10px; color: #979BA5;'
93699
+ }, [t('会将近 xxx 这种时间保留,按照访问人的近 xxx 时间进行载入')])])])]), (0,external_vue_namespaceObject.h)("div", {
93700
+ "style": 'margin-bottom: 20px'
93701
+ }, [(0,external_vue_namespaceObject.h)("span", [t('时间示例'), "\uFF1A"]), (0,external_vue_namespaceObject.h)("span", {
93702
+ "style": 'color: #979BA5;'
93703
+ }, [placeholder.value])]), (0,external_vue_namespaceObject.h)("div", {
93704
+ "style": 'display: flex; align-items: center; margin-bottom: 12px;'
93705
+ }, [(0,external_vue_namespaceObject.h)("span", [t('链接有效期'), ":"]), (0,external_vue_namespaceObject.h)("bk-select", {
93706
+ "style": 'width: 200px; margin-left: 10px;',
93707
+ "attrs": {
93708
+ "ext-popover-cls": 'bklog-v3-select-popover',
93709
+ "value": expireTime.value
93710
+ },
93711
+ "on": {
93712
+ "change": handleExpireTimeChange
93713
+ }
93714
+ }, [expireTimeList.value.map(item => (0,external_vue_namespaceObject.h)("bk-option", {
93715
+ "attrs": {
93716
+ "id": item.id,
93717
+ "name": item.name
93718
+ },
93719
+ "key": item.id
93720
+ }, [item.name])), (0,external_vue_namespaceObject.h)("div", {
93721
+ "style": 'display: flex; align-items: center; padding: 10px;',
93722
+ "class": 'bklog-v3-select-popover'
93723
+ }, [(0,external_vue_namespaceObject.h)("span", {
93724
+ "style": 'display: inline-block; min-width: fit-content;'
93725
+ }, [t('自定义'), ":"]), (0,external_vue_namespaceObject.h)("bk-input", {
93726
+ "style": 'width: 100%; height: 28px; margin-left: 4px;',
93727
+ "attrs": {
93728
+ "placeholder": '{number}d|w|m'
93729
+ },
93730
+ "on": {
93731
+ "enter": val => handleCutomExpireTimeChange(val)
93732
+ }
93733
+ })])])]), (0,external_vue_namespaceObject.h)("div", {
93734
+ "style": 'display: flex; width: 100%; margin-top: 12px;'
93735
+ }, [(0,external_vue_namespaceObject.h)("bk-input", {
93736
+ "attrs": {
93737
+ "placeholder": `{SITE_URL}/share/{LINK_ID}`,
93738
+ "readonly": true,
93739
+ "value": link.value
93740
+ }
93741
+ }), (0,external_vue_namespaceObject.h)("bk-button", {
93742
+ "style": 'margin-left: -2px; border-radius: 0 2px 2px 0; min-width: fit-content;',
93743
+ "attrs": {
93744
+ "theme": 'primary'
93745
+ },
93746
+ "on": {
93747
+ "click": handleShareLinkClick
93748
+ }
93749
+ }, [t('生成并复制链接')])])]);
93750
+ };
93751
+ return () => {
93752
+ return (0,external_vue_namespaceObject.h)(bklog_popover, helper_default()([{
93753
+ "style": 'height: 100%;border-right: solid 1px #eaebf0; align-items: center; display: flex; justify-content: center; cursor: pointer; padding: 0 20px;',
93754
+ "attrs": {
93755
+ "beforeHide": beforePopoverHide,
93756
+ "options": {
93757
+ hideOnClick: false,
93758
+ onShow: beforeShow
93759
+ },
93760
+ "trigger": 'click'
93761
+ }
93762
+ }, {
93763
+ scopedSlots: {
93764
+ content: getContentView
93765
+ }
93766
+ }]), [(0,external_vue_namespaceObject.h)("span", {
93767
+ "class": 'bklog-icon bklog-share'
93768
+ }), (0,external_vue_namespaceObject.h)("span", {
93769
+ "style": 'margin-left: 6px;'
93770
+ }, [t('分享')])]);
93771
+ };
93772
+ }
93773
+ }));
93439
93774
  ;// ./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/sub-bar/index.vue?vue&type=script&setup=true&lang=js
93440
93775
 
93441
93776
 
93442
93777
 
93778
+
93443
93779
  function sub_barvue_type_script_setup_true_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; }
93444
93780
  function sub_barvue_type_script_setup_true_lang_js_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? sub_barvue_type_script_setup_true_lang_js_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : sub_barvue_type_script_setup_true_lang_js_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
93445
93781
 
@@ -93476,6 +93812,7 @@ var WarningSetting = function WarningSetting() {
93476
93812
 
93477
93813
 
93478
93814
 
93815
+
93479
93816
  /* harmony default export */ const sub_barvue_type_script_setup_true_lang_js = ({
93480
93817
  __name: 'index',
93481
93818
  props: {
@@ -93544,10 +93881,17 @@ var WarningSetting = function WarningSetting() {
93544
93881
  });
93545
93882
  var setRouteParams = function setRouteParams(ids, isUnionIndex) {
93546
93883
  var queryTab = retrieve_helper.routeQueryTabValueFix(indexSetParams.value.items[0], route.query.tab, isUnionIndex);
93884
+ var _indexSetParams$value = indexSetParams.value,
93885
+ search_mode = _indexSetParams$value.search_mode,
93886
+ keyword = _indexSetParams$value.keyword,
93887
+ addition = _indexSetParams$value.addition;
93547
93888
  if (isUnionIndex) {
93548
93889
  router.replace({
93549
93890
  query: sub_barvue_type_script_setup_true_lang_js_objectSpread(sub_barvue_type_script_setup_true_lang_js_objectSpread(sub_barvue_type_script_setup_true_lang_js_objectSpread({}, route.query), queryTab), {}, defineProperty_defineProperty(defineProperty_defineProperty({
93550
93891
  indexId: undefined,
93892
+ search_mode: search_mode,
93893
+ keyword: keyword,
93894
+ addition: JSON.stringify(addition),
93551
93895
  unionList: JSON.stringify(ids),
93552
93896
  clusterParams: undefined
93553
93897
  }, BK_LOG_STORAGE.HISTORY_ID, store.state.storage[BK_LOG_STORAGE.HISTORY_ID]), BK_LOG_STORAGE.FAVORITE_ID, store.state.storage[BK_LOG_STORAGE.FAVORITE_ID]))
@@ -93557,6 +93901,9 @@ var WarningSetting = function WarningSetting() {
93557
93901
  router.replace({
93558
93902
  query: sub_barvue_type_script_setup_true_lang_js_objectSpread(sub_barvue_type_script_setup_true_lang_js_objectSpread(sub_barvue_type_script_setup_true_lang_js_objectSpread({}, route.query), queryTab), {}, defineProperty_defineProperty(defineProperty_defineProperty({
93559
93903
  indexId: ids[0],
93904
+ search_mode: search_mode,
93905
+ keyword: keyword,
93906
+ addition: JSON.stringify(addition),
93560
93907
  unionList: undefined,
93561
93908
  clusterParams: undefined
93562
93909
  }, BK_LOG_STORAGE.HISTORY_ID, store.state.storage[BK_LOG_STORAGE.HISTORY_ID]), BK_LOG_STORAGE.FAVORITE_ID, store.state.storage[BK_LOG_STORAGE.FAVORITE_ID]))
@@ -93586,14 +93933,35 @@ var WarningSetting = function WarningSetting() {
93586
93933
  };
93587
93934
  var handleIndexSetSelected = /*#__PURE__*/function () {
93588
93935
  var _ref = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(payload) {
93589
- var _payload$ids;
93936
+ var _payload$ids, indexSetDefaultCondition, _payload$items$, _payload$items$2;
93590
93937
  return regenerator_default().wrap(function _callee$(_context) {
93591
93938
  while (1) switch (_context.prev = _context.next) {
93592
93939
  case 0:
93593
93940
  if (!(0,external_lodash_namespaceObject.isEqual)(indexSetParams.value.ids, payload.ids) || indexSetParams.value.isUnionIndex !== payload.isUnionIndex) {
93941
+ /** 索引集默认条件 */
93942
+ indexSetDefaultCondition = {};
93943
+ /** 只选择一个索引集且ui模式和sql模式都没有值, 取索引集默认条件 */
93944
+ if (payload.items.length === 1 && !indexSetParams.value.addition.length && !indexSetParams.value.keyword) {
93945
+ if ((_payload$items$ = payload.items[0]) !== null && _payload$items$ !== void 0 && _payload$items$.query_string) {
93946
+ indexSetDefaultCondition = {
93947
+ keyword: payload.items[0].query_string,
93948
+ search_mode: 'sql',
93949
+ addition: []
93950
+ };
93951
+ } else if ((_payload$items$2 = payload.items[0]) !== null && _payload$items$2 !== void 0 && _payload$items$2.addition) {
93952
+ indexSetDefaultCondition = {
93953
+ addition: toConsumableArray_toConsumableArray(payload.items[0].addition),
93954
+ search_mode: 'ui',
93955
+ keyword: ''
93956
+ };
93957
+ }
93958
+ if (indexSetDefaultCondition.search_mode) {
93959
+ store.commit('updateStorage', defineProperty_defineProperty({}, BK_LOG_STORAGE.SEARCH_TYPE, ['ui', 'sql'].indexOf(indexSetDefaultCondition.search_mode)));
93960
+ }
93961
+ }
93594
93962
  retrieve_helper.setIndexsetId(payload.ids, payload.isUnionIndex ? 'union' : 'single', false);
93595
93963
  store.commit('updateUnionIndexList', payload.isUnionIndex ? (_payload$ids = payload.ids) !== null && _payload$ids !== void 0 ? _payload$ids : [] : []);
93596
- store.commit('updateIndexItem', payload);
93964
+ store.commit('updateIndexItem', sub_barvue_type_script_setup_true_lang_js_objectSpread(sub_barvue_type_script_setup_true_lang_js_objectSpread({}, payload), indexSetDefaultCondition));
93597
93965
  if (!payload.isUnionIndex) {
93598
93966
  store.commit('updateIndexId', payload.ids[0]);
93599
93967
  }
@@ -93602,9 +93970,18 @@ var WarningSetting = function WarningSetting() {
93602
93970
  origin_log_list: [],
93603
93971
  list: []
93604
93972
  });
93605
- store.dispatch('requestIndexSetFieldInfo').then(function () {
93973
+ store.dispatch('requestIndexSetFieldInfo').then(function (resp) {
93974
+ var _resp$data, _resp$data2;
93606
93975
  retrieve_helper.fire(retrieve_events.TREND_GRAPH_SEARCH);
93607
- store.dispatch('requestIndexSetQuery');
93976
+ if (resp !== null && resp !== void 0 && (_resp$data = resp.data) !== null && _resp$data !== void 0 && (_resp$data = _resp$data.fields) !== null && _resp$data !== void 0 && _resp$data.length) {
93977
+ store.dispatch('requestIndexSetQuery');
93978
+ }
93979
+ if (!(resp !== null && resp !== void 0 && (_resp$data2 = resp.data) !== null && _resp$data2 !== void 0 && (_resp$data2 = _resp$data2.fields) !== null && _resp$data2 !== void 0 && _resp$data2.length)) {
93980
+ store.commit('updateIndexSetQueryResult', {
93981
+ is_error: true,
93982
+ exception_msg: 'index-set-field-not-found'
93983
+ });
93984
+ }
93608
93985
  });
93609
93986
  setRouteParams(payload.ids, payload.isUnionIndex);
93610
93987
  }
@@ -93752,7 +94129,8 @@ var WarningSetting = function WarningSetting() {
93752
94129
  ClusterSetting: ClusterSetting,
93753
94130
  BarGlobalSetting: BarGlobalSetting,
93754
94131
  MoreSetting: MoreSetting,
93755
- WarningSetting: WarningSetting
94132
+ WarningSetting: WarningSetting,
94133
+ ShareLink: share_link
93756
94134
  };
93757
94135
  }
93758
94136
  });
@@ -93769,8 +94147,8 @@ var WarningSetting = function WarningSetting() {
93769
94147
 
93770
94148
  var sub_bar_component = normalizeComponent(
93771
94149
  retrieve_v2_sub_barvue_type_script_setup_true_lang_js,
93772
- sub_barvue_type_template_id_74d2d0b1_render,
93773
- sub_barvue_type_template_id_74d2d0b1_staticRenderFns,
94150
+ sub_barvue_type_template_id_6680cc42_render,
94151
+ sub_barvue_type_template_id_6680cc42_staticRenderFns,
93774
94152
  false,
93775
94153
  null,
93776
94154
  null,
@@ -94034,6 +94412,40 @@ var sub_bar_component = normalizeComponent(
94034
94412
  });
94035
94413
  }
94036
94414
  }
94415
+ const {
94416
+ addition,
94417
+ keyword,
94418
+ items
94419
+ } = store.state.indexItem;
94420
+ // 初始化时,判断当前单选索引集是否有默认条件
94421
+ if (items.length === 1 && !addition.length && !keyword) {
94422
+ let searchMode = 'ui';
94423
+ let defaultKeyword = '';
94424
+ let defaultAddition = [];
94425
+ if (items[0]?.query_string) {
94426
+ defaultKeyword = items[0].query_string;
94427
+ searchMode = 'sql';
94428
+ } else if (items[0]?.addition) {
94429
+ defaultAddition = [...items[0].addition];
94430
+ searchMode = 'ui';
94431
+ }
94432
+ store.commit('updateStorage', {
94433
+ [BK_LOG_STORAGE.SEARCH_TYPE]: ['ui', 'sql'].indexOf(searchMode ?? 'ui')
94434
+ });
94435
+ store.commit('updateIndexItem', {
94436
+ addition: defaultAddition,
94437
+ keyword: defaultKeyword,
94438
+ search_mode: searchMode
94439
+ });
94440
+ router.replace({
94441
+ query: {
94442
+ ...route.query,
94443
+ addition: JSON.stringify(defaultAddition),
94444
+ keyword: defaultKeyword,
94445
+ search_mode: searchMode
94446
+ }
94447
+ });
94448
+ }
94037
94449
  if (emptyIndexSetList.length === 0) {
94038
94450
  retrieve_helper.setSearchingValue(true);
94039
94451
  const type = route.query.indexId ? 'single' : 'union';
@@ -94302,7 +94714,6 @@ if (!window.mainComponent?.$t) {
94302
94714
  $t: language_i18n.t.bind(language_i18n),
94303
94715
  $i18n: language_i18n
94304
94716
  };
94305
- window.$t = language_i18n.t.bind(language_i18n);
94306
94717
  }
94307
94718
 
94308
94719
 
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@blueking/monitor-apm-log","version":"2.3.4","description":"","main":"main.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"MIT"}
1
+ {"name":"@blueking/monitor-apm-log","version":"2.3.6","description":"","main":"main.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"MIT"}
Binary file