@riil-frontend/component-topology 11.0.35 → 12.0.0-dev.2

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