@riil-frontend/component-topology 11.0.35 → 12.0.0-dev.1
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/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.js +45 -29
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/MultiResourceDrawer/index.js +8 -6
- package/es/components/ResourceList/ResourceSelect.js +8 -7
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
- package/es/components/SingleResourceDrawer/SelectDrawer.js +8 -6
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
- package/es/core/editor/components/BackgroundView/index.js +73 -54
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -5
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
- package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
- package/es/core/editor/utils/copyElementUtil.js +171 -0
- package/es/core/hooks/usePolling.js +21 -13
- package/es/core/hooks/useResourceConfig.js +37 -21
- package/es/core/hooks/useTopoEdit.js +202 -139
- package/es/core/models/Alarm.js +104 -38
- package/es/core/models/AttributeMetricDisplay.js +36 -14
- package/es/core/models/TopoApp.js +197 -75
- package/es/core/models/TopoGraphView.js +20 -10
- package/es/core/models/cache/CiCache.js +12 -6
- package/es/core/models/cache/CiTypeCache.js +20 -10
- package/es/core/models/cache/DictCache.js +10 -6
- package/es/core/models/graph/Background.js +9 -6
- package/es/core/models/plugins/resourceWebControllUrl.js +21 -8
- package/es/core/models/tagstips/ElementTagTipConfig.js +20 -10
- package/es/core/models/topoData.js +7 -5
- package/es/core/models/utils/linkUtils.js +8 -5
- package/es/core/services/cmdb/metric.js +7 -5
- package/es/core/services/cmdb.js +9 -5
- package/es/core/services/index.js +23 -9
- package/es/core/services/topo/tagtip.js +7 -5
- package/es/core/store/models/customIcon.js +11 -6
- package/es/core/utils/imageUtil.js +7 -5
- package/es/core/utils/metricUtil.js +5 -0
- package/es/core/utils/saveSerialize.js +7 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +8 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +47 -34
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +74 -34
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -26
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +15 -7
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
- package/es/networkTopo/components/Link/hook.js +21 -14
- package/es/networkTopo/components/Link/index.js +32 -18
- package/es/networkTopo/components/Link/setting.js +8 -6
- package/es/networkTopo/getTopoData.js +23 -10
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
- package/es/networkTopo/models/TopoCenter.js +24 -10
- package/es/networkTopo/services/cmdb.js +333 -233
- package/es/networkTopo/services/mdc.js +24 -15
- package/es/networkTopo/services/metric.js +16 -11
- package/es/networkTopo/services/model.js +412 -283
- package/es/networkTopo/utils/exportData.js +7 -5
- package/lib/components/BatchAttrMetric/setting.js +1 -1
- package/lib/components/MultiResourceDrawer/index.js +8 -6
- package/lib/components/ResourceList/ResourceSelect.js +8 -6
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +8 -6
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
- package/lib/core/editor/components/BackgroundView/index.js +74 -55
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -4
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
- package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
- package/lib/core/editor/utils/copyElementUtil.js +182 -0
- package/lib/core/hooks/usePolling.js +21 -13
- package/lib/core/hooks/useResourceConfig.js +37 -21
- package/lib/core/hooks/useTopoEdit.js +202 -139
- package/lib/core/models/Alarm.js +104 -38
- package/lib/core/models/AttributeMetricDisplay.js +36 -14
- package/lib/core/models/TopoApp.js +197 -75
- package/lib/core/models/TopoGraphView.js +20 -10
- package/lib/core/models/cache/CiCache.js +12 -6
- package/lib/core/models/cache/CiTypeCache.js +20 -10
- package/lib/core/models/cache/DictCache.js +10 -6
- package/lib/core/models/graph/Background.js +9 -6
- package/lib/core/models/plugins/resourceWebControllUrl.js +21 -8
- package/lib/core/models/tagstips/ElementTagTipConfig.js +20 -10
- package/lib/core/models/topoData.js +7 -4
- package/lib/core/models/utils/linkUtils.js +8 -4
- package/lib/core/services/cmdb/metric.js +7 -4
- package/lib/core/services/cmdb.js +9 -4
- package/lib/core/services/index.js +21 -8
- package/lib/core/services/topo/tagtip.js +7 -4
- package/lib/core/store/models/customIcon.js +11 -6
- package/lib/core/utils/imageUtil.js +7 -4
- package/lib/core/utils/metricUtil.js +5 -0
- package/lib/core/utils/saveSerialize.js +7 -4
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +49 -36
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +73 -35
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +14 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
- package/lib/networkTopo/components/Link/hook.js +23 -15
- package/lib/networkTopo/components/Link/index.js +32 -18
- package/lib/networkTopo/components/Link/setting.js +8 -6
- package/lib/networkTopo/getTopoData.js +23 -10
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
- package/lib/networkTopo/models/TopoCenter.js +24 -10
- package/lib/networkTopo/services/cmdb.js +336 -235
- package/lib/networkTopo/services/mdc.js +24 -14
- package/lib/networkTopo/services/metric.js +16 -10
- package/lib/networkTopo/services/model.js +414 -284
- package/lib/networkTopo/utils/exportData.js +7 -4
- package/lib/utils/htElementDataUtil.js +4 -2
- package/package.json +3 -2
@@ -3,9 +3,6 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutP
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
4
4
|
var _excluded = ["checkAuth"],
|
5
5
|
_excluded2 = ["totalPage", "pageIndex", "data"];
|
6
|
-
|
7
|
-
var _ref, _ref2, _ref3, _ref4, _commonQuery, _ref7, _ref8, _changeManageStatus, _batchChangeManageStatus, _commonCount, _queryCiWithComponents, _queryPageIgnoreRelations, _deleteIgnoreRelations, _ref9, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20;
|
8
|
-
|
9
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
10
7
|
import { request } from '@riil-frontend/component-topology-utils';
|
11
8
|
/**
|
@@ -14,8 +11,8 @@ import { request } from '@riil-frontend/component-topology-utils';
|
|
14
11
|
* @param {string} id 实例id
|
15
12
|
*/
|
16
13
|
|
17
|
-
export var queryById = function
|
18
|
-
|
14
|
+
export var queryById = /*#__PURE__*/function () {
|
15
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(id) {
|
19
16
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
20
17
|
while (1) switch (_context.prev = _context.next) {
|
21
18
|
case 0:
|
@@ -32,8 +29,12 @@ export var queryById = function queryById(_x) {
|
|
32
29
|
return _context.stop();
|
33
30
|
}
|
34
31
|
}, _callee);
|
35
|
-
}))
|
36
|
-
|
32
|
+
}));
|
33
|
+
|
34
|
+
return function queryById(_x) {
|
35
|
+
return _ref.apply(this, arguments);
|
36
|
+
};
|
37
|
+
}();
|
37
38
|
/**
|
38
39
|
* ci删除
|
39
40
|
* @param {string} id 实例id
|
@@ -44,8 +45,8 @@ export var queryById = function queryById(_x) {
|
|
44
45
|
}
|
45
46
|
*/
|
46
47
|
|
47
|
-
export var deleteById = function
|
48
|
-
|
48
|
+
export var deleteById = /*#__PURE__*/function () {
|
49
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id) {
|
49
50
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
50
51
|
while (1) switch (_context2.prev = _context2.next) {
|
51
52
|
case 0:
|
@@ -62,8 +63,12 @@ export var deleteById = function deleteById(_x2) {
|
|
62
63
|
return _context2.stop();
|
63
64
|
}
|
64
65
|
}, _callee2);
|
65
|
-
}))
|
66
|
-
|
66
|
+
}));
|
67
|
+
|
68
|
+
return function deleteById(_x2) {
|
69
|
+
return _ref2.apply(this, arguments);
|
70
|
+
};
|
71
|
+
}();
|
67
72
|
/**
|
68
73
|
* ci删除(批量)
|
69
74
|
* @param {array} keys [ "1513569" ,...]
|
@@ -74,8 +79,8 @@ export var deleteById = function deleteById(_x2) {
|
|
74
79
|
}
|
75
80
|
*/
|
76
81
|
|
77
|
-
export var batchDeleteById = function
|
78
|
-
|
82
|
+
export var batchDeleteById = /*#__PURE__*/function () {
|
83
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(keys) {
|
79
84
|
var ids;
|
80
85
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
81
86
|
while (1) switch (_context3.prev = _context3.next) {
|
@@ -101,8 +106,12 @@ export var batchDeleteById = function batchDeleteById(_x3) {
|
|
101
106
|
return _context3.stop();
|
102
107
|
}
|
103
108
|
}, _callee3);
|
104
|
-
}))
|
105
|
-
|
109
|
+
}));
|
110
|
+
|
111
|
+
return function batchDeleteById(_x3) {
|
112
|
+
return _ref3.apply(this, arguments);
|
113
|
+
};
|
114
|
+
}();
|
106
115
|
/**
|
107
116
|
* cmdm 通用查询接口
|
108
117
|
* @param {Object | string } condition 查询条件对象 或 接口原生查询字符串
|
@@ -120,8 +129,8 @@ export var batchDeleteById = function batchDeleteById(_x3) {
|
|
120
129
|
* @param {boolean} authOption.checkAuth 默认为true,是否只查看有权限的资源
|
121
130
|
*/
|
122
131
|
|
123
|
-
export var fetchCommonQuery = function
|
124
|
-
|
132
|
+
export var fetchCommonQuery = /*#__PURE__*/function () {
|
133
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(condition, sortIndex, sortMethod, currentPage, pageSize, sort, authOption) {
|
125
134
|
var newCondition, _ref5, _ref5$checkAuth, checkAuth, otherOption, url, sorts, params, response, _ref6, totalPage, pageIndex, data, result;
|
126
135
|
|
127
136
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
@@ -202,8 +211,12 @@ export var fetchCommonQuery = function fetchCommonQuery(_x4, _x5, _x6, _x7, _x8,
|
|
202
211
|
return _context4.stop();
|
203
212
|
}
|
204
213
|
}, _callee4);
|
205
|
-
}))
|
206
|
-
|
214
|
+
}));
|
215
|
+
|
216
|
+
return function fetchCommonQuery(_x4, _x5, _x6, _x7, _x8, _x9, _x10) {
|
217
|
+
return _ref4.apply(this, arguments);
|
218
|
+
};
|
219
|
+
}();
|
207
220
|
/**
|
208
221
|
* cmdb实例查询接口(不涉及权限)
|
209
222
|
* @param {Object} param
|
@@ -211,98 +224,111 @@ export var fetchCommonQuery = function fetchCommonQuery(_x4, _x5, _x6, _x7, _x8,
|
|
211
224
|
*/
|
212
225
|
|
213
226
|
export function commonQuery(_x11) {
|
214
|
-
return
|
215
|
-
|
216
|
-
|
227
|
+
return _commonQuery.apply(this, arguments);
|
228
|
+
} // 批量属性更新
|
229
|
+
|
230
|
+
function _commonQuery() {
|
231
|
+
_commonQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(param) {
|
232
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
233
|
+
while (1) switch (_context18.prev = _context18.next) {
|
217
234
|
case 0:
|
218
|
-
|
235
|
+
_context18.next = 2;
|
219
236
|
return request.post('/cmdb/v1/api/ci/commonQuery', param);
|
220
237
|
|
221
238
|
case 2:
|
222
|
-
return
|
239
|
+
return _context18.abrupt("return", _context18.sent);
|
223
240
|
|
224
241
|
case 3:
|
225
242
|
case "end":
|
226
|
-
return
|
243
|
+
return _context18.stop();
|
227
244
|
}
|
228
|
-
},
|
229
|
-
}))
|
230
|
-
|
245
|
+
}, _callee18);
|
246
|
+
}));
|
247
|
+
return _commonQuery.apply(this, arguments);
|
248
|
+
}
|
231
249
|
|
232
|
-
export var batchUpdateAttributes = function
|
233
|
-
|
250
|
+
export var batchUpdateAttributes = /*#__PURE__*/function () {
|
251
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(values, fieldName) {
|
234
252
|
var aa, _aa;
|
235
253
|
|
236
|
-
return _regeneratorRuntime.wrap(function
|
237
|
-
while (1) switch (
|
254
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
255
|
+
while (1) switch (_context5.prev = _context5.next) {
|
238
256
|
case 0:
|
239
257
|
if (!fieldName) {
|
240
|
-
|
258
|
+
_context5.next = 8;
|
241
259
|
break;
|
242
260
|
}
|
243
261
|
|
244
262
|
// 传了要更新的属性名,更新某一个属性
|
245
263
|
aa = {};
|
246
264
|
aa[fieldName] = values[fieldName];
|
247
|
-
|
265
|
+
_context5.next = 5;
|
248
266
|
return request.post('/cmdb/v1/api/ci/batchUpdateAttributes', [{
|
249
267
|
id: values.id,
|
250
268
|
attributes: aa
|
251
269
|
}]);
|
252
270
|
|
253
271
|
case 5:
|
254
|
-
return
|
272
|
+
return _context5.abrupt("return", _context5.sent);
|
255
273
|
|
256
274
|
case 8:
|
257
275
|
if (!Array.isArray(values)) {
|
258
|
-
|
276
|
+
_context5.next = 12;
|
259
277
|
break;
|
260
278
|
}
|
261
279
|
|
262
|
-
|
280
|
+
_context5.next = 11;
|
263
281
|
return request.post('/cmdb/v1/api/ci/batchUpdateAttributes', values);
|
264
282
|
|
265
283
|
case 11:
|
266
|
-
return
|
284
|
+
return _context5.abrupt("return", _context5.sent);
|
267
285
|
|
268
286
|
case 12:
|
269
287
|
_aa = values.id;
|
270
288
|
delete values.id;
|
271
|
-
|
289
|
+
_context5.next = 16;
|
272
290
|
return request.post('/cmdb/v1/api/ci/batchUpdateAttributes', [{
|
273
291
|
id: _aa,
|
274
292
|
attributes: values
|
275
293
|
}]);
|
276
294
|
|
277
295
|
case 16:
|
278
|
-
return
|
296
|
+
return _context5.abrupt("return", _context5.sent);
|
279
297
|
|
280
298
|
case 17:
|
281
299
|
case "end":
|
282
|
-
return
|
300
|
+
return _context5.stop();
|
283
301
|
}
|
284
|
-
},
|
285
|
-
}))
|
286
|
-
}; // 创建单个ci实例
|
302
|
+
}, _callee5);
|
303
|
+
}));
|
287
304
|
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
305
|
+
return function batchUpdateAttributes(_x12, _x13) {
|
306
|
+
return _ref7.apply(this, arguments);
|
307
|
+
};
|
308
|
+
}(); // 创建单个ci实例
|
309
|
+
|
310
|
+
export var createInstance = /*#__PURE__*/function () {
|
311
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(values) {
|
312
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
313
|
+
while (1) switch (_context6.prev = _context6.next) {
|
292
314
|
case 0:
|
293
|
-
|
315
|
+
_context6.next = 2;
|
294
316
|
return request.post('/cmdb/v1/api/ci/create', values);
|
295
317
|
|
296
318
|
case 2:
|
297
|
-
return
|
319
|
+
return _context6.abrupt("return", _context6.sent);
|
298
320
|
|
299
321
|
case 3:
|
300
322
|
case "end":
|
301
|
-
return
|
323
|
+
return _context6.stop();
|
302
324
|
}
|
303
|
-
},
|
304
|
-
}))
|
305
|
-
|
325
|
+
}, _callee6);
|
326
|
+
}));
|
327
|
+
|
328
|
+
return function createInstance(_x14) {
|
329
|
+
return _ref8.apply(this, arguments);
|
330
|
+
};
|
331
|
+
}();
|
306
332
|
/**
|
307
333
|
* 改变监控状态
|
308
334
|
* @param {object} param 查询传参{"id":"xxxx","manageStatus": 3,//已监控:3,加入监控中:2,取消监控中:1,未监控:0}
|
@@ -310,22 +336,7 @@ export var createInstance = function createInstance(_x14) {
|
|
310
336
|
*/
|
311
337
|
|
312
338
|
export function changeManageStatus(_x15) {
|
313
|
-
return
|
314
|
-
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
315
|
-
while (1) switch (_context8.prev = _context8.next) {
|
316
|
-
case 0:
|
317
|
-
_context8.next = 2;
|
318
|
-
return request.post('/cmdb/v1/api/ci/changeManageStatus', param);
|
319
|
-
|
320
|
-
case 2:
|
321
|
-
return _context8.abrupt("return", _context8.sent);
|
322
|
-
|
323
|
-
case 3:
|
324
|
-
case "end":
|
325
|
-
return _context8.stop();
|
326
|
-
}
|
327
|
-
}, _callee8);
|
328
|
-
}))).apply(this, arguments);
|
339
|
+
return _changeManageStatus.apply(this, arguments);
|
329
340
|
}
|
330
341
|
/**
|
331
342
|
* 批量改变监控状态
|
@@ -333,23 +344,28 @@ export function changeManageStatus(_x15) {
|
|
333
344
|
* @returns {object}
|
334
345
|
*/
|
335
346
|
|
336
|
-
|
337
|
-
|
338
|
-
return _regeneratorRuntime.wrap(function
|
339
|
-
while (1) switch (
|
347
|
+
function _changeManageStatus() {
|
348
|
+
_changeManageStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(param) {
|
349
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
350
|
+
while (1) switch (_context19.prev = _context19.next) {
|
340
351
|
case 0:
|
341
|
-
|
342
|
-
return request.post('/cmdb/v1/api/ci/
|
352
|
+
_context19.next = 2;
|
353
|
+
return request.post('/cmdb/v1/api/ci/changeManageStatus', param);
|
343
354
|
|
344
355
|
case 2:
|
345
|
-
return
|
356
|
+
return _context19.abrupt("return", _context19.sent);
|
346
357
|
|
347
358
|
case 3:
|
348
359
|
case "end":
|
349
|
-
return
|
360
|
+
return _context19.stop();
|
350
361
|
}
|
351
|
-
},
|
352
|
-
}))
|
362
|
+
}, _callee19);
|
363
|
+
}));
|
364
|
+
return _changeManageStatus.apply(this, arguments);
|
365
|
+
}
|
366
|
+
|
367
|
+
export function batchChangeManageStatus(_x16) {
|
368
|
+
return _batchChangeManageStatus.apply(this, arguments);
|
353
369
|
}
|
354
370
|
/**
|
355
371
|
* 计数函数
|
@@ -361,23 +377,28 @@ export function batchChangeManageStatus(_x16) {
|
|
361
377
|
]
|
362
378
|
*/
|
363
379
|
|
364
|
-
|
365
|
-
|
366
|
-
return _regeneratorRuntime.wrap(function
|
367
|
-
while (1) switch (
|
380
|
+
function _batchChangeManageStatus() {
|
381
|
+
_batchChangeManageStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(param) {
|
382
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
383
|
+
while (1) switch (_context20.prev = _context20.next) {
|
368
384
|
case 0:
|
369
|
-
|
370
|
-
return request.post('/cmdb/v1/api/ci/
|
385
|
+
_context20.next = 2;
|
386
|
+
return request.post('/cmdb/v1/api/ci/batchChangeManageStatus', param);
|
371
387
|
|
372
388
|
case 2:
|
373
|
-
return
|
389
|
+
return _context20.abrupt("return", _context20.sent);
|
374
390
|
|
375
391
|
case 3:
|
376
392
|
case "end":
|
377
|
-
return
|
393
|
+
return _context20.stop();
|
378
394
|
}
|
379
|
-
},
|
380
|
-
}))
|
395
|
+
}, _callee20);
|
396
|
+
}));
|
397
|
+
return _batchChangeManageStatus.apply(this, arguments);
|
398
|
+
}
|
399
|
+
|
400
|
+
export function commonCount(_x17) {
|
401
|
+
return _commonCount.apply(this, arguments);
|
381
402
|
}
|
382
403
|
/**
|
383
404
|
* 批量改变监控状态
|
@@ -385,23 +406,28 @@ export function commonCount(_x17) {
|
|
385
406
|
* @returns {object}
|
386
407
|
*/
|
387
408
|
|
388
|
-
|
389
|
-
|
390
|
-
return _regeneratorRuntime.wrap(function
|
391
|
-
while (1) switch (
|
409
|
+
function _commonCount() {
|
410
|
+
_commonCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(param) {
|
411
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
412
|
+
while (1) switch (_context21.prev = _context21.next) {
|
392
413
|
case 0:
|
393
|
-
|
394
|
-
return request.post('/cmdb/v1/api/ci/
|
414
|
+
_context21.next = 2;
|
415
|
+
return request.post('/cmdb/v1/api/ci/commonCount', param);
|
395
416
|
|
396
417
|
case 2:
|
397
|
-
return
|
418
|
+
return _context21.abrupt("return", _context21.sent);
|
398
419
|
|
399
420
|
case 3:
|
400
421
|
case "end":
|
401
|
-
return
|
422
|
+
return _context21.stop();
|
402
423
|
}
|
403
|
-
},
|
404
|
-
}))
|
424
|
+
}, _callee21);
|
425
|
+
}));
|
426
|
+
return _commonCount.apply(this, arguments);
|
427
|
+
}
|
428
|
+
|
429
|
+
export function queryCiWithComponents(_x18) {
|
430
|
+
return _queryCiWithComponents.apply(this, arguments);
|
405
431
|
}
|
406
432
|
/**
|
407
433
|
* 连接关系忽略列表查询
|
@@ -412,12 +438,40 @@ export function queryCiWithComponents(_x18) {
|
|
412
438
|
* @param {*} sort 排序对象
|
413
439
|
*/
|
414
440
|
|
441
|
+
function _queryCiWithComponents() {
|
442
|
+
_queryCiWithComponents = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(mainCiIds) {
|
443
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
444
|
+
while (1) switch (_context22.prev = _context22.next) {
|
445
|
+
case 0:
|
446
|
+
_context22.next = 2;
|
447
|
+
return request.post('/cmdb/v1/api/ci/queryCiWithComponents', mainCiIds);
|
448
|
+
|
449
|
+
case 2:
|
450
|
+
return _context22.abrupt("return", _context22.sent);
|
451
|
+
|
452
|
+
case 3:
|
453
|
+
case "end":
|
454
|
+
return _context22.stop();
|
455
|
+
}
|
456
|
+
}, _callee22);
|
457
|
+
}));
|
458
|
+
return _queryCiWithComponents.apply(this, arguments);
|
459
|
+
}
|
460
|
+
|
415
461
|
export function queryPageIgnoreRelations(_x19, _x20, _x21, _x22, _x23) {
|
416
|
-
return
|
417
|
-
|
418
|
-
|
462
|
+
return _queryPageIgnoreRelations.apply(this, arguments);
|
463
|
+
}
|
464
|
+
/**
|
465
|
+
* 忽略的连接关系批量删除
|
466
|
+
* @param {*} ids id集合
|
467
|
+
*/
|
468
|
+
|
469
|
+
function _queryPageIgnoreRelations() {
|
470
|
+
_queryPageIgnoreRelations = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(relationType, currentPage, pageSize, condition, sort) {
|
471
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
472
|
+
while (1) switch (_context23.prev = _context23.next) {
|
419
473
|
case 0:
|
420
|
-
|
474
|
+
_context23.next = 2;
|
421
475
|
return request.post('/cmdb/v1/api/relation/ignore/list', _extends({
|
422
476
|
relationType: relationType,
|
423
477
|
currentPage: currentPage,
|
@@ -429,26 +483,27 @@ export function queryPageIgnoreRelations(_x19, _x20, _x21, _x22, _x23) {
|
|
429
483
|
} : {}));
|
430
484
|
|
431
485
|
case 2:
|
432
|
-
return
|
486
|
+
return _context23.abrupt("return", _context23.sent);
|
433
487
|
|
434
488
|
case 3:
|
435
489
|
case "end":
|
436
|
-
return
|
490
|
+
return _context23.stop();
|
437
491
|
}
|
438
|
-
},
|
439
|
-
}))
|
492
|
+
}, _callee23);
|
493
|
+
}));
|
494
|
+
return _queryPageIgnoreRelations.apply(this, arguments);
|
440
495
|
}
|
441
|
-
/**
|
442
|
-
* 忽略的连接关系批量删除
|
443
|
-
* @param {*} ids id集合
|
444
|
-
*/
|
445
496
|
|
446
497
|
export function deleteIgnoreRelations(_x24) {
|
447
|
-
return
|
448
|
-
|
449
|
-
|
498
|
+
return _deleteIgnoreRelations.apply(this, arguments);
|
499
|
+
} // 上传文件
|
500
|
+
|
501
|
+
function _deleteIgnoreRelations() {
|
502
|
+
_deleteIgnoreRelations = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(ids) {
|
503
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
504
|
+
while (1) switch (_context24.prev = _context24.next) {
|
450
505
|
case 0:
|
451
|
-
|
506
|
+
_context24.next = 2;
|
452
507
|
return request.post('/cmdb/v1/api/relation/ignore/batchDeleteById', ids.map(function (id) {
|
453
508
|
return {
|
454
509
|
id: id
|
@@ -456,21 +511,22 @@ export function deleteIgnoreRelations(_x24) {
|
|
456
511
|
}));
|
457
512
|
|
458
513
|
case 2:
|
459
|
-
return
|
514
|
+
return _context24.abrupt("return", _context24.sent);
|
460
515
|
|
461
516
|
case 3:
|
462
517
|
case "end":
|
463
|
-
return
|
518
|
+
return _context24.stop();
|
464
519
|
}
|
465
|
-
},
|
466
|
-
}))
|
467
|
-
|
520
|
+
}, _callee24);
|
521
|
+
}));
|
522
|
+
return _deleteIgnoreRelations.apply(this, arguments);
|
523
|
+
}
|
468
524
|
|
469
|
-
export var uploadFile = function
|
470
|
-
|
525
|
+
export var uploadFile = /*#__PURE__*/function () {
|
526
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(files, userId, modelType) {
|
471
527
|
var formData, names, originFiles, config, result;
|
472
|
-
return _regeneratorRuntime.wrap(function
|
473
|
-
while (1) switch (
|
528
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
529
|
+
while (1) switch (_context7.prev = _context7.next) {
|
474
530
|
case 0:
|
475
531
|
formData = new FormData(); // 用户id
|
476
532
|
|
@@ -490,247 +546,287 @@ export var uploadFile = function uploadFile(_x25, _x26, _x27) {
|
|
490
546
|
'Content-Type': "multipart/form-data;boundary=" + new Date().getTime()
|
491
547
|
}
|
492
548
|
};
|
493
|
-
|
549
|
+
_context7.next = 9;
|
494
550
|
return request.post('/cmdb/v1/api/import', formData, config);
|
495
551
|
|
496
552
|
case 9:
|
497
|
-
result =
|
498
|
-
return
|
553
|
+
result = _context7.sent;
|
554
|
+
return _context7.abrupt("return", result);
|
499
555
|
|
500
556
|
case 11:
|
501
557
|
case "end":
|
502
|
-
return
|
558
|
+
return _context7.stop();
|
503
559
|
}
|
504
|
-
},
|
505
|
-
}))
|
506
|
-
|
560
|
+
}, _callee7);
|
561
|
+
}));
|
562
|
+
|
563
|
+
return function uploadFile(_x25, _x26, _x27) {
|
564
|
+
return _ref9.apply(this, arguments);
|
565
|
+
};
|
566
|
+
}(); // 关闭提示
|
507
567
|
|
508
|
-
export var closeRecord = function
|
509
|
-
|
568
|
+
export var closeRecord = /*#__PURE__*/function () {
|
569
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(userId, modelType) {
|
510
570
|
var result;
|
511
|
-
return _regeneratorRuntime.wrap(function
|
512
|
-
while (1) switch (
|
571
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
572
|
+
while (1) switch (_context8.prev = _context8.next) {
|
513
573
|
case 0:
|
514
|
-
|
574
|
+
_context8.next = 2;
|
515
575
|
return request.post('/cmdb/v1/api/delete/import/record', {
|
516
576
|
userId: userId,
|
517
577
|
modelType: modelType
|
518
578
|
});
|
519
579
|
|
520
580
|
case 2:
|
521
|
-
result =
|
522
|
-
return
|
581
|
+
result = _context8.sent;
|
582
|
+
return _context8.abrupt("return", result);
|
523
583
|
|
524
584
|
case 4:
|
525
585
|
case "end":
|
526
|
-
return
|
586
|
+
return _context8.stop();
|
527
587
|
}
|
528
|
-
},
|
529
|
-
}))
|
530
|
-
}; // 获取提示信息
|
588
|
+
}, _callee8);
|
589
|
+
}));
|
531
590
|
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
591
|
+
return function closeRecord(_x28, _x29) {
|
592
|
+
return _ref11.apply(this, arguments);
|
593
|
+
};
|
594
|
+
}(); // 获取提示信息
|
595
|
+
|
596
|
+
export var getRecord = /*#__PURE__*/function () {
|
597
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(userId, modelType) {
|
598
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
599
|
+
while (1) switch (_context9.prev = _context9.next) {
|
536
600
|
case 0:
|
537
|
-
|
601
|
+
_context9.next = 2;
|
538
602
|
return request.post('/cmdb/v1/api/get/import/record', {
|
539
603
|
userId: userId,
|
540
604
|
modelType: modelType
|
541
605
|
});
|
542
606
|
|
543
607
|
case 2:
|
544
|
-
return
|
608
|
+
return _context9.abrupt("return", _context9.sent);
|
545
609
|
|
546
610
|
case 3:
|
547
611
|
case "end":
|
548
|
-
return
|
612
|
+
return _context9.stop();
|
549
613
|
}
|
550
|
-
},
|
551
|
-
}))
|
552
|
-
|
614
|
+
}, _callee9);
|
615
|
+
}));
|
616
|
+
|
617
|
+
return function getRecord(_x30, _x31) {
|
618
|
+
return _ref12.apply(this, arguments);
|
619
|
+
};
|
620
|
+
}();
|
553
621
|
/**
|
554
622
|
* 批量创建关系
|
555
623
|
* @param {*} params
|
556
624
|
* @returns
|
557
625
|
*/
|
558
626
|
|
559
|
-
export var batchCreateRelation = function
|
560
|
-
|
561
|
-
return _regeneratorRuntime.wrap(function
|
562
|
-
while (1) switch (
|
627
|
+
export var batchCreateRelation = /*#__PURE__*/function () {
|
628
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(params) {
|
629
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
630
|
+
while (1) switch (_context10.prev = _context10.next) {
|
563
631
|
case 0:
|
564
|
-
|
632
|
+
_context10.next = 2;
|
565
633
|
return request.post('/cmdb/v1/api/relation/batchCreate', params);
|
566
634
|
|
567
635
|
case 2:
|
568
|
-
return
|
636
|
+
return _context10.abrupt("return", _context10.sent);
|
569
637
|
|
570
638
|
case 3:
|
571
639
|
case "end":
|
572
|
-
return
|
640
|
+
return _context10.stop();
|
573
641
|
}
|
574
|
-
},
|
575
|
-
}))
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
642
|
+
}, _callee10);
|
643
|
+
}));
|
644
|
+
|
645
|
+
return function batchCreateRelation(_x32) {
|
646
|
+
return _ref13.apply(this, arguments);
|
647
|
+
};
|
648
|
+
}();
|
649
|
+
export var queryRelationByEndpoint = /*#__PURE__*/function () {
|
650
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(id) {
|
651
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
652
|
+
while (1) switch (_context11.prev = _context11.next) {
|
581
653
|
case 0:
|
582
|
-
|
654
|
+
_context11.next = 2;
|
583
655
|
return request.post('/cmdb/v1/api/relation/queryByEndpoint', {
|
584
656
|
id: id
|
585
657
|
});
|
586
658
|
|
587
659
|
case 2:
|
588
|
-
return
|
660
|
+
return _context11.abrupt("return", _context11.sent);
|
589
661
|
|
590
662
|
case 3:
|
591
663
|
case "end":
|
592
|
-
return
|
664
|
+
return _context11.stop();
|
593
665
|
}
|
594
|
-
},
|
595
|
-
}))
|
596
|
-
|
666
|
+
}, _callee11);
|
667
|
+
}));
|
668
|
+
|
669
|
+
return function queryRelationByEndpoint(_x33) {
|
670
|
+
return _ref14.apply(this, arguments);
|
671
|
+
};
|
672
|
+
}();
|
597
673
|
/**
|
598
674
|
* 批量更新关系
|
599
675
|
* @param {*} params
|
600
676
|
* @returns
|
601
677
|
*/
|
602
678
|
|
603
|
-
export var batchUpdateRelation = function
|
604
|
-
|
605
|
-
return _regeneratorRuntime.wrap(function
|
606
|
-
while (1) switch (
|
679
|
+
export var batchUpdateRelation = /*#__PURE__*/function () {
|
680
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
|
681
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
682
|
+
while (1) switch (_context12.prev = _context12.next) {
|
607
683
|
case 0:
|
608
|
-
|
684
|
+
_context12.next = 2;
|
609
685
|
return request.post('/cmdb/v1/api/relation/batchUpdateAttributes', params);
|
610
686
|
|
611
687
|
case 2:
|
612
|
-
return
|
688
|
+
return _context12.abrupt("return", _context12.sent);
|
613
689
|
|
614
690
|
case 3:
|
615
691
|
case "end":
|
616
|
-
return
|
692
|
+
return _context12.stop();
|
617
693
|
}
|
618
|
-
},
|
619
|
-
}))
|
620
|
-
|
694
|
+
}, _callee12);
|
695
|
+
}));
|
696
|
+
|
697
|
+
return function batchUpdateRelation(_x34) {
|
698
|
+
return _ref15.apply(this, arguments);
|
699
|
+
};
|
700
|
+
}();
|
621
701
|
/**
|
622
702
|
* 删除关系,添加到忽略
|
623
703
|
* @param {*} id 关系id
|
624
704
|
* @returns
|
625
705
|
*/
|
626
706
|
|
627
|
-
export var deleteRelation = function
|
628
|
-
|
629
|
-
return _regeneratorRuntime.wrap(function
|
630
|
-
while (1) switch (
|
707
|
+
export var deleteRelation = /*#__PURE__*/function () {
|
708
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(id) {
|
709
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
710
|
+
while (1) switch (_context13.prev = _context13.next) {
|
631
711
|
case 0:
|
632
|
-
|
712
|
+
_context13.next = 2;
|
633
713
|
return request.post('/cmdb/v1/api/relation/delete', {
|
634
714
|
id: id
|
635
715
|
});
|
636
716
|
|
637
717
|
case 2:
|
638
|
-
return
|
718
|
+
return _context13.abrupt("return", _context13.sent);
|
639
719
|
|
640
720
|
case 3:
|
641
721
|
case "end":
|
642
|
-
return
|
722
|
+
return _context13.stop();
|
643
723
|
}
|
644
|
-
},
|
645
|
-
}))
|
646
|
-
|
724
|
+
}, _callee13);
|
725
|
+
}));
|
726
|
+
|
727
|
+
return function deleteRelation(_x35) {
|
728
|
+
return _ref16.apply(this, arguments);
|
729
|
+
};
|
730
|
+
}();
|
647
731
|
/**
|
648
732
|
* 批量删除关系
|
649
733
|
* @param {[{id: string}]} params
|
650
734
|
* @returns
|
651
735
|
*/
|
652
736
|
|
653
|
-
export var batchDeleteRelation = function
|
654
|
-
|
655
|
-
return _regeneratorRuntime.wrap(function
|
656
|
-
while (1) switch (
|
737
|
+
export var batchDeleteRelation = /*#__PURE__*/function () {
|
738
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(params) {
|
739
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
740
|
+
while (1) switch (_context14.prev = _context14.next) {
|
657
741
|
case 0:
|
658
|
-
|
742
|
+
_context14.next = 2;
|
659
743
|
return request.post('/cmdb/v1/api/relation/batchDelete', params);
|
660
744
|
|
661
745
|
case 2:
|
662
|
-
return
|
746
|
+
return _context14.abrupt("return", _context14.sent);
|
663
747
|
|
664
748
|
case 3:
|
665
749
|
case "end":
|
666
|
-
return
|
750
|
+
return _context14.stop();
|
667
751
|
}
|
668
|
-
},
|
669
|
-
}))
|
670
|
-
|
752
|
+
}, _callee14);
|
753
|
+
}));
|
754
|
+
|
755
|
+
return function batchDeleteRelation(_x36) {
|
756
|
+
return _ref17.apply(this, arguments);
|
757
|
+
};
|
758
|
+
}();
|
671
759
|
/**
|
672
760
|
* 强制删除关系
|
673
761
|
* @param {*} id 关系id
|
674
762
|
* @returns
|
675
763
|
*/
|
676
764
|
|
677
|
-
export var forceDeleteRelation = function
|
678
|
-
|
679
|
-
return _regeneratorRuntime.wrap(function
|
680
|
-
while (1) switch (
|
765
|
+
export var forceDeleteRelation = /*#__PURE__*/function () {
|
766
|
+
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(id) {
|
767
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
768
|
+
while (1) switch (_context15.prev = _context15.next) {
|
681
769
|
case 0:
|
682
|
-
|
770
|
+
_context15.next = 2;
|
683
771
|
return batchDeleteRelation([{
|
684
772
|
id: id,
|
685
773
|
force: true
|
686
774
|
}]);
|
687
775
|
|
688
776
|
case 2:
|
689
|
-
return
|
777
|
+
return _context15.abrupt("return", _context15.sent);
|
690
778
|
|
691
779
|
case 3:
|
692
780
|
case "end":
|
693
|
-
return
|
781
|
+
return _context15.stop();
|
694
782
|
}
|
695
|
-
},
|
696
|
-
}))
|
697
|
-
|
783
|
+
}, _callee15);
|
784
|
+
}));
|
785
|
+
|
786
|
+
return function forceDeleteRelation(_x37) {
|
787
|
+
return _ref18.apply(this, arguments);
|
788
|
+
};
|
789
|
+
}();
|
698
790
|
/**
|
699
791
|
* 查询关系
|
700
792
|
* @param {[{id: string}]} params
|
701
793
|
* @returns
|
702
794
|
*/
|
703
795
|
|
704
|
-
export var batchQueryRelationById = function
|
705
|
-
|
706
|
-
return _regeneratorRuntime.wrap(function
|
707
|
-
while (1) switch (
|
796
|
+
export var batchQueryRelationById = /*#__PURE__*/function () {
|
797
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(params) {
|
798
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
799
|
+
while (1) switch (_context16.prev = _context16.next) {
|
708
800
|
case 0:
|
709
|
-
|
801
|
+
_context16.next = 2;
|
710
802
|
return request.post('/cmdb/v1/api/relation/batchQueryById', params);
|
711
803
|
|
712
804
|
case 2:
|
713
|
-
return
|
805
|
+
return _context16.abrupt("return", _context16.sent);
|
714
806
|
|
715
807
|
case 3:
|
716
808
|
case "end":
|
717
|
-
return
|
809
|
+
return _context16.stop();
|
718
810
|
}
|
719
|
-
},
|
720
|
-
}))
|
721
|
-
|
811
|
+
}, _callee16);
|
812
|
+
}));
|
813
|
+
|
814
|
+
return function batchQueryRelationById(_x38) {
|
815
|
+
return _ref19.apply(this, arguments);
|
816
|
+
};
|
817
|
+
}();
|
722
818
|
/**
|
723
819
|
* 查询关系
|
724
820
|
* @param {*} ids 关系ids
|
725
821
|
* @returns
|
726
822
|
*/
|
727
823
|
|
728
|
-
export var queryRelationByIds = function
|
729
|
-
|
730
|
-
return _regeneratorRuntime.wrap(function
|
731
|
-
while (1) switch (
|
824
|
+
export var queryRelationByIds = /*#__PURE__*/function () {
|
825
|
+
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(ids) {
|
826
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
827
|
+
while (1) switch (_context17.prev = _context17.next) {
|
732
828
|
case 0:
|
733
|
-
|
829
|
+
_context17.next = 2;
|
734
830
|
return batchQueryRelationById(ids.map(function (id) {
|
735
831
|
return {
|
736
832
|
id: id
|
@@ -738,12 +834,16 @@ export var queryRelationByIds = function queryRelationByIds(_x39) {
|
|
738
834
|
}));
|
739
835
|
|
740
836
|
case 2:
|
741
|
-
return
|
837
|
+
return _context17.abrupt("return", _context17.sent);
|
742
838
|
|
743
839
|
case 3:
|
744
840
|
case "end":
|
745
|
-
return
|
841
|
+
return _context17.stop();
|
746
842
|
}
|
747
|
-
},
|
748
|
-
}))
|
749
|
-
|
843
|
+
}, _callee17);
|
844
|
+
}));
|
845
|
+
|
846
|
+
return function queryRelationByIds(_x39) {
|
847
|
+
return _ref20.apply(this, arguments);
|
848
|
+
};
|
849
|
+
}();
|