@riil-frontend/component-topology 7.0.0-dev.9 → 7.0.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 (172) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +1 -1
  4. package/build/index.js +31 -31
  5. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -23
  6. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +3 -2
  7. package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +1 -2
  8. package/es/core/components/TopoView/GraphViewPanel.js +18 -2
  9. package/es/core/editor/components/Toolbar/buttons.js +2 -2
  10. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +10 -3
  11. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +9 -2
  12. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +7 -1
  13. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +21 -6
  14. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +5 -0
  15. package/es/core/editor/components/settings/PropertyView.js +11 -10
  16. package/es/core/editor/components/settings/Settings.js +8 -1
  17. package/es/core/editor/components/settings/core/PropertyViewManager.js +4 -3
  18. package/es/core/editor/components/settings/core/edgePropertyViewAdapter.js +1 -7
  19. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +4 -2
  20. package/es/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +15 -0
  21. package/es/core/hooks/usePolling.js +1 -6
  22. package/es/core/hooks/useTopoEdit.js +3 -1
  23. package/es/core/models/Alarm.js +12 -24
  24. package/es/core/models/AttributeMetricDisplay.js +24 -10
  25. package/es/core/models/TopoApp.js +5 -3
  26. package/es/core/models/attributeFormatter/index.js +4 -0
  27. package/es/core/models/utils/linkUtils.js +0 -3
  28. package/es/core/store/models/topoMod.js +7 -6
  29. package/es/core/utils/manageStatusUtil.js +4 -0
  30. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +28 -25
  31. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +4 -0
  32. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +17 -17
  33. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +1 -0
  34. package/es/core/viewer/components/titlebar/widgets/SettingButton.js +3 -11
  35. package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +5 -3
  36. package/es/networkTopo/getTopoData.js +16 -27
  37. package/es/networkTopo/index.js +2 -2
  38. package/es/networkTopo/services/alert.js +55 -0
  39. package/es/networkTopo/services/authorization.js +135 -0
  40. package/es/networkTopo/services/cmdb.js +897 -0
  41. package/es/networkTopo/services/index.js +2 -26
  42. package/es/networkTopo/services/mdc.js +74 -0
  43. package/es/networkTopo/services/metric.js +68 -0
  44. package/es/networkTopo/services/model.js +1283 -0
  45. package/es/networkTopo/services/risk.js +29 -0
  46. package/es/networkTopo/services/topo/auth.js +67 -0
  47. package/es/networkTopo/services/topo/basic.js +727 -0
  48. package/es/networkTopo/services/topo/blacklist.js +60 -0
  49. package/es/networkTopo/services/topo/ciInfo.js +69 -0
  50. package/es/networkTopo/services/topo/constants.js +1 -0
  51. package/es/networkTopo/services/topo/icon.js +131 -0
  52. package/es/networkTopo/services/topo/index.js +18 -0
  53. package/es/networkTopo/services/topo/networkLink.js +33 -0
  54. package/es/networkTopo/services/topo/relation.js +27 -0
  55. package/es/networkTopo/services/topo/resourceWebUrl.js +84 -0
  56. package/es/networkTopo/store/topoTreeMod.js +5 -1
  57. package/es/networkTopo/utils/storage.js +38 -0
  58. package/es/style.js +1 -1
  59. package/es/utils/topoData.js +6 -67
  60. package/es/utils/tree.js +1 -0
  61. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +3 -24
  62. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +3 -3
  63. package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +1 -2
  64. package/lib/core/components/TopoView/GraphViewPanel.js +22 -2
  65. package/lib/core/editor/components/Toolbar/buttons.js +2 -2
  66. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +10 -3
  67. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +9 -3
  68. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +8 -1
  69. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +21 -7
  70. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +5 -0
  71. package/lib/core/editor/components/settings/PropertyView.js +10 -10
  72. package/lib/core/editor/components/settings/Settings.js +9 -1
  73. package/lib/core/editor/components/settings/core/PropertyViewManager.js +4 -3
  74. package/lib/core/editor/components/settings/core/edgePropertyViewAdapter.js +1 -10
  75. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +5 -3
  76. package/lib/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +23 -0
  77. package/lib/core/hooks/usePolling.js +1 -6
  78. package/lib/core/hooks/useTopoEdit.js +3 -1
  79. package/lib/core/models/Alarm.js +12 -24
  80. package/lib/core/models/AttributeMetricDisplay.js +25 -10
  81. package/lib/core/models/TopoApp.js +5 -3
  82. package/lib/core/models/attributeFormatter/index.js +4 -0
  83. package/lib/core/models/utils/linkUtils.js +0 -5
  84. package/lib/core/store/models/topoMod.js +9 -6
  85. package/lib/core/utils/manageStatusUtil.js +9 -0
  86. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +28 -26
  87. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +4 -0
  88. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +17 -17
  89. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +1 -0
  90. package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +3 -11
  91. package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +5 -3
  92. package/lib/networkTopo/getTopoData.js +16 -28
  93. package/lib/networkTopo/index.js +4 -4
  94. package/lib/networkTopo/services/alert.js +66 -0
  95. package/lib/networkTopo/services/authorization.js +145 -0
  96. package/lib/networkTopo/services/cmdb.js +977 -0
  97. package/lib/networkTopo/services/index.js +3 -29
  98. package/lib/networkTopo/services/mdc.js +91 -0
  99. package/lib/networkTopo/services/metric.js +82 -0
  100. package/lib/networkTopo/services/model.js +1387 -0
  101. package/lib/networkTopo/services/risk.js +40 -0
  102. package/lib/networkTopo/services/topo/auth.js +79 -0
  103. package/lib/networkTopo/services/topo/basic.js +753 -0
  104. package/lib/networkTopo/services/topo/blacklist.js +72 -0
  105. package/lib/networkTopo/services/topo/ciInfo.js +82 -0
  106. package/lib/networkTopo/services/topo/constants.js +6 -0
  107. package/lib/networkTopo/services/topo/icon.js +144 -0
  108. package/lib/networkTopo/{components/editor/plugins/LayerConfigPlugin.js → services/topo/index.js} +33 -23
  109. package/lib/networkTopo/services/topo/networkLink.js +45 -0
  110. package/lib/networkTopo/services/topo/relation.js +39 -0
  111. package/lib/networkTopo/services/topo/resourceWebUrl.js +95 -0
  112. package/lib/networkTopo/store/topoTreeMod.js +5 -1
  113. package/lib/networkTopo/utils/storage.js +46 -0
  114. package/lib/style.js +1 -1
  115. package/lib/utils/topoData.js +7 -75
  116. package/lib/utils/tree.js +1 -0
  117. package/package.json +3 -3
  118. package/es/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +0 -122
  119. package/es/core/editor/components/settings/propertyViews/edge/addEdgeProps.js +0 -10
  120. package/es/networkTopo/components/Topology.js +0 -28
  121. package/es/networkTopo/components/editor/plugins/LayerConfigPlugin.js +0 -22
  122. package/es/networkTopo/components/editor/propertyViews/LayerRelatedResourceList.js +0 -48
  123. package/es/networkTopo/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +0 -35
  124. package/es/networkTopo/components/editor/propertyViews/edge/EdgePropertyView.js +0 -43
  125. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +0 -39
  126. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyView.js +0 -31
  127. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyViewV1.js +0 -37
  128. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Setting/index.js +0 -49
  129. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/index.js +0 -2
  130. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +0 -630
  131. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/NetworkLinkForm.js +0 -4
  132. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +0 -458
  133. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/index.module.scss +0 -34
  134. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/hooks/useAddLink.js +0 -104
  135. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/index.module.scss +0 -12
  136. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/mock.js +0 -55
  137. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/server.js +0 -187
  138. package/es/networkTopo/components/editor/propertyViews/edge/link/BindExitLinkSelect.js +0 -178
  139. package/es/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.js +0 -103
  140. package/es/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.module.scss +0 -65
  141. package/es/networkTopo/components/editor/useEditorProps.js +0 -32
  142. package/es/networkTopo/event/index.js +0 -6
  143. package/es/networkTopo/hooks/editor/useDeleteEdges.js +0 -200
  144. package/es/networkTopo/hooks/editor/useGroupSortResources.js +0 -16
  145. package/es/networkTopo/hooks/useTopoEdit.js +0 -26
  146. package/lib/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +0 -147
  147. package/lib/core/editor/components/settings/propertyViews/edge/addEdgeProps.js +0 -19
  148. package/lib/networkTopo/components/Topology.js +0 -40
  149. package/lib/networkTopo/components/editor/propertyViews/LayerRelatedResourceList.js +0 -63
  150. package/lib/networkTopo/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +0 -51
  151. package/lib/networkTopo/components/editor/propertyViews/edge/EdgePropertyView.js +0 -60
  152. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +0 -54
  153. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyView.js +0 -42
  154. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyViewV1.js +0 -50
  155. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Setting/index.js +0 -66
  156. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/index.js +0 -11
  157. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +0 -661
  158. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/NetworkLinkForm.js +0 -12
  159. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +0 -486
  160. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/index.module.scss +0 -34
  161. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/hooks/useAddLink.js +0 -120
  162. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/index.module.scss +0 -12
  163. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/mock.js +0 -60
  164. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/server.js +0 -207
  165. package/lib/networkTopo/components/editor/propertyViews/edge/link/BindExitLinkSelect.js +0 -205
  166. package/lib/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.js +0 -121
  167. package/lib/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.module.scss +0 -65
  168. package/lib/networkTopo/components/editor/useEditorProps.js +0 -46
  169. package/lib/networkTopo/event/index.js +0 -11
  170. package/lib/networkTopo/hooks/editor/useDeleteEdges.js +0 -218
  171. package/lib/networkTopo/hooks/editor/useGroupSortResources.js +0 -21
  172. package/lib/networkTopo/hooks/useTopoEdit.js +0 -40
