@riil-frontend/component-topology 11.0.32 → 11.0.34

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.
@@ -27,12 +27,6 @@ var _textModule = _interopRequireDefault(require("../../../../../../common/text.
27
27
 
28
28
  var _NodeRelateResourceButton = _interopRequireDefault(require("./NodeRelateResourceButton"));
29
29
 
30
- var _PlatformDisplay = _interopRequireDefault(require("./PlatformDisplay"));
31
-
32
- var _BindIpInput = _interopRequireDefault(require("./BindIpInput"));
33
-
34
- var _exitLinkUtil = require("../../../../../../../networkTopo/utils/exitLinkUtil");
35
-
36
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
31
 
38
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -54,7 +48,7 @@ function getBindType(values) {
54
48
  return values.attrObject.bindType;
55
49
  }
56
50
 
57
- if (values.tag && !values.tag.startsWith('ip:')) {
51
+ if (values.tag) {
58
52
  return 'resource';
59
53
  }
60
54
 
@@ -68,7 +62,7 @@ function Data(props) {
68
62
  values = props.values,
69
63
  _onChange = props.onChange,
70
64
  editorProps = props.editorProps;
71
- var bindType = getBindType(values); // console.log("node, values", node, values);
65
+ var bindType = getBindType(values);
72
66
 
73
67
  var field = _field["default"].useField({
74
68
  autoUnmount: false,
@@ -141,7 +135,7 @@ function Data(props) {
141
135
  }, /*#__PURE__*/_react["default"].createElement(_form["default"], {
142
136
  field: field,
143
137
  labelAlign: "top"
144
- }, (!values.tag || bindType === 'ip') && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
138
+ }, !values.tag && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
145
139
  label: "\u5173\u8054\u7C7B\u578B"
146
140
  }, /*#__PURE__*/_react["default"].createElement(_select["default"], {
147
141
  name: "bindType",
@@ -155,9 +149,7 @@ function Data(props) {
155
149
  value: "none"
156
150
  }, "\u672A\u5173\u8054"), /*#__PURE__*/_react["default"].createElement(Option, {
157
151
  value: "resource"
158
- }, "\u5173\u8054\u8D44\u6E90"), /*#__PURE__*/_react["default"].createElement(Option, {
159
- value: "ip"
160
- }, "\u5173\u8054IP"), RelateTopoTree && /*#__PURE__*/_react["default"].createElement(Option, {
152
+ }, "\u5173\u8054\u8D44\u6E90"), RelateTopoTree && /*#__PURE__*/_react["default"].createElement(Option, {
161
153
  value: "topo"
162
154
  }, "\u5173\u8054\u62D3\u6251"))), bindType === 'resource' && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
163
155
  label: "\u5173\u8054\u8D44\u6E90"
@@ -181,35 +173,11 @@ function Data(props) {
181
173
  topo: topo,
182
174
  topoEditApi: topoEditApi,
183
175
  nodeBindResourceDrawerComponent: editorProps.nodeBindResourceDrawerComponent
184
- }))), bindType === 'ip' &&
185
- /*#__PURE__*/
186
- // <Form.Item
187
- // label="关联IP"
188
- // // style={{ display: "flex" }}
189
- // pattern={
190
- // /^((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))$/
191
- // }
192
- // patternTrigger="onBlur"
193
- // patternMessage="IP地址格式不正确"
194
- // >
195
- _react["default"].createElement(_BindIpInput["default"], {
196
- nodeElement: node,
197
- values: values,
198
- topo: topo,
199
- fieldItem: field,
200
- topoEditApi: topoEditApi,
201
- placeholder: "\u8BF7\u8F93\u5165",
202
- name: "attrObject.bindIp",
203
- onChange: _onChange,
204
- maxLength: 128
205
- }) // </Form.Item>
206
- , bindType === 'topo' && RelateTopoTree && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
176
+ }))), bindType === 'topo' && RelateTopoTree && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
207
177
  label: "\u5173\u8054\u62D3\u6251"
