@aliyun-obv/api 0.0.47 → 0.0.49

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/dist/api.d.ts CHANGED
@@ -213,4 +213,26 @@ declare namespace workSpaceService {
213
213
  export {};
214
214
  }
215
215
 
216
- export { commonEasyFetch, metaService, obsEasyFetch, showAlertDialog, showAlertDialogWhenNeedLogin, slsEasyFetch, workSpaceService };
216
+ declare namespace indexService {
217
+ interface IndexParameters {
218
+ ProjectName: string;
219
+ LogStoreName: string;
220
+ }
221
+ interface GetProjectLogs {
222
+ ProjectName: string;
223
+ query: string;
224
+ }
225
+ function updateIndexInfo(params: IndexParameters, options?: {
226
+ forbidAlert: boolean;
227
+ }): Promise<IResponseData>;
228
+ function getIndexInfo(params: IndexParameters, options?: {
229
+ forbidAlert: boolean;
230
+ }): Promise<IResponseData>;
231
+ function getProjectLogs(params: GetProjectLogs): Promise<IResponseData>;
232
+ function getCloudMonitoringProjectLogs(params: GetProjectLogs, options?: {
233
+ forbidAlert: boolean;
234
+ }): Promise<IResponseData>;
235
+ function updateIndexDocVal(project: string, logstore: string): Promise<void>;
236
+ }
237
+
238
+ export { commonEasyFetch, indexService, metaService, obsEasyFetch, showAlertDialog, showAlertDialogWhenNeedLogin, slsEasyFetch, workSpaceService };
package/dist/api.es.js CHANGED
@@ -41,7 +41,7 @@ var __publicField = (obj, key, value) => {
41
41
  __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
42
42
  return value;
43
43
  };
