@aliyun-obv/api 0.2.26 → 0.2.28-beta.0
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 +63 -1
- package/dist/api.es.js +199 -47
- package/package.json +3 -3
package/dist/api.d.ts
CHANGED
|
@@ -235,4 +235,66 @@ declare namespace indexService {
|
|
|
235
235
|
function updateIndexDocVal(project: string, logstore: string): Promise<void>;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
declare namespace projectService {
|
|
239
|
+
export interface ProjectCommonParameters {
|
|
240
|
+
ProjectName: string;
|
|
241
|
+
}
|
|
242
|
+
export interface getProject {
|
|
243
|
+
IsListOnly: number;
|
|
244
|
+
size: number;
|
|
245
|
+
page: number;
|
|
246
|
+
projectName: string;
|
|
247
|
+
clusterRegion: string;
|
|
248
|
+
resourceGroupId?: string;
|
|
249
|
+
}
|
|
250
|
+
export interface getNewProjectInfo {
|
|
251
|
+
projectName: string;
|
|
252
|
+
}
|
|
253
|
+
export interface updateProject {
|
|
254
|
+
projectName: string;
|
|
255
|
+
projectDesc: string;
|
|
256
|
+
}
|
|
257
|
+
export interface deleteProject {
|
|
258
|
+
projectName: string;
|
|
259
|
+
deleteReason: string;
|
|
260
|
+
}
|
|
261
|
+
export interface getLb {
|
|
262
|
+
tairKey: string;
|
|
263
|
+
}
|
|
264
|
+
export interface putLb {
|
|
265
|
+
tairKey: string;
|
|
266
|
+
tairValue: string;
|
|
267
|
+
tairType: string;
|
|
268
|
+
}
|
|
269
|
+
interface MetricStoreParameters {
|
|
270
|
+
ProjectName: string;
|
|
271
|
+
IsListOnly: number;
|
|
272
|
+
Page: number;
|
|
273
|
+
Size: number;
|
|
274
|
+
telemetryType: string;
|
|
275
|
+
}
|
|
276
|
+
export interface getNewProjectInfo {
|
|
277
|
+
projectName: string;
|
|
278
|
+
}
|
|
279
|
+
export function getCombineSearch(params: ProjectCommonParameters, options?: any): Promise<IResponseData>;
|
|
280
|
+
export function getListProject(params: getProject, option?: any): Promise<IResponseData>;
|
|
281
|
+
export function getListProjectNew(params: getProject, option?: any): Promise<IResponseData>;
|
|
282
|
+
export const getProjectList: (config?: {}, option?: {
|
|
283
|
+
forbidAlert: boolean;
|
|
284
|
+
}) => Promise<IResponseData>;
|
|
285
|
+
export function createProject(): Promise<IResponseData>;
|
|
286
|
+
export function updateProject(params: updateProject): Promise<IResponseData>;
|
|
287
|
+
export function deleteProject(params: deleteProject): Promise<IResponseData>;
|
|
288
|
+
export function getNewProjectInfo(params: getNewProjectInfo, option?: any): Promise<IResponseData>;
|
|
289
|
+
export function getLdb(params: getLb): Promise<IResponseData | ((_params?: {}) => Promise<any>)>;
|
|
290
|
+
export function putLdb(params: putLb): Promise<IResponseData | ((params?: {}) => Promise<any>)>;
|
|
291
|
+
export function getOpConfig(): Promise<IResponseData | ((config?: {}) => Promise<any>)>;
|
|
292
|
+
export function listMetricStore(params: MetricStoreParameters): Promise<IResponseData>;
|
|
293
|
+
export {};
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
declare namespace diamondService {
|
|
297
|
+
function getTemplateDiamond(name: string): Promise<IResponseData>;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export { IResponseData, commonEasyFetch, diamondService, indexService, metaService, obsEasyFetch, projectService, showAlertDialog, showAlertDialogWhenNeedLogin, slsEasyFetch, workSpaceService };
|
package/dist/api.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import errorPrompt from '@alicloud/console-base-error-prompt-proxy';
|
|
|
3
3
|
import i18n, { getMsg } from '@aliyun-obv/i18n';
|
|
4
4
|
import urijs from 'urijs';
|
|
5
5
|
import { Dialog, Button, Message } from '@alifd/next';
|
|
6
|
-
import { slsConsoleRuntime, commonUtil, urlUtil, addStubForSearch, addRUMLog } from '@aliyun-obv/utils';
|
|
6
|
+
import { slsConsoleRuntime, commonUtil, urlUtil, addStubForSearch, addRUMLog, slsConsoleUtil } from '@aliyun-obv/utils';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import merge from 'lodash/merge';
|
|
9
9
|
|
|
@@ -38,7 +38,7 @@ var __spreadValues$4 = (a, b) => {
|
|
|
38
38
|
return a;
|
|
39
39
|
};
|
|
40
40
|
var __publicField = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
41
|
-
var __async$
|
|
41
|
+
var __async$8 = (__this, __arguments, generator) => {
|
|
42
42
|
return new Promise((resolve, reject) => {
|
|
43
43
|
var fulfilled = (value) => {
|
|
44
44
|
try {
|
|
@@ -103,7 +103,7 @@ class BaseFetch {
|
|
|
103
103
|
return { url, init: newInit };
|
|
104
104
|
}
|
|
105
105
|
callFetch(_0, _1) {
|
|
106
|
-
return __async$
|
|
106
|
+
return __async$8(this, arguments, function* (api, init, options = {}) {
|
|
107
107
|
let headers = init == null ? void 0 : init.headers;
|
|
108
108
|
if (options.headers) {
|
|
109
109
|
headers = Object.assign({}, init == null ? void 0 : init.headers, options.headers);
|
|
@@ -115,7 +115,7 @@ class BaseFetch {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
get(_0) {
|
|
118
|
-
return __async$
|
|
118
|
+
return __async$8(this, arguments, function* (api, params = {}, options = {}) {
|
|
119
119
|
var _a, _b, _c;
|
|
120
120
|
if (isTest) return Promise.resolve({ res: void 0 });
|
|
121
121
|
try {
|
|
@@ -154,7 +154,7 @@ class BaseFetch {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
_post(_0) {
|
|
157
|
-
return __async$
|
|
157
|
+
return __async$8(this, arguments, function* (api, params = {}, options = {}, defaultInit) {
|
|
158
158
|
var _a;
|
|
159
159
|
if (isTest) return Promise.resolve({ res: void 0 });
|
|
160
160
|
try {
|
|
@@ -192,12 +192,12 @@ class BaseFetch {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
post(_0) {
|
|
195
|
-
return __async$
|
|
195
|
+
return __async$8(this, arguments, function* (api, params = {}, options = {}) {
|
|
196
196
|
return this._post(api, params, options, this.defaults.postDefaultInit);
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
put(_0) {
|
|
200
|
-
return __async$
|
|
200
|
+
return __async$8(this, arguments, function* (api, params = {}, options = {}) {
|
|
201
201
|
return this._post(api, params, options, this.defaults.putDefaultInit);
|
|
202
202
|
});
|
|
203
203
|
}
|
|
@@ -305,7 +305,7 @@ var __spreadValues$3 = (a, b) => {
|
|
|
305
305
|
return a;
|
|
306
306
|
};
|
|
307
307
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
308
|
-
var __async$
|
|
308
|
+
var __async$7 = (__this, __arguments, generator) => {
|
|
309
309
|
return new Promise((resolve, reject) => {
|
|
310
310
|
var fulfilled = (value) => {
|
|
311
311
|
try {
|
|
@@ -328,7 +328,7 @@ var __async$5 = (__this, __arguments, generator) => {
|
|
|
328
328
|
const commonEasyFetch = new BaseFetch();
|
|
329
329
|
commonEasyFetch.defaults.postDefaultInit.headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
330
330
|
commonEasyFetch.defaults.postDefaultInit.headers["Accept"] = "application/json";
|
|
331
|
-
commonEasyFetch.defaults.afterResponse = (response) => __async$
|
|
331
|
+
commonEasyFetch.defaults.afterResponse = (response) => __async$7(void 0, null, function* () {
|
|
332
332
|
if (response.status >= 200 && response.status < 300) {
|
|
333
333
|
const data = yield response.json();
|
|
334
334
|
return __spreadProps$3(__spreadValues$3({}, data != null ? data : {}), {
|
|
@@ -602,7 +602,7 @@ var __spreadValues$2 = (a, b) => {
|
|
|
602
602
|
return a;
|
|
603
603
|
};
|
|
604
604
|
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
605
|
-
var __async$
|
|
605
|
+
var __async$6 = (__this, __arguments, generator) => {
|
|
606
606
|
return new Promise((resolve, reject) => {
|
|
607
607
|
var fulfilled = (value) => {
|
|
608
608
|
try {
|
|
@@ -670,7 +670,7 @@ function waitRefreshToken() {
|
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
function _finalFetch(api, fetchOptions, deep = 0) {
|
|
673
|
-
return __async$
|
|
673
|
+
return __async$6(this, null, function* () {
|
|
674
674
|
const requestApi = api;
|
|
675
675
|
if (tokenRefreshing) {
|
|
676
676
|
yield waitRefreshToken();
|
|
@@ -699,7 +699,7 @@ function _finalFetch(api, fetchOptions, deep = 0) {
|
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
701
|
function finalFetch(api, fetchOptions, options) {
|
|
702
|
-
return __async$
|
|
702
|
+
return __async$6(this, null, function* () {
|
|
703
703
|
let finalOption = fetchOptions;
|
|
704
704
|
const parseQuery = urijs(decodeURIComponent(location.search)).escapeQuerySpace(false).query(true);
|
|
705
705
|
if (parseQuery.slsRegion && options.ingoreSlsRegion) {
|
|
@@ -739,7 +739,7 @@ var __spreadValues$1 = (a, b) => {
|
|
|
739
739
|
return a;
|
|
740
740
|
};
|
|
741
741
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
742
|
-
var __async$
|
|
742
|
+
var __async$5 = (__this, __arguments, generator) => {
|
|
743
743
|
return new Promise((resolve, reject) => {
|
|
744
744
|
var fulfilled = (value) => {
|
|
745
745
|
try {
|
|
@@ -764,7 +764,7 @@ slsEasyFetch.defaults.postDefaultInit.headers["Content-Type"] = "application/x-w
|
|
|
764
764
|
slsEasyFetch.defaults.postDefaultInit.headers["Accept"] = "application/json";
|
|
765
765
|
slsEasyFetch.defaults.baseURL = getSlsBaseUrl();
|
|
766
766
|
slsEasyFetch.defaults.errorHandler = errorHandler;
|
|
767
|
-
slsEasyFetch.defaults.beforeRequest = (url, params, init, options) => __async$
|
|
767
|
+
slsEasyFetch.defaults.beforeRequest = (url, params, init, options) => __async$5(void 0, null, function* () {
|
|
768
768
|
var _a;
|
|
769
769
|
const method = (_a = init.method) == null ? void 0 : _a.toLowerCase();
|
|
770
770
|
if (method === "post" || method === "put") {
|
|
@@ -795,7 +795,7 @@ slsEasyFetch.defaults.beforeRequest = (url, params, init, options) => __async$3(
|
|
|
795
795
|
};
|
|
796
796
|
}
|
|
797
797
|
});
|
|
798
|
-
slsEasyFetch.defaults.afterResponse = (r, options) => __async$
|
|
798
|
+
slsEasyFetch.defaults.afterResponse = (r, options) => __async$5(void 0, null, function* () {
|
|
799
799
|
const { response, data } = r;
|
|
800
800
|
let composedData = typeof data === "string" || typeof data === "number" || Array.isArray(data) ? data : __spreadProps$1(__spreadValues$1({}, data), {
|
|
801
801
|
response
|
|
@@ -863,7 +863,7 @@ var __spreadValues = (a, b) => {
|
|
|
863
863
|
return a;
|
|
864
864
|
};
|
|
865
865
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
866
|
-
var __async$
|
|
866
|
+
var __async$4 = (__this, __arguments, generator) => {
|
|
867
867
|
return new Promise((resolve, reject) => {
|
|
868
868
|
var fulfilled = (value) => {
|
|
869
869
|
try {
|
|
@@ -886,13 +886,13 @@ var __async$2 = (__this, __arguments, generator) => {
|
|
|
886
886
|
var metaService;
|
|
887
887
|
((metaService2) => {
|
|
888
888
|
function getMetaRecord(params) {
|
|
889
|
-
return __async$
|
|
889
|
+
return __async$4(this, null, function* () {
|
|
890
890
|
return slsEasyFetch.get("/console/metaRecordAjax/get.json", params);
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
893
|
metaService2.getMetaRecord = getMetaRecord;
|
|
894
894
|
function listMetaRecord(params, forbidAlert = false) {
|
|
895
|
-
return __async$
|
|
895
|
+
return __async$4(this, null, function* () {
|
|
896
896
|
return slsEasyFetch.get(
|
|
897
897
|
"/console/metaRecordAjax/list.json",
|
|
898
898
|
__spreadProps(__spreadValues({}, params), {
|
|
@@ -905,13 +905,13 @@ var metaService;
|
|
|
905
905
|
}
|
|
906
906
|
metaService2.listMetaRecord = listMetaRecord;
|
|
907
907
|
function createMetaResource(params) {
|
|
908
|
-
return __async$
|
|
908
|
+
return __async$4(this, null, function* () {
|
|
909
909
|
return slsEasyFetch.post("/console/metaResourceAjax/create.json", params);
|
|
910
910
|
});
|
|
911
911
|
}
|
|
912
912
|
metaService2.createMetaResource = createMetaResource;
|
|
913
913
|
function createMetaRecord(_0) {
|
|
914
|
-
return __async$
|
|
914
|
+
return __async$4(this, arguments, function* ({ name, record }, forbidAlert = false) {
|
|
915
915
|
const recordObj = __spreadProps(__spreadValues({}, record), {
|
|
916
916
|
value: JSON.stringify(record.value)
|
|
917
917
|
});
|
|
@@ -927,7 +927,7 @@ var metaService;
|
|
|
927
927
|
}
|
|
928
928
|
metaService2.createMetaRecord = createMetaRecord;
|
|
929
929
|
function updataMetaRecord(_0) {
|
|
930
|
-
return __async$
|
|
930
|
+
return __async$4(this, arguments, function* ({ name, record }, forbidAlert = false) {
|
|
931
931
|
const recordObj = __spreadProps(__spreadValues({}, record), {
|
|
932
932
|
value: JSON.stringify(record.value)
|
|
933
933
|
});
|
|
@@ -943,7 +943,7 @@ var metaService;
|
|
|
943
943
|
}
|
|
944
944
|
metaService2.updataMetaRecord = updataMetaRecord;
|
|
945
945
|
function listMetaRecordWithIdentity(params, forbidAlert = false) {
|
|
946
|
-
return __async$
|
|
946
|
+
return __async$4(this, null, function* () {
|
|
947
947
|
return slsEasyFetch.get(
|
|
948
948
|
"/console/metaRecordAjax/listWithIdentity.json",
|
|
949
949
|
__spreadProps(__spreadValues({}, params), {
|
|
@@ -956,13 +956,13 @@ var metaService;
|
|
|
956
956
|
}
|
|
957
957
|
metaService2.listMetaRecordWithIdentity = listMetaRecordWithIdentity;
|
|
958
958
|
function getMetaRecordWithIdentity(params) {
|
|
959
|
-
return __async$
|
|
959
|
+
return __async$4(this, null, function* () {
|
|
960
960
|
return slsEasyFetch.get("/console/metaRecordAjax/getWithIdentity.json", params);
|
|
961
961
|
});
|
|
962
962
|
}
|
|
963
963
|
metaService2.getMetaRecordWithIdentity = getMetaRecordWithIdentity;
|
|
964
964
|
function updataMetaRecordWithIdentity(_0) {
|
|
965
|
-
return __async$
|
|
965
|
+
return __async$4(this, arguments, function* ({ name, record }, forbidAlert = false) {
|
|
966
966
|
const recordObj = __spreadProps(__spreadValues({}, record), {
|
|
967
967
|
value: JSON.stringify(record.value)
|
|
968
968
|
});
|
|
@@ -978,7 +978,7 @@ var metaService;
|
|
|
978
978
|
}
|
|
979
979
|
metaService2.updataMetaRecordWithIdentity = updataMetaRecordWithIdentity;
|
|
980
980
|
function deleteRecords() {
|
|
981
|
-
return __async$
|
|
981
|
+
return __async$4(this, arguments, function* (config = {
|
|
982
982
|
name: "",
|
|
983
983
|
recordIds: ""
|
|
984
984
|
// 1,2
|
|
@@ -988,7 +988,7 @@ var metaService;
|
|
|
988
988
|
}
|
|
989
989
|
metaService2.deleteRecords = deleteRecords;
|
|
990
990
|
function deleteRecordsWithIdentity() {
|
|
991
|
-
return __async$
|
|
991
|
+
return __async$4(this, arguments, function* (config = {
|
|
992
992
|
name: "",
|
|
993
993
|
recordIds: ""
|
|
994
994
|
// 1,2
|
|
@@ -1000,13 +1000,13 @@ var metaService;
|
|
|
1000
1000
|
}
|
|
1001
1001
|
metaService2.deleteRecordsWithIdentity = deleteRecordsWithIdentity;
|
|
1002
1002
|
function deleteResource(params) {
|
|
1003
|
-
return __async$
|
|
1003
|
+
return __async$4(this, null, function* () {
|
|
1004
1004
|
return slsEasyFetch.post("/console/metaResourceAjax/delete.json", params);
|
|
1005
1005
|
});
|
|
1006
1006
|
}
|
|
1007
1007
|
metaService2.deleteResource = deleteResource;
|
|
1008
1008
|
function createSomeMetaRecordsWithIdentity(_0) {
|
|
1009
|
-
return __async$
|
|
1009
|
+
return __async$4(this, arguments, function* ({ name, records }, forbidAlert = false) {
|
|
1010
1010
|
return slsEasyFetch.post(
|
|
1011
1011
|
"/console/metaRecordAjax/batchUpsertWithIdentity.json",
|
|
1012
1012
|
{
|
|
@@ -1019,7 +1019,7 @@ var metaService;
|
|
|
1019
1019
|
}
|
|
1020
1020
|
metaService2.createSomeMetaRecordsWithIdentity = createSomeMetaRecordsWithIdentity;
|
|
1021
1021
|
function createSomeMetaRecords(_0) {
|
|
1022
|
-
return __async$
|
|
1022
|
+
return __async$4(this, arguments, function* ({ name, records }, forbidAlert = false) {
|
|
1023
1023
|
return slsEasyFetch.post(
|
|
1024
1024
|
"/console/metaRecordAjax/batchUpsert.json",
|
|
1025
1025
|
{
|
|
@@ -1032,7 +1032,7 @@ var metaService;
|
|
|
1032
1032
|
}
|
|
1033
1033
|
metaService2.createSomeMetaRecords = createSomeMetaRecords;
|
|
1034
1034
|
function getNewDashboardList(_0) {
|
|
1035
|
-
return __async$
|
|
1035
|
+
return __async$4(this, arguments, function* ({ name, jsonPath, jsonPathValue, page, size }, forbidAlert = false) {
|
|
1036
1036
|
return slsEasyFetch.post(
|
|
1037
1037
|
`/console/metaRecordAjax/list.json`,
|
|
1038
1038
|
{
|
|
@@ -1048,7 +1048,7 @@ var metaService;
|
|
|
1048
1048
|
}
|
|
1049
1049
|
metaService2.getNewDashboardList = getNewDashboardList;
|
|
1050
1050
|
function getNewDashboardListWithIdentity(_0) {
|
|
1051
|
-
return __async$
|
|
1051
|
+
return __async$4(this, arguments, function* ({ name, jsonPath, jsonPathValue, page, size }, forbidAlert = false) {
|
|
1052
1052
|
return slsEasyFetch.post(
|
|
1053
1053
|
`/console/metaRecordAjax/listWithIdentity.json`,
|
|
1054
1054
|
{
|
|
@@ -1064,7 +1064,7 @@ var metaService;
|
|
|
1064
1064
|
}
|
|
1065
1065
|
metaService2.getNewDashboardListWithIdentity = getNewDashboardListWithIdentity;
|
|
1066
1066
|
function deleteVersionRecords(_0) {
|
|
1067
|
-
return __async$
|
|
1067
|
+
return __async$4(this, arguments, function* ({ name, recordIds }, forbidAlert = false) {
|
|
1068
1068
|
return slsEasyFetch.post(
|
|
1069
1069
|
"/console/metaRecordAjax/delete.json",
|
|
1070
1070
|
{
|
|
@@ -1076,7 +1076,7 @@ var metaService;
|
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
metaService2.deleteVersionRecords = deleteVersionRecords;
|
|
1079
|
-
metaService2.ckeckPermissionForList = (resourceName) => __async$
|
|
1079
|
+
metaService2.ckeckPermissionForList = (resourceName) => __async$4(void 0, null, function* () {
|
|
1080
1080
|
const res = yield slsEasyFetch.get(
|
|
1081
1081
|
"/console/metaRecordAjax/checkList.json",
|
|
1082
1082
|
{
|
|
@@ -1091,7 +1091,7 @@ var metaService;
|
|
|
1091
1091
|
});
|
|
1092
1092
|
})(metaService || (metaService = {}));
|
|
1093
1093
|
|
|
1094
|
-
var __async$
|
|
1094
|
+
var __async$3 = (__this, __arguments, generator) => {
|
|
1095
1095
|
return new Promise((resolve, reject) => {
|
|
1096
1096
|
var fulfilled = (value) => {
|
|
1097
1097
|
try {
|
|
@@ -1114,44 +1114,44 @@ var __async$1 = (__this, __arguments, generator) => {
|
|
|
1114
1114
|
var workSpaceService;
|
|
1115
1115
|
((workSpaceService2) => {
|
|
1116
1116
|
function getWorkspaceRecord(params) {
|
|
1117
|
-
return __async$
|
|
1117
|
+
return __async$3(this, null, function* () {
|
|
1118
1118
|
return slsEasyFetch.get("/console/workspace/list_app.json", params);
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
1121
|
workSpaceService2.getWorkspaceRecord = getWorkspaceRecord;
|
|
1122
1122
|
function getWorkspacelist(params) {
|
|
1123
|
-
return __async$
|
|
1123
|
+
return __async$3(this, null, function* () {
|
|
1124
1124
|
return slsEasyFetch.get("/console/workspace/list.json", params);
|
|
1125
1125
|
});
|
|
1126
1126
|
}
|
|
1127
1127
|
workSpaceService2.getWorkspacelist = getWorkspacelist;
|
|
1128
1128
|
function getWorkspaceInfor(params) {
|
|
1129
|
-
return __async$
|
|
1129
|
+
return __async$3(this, null, function* () {
|
|
1130
1130
|
return slsEasyFetch.get("/console/workspace/get.json", params);
|
|
1131
1131
|
});
|
|
1132
1132
|
}
|
|
1133
1133
|
workSpaceService2.getWorkspaceInfor = getWorkspaceInfor;
|
|
1134
1134
|
function createInstance(params) {
|
|
1135
|
-
return __async$
|
|
1135
|
+
return __async$3(this, null, function* () {
|
|
1136
1136
|
return slsEasyFetch.post("/observability/createInstance.json", params);
|
|
1137
1137
|
});
|
|
1138
1138
|
}
|
|
1139
1139
|
workSpaceService2.createInstance = createInstance;
|
|
1140
1140
|
function updataAppInstance(params) {
|
|
1141
|
-
return __async$
|
|
1141
|
+
return __async$3(this, null, function* () {
|
|
1142
1142
|
return slsEasyFetch.post("/console/workspace/update_app.json", params);
|
|
1143
1143
|
});
|
|
1144
1144
|
}
|
|
1145
1145
|
workSpaceService2.updataAppInstance = updataAppInstance;
|
|
1146
1146
|
function getWorkspaceForITOM(params) {
|
|
1147
|
-
return __async$
|
|
1147
|
+
return __async$3(this, null, function* () {
|
|
1148
1148
|
return slsEasyFetch.get("/console/workspace/getWorkspaceForITOM.json", params);
|
|
1149
1149
|
});
|
|
1150
1150
|
}
|
|
1151
1151
|
workSpaceService2.getWorkspaceForITOM = getWorkspaceForITOM;
|
|
1152
1152
|
})(workSpaceService || (workSpaceService = {}));
|
|
1153
1153
|
|
|
1154
|
-
var __async = (__this, __arguments, generator) => {
|
|
1154
|
+
var __async$2 = (__this, __arguments, generator) => {
|
|
1155
1155
|
return new Promise((resolve, reject) => {
|
|
1156
1156
|
var fulfilled = (value) => {
|
|
1157
1157
|
try {
|
|
@@ -1174,7 +1174,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1174
1174
|
var indexService;
|
|
1175
1175
|
((indexService2) => {
|
|
1176
1176
|
function updateIndexInfo(_0) {
|
|
1177
|
-
return __async(this, arguments, function* (params, options = {
|
|
1177
|
+
return __async$2(this, arguments, function* (params, options = {
|
|
1178
1178
|
forbidAlert: true
|
|
1179
1179
|
}) {
|
|
1180
1180
|
return slsEasyFetch.post("/console/logstoreindex/update.json", params, options);
|
|
@@ -1182,7 +1182,7 @@ var indexService;
|
|
|
1182
1182
|
}
|
|
1183
1183
|
indexService2.updateIndexInfo = updateIndexInfo;
|
|
1184
1184
|
function getIndexInfo(_0) {
|
|
1185
|
-
return __async(this, arguments, function* (params, options = {
|
|
1185
|
+
return __async$2(this, arguments, function* (params, options = {
|
|
1186
1186
|
forbidAlert: true
|
|
1187
1187
|
}) {
|
|
1188
1188
|
return slsEasyFetch.get("/console/logstoreindex/getString.json", params, options);
|
|
@@ -1190,13 +1190,13 @@ var indexService;
|
|
|
1190
1190
|
}
|
|
1191
1191
|
indexService2.getIndexInfo = getIndexInfo;
|
|
1192
1192
|
function getProjectLogs(params) {
|
|
1193
|
-
return __async(this, null, function* () {
|
|
1193
|
+
return __async$2(this, null, function* () {
|
|
1194
1194
|
return slsEasyFetch.get("/console/logstoreindex/getProjectLogs.json", params);
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
1197
|
indexService2.getProjectLogs = getProjectLogs;
|
|
1198
1198
|
function getCloudMonitoringProjectLogs(_0) {
|
|
1199
|
-
return __async(this, arguments, function* (params, options = {
|
|
1199
|
+
return __async$2(this, arguments, function* (params, options = {
|
|
1200
1200
|
forbidAlert: true
|
|
1201
1201
|
}) {
|
|
1202
1202
|
return slsEasyFetch.get("/console/logstoreindex/getProjectLogs.json", params, options);
|
|
@@ -1204,7 +1204,7 @@ var indexService;
|
|
|
1204
1204
|
}
|
|
1205
1205
|
indexService2.getCloudMonitoringProjectLogs = getCloudMonitoringProjectLogs;
|
|
1206
1206
|
function updateIndexDocVal(project, logstore) {
|
|
1207
|
-
return __async(this, null, function* () {
|
|
1207
|
+
return __async$2(this, null, function* () {
|
|
1208
1208
|
const openDocVal = (obj) => {
|
|
1209
1209
|
Object.keys(obj).forEach((key) => {
|
|
1210
1210
|
obj[key].doc_value = true;
|
|
@@ -1237,5 +1237,157 @@ var indexService;
|
|
|
1237
1237
|
indexService2.updateIndexDocVal = updateIndexDocVal;
|
|
1238
1238
|
})(indexService || (indexService = {}));
|
|
1239
1239
|
|
|
1240
|
-
|
|
1240
|
+
var __async$1 = (__this, __arguments, generator) => {
|
|
1241
|
+
return new Promise((resolve, reject) => {
|
|
1242
|
+
var fulfilled = (value) => {
|
|
1243
|
+
try {
|
|
1244
|
+
step(generator.next(value));
|
|
1245
|
+
} catch (e) {
|
|
1246
|
+
reject(e);
|
|
1247
|
+
}
|
|
1248
|
+
};
|
|
1249
|
+
var rejected = (value) => {
|
|
1250
|
+
try {
|
|
1251
|
+
step(generator.throw(value));
|
|
1252
|
+
} catch (e) {
|
|
1253
|
+
reject(e);
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
1257
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
1258
|
+
});
|
|
1259
|
+
};
|
|
1260
|
+
var projectService;
|
|
1261
|
+
((projectService2) => {
|
|
1262
|
+
const noop = (params) => {
|
|
1263
|
+
return Promise.resolve(params);
|
|
1264
|
+
};
|
|
1265
|
+
const privateRequest = {
|
|
1266
|
+
getFavor(_params = {}) {
|
|
1267
|
+
return noop();
|
|
1268
|
+
},
|
|
1269
|
+
putFavor(params = {}) {
|
|
1270
|
+
return noop(params);
|
|
1271
|
+
},
|
|
1272
|
+
getLdb(_params = {}) {
|
|
1273
|
+
return noop();
|
|
1274
|
+
},
|
|
1275
|
+
putLdb(params = {}) {
|
|
1276
|
+
return noop(params);
|
|
1277
|
+
},
|
|
1278
|
+
getOpConfig(config = {}) {
|
|
1279
|
+
return noop(config);
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
function getCombineSearch(params, options) {
|
|
1283
|
+
return __async$1(this, null, function* () {
|
|
1284
|
+
return slsEasyFetch.get("/console/combineSearch.json", params, options);
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
projectService2.getCombineSearch = getCombineSearch;
|
|
1288
|
+
function getListProject(params, option) {
|
|
1289
|
+
return __async$1(this, null, function* () {
|
|
1290
|
+
return slsEasyFetch.get("/console/project/listProject.json", params, option);
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
projectService2.getListProject = getListProject;
|
|
1294
|
+
function getListProjectNew(params, option) {
|
|
1295
|
+
return __async$1(this, null, function* () {
|
|
1296
|
+
return slsEasyFetch.get("/console/project/listProject.json", params, option);
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
projectService2.getListProjectNew = getListProjectNew;
|
|
1300
|
+
projectService2.getProjectList = (config = {}, option = { forbidAlert: true }) => {
|
|
1301
|
+
return slsEasyFetch.get("/console/project/listProject.json", config, option);
|
|
1302
|
+
};
|
|
1303
|
+
function createProject() {
|
|
1304
|
+
return __async$1(this, null, function* () {
|
|
1305
|
+
return slsEasyFetch.post("/console/project/createProject.json");
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
projectService2.createProject = createProject;
|
|
1309
|
+
function updateProject(params) {
|
|
1310
|
+
return __async$1(this, null, function* () {
|
|
1311
|
+
return slsEasyFetch.post("/console/project/updateProject.json", params);
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
projectService2.updateProject = updateProject;
|
|
1315
|
+
function deleteProject(params) {
|
|
1316
|
+
return __async$1(this, null, function* () {
|
|
1317
|
+
return slsEasyFetch.post("/console/project/deleteProject.json", params);
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
projectService2.deleteProject = deleteProject;
|
|
1321
|
+
function getNewProjectInfo(params, option) {
|
|
1322
|
+
return __async$1(this, null, function* () {
|
|
1323
|
+
return slsEasyFetch.get("/console/project/getNewProjectInfo.json", params, option);
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
projectService2.getNewProjectInfo = getNewProjectInfo;
|
|
1327
|
+
function getLdb(params) {
|
|
1328
|
+
return __async$1(this, null, function* () {
|
|
1329
|
+
if (slsConsoleUtil.isPrivateEnv()) {
|
|
1330
|
+
return privateRequest.getLdb;
|
|
1331
|
+
}
|
|
1332
|
+
return slsEasyFetch.get("/console/tairAjax/getLdb.json", params);
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1335
|
+
projectService2.getLdb = getLdb;
|
|
1336
|
+
function putLdb(params) {
|
|
1337
|
+
return __async$1(this, null, function* () {
|
|
1338
|
+
if (slsConsoleUtil.isPrivateEnv()) {
|
|
1339
|
+
return privateRequest.putLdb;
|
|
1340
|
+
}
|
|
1341
|
+
return slsEasyFetch.post("/console/tairAjax/putLdb.json", params);
|
|
1342
|
+
});
|
|
1343
|
+
}
|
|
1344
|
+
projectService2.putLdb = putLdb;
|
|
1345
|
+
function getOpConfig() {
|
|
1346
|
+
return __async$1(this, null, function* () {
|
|
1347
|
+
if (slsConsoleUtil.isPrivateEnv()) {
|
|
1348
|
+
return privateRequest.getOpConfig;
|
|
1349
|
+
}
|
|
1350
|
+
return slsEasyFetch.get("/console/diamondAjax/getOpConfig.json");
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
projectService2.getOpConfig = getOpConfig;
|
|
1354
|
+
function listMetricStore(params) {
|
|
1355
|
+
return __async$1(this, null, function* () {
|
|
1356
|
+
return slsEasyFetch.get("/console/logstore/list.json", params);
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1359
|
+
projectService2.listMetricStore = listMetricStore;
|
|
1360
|
+
})(projectService || (projectService = {}));
|
|
1361
|
+
|
|
1362
|
+
var __async = (__this, __arguments, generator) => {
|
|
1363
|
+
return new Promise((resolve, reject) => {
|
|
1364
|
+
var fulfilled = (value) => {
|
|
1365
|
+
try {
|
|
1366
|
+
step(generator.next(value));
|
|
1367
|
+
} catch (e) {
|
|
1368
|
+
reject(e);
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1371
|
+
var rejected = (value) => {
|
|
1372
|
+
try {
|
|
1373
|
+
step(generator.throw(value));
|
|
1374
|
+
} catch (e) {
|
|
1375
|
+
reject(e);
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
1379
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
1380
|
+
});
|
|
1381
|
+
};
|
|
1382
|
+
var diamondService;
|
|
1383
|
+
((diamondService2) => {
|
|
1384
|
+
function getTemplateDiamond(name) {
|
|
1385
|
+
return __async(this, null, function* () {
|
|
1386
|
+
return slsEasyFetch.get("/console/diamondAjax/getDashboardTemplate.json", { appName: name });
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
diamondService2.getTemplateDiamond = getTemplateDiamond;
|
|
1390
|
+
})(diamondService || (diamondService = {}));
|
|
1391
|
+
|
|
1392
|
+
export { commonEasyFetch, diamondService, indexService, metaService, obsEasyFetch, projectService, showAlertDialog, showAlertDialogWhenNeedLogin, slsEasyFetch, workSpaceService };
|
|
1241
1393
|
//# sourceMappingURL=api.es.js.map
|
package/package.json
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"urijs": "^1.19.1",
|
|
12
12
|
"lodash": "^4.17.21",
|
|
13
13
|
"@alicloud/console-base-error-prompt-proxy": "^1.9.12",
|
|
14
|
-
"@aliyun-obv/i18n": "0.2.
|
|
15
|
-
"@aliyun-obv/utils": "0.2.
|
|
14
|
+
"@aliyun-obv/i18n": "0.2.28-beta.0",
|
|
15
|
+
"@aliyun-obv/utils": "0.2.28-beta.0",
|
|
16
16
|
"@alifd/next": "^1.27.21",
|
|
17
17
|
"styled-components": "^5.2.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
20
|
-
"version": "0.2.
|
|
20
|
+
"version": "0.2.28-beta.0"
|
|
21
21
|
}
|