@@ -1,29 +1,5 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
1
  import _extends from "@babel/runtime/helpers/extends";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
- import topoService from '@riil-frontend/component-topology-common/es/services/topo';
5
2
  import { request } from '@riil-frontend/component-topology-utils';
3
+ import topoService from "./topo";
6
4
  import funcAuth from "./funcAuth";
7
- export default _extends({}, topoService, funcAuth, {
8
- // 获取有权限的拓扑树
9
- getTopoTreeByLoginUser: function getTopoTreeByLoginUser(params) {
10
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
11
- return _regeneratorRuntime.wrap(function _callee$(_context) {
12
- while (1) {
13
- switch (_context.prev = _context.next) {
14
- case 0:
15
- _context.next = 2;
16
- return request.get('/topo/v1/api/menuByLoginUser');
17
-
18
- case 2:
19
- return _context.abrupt("return", _context.sent);
20
-
21
- case 3:
22
- case "end":
23
- return _context.stop();
24
- }
25
- }
26
- }, _callee);
27
- }))();
28
- }
29
- });
5
+ export default _extends({}, topoService, funcAuth);
@@ -0,0 +1,74 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import { request } from '@riil-frontend/component-topology-utils';
4
+ /**
5
+ * 查询单个CI模型
6
+ * @param {*} code
7
+ */
8
+
9
+ export var getModelAssert = /*#__PURE__*/function () {
10
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
11
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
12
+ while (1) {
13
+ switch (_context.prev = _context.next) {
14
+ case 0:
15
+ return _context.abrupt("return", request.get("/mdc/v1/api/model-asset/" + code));
16
+
17
+ case 1:
18
+ case "end":
19
+ return _context.stop();
20
+ }
21
+ }
22
+ }, _callee);
23
+ }));
24
+
25
+ return function getModelAssert(_x) {
26
+ return _ref.apply(this, arguments);
27
+ };
28
+ }(); // 查询模型树
29
+
30
+ export var modelAssertTree = /*#__PURE__*/function () {
31
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
32
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
33
+ while (1) {
34
+ switch (_context2.prev = _context2.next) {
35
+ case 0:
36
+ return _context2.abrupt("return", request.get('/mdc/v1/api/model-asset/tree'));
37
+
38
+ case 1:
39
+ case "end":
40
+ return _context2.stop();
41
+ }
42
+ }
43
+ }, _callee2);
44
+ }));
45
+
46
+ return function modelAssertTree() {
47
+ return _ref2.apply(this, arguments);
48
+ };
49
+ }();
50
+ /**
51
+ * 批量查询字典定义
52
+ * @param {*?} dictCodes null:查所有
53
+ */
54
+
55
+ export var modelDictList = /*#__PURE__*/function () {
56
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(dictCodes) {
57
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
58
+ while (1) {
59
+ switch (_context3.prev = _context3.next) {
60
+ case 0:
61
+ return _context3.abrupt("return", request.post('/mdc/v1/api/model-dict/list', dictCodes));
62
+
63
+ case 1:
64
+ case "end":
65
+ return _context3.stop();
66
+ }
67
+ }
68
+ }, _callee3);
69
+ }));
70
+
71
+ return function modelDictList(_x2) {
72
+ return _ref3.apply(this, arguments);
73
+ };
74
+ }();
@@ -0,0 +1,68 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import { request } from '@riil-frontend/component-topology-utils';
4
+ /**
5
+ * 获得指标数据
6
+ * @param {array} ciId 实例id
7
+ * @param {array} subId 子实例id
8
+ * @param {array} code 指标code
9
+ * @returns {array} 对象数组
10
+ */
11
+
12
+ export var getLatestMetrics = /*#__PURE__*/function () {
13
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ciId, code) {
14
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
15
+ while (1) {
16
+ switch (_context.prev = _context.next) {
17
+ case 0:
18
+ _context.next = 2;
19
+ return request.post("/metric/v1/api/latestMetrics", {
20
+ ciId: ciId,
21
+ code: code
22
+ });
23
+
24
+ case 2:
25
+ return _context.abrupt("return", _context.sent);
26
+
27
+ case 3:
28
+ case "end":
29
+ return _context.stop();
30
+ }
31
+ }
32
+ }, _callee);
33
+ }));
34
+
35
+ return function getLatestMetrics(_x, _x2) {
36
+ return _ref.apply(this, arguments);
37
+ };
38
+ }();
39
+ /**
40
+ * 获得CI指标
41
+ */
42
+
43
+ export var getCiMetric = /*#__PURE__*/function () {
44
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(ciCode) {
45
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
46
+ while (1) {
47
+ switch (_context2.prev = _context2.next) {
48
+ case 0:
49
+ _context2.next = 2;
50
+ return request.post('/model/v1/api/getCiMetric', {
51
+ ciCode: ciCode
52
+ });
53
+
54
+ case 2:
55
+ return _context2.abrupt("return", _context2.sent);
56
+
57
+ case 3:
58
+ case "end":
59
+ return _context2.stop();
60
+ }
61
+ }
62
+ }, _callee2);
63
+ }));
64
+
65
+ return function getCiMetric(_x3) {
66
+ return _ref2.apply(this, arguments);
67
+ };
68
+ }();