44
- var __async$5 = (__this, __arguments, generator) => {
44
+ var __async$6 = (__this, __arguments, generator) => {
45
45
  return new Promise((resolve, reject) => {
46
46
  var fulfilled = (value) => {
47
47
  try {
@@ -95,6 +95,8 @@ class BaseFetch {
95
95
  let newInit = init;
96
96
  if (hasBaseURL) {
97
97
  url = `${this.defaults.baseURL}${url}`;
98
+ }
99
+ if ((url.startsWith("http:") || url.startsWith("https:")) && !url.startsWith(window.location.host)) {
98
100
  newInit = __spreadValues$4({}, Object.assign({}, init, { credentials: "include" }));
99
101
  }
100
102
  if (this.defaults.beforeRequest) {
@@ -103,7 +105,7 @@ class BaseFetch {
103
105
  return { url, init: newInit };
104
106
  }
105
107
  callFetch(_0, _1) {
106
- return __async$5(this, arguments, function* (api, init, options = {}) {
108
+ return __async$6(this, arguments, function* (api, init, options = {}) {
107
109
  let headers = init == null ? void 0 : init.headers;
108
110
  if (options.headers) {
109
111
  headers = Object.assign({}, init == null ? void 0 : init.headers, options.headers);
@@ -115,7 +117,7 @@ class BaseFetch {
115
117
  });
116
118
  }
117
119
  get(_0) {
118
- return __async$5(this, arguments, function* (api, params = {}, options = {}) {
120
+ return __async$6(this, arguments, function* (api, params = {}, options = {}) {
119
121
  if (isTest)
120
122
  return Promise.resolve({ res: void 0 });
121
123
  try {
@@ -144,7 +146,7 @@ class BaseFetch {
144
146
  });
145
147
  }
146
148
  _post(_0) {
147
- return __async$5(this, arguments, function* (api, params = {}, options = {}, defaultInit) {
149
+ return __async$6(this, arguments, function* (api, params = {}, options = {}, defaultInit) {
148
150
  var _a;
149
151
  if (isTest)
150
152
  return Promise.resolve({ res: void 0 });
@@ -153,7 +155,12 @@ class BaseFetch {
153
155
  const fetchInit = _.merge({}, defaultInit, {
154
156
  body: contentType.includes("application/json") ? JSON.stringify(params) : getPostParam(params)
155
157
  });
156
- const { url: newApi, init: newInit } = yield this.beforeRequest(api, params, fetchInit, options);
158
+ const { url: newApi, init: newInit } = yield this.beforeRequest(
159
+ api,
160
+ params,
161
+ fetchInit,
162
+ options
163
+ );
157
164
  const res = yield this.callFetch(newApi, newInit, options);
158
165
  if (this.defaults.afterResponse) {
159
166
  return yield this.defaults.afterResponse(res, options);
@@ -168,12 +175,12 @@ class BaseFetch {
168
175
  });
169
176
  }
170
177
  post(_0) {
171
- return __async$5(this, arguments, function* (api, params = {}, options = {}) {
178
+ return __async$6(this, arguments, function* (api, params = {}, options = {}) {
172
179
  return this._post(api, params, options, this.defaults.postDefaultInit);
173
180
  });
174
181
  }
175
182
  put(_0) {
176
- return __async$5(this, arguments, function* (api, params = {}, options = {}) {
183
+ return __async$6(this, arguments, function* (api, params = {}, options = {}) {
177
184
  return this._post(api, params, options, this.defaults.putDefaultInit);
178
185
  });
179
186
  }
@@ -255,7 +262,7 @@ var __spreadValues$3 = (a, b) => {
255
262
  return a;
256
263
  };
257
264
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
258
- var __async$4 = (__this, __arguments, generator) => {
265
+ var __async$5 = (__this, __arguments, generator) => {
259
266
  return new Promise((resolve, reject) => {
260
267
  var fulfilled = (value) => {
261
268
  try {
@@ -278,7 +285,7 @@ var __async$4 = (__this, __arguments, generator) => {
278
285
  const commonEasyFetch = new BaseFetch();
279
286
  commonEasyFetch.defaults.postDefaultInit.headers["Content-Type"] = "application/x-www-form-urlencoded";
280
287
  commonEasyFetch.defaults.postDefaultInit.headers["Accept"] = "application/json";
281
- commonEasyFetch.defaults.afterResponse = (response) => __async$4(void 0, null, function* () {
288
+ commonEasyFetch.defaults.afterResponse = (response) => __async$5(void 0, null, function* () {
282
289
  if (response.status >= 200 && response.status < 300) {
283
290
  const data = yield response.json();
284
291
  return __spreadProps$3(__spreadValues$3({}, data != null ? data : {}), {
@@ -537,7 +544,7 @@ var __spreadValues$2 = (a, b) => {
537
544
  return a;
538
545
  };
539
546
  var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
540
- var __async$3 = (__this, __arguments, generator) => {
547
+ var __async$4 = (__this, __arguments, generator) => {
541
548
  return new Promise((resolve, reject) => {
542
549
  var fulfilled = (value) => {
543
550
  try {
@@ -604,7 +611,7 @@ function waitRefreshToken() {
604
611
  });
605
612
  }
606
613
  function _finalFetch(api, fetchOptions, deep = 0) {
607
- return __async$3(this, null, function* () {
614
+ return __async$4(this, null, function* () {
608
615
  const requestApi = api;
609
616
  if (tokenRefreshing) {
610
617
  yield waitRefreshToken();
@@ -633,7 +640,7 @@ function _finalFetch(api, fetchOptions, deep = 0) {
633
640
  });
634
641
  }
635
642
  function finalFetch(api, fetchOptions, options) {
636
- return __async$3(this, null, function* () {
643
+ return __async$4(this, null, function* () {
637
644
  let finalOption = fetchOptions;
638
645
  const parseQuery = urijs(decodeURIComponent(location.search)).escapeQuerySpace(false).query(true);
639
646
  if (parseQuery.slsRegion && options.ingoreSlsRegion) {
@@ -673,7 +680,7 @@ var __spreadValues$1 = (a, b) => {
673
680
  return a;
674
681
  };
675
682
  var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
676
- var __async$2 = (__this, __arguments, generator) => {
683
+ var __async$3 = (__this, __arguments, generator) => {
677
684
  return new Promise((resolve, reject) => {
678
685
  var fulfilled = (value) => {
679
686
  try {
@@ -697,7 +704,7 @@ const slsEasyFetch = new BaseFetch(finalFetch);
697
704
  slsEasyFetch.defaults.postDefaultInit.headers["Content-Type"] = "application/x-www-form-urlencoded";
698
705
  slsEasyFetch.defaults.postDefaultInit.headers["Accept"] = "application/json";
699
706
  slsEasyFetch.defaults.errorHandler = errorHandler;
700
- slsEasyFetch.defaults.beforeRequest = (url, params, init, options) => __async$2(void 0, null, function* () {
707
+ slsEasyFetch.defaults.beforeRequest = (url, params, init, options) => __async$3(void 0, null, function* () {
701
708
  var _a;
702
709
  const method = (_a = init.method) == null ? void 0 : _a.toLowerCase();
703
710
  if (method === "post" || method === "put") {
@@ -728,7 +735,7 @@ slsEasyFetch.defaults.beforeRequest = (url, params, init, options) => __async$2(
728
735
  };
729
736
  }
730
737
  });
731
- slsEasyFetch.defaults.afterResponse = (r, options) => __async$2(void 0, null, function* () {
738
+ slsEasyFetch.defaults.afterResponse = (r, options) => __async$3(void 0, null, function* () {
732
739
  const { response, data } = r;
733
740
  let composedData = typeof data === "string" || typeof data === "number" || Array.isArray(data) ? data : __spreadProps$1(__spreadValues$1({}, data), {
734
741
  response
@@ -756,9 +763,19 @@ slsEasyFetch.defaults.afterResponse = (r, options) => __async$2(void 0, null, fu
756
763
  return composedData;
757
764
  });
758
765
 
766
+ function getBaseUrl() {
767
+ if (window.ALIYUN_CONSOLE_CONFIG.LOCAL) {
768
+ return `http://pre-observability:${window.location.port}`;
769
+ }
770
+ if (window.ALIYUN_CONSOLE_CONFIG.ENV === "pre") {
771
+ return `https://pre-observability.console.aliyun.com`;
772
+ }
773
+ return `https://observability.console.aliyun.com`;
774
+ }
759
775
  const obsEasyFetch = new BaseFetch(finalFetch);
760
776
  obsEasyFetch.defaults.postDefaultInit.headers["Content-Type"] = "application/x-www-form-urlencoded";
761
777
  obsEasyFetch.defaults.postDefaultInit.headers["Accept"] = "application/json";
778
+ obsEasyFetch.defaults.baseURL = getBaseUrl();
762
779
  obsEasyFetch.defaults.errorHandler = errorHandler;
763
780
  obsEasyFetch.defaults.beforeRequest = slsEasyFetch.defaults.beforeRequest;
764
781
  obsEasyFetch.defaults.afterResponse = slsEasyFetch.defaults.afterResponse;
@@ -782,7 +799,7 @@ var __spreadValues = (a, b) => {
782
799
  return a;
783
800
  };
784
801
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
785
- var __async$1 = (__this, __arguments, generator) => {
802
+ var __async$2 = (__this, __arguments, generator) => {
786
803
  return new Promise((resolve, reject) => {
787
804
  var fulfilled = (value) => {
788
805
  try {
@@ -805,13 +822,13 @@ var __async$1 = (__this, __arguments, generator) => {
805
822
  var metaService;
806
823
  ((metaService2) => {
807
824
  function getMetaRecord(params) {
808
- return __async$1(this, null, function* () {
825
+ return __async$2(this, null, function* () {
809
826
  return slsEasyFetch.get("/console/metaRecordAjax/get.json", params);
810
827
  });
811
828
  }
812
829
  metaService2.getMetaRecord = getMetaRecord;
813
830
  function listMetaRecord(params, forbidAlert = false) {
814
- return __async$1(this, null, function* () {
831
+ return __async$2(this, null, function* () {
815
832
  return slsEasyFetch.get(
816
833
  "/console/metaRecordAjax/list.json",
817
834
  __spreadProps(__spreadValues({}, params), {
@@ -824,13 +841,13 @@ var metaService;
824
841
  }
825
842
  metaService2.listMetaRecord = listMetaRecord;
826
843
  function createMetaResource(params) {
827
- return __async$1(this, null, function* () {
844
+ return __async$2(this, null, function* () {
828
845
  return slsEasyFetch.post("/console/metaResourceAjax/create.json", params);
829
846
  });
830
847
  }
831
848
  metaService2.createMetaResource = createMetaResource;
832
849
  function createMetaRecord(_0) {
833
- return __async$1(this, arguments, function* ({ name, record }, forbidAlert = false) {
850
+ return __async$2(this, arguments, function* ({ name, record }, forbidAlert = false) {
834
851
  const recordObj = __spreadProps(__spreadValues({}, record), {
835
852
  value: JSON.stringify(record.value)
836
853
  });
@@ -846,7 +863,7 @@ var metaService;
846
863
  }
847
864
  metaService2.createMetaRecord = createMetaRecord;
848
865
  function updataMetaRecord(_0) {
849
- return __async$1(this, arguments, function* ({ name, record }, forbidAlert = false) {
866
+ return __async$2(this, arguments, function* ({ name, record }, forbidAlert = false) {
850
867
  const recordObj = __spreadProps(__spreadValues({}, record), {
851
868
  value: JSON.stringify(record.value)
852
869
  });
@@ -862,7 +879,7 @@ var metaService;
862
879
  }
863
880
  metaService2.updataMetaRecord = updataMetaRecord;
864
881
  function listMetaRecordWithIdentity(params, forbidAlert = false) {
865
- return __async$1(this, null, function* () {
882
+ return __async$2(this, null, function* () {
866
883
  return slsEasyFetch.get(
867
884
  "/console/metaRecordAjax/listWithIdentity.json",
868
885
  __spreadProps(__spreadValues({}, params), {
@@ -875,13 +892,13 @@ var metaService;
875
892
  }
876
893
  metaService2.listMetaRecordWithIdentity = listMetaRecordWithIdentity;
877
894
  function getMetaRecordWithIdentity(params) {
878
- return __async$1(this, null, function* () {
895
+ return __async$2(this, null, function* () {
879
896
  return slsEasyFetch.get("/console/metaRecordAjax/getWithIdentity.json", params);
880
897
  });
881
898
  }
882
899
  metaService2.getMetaRecordWithIdentity = getMetaRecordWithIdentity;
883
900
  function updataMetaRecordWithIdentity(_0) {
884
- return __async$1(this, arguments, function* ({ name, record }, forbidAlert = false) {
901
+ return __async$2(this, arguments, function* ({ name, record }, forbidAlert = false) {
885
902
  const recordObj = __spreadProps(__spreadValues({}, record), {
886
903
  value: JSON.stringify(record.value)
887
904
  });
@@ -897,7 +914,7 @@ var metaService;
897
914
  }
898
915
  metaService2.updataMetaRecordWithIdentity = updataMetaRecordWithIdentity;
899
916
  function deleteRecords() {
900
- return __async$1(this, arguments, function* (config = {
917
+ return __async$2(this, arguments, function* (config = {
901
918
  name: "",
902
919
  recordIds: ""
903
920
  // 1,2
@@ -907,7 +924,7 @@ var metaService;
907
924
  }
908
925
  metaService2.deleteRecords = deleteRecords;
909
926
  function deleteRecordsWithIdentity() {
910
- return __async$1(this, arguments, function* (config = {
927
+ return __async$2(this, arguments, function* (config = {
911
928
  name: "",
912
929
  recordIds: ""
913
930
  // 1,2
@@ -919,13 +936,13 @@ var metaService;
919
936
  }
920
937
  metaService2.deleteRecordsWithIdentity = deleteRecordsWithIdentity;
921
938
  function deleteResource(params) {
922
- return __async$1(this, null, function* () {
939
+ return __async$2(this, null, function* () {
923
940
  return slsEasyFetch.post("/console/metaResourceAjax/delete.json", params);
924
941
  });
925
942
  }
926
943
  metaService2.deleteResource = deleteResource;
927
944
  function createSomeMetaRecordsWithIdentity(_0) {
928
- return __async$1(this, arguments, function* ({ name, records }, forbidAlert = false) {
945
+ return __async$2(this, arguments, function* ({ name, records }, forbidAlert = false) {
929
946
  return slsEasyFetch.post(
930
947
  "/console/metaRecordAjax/batchUpsertWithIdentity.json",
931
948
  {
@@ -938,7 +955,7 @@ var metaService;
938
955
  }
939
956
  metaService2.createSomeMetaRecordsWithIdentity = createSomeMetaRecordsWithIdentity;
940
957
  function createSomeMetaRecords(_0) {
941
- return __async$1(this, arguments, function* ({ name, records }, forbidAlert = false) {
958
+ return __async$2(this, arguments, function* ({ name, records }, forbidAlert = false) {
942
959
  return slsEasyFetch.post(
943
960
  "/console/metaRecordAjax/batchUpsert.json",
944
961
  {
@@ -951,7 +968,7 @@ var metaService;
951
968
  }
952
969
  metaService2.createSomeMetaRecords = createSomeMetaRecords;
953
970
  function getNewDashboardList(_0) {
954
- return __async$1(this, arguments, function* ({ name, jsonPath, jsonPathValue, page, size }, forbidAlert = false) {
971
+ return __async$2(this, arguments, function* ({ name, jsonPath, jsonPathValue, page, size }, forbidAlert = false) {
955
972
  return slsEasyFetch.post(
956
973
  `/console/metaRecordAjax/list.json`,
957
974
  {
@@ -967,7 +984,7 @@ var metaService;
967
984
  }
968
985
  metaService2.getNewDashboardList = getNewDashboardList;
969
986
  function getNewDashboardListWithIdentity(_0) {
970
- return __async$1(this, arguments, function* ({ name, jsonPath, jsonPathValue, page, size }, forbidAlert = false) {
987
+ return __async$2(this, arguments, function* ({ name, jsonPath, jsonPathValue, page, size }, forbidAlert = false) {
971
988
  return slsEasyFetch.post(
972
989
  `/console/metaRecordAjax/listWithIdentity.json`,
973
990
  {
@@ -983,7 +1000,7 @@ var metaService;
983
1000
  }
984
1001
  metaService2.getNewDashboardListWithIdentity = getNewDashboardListWithIdentity;
985
1002
  function deleteVersionRecords(_0) {
986
- return __async$1(this, arguments, function* ({ name, recordIds }, forbidAlert = false) {
1003
+ return __async$2(this, arguments, function* ({ name, recordIds }, forbidAlert = false) {
987
1004
  return slsEasyFetch.post(
988
1005
  "/console/metaRecordAjax/delete.json",
989
1006
  {
@@ -995,7 +1012,7 @@ var metaService;
995
1012
  });
996
1013
  }
997
1014
  metaService2.deleteVersionRecords = deleteVersionRecords;
998
- metaService2.ckeckPermissionForList = (resourceName) => __async$1(void 0, null, function* () {
1015
+ metaService2.ckeckPermissionForList = (resourceName) => __async$2(void 0, null, function* () {
999
1016
  const res = yield slsEasyFetch.get(
1000
1017
  "/console/metaRecordAjax/checkList.json",
1001
1018
  {
@@ -1010,7 +1027,7 @@ var metaService;
1010
1027
  });
1011
1028
  })(metaService || (metaService = {}));
1012
1029
 
1013
- var __async = (__this, __arguments, generator) => {
1030
+ var __async$1 = (__this, __arguments, generator) => {
1014
1031
  return new Promise((resolve, reject) => {
1015
1032
  var fulfilled = (value) => {
1016
1033
  try {
@@ -1033,42 +1050,128 @@ var __async = (__this, __arguments, generator) => {
1033
1050
  var workSpaceService;
1034
1051
  ((workSpaceService2) => {
1035
1052
  function getWorkspaceRecord(params) {
1036
- return __async(this, null, function* () {
1053
+ return __async$1(this, null, function* () {
1037
1054
  return slsEasyFetch.get("/console/workspace/list_app.json", params);
1038
1055
  });
1039
1056
  }
1040
1057
  workSpaceService2.getWorkspaceRecord = getWorkspaceRecord;
1041
1058
  function getWorkspacelist(params) {
1042
- return __async(this, null, function* () {
1059
+ return __async$1(this, null, function* () {
1043
1060
  return slsEasyFetch.get("/console/workspace/list.json", params);
1044
1061
  });
1045
1062
  }
1046
1063
  workSpaceService2.getWorkspacelist = getWorkspacelist;
1047
1064
  function getWorkspaceInfor(params) {
1048
- return __async(this, null, function* () {
1065
+ return __async$1(this, null, function* () {
1049
1066
  return slsEasyFetch.get("/console/workspace/get.json", params);
1050
1067
  });
1051
1068
  }
1052
1069
  workSpaceService2.getWorkspaceInfor = getWorkspaceInfor;
1053
1070
  function createInstance(params) {
1054
- return __async(this, null, function* () {
1071
+ return __async$1(this, null, function* () {
1055
1072
  return slsEasyFetch.post("/observability/createInstance.json", params);
1056
1073
  });
1057
1074
  }
1058
1075
  workSpaceService2.createInstance = createInstance;
1059
1076
  function updataAppInstance(params) {
1060
- return __async(this, null, function* () {
1077
+ return __async$1(this, null, function* () {
1061
1078
  return slsEasyFetch.post("/console/workspace/update_app.json", params);
1062
1079
  });
1063
1080
  }
1064
1081
  workSpaceService2.updataAppInstance = updataAppInstance;
1065
1082
  function getWorkspaceForITOM(params) {
1066
- return __async(this, null, function* () {
1083
+ return __async$1(this, null, function* () {
1067
1084
  return slsEasyFetch.get("/console/workspace/getWorkspaceForITOM.json", params);
1068
1085
  });
1069
1086
  }
1070
1087
  workSpaceService2.getWorkspaceForITOM = getWorkspaceForITOM;
1071
1088
  })(workSpaceService || (workSpaceService = {}));
1072
1089
 
1073
- export { commonEasyFetch, metaService, obsEasyFetch, showAlertDialog, showAlertDialogWhenNeedLogin, slsEasyFetch, workSpaceService };
1090
+ var __async = (__this, __arguments, generator) => {
1091
+ return new Promise((resolve, reject) => {
1092
+ var fulfilled = (value) => {
1093
+ try {
1094
+ step(generator.next(value));
1095
+ } catch (e) {
1096
+ reject(e);
1097
+ }
1098
+ };
1099
+ var rejected = (value) => {
1100
+ try {
1101
+ step(generator.throw(value));
1102
+ } catch (e) {
1103
+ reject(e);
1104
+ }
1105
+ };
1106
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
1107
+ step((generator = generator.apply(__this, __arguments)).next());
1108
+ });
1109
+ };
1110
+ var indexService;
1111
+ ((indexService2) => {
1112
+ function updateIndexInfo(_0) {
1113
+ return __async(this, arguments, function* (params, options = {
1114
+ forbidAlert: true
1115
+ }) {
1116
+ return slsEasyFetch.post("/console/logstoreindex/update.json", params, options);
1117
+ });
1118
+ }
1119
+ indexService2.updateIndexInfo = updateIndexInfo;
1120
+ function getIndexInfo(_0) {
1121
+ return __async(this, arguments, function* (params, options = {
1122
+ forbidAlert: true
1123
+ }) {
1124
+ return slsEasyFetch.get("/console/logstoreindex/getString.json", params, options);
1125
+ });
1126
+ }
1127
+ indexService2.getIndexInfo = getIndexInfo;
1128
+ function getProjectLogs(params) {
1129
+ return __async(this, null, function* () {
1130
+ return slsEasyFetch.get("/console/logstoreindex/getProjectLogs.json", params);
1131
+ });
1132
+ }
1133
+ indexService2.getProjectLogs = getProjectLogs;
1134
+ function getCloudMonitoringProjectLogs(_0) {
1135
+ return __async(this, arguments, function* (params, options = {
1136
+ forbidAlert: true
1137
+ }) {
1138
+ return slsEasyFetch.get("/console/logstoreindex/getProjectLogs.json", params, options);
1139
+ });
1140
+ }
1141
+ indexService2.getCloudMonitoringProjectLogs = getCloudMonitoringProjectLogs;
1142
+ function updateIndexDocVal(project, logstore) {
1143
+ return __async(this, null, function* () {
1144
+ const openDocVal = (obj) => {
1145
+ Object.keys(obj).forEach((key) => {
1146
+ obj[key].doc_value = true;
1147
+ if (obj[key].type === "json") {
1148
+ openDocVal(obj[key].json_keys);
1149
+ }
1150
+ });
1151
+ };
1152
+ const res = yield indexService2.getIndexInfo({ ProjectName: project, LogStoreName: logstore });
1153
+ if (res && res.code === "200" && res.data) {
1154
+ const config = JSON.parse(res.data);
1155
+ const { keys, max_text_len, ttl, log_reduce, line } = config;
1156
+ openDocVal(keys || {});
1157
+ const params = {
1158
+ ProjectName: project,
1159
+ LogStoreName: logstore,
1160
+ TTL: config.ttl,
1161
+ indexDetail: JSON.stringify({
1162
+ max_text_len,
1163
+ ttl,
1164
+ log_reduce,
1165
+ line,
1166
+ keys
1167
+ })
1168
+ };
1169
+ yield updateIndexInfo(params);
1170
+ }
1171
+ });
1172
+ }
1173
+ indexService2.updateIndexDocVal = updateIndexDocVal;
1174
+ })(indexService || (indexService = {}));
1175
+
1176
+ export { commonEasyFetch, indexService, metaService, obsEasyFetch, showAlertDialog, showAlertDialogWhenNeedLogin, slsEasyFetch, workSpaceService };
1074
1177
  //# sourceMappingURL=api.es.js.map
package/package.json CHANGED
@@ -10,11 +10,11 @@
10
10
  "urijs": "^1.19.1",
11
11
  "lodash": "^4.17.21",
12
12
  "@alicloud/console-base-error-prompt-proxy": "^1.9.12",
13
- "@aliyun-obv/i18n": "0.0.47",
14
- "@aliyun-obv/utils": "0.0.47",
13
+ "@aliyun-obv/i18n": "0.0.49",
14
+ "@aliyun-obv/utils": "0.0.49",
15
15
  "@alifd/next": "^1.27.11",
16
16
  "styled-components": "^5.2.0"
17
17
  },
18
18
  "devDependencies": {},
19
- "version": "0.0.47"
19
+ "version": "0.0.49"
20
20
  }