208
178
  }, /*#__PURE__*/_react["default"].createElement(RelateTopoTree, {
209
179
  name: "attrObject.bindTopo",
210
180
  topo: topo,
211
181
  onChange: handleBindTopoChange
212
- })), (editorProps === null || editorProps === void 0 ? void 0 : editorProps.topoType) === 'cmpTopo' && node.getTag() && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
213
- label: "\u6240\u5C5E\u5E73\u53F0"
214
- }, /*#__PURE__*/_react["default"].createElement(_PlatformDisplay["default"], props)))));
182
+ })))));
215
183
  }
@@ -603,7 +603,7 @@ var useTopoEdit = function useTopoEdit(params) {
603
603
 
604
604
  function _bindViewResources() {
605
605
  _bindViewResources = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(data) {
606
- var config, result, _elements;
606
+ var config, _yield$editDispatcher3, elements;
607
607
 
608
608
  return _regenerator["default"].wrap(function _callee12$(_context12) {
609
609
  while (1) {
@@ -620,19 +620,15 @@ var useTopoEdit = function useTopoEdit(params) {
620
620
  return editDispatchers.fetchDataByConfig();
621
621
 
622
622
  case 6:
623
- result = _context12.sent;
624
- console.log("fetchDataByConfig", result);
625
-
626
- if (result) {
627
- _elements = result.elements;
628
- saveBind(_componentTopologyGraph.TopoEvent.DATA_TYPE_RESOURCE_COMBO, _elements); // 临时放这里,仅拓扑中心有
623
+ _yield$editDispatcher3 = _context12.sent;
624
+ elements = _yield$editDispatcher3.elements;
625
+ saveBind(_componentTopologyGraph.TopoEvent.DATA_TYPE_RESOURCE_COMBO, elements); // 临时放这里,仅拓扑中心有
629
626
 
630
- if (topo.linkDynamicStyleExecutor) {
631
- topo.linkDynamicStyleExecutor.execute();
632
- }
627
+ if (topo.linkDynamicStyleExecutor) {
628
+ topo.linkDynamicStyleExecutor.execute();
633
629
  }
634
630
 
635
- case 9:
631
+ case 10:
636
632
  case "end":
637
633
  return _context12.stop();
638
634
  }
@@ -648,7 +644,7 @@ var useTopoEdit = function useTopoEdit(params) {
648
644
 
649
645
  function _addLayerResources() {
650
646
  _addLayerResources = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(group, newResourceIds) {
651
- var _yield$editDispatcher3, elements, newElements;
647
+ var _yield$editDispatcher4, elements, newElements;
652
648
 
653
649
  return _regenerator["default"].wrap(function _callee13$(_context13) {
654
650
  while (1) {
@@ -664,8 +660,8 @@ var useTopoEdit = function useTopoEdit(params) {
664
660
  return editDispatchers.fetchDataByConfig();
665
661
 
666
662
  case 5:
667
- _yield$editDispatcher3 = _context13.sent;
668
- elements = _yield$editDispatcher3.elements;
663
+ _yield$editDispatcher4 = _context13.sent;
664
+ elements = _yield$editDispatcher4.elements;
669
665
  // 2022-11-10 修复 添加资源后分层重新布局问题,仅布局新增资源。替换api topo.updateElements(data)
670
666
  newElements = findUNExistedElements(elements);
671
667
 
@@ -1079,7 +1075,7 @@ var useTopoEdit = function useTopoEdit(params) {
1079
1075
 
1080
1076
  function _relateNodeIp() {
1081
1077
  _relateNodeIp = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(txtValue, nodeElement) {
1082
- var dm, isUnique, ip, configObj, configData, _elements2, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
1078
+ var dm, isUnique, ip, configObj, configData, _elements, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
1083
1079
 
1084
1080
  return _regenerator["default"].wrap(function _callee15$(_context15) {
1085
1081
  while (1) {
@@ -1102,7 +1098,7 @@ var useTopoEdit = function useTopoEdit(params) {
1102
1098
  isUnique = (0, _exitLinkUtil.isUniqueIp)(dm, txtValue, nodeElement); // 获取关联链路
1103
1099
 
1104
1100
  if (!isUnique) {
1105
- _context15.next = 24;
1101
+ _context15.next = 23;
1106
1102
  break;
1107
1103
  }
1108
1104
 
@@ -1126,8 +1122,8 @@ var useTopoEdit = function useTopoEdit(params) {
1126
1122
  case 16:
1127
1123
  configData = _context15.sent;
1128
1124
  // console.log("configData",configObj, configData);
1129
- _elements2 = configData.elements;
1130
- newLinkElements = findUNExistedLinkElements(_elements2); // console.log("configData", configData, newLinkElements);
1125
+ _elements = configData.elements;
1126
+ newLinkElements = findUNExistedLinkElements(_elements); // console.log("configData", configData, newLinkElements);
1131
1127
 
1132
1128
  newLink = newLinkElements.filter(function (item) {
1133
1129
  return item.type === "link";
@@ -1142,8 +1138,7 @@ var useTopoEdit = function useTopoEdit(params) {
1142
1138
  nodes: [],
1143
1139
  links: newLink,
1144
1140
  linkGroups: newLinkGroup
1145
- };
1146
- console.log("createElementsData", createElementsData);
1141
+ }; // console.log("createElementsData", createElementsData);
1147
1142
 
1148
1143
  if ([].concat(newLink, newLinkGroup).length > 0) {
1149
1144
  _htTopo = topo.getHtTopo();
@@ -1151,7 +1146,7 @@ var useTopoEdit = function useTopoEdit(params) {
1151
1146
  _htTopo.createElements(createElementsData);
1152
1147
  }
1153
1148
 
1154
- case 24:
1149
+ case 23:
1155
1150
  case "end":
1156
1151
  return _context15.stop();
1157
1152
  }
@@ -56,7 +56,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
56
56
  var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
57
57
 
58
58
  // eslint-disable-next-line no-undef
59
- var version = typeof "11.0.32" === 'string' ? "11.0.32" : null;
59
+ var version = typeof "11.0.34" === 'string' ? "11.0.34" : null;
60
60
  console.info("\u62D3\u6251\u7248\u672C: " + version);
61
61
  /**
62
62
  * 拓扑显示和编辑
@@ -3,43 +3,182 @@
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  exports.__esModule = true;
6
- exports["default"] = void 0;
6
+ exports["default"] = exports.TOPO_PARENT_ID = exports.TOPO_GROUP_ID = void 0;
7
7
 
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
 
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
 
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
12
14
  var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
13
15
 
14
16
  var _constants = require("./constants");
15
17
 
18
+ var API_ROOT = _constants.TOPO_API_ROOT;
19
+ /**
20
+ * 拓扑图(看做一个容器)的“父容器”ID
21
+ */
22
+
23
+ var TOPO_PARENT_ID = -2;
24
+ /**
25
+ * 拓扑图(看做一个容器)的容器ID
26
+ */
27
+
28
+ exports.TOPO_PARENT_ID = TOPO_PARENT_ID;
29
+ var TOPO_GROUP_ID = -1;
30
+ exports.TOPO_GROUP_ID = TOPO_GROUP_ID;
31
+ var DEFAULT_QUERY = {
32
+ current: 1,
33
+ pageSize: 200,
34
+ sortBy: 'name',
35
+ sortOrder: 'asc'
36
+ };
37
+
38
+ function prepareResourceParams(conditions, query) {
39
+ if (query === void 0) {
40
+ query = DEFAULT_QUERY;
41
+ }
42
+
43
+ var dynamicRes = conditions.dynamic,
44
+ staticRes = conditions["static"],
45
+ stateValue = conditions.stateValue;
46
+ var dynamicCondition = dynamicRes && {
47
+ stateValue: stateValue,
48
+ condition: dynamicRes
49
+ } || undefined;
50
+
51
+ if (dynamicCondition && query) {
52
+ dynamicCondition.currentPage = query.current;
53
+ dynamicCondition.pageSize = query.pageSize;
54
+ dynamicCondition.sort = query.sortBy + " " + query.sortOrder;
55
+ }
56
+
57
+ return {
58
+ dynamicCondition: dynamicCondition,
59
+ fixedConditionIdList: (staticRes || []).filter(function (ciId) {
60
+ return !ciId.startsWith('ip:');
61
+ }),
62
+ linkIps: (staticRes || []).filter(function (ciId) {
63
+ return ciId.startsWith('ip:');
64
+ }).map(function (ciId) {
65
+ return ciId.replace('ip:', '');
66
+ })
67
+ };
68
+ }
69
+
70
+ function prepareGroupParams(modifiedGroups) {
71
+ if (modifiedGroups === void 0) {
72
+ modifiedGroups = [];
73
+ }
74
+
75
+ var groups = modifiedGroups.map(function (group, index) {
76
+ var id = group.id,
77
+ layout = group.layout,
78
+ _group$parentId = group.parentId,
79
+ parentId = _group$parentId === void 0 ? TOPO_GROUP_ID : _group$parentId,
80
+ _group$name = group.name,
81
+ name = _group$name === void 0 ? '' : _group$name,
82
+ expanded = group.expanded,
83
+ _group$styles = group.styles,
84
+ styles = _group$styles === void 0 ? {} : _group$styles,
85
+ resources = group.resources,
86
+ tag = group.tag;
87
+
88
+ if (!resources) {
89
+ return null;
90
+ }
91
+
92
+ var topoGroup = {
93
+ id: id,
94
+ layout: layout,
95
+ parentId: parentId,
96
+ name: name,
97
+ styles: JSON.stringify(expanded !== undefined ? (0, _extends2["default"])({}, styles, {
98
+ showExpanded: expanded
99
+ }) : styles),
100
+ order: index,
101
+ tag: tag
102
+ };
103
+ return {
104
+ topoGroup: topoGroup,
105
+ condition: prepareResourceParams(resources)
106
+ };
107
+ }).filter(Boolean);
108
+ return {
109
+ groups: groups
110
+ };
111
+ }
112
+
16
113
  var _default = {
17
114
  /**
18
- * 保存拓扑绘制数据(第三方库内部结构,无需关心含义)
115
+ * 查询拓扑数据
19
116
  * @param {Number} id Topo ID
20
- * @param {String} data ht拓扑序列化数据
117
+ * @param {Object} resources
118
+ * @param {Array} groups
21
119
  * @returns
22
120
  */
23
- saveSerializeData: function saveSerializeData(id, data) {
121
+ getTopoDataByResource: function getTopoDataByResource(id, resources, groups, exportLinkIdList) {
24
122
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
123
+ var data, obj;
25
124
  return _regenerator["default"].wrap(function _callee$(_context) {
26
125
  while (1) {
27
126
  switch (_context.prev = _context.next) {
28
127
  case 0:
29
- _context.next = 2;
128
+ data = Array.isArray(groups) ? groups : [];
129
+
130
+ if (resources) {
131
+ data.push({
132
+ parentId: TOPO_PARENT_ID,
133
+ order: 100,
134
+ resources: resources
135
+ });
136
+ }
137
+
138
+ obj = prepareGroupParams(data);
139
+ _context.next = 5;
140
+ return _componentTopologyUtils.request.post(API_ROOT + "/structure/byCondition/" + id, (0, _extends2["default"])({}, obj, {
141
+ exportLinkIdList: exportLinkIdList
142
+ }));
143
+
144
+ case 5:
145
+ return _context.abrupt("return", _context.sent);
146
+
147
+ case 6:
148
+ case "end":
149
+ return _context.stop();
150
+ }
151
+ }
152
+ }, _callee);
153
+ }))();
154
+ },
155
+
156
+ /**
157
+ * 保存拓扑绘制数据(第三方库内部结构,无需关心含义)
158
+ * @param {Number} id Topo ID
159
+ * @param {String} data ht拓扑序列化数据
160
+ * @returns
161
+ */
162
+ saveSerializeData: function saveSerializeData(id, data) {
163
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
164
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
165
+ while (1) {
166
+ switch (_context2.prev = _context2.next) {
167
+ case 0:
168
+ _context2.next = 2;
30
169
  return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/structure/" + id, {
31
170
  data: data
32
171
  });
33
172
 
34
173
  case 2:
35
- return _context.abrupt("return", _context.sent);
174
+ return _context2.abrupt("return", _context2.sent);
36
175
 
37
176
  case 3:
38
177
  case "end":
39
- return _context.stop();
178
+ return _context2.stop();
40
179
  }
41
180
  }
42
- }, _callee);
181
+ }, _callee2);
43
182
  }))();
44
183
  }
45
184
  };
@@ -65,40 +65,6 @@ function _default(engine) {
65
65
  }, _callee);
66
66
  }))();
67
67
  },
68
- // 根据ci的id获取属性的值
69
- getCiArrByIds: function getCiArrByIds(conditions, state) {
70
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
71
- var resIdsList, result;
72
- return _regenerator["default"].wrap(function _callee2$(_context2) {
73
- while (1) {
74
- switch (_context2.prev = _context2.next) {
75
- case 0:
76
- resIdsList = state.topoBizMod.resAndMetrics.resIdsList; // rlog.debug('根据ci的id获取属性的值-getCiArrByIds', resIdsList);
77
- // const ciIds = encodeURIComponent(resIdsList);
78
-
79
- _context2.prev = 1;
80
- _context2.next = 4;
81
- return _topo["default"].getBatchCiArr({
82
- ids: resIdsList
83
- });
84
-
85
- case 4:
86
- result = _context2.sent;
87
- return _context2.abrupt("return", result.content);
88
-
89
- case 8:
90
- _context2.prev = 8;
91
- _context2.t0 = _context2["catch"](1);
92
- return _context2.abrupt("return", null);
93
-
94
- case 11:
95
- case "end":
96
- return _context2.stop();
97
- }
98
- }
99
- }, _callee2, null, [[1, 8]]);
100
- }))();
101
- },
102
68
 
103
69
  /**
104
70
  * 设置属性和指标
@@ -21,8 +21,6 @@ var _blacklist = _interopRequireDefault(require("./blacklist"));
21
21
 
22
22
  var _constants = require("./constants");
23
23
 
24
- var _cmdb = require("../cmdb");
25
-
26
24
  var _model = require("../model");
27
25
 
28
26
  var _exitLinkUtil = require("../../utils/exitLinkUtil");
@@ -48,10 +46,6 @@ var DEFAULT_QUERY = {
48
46
  sortOrder: 'asc'
49
47
  };
50
48
 
51
- function isAvailableArray(arr) {
52
- return arr && Array.isArray(arr) && arr.length > 0;
53
- }
54
-
55
49
  function prepareResourceParams(conditions, query) {
56
50
  if (query === void 0) {
57
51
  query = DEFAULT_QUERY;
@@ -59,10 +53,7 @@ function prepareResourceParams(conditions, query) {
59
53
 
60
54
  var dynamicRes = conditions.dynamic,
61
55
  staticRes = conditions["static"],
62
- stateValue = conditions.stateValue; // if (isNull(dynamicRes) && isNull(staticRes)) {
63
- // return null;
64
- // }
65
-
56
+ stateValue = conditions.stateValue;
66
57
  var dynamicCondition = dynamicRes && {
67
58
  stateValue: stateValue,
68
59
  condition: dynamicRes
@@ -474,7 +465,7 @@ var _default = (0, _extends2["default"])({
474
465
  while (1) {
475
466
  switch (_context13.prev = _context13.next) {
476
467
  case 0:
477
- data = isAvailableArray(groups) ? groups : [];
468
+ data = Array.isArray(groups) ? groups : [];
478
469
 
479
470
  if (resources) {
480
471
  data.push({
@@ -523,7 +514,7 @@ var _default = (0, _extends2["default"])({
523
514
  switch (_context14.prev = _context14.next) {
524
515
  case 0:
525
516
  groups = config.groups, resources = config.resources, exportLinkIdList = config.exportLinkIdList, otherConfig = (0, _objectWithoutPropertiesLoose2["default"])(config, _excluded);
526
- newGroups = isAvailableArray(groups) ? groups : [];
517
+ newGroups = Array.isArray(groups) ? groups : [];
527
518
 
528
519
  if (resources) {
529
520
  // 新建拓扑时
@@ -659,48 +650,6 @@ var _default = (0, _extends2["default"])({
659
650
  }))();
660
651
  },
661
652
 
662
- /**
663
- * 根据资源id获取属性及属性值
664
- * @param {*} params Topo ID
665
- */
666
- getAttributesByIds: function getAttributesByIds(params) {
667
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19() {
668
- var _params$ids;
669
-
670
- var param;
671
- return _regenerator["default"].wrap(function _callee19$(_context19) {
672
- while (1) {
673
- switch (_context19.prev = _context19.next) {
674
- case 0:
675
- if (!(((_params$ids = params.ids) === null || _params$ids === void 0 ? void 0 : _params$ids.length) > 0)) {
676
- _context19.next = 6;
677
- break;
678
- }
679
-
680
- param = {
681
- condition: "id('" + params.ids.join("','") + "')",
682
- sort: 'index DESC',
683
- currentPage: 1,
684
- pageSize: params.ids.length > 10 ? params.ids.length : 10
685
- };
686
-
687
- _rlog["default"].debug('getAttributesByIds', param);
688
-
689
- _context19.next = 5;
690
- return (0, _cmdb.commonQuery)(param);
691
-
692
- case 5:
693
- return _context19.abrupt("return", _context19.sent);
694
-
695
- case 6:
696
- case "end":
697
- return _context19.stop();
698
- }
699
- }
700
- }, _callee19);
701
- }))();
702
- },
703
-
704
653
  /**
705
654
  * 批量查询ci信息接口
706
655
  * @param {*} params Topo ID
@@ -725,47 +674,28 @@ var _default = (0, _extends2["default"])({
725
674
  }
726
675
  },
727
676
 
728
- /**
729
- * 批量查询ci属性
730
- * @param {*} params Topo ID
731
- */
732
- getBatchCiArr: function getBatchCiArr(params) {
733
- var _params$ids2;
734
-
735
- if (((_params$ids2 = params.ids) === null || _params$ids2 === void 0 ? void 0 : _params$ids2.length) > 0) {
736
- var param = {
737
- condition: "id('" + params.ids.join("','") + "')",
738
- sort: 'name asc',
739
- currentPage: 1,
740
- pageSize: 999
741
- }; // rlog.debug('getBatchCi', param);
742
-
743
- return (0, _cmdb.commonQuery)(param);
744
- }
745
- },
746
-
747
677
  /**
748
678
  * 批量查询ci指标属性
749
679
  * @param {*} params Topo ID
750
680
  */
751
681
  getBatchCiPolling: function getBatchCiPolling(params) {
752
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee20() {
753
- return _regenerator["default"].wrap(function _callee20$(_context20) {
682
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19() {
683
+ return _regenerator["default"].wrap(function _callee19$(_context19) {
754
684
  while (1) {
755
- switch (_context20.prev = _context20.next) {
685
+ switch (_context19.prev = _context19.next) {
756
686
  case 0:
757
- _context20.next = 2;
687
+ _context19.next = 2;
758
688
  return _componentTopologyUtils.request.post(_constants.TOPO_API_ROOT + "/attributes/polling", params);
759
689
 
760
690
  case 2:
761
- return _context20.abrupt("return", _context20.sent);
691
+ return _context19.abrupt("return", _context19.sent);
762
692
 
763
693
  case 3:
764
694
  case "end":
765
- return _context20.stop();
695
+ return _context19.stop();
766
696
  }
767
697
  }
768
- }, _callee20);
698
+ }, _callee19);
769
699
  }))();
770
700
  }
771
701
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "11.0.32",
3
+ "version": "11.0.34",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -80,8 +80,9 @@
80
80
  "@riil-frontend/hooks": "latest",
81
81
  "@riil-frontend/next-collapse": "^1.0.1-a.0",
82
82
  "@riil-frontend/utils": "^1.0.20",
83
+ "@types/jest": "^29.5.4",
83
84
  "axios": "^0.21.1",
84
- "build-plugin-component": "^1.9.2",
85
+ "build-plugin-component": "^1.12.1",
85
86
  "build-plugin-fusion": "^0.1.0",
86
87
  "build-plugin-moment-locales": "^0.1.0",
87
88
  "build-scripts": "^1.1.1",
@@ -92,7 +93,9 @@
92
93
  "enzyme-adapter-react-16": "^1.15.4",
93
94
  "eslint": "^6.0.1",
94
95
  "html2canvas": "^1.3.2",
95
- "jest": "^29.6.2",
96
+ "identity-obj-proxy": "^3.0.0",
97
+ "jest": "^24.9.0",
98
+ "jest-environment-jsdom": "^24.9.0",
96
99
  "jspdf": "^2.3.1",
97
100
  "lnk-cli": "^1.0.1",
98
101
  "lodash": "^4.17.19",
@@ -118,6 +121,6 @@
118
121
  "access": "public"
119
122
  },
120
123
  "license": "MIT",
121
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.32/build/index.html",
124
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.34/build/index.html",
122
125
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
123
126
  }