@riil-frontend/component-topology 7.0.0-dev.2 → 7.0.0-dev.21

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 (170) 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/TopoView/topoView.js +2 -19
  6. package/es/core/components/titlebar/index.js +2 -1
  7. package/es/core/editor/components/EditorPlugin.js +1 -2
  8. package/es/core/editor/components/Toolbar/buttons.js +2 -2
  9. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +11 -3
  10. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +6 -1
  11. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +5 -0
  12. package/es/core/editor/components/settings/PropertyView.js +11 -10
  13. package/es/core/editor/components/settings/Settings.js +8 -1
  14. package/es/core/editor/components/settings/core/PropertyViewManager.js +4 -3
  15. package/es/core/editor/components/settings/core/edgePropertyViewAdapter.js +1 -7
  16. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +6 -3
  17. package/es/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +4 -2
  18. package/es/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +10 -0
  19. package/es/core/editor/hooks/useKeyboardShortcut.js +1 -1
  20. package/es/core/hooks/usePolling.js +1 -6
  21. package/es/core/hooks/useTopoEdit.js +134 -170
  22. package/es/core/models/Alarm.js +12 -24
  23. package/es/core/models/TopoApp.js +1 -1
  24. package/es/core/models/topoData.js +3 -3
  25. package/es/core/models/utils/linkUtils.js +0 -3
  26. package/es/core/store/models/topoConfig.js +7 -5
  27. package/es/core/store/models/topoMod.js +8 -7
  28. package/es/core/utils/saveSerialize.js +2 -3
  29. package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +13 -2
  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/BasicTools.js +3 -16
  35. package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +25 -0
  36. package/es/networkTopo/getTopoData.js +18 -30
  37. package/es/networkTopo/index.js +1 -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 +21 -21
  59. package/es/utils/tree.js +1 -0
  60. package/lib/core/components/TopoView/topoView.js +2 -20
  61. package/lib/core/components/titlebar/index.js +5 -1
  62. package/lib/core/editor/components/EditorPlugin.js +1 -3
  63. package/lib/core/editor/components/Toolbar/buttons.js +2 -2
  64. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +11 -4
  65. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +6 -1
  66. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +5 -0
  67. package/lib/core/editor/components/settings/PropertyView.js +10 -10
  68. package/lib/core/editor/components/settings/Settings.js +9 -1
  69. package/lib/core/editor/components/settings/core/PropertyViewManager.js +4 -3
  70. package/lib/core/editor/components/settings/core/edgePropertyViewAdapter.js +1 -10
  71. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +7 -4
  72. package/lib/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +4 -2
  73. package/lib/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +18 -0
  74. package/lib/core/editor/hooks/useKeyboardShortcut.js +1 -1
  75. package/lib/core/hooks/usePolling.js +1 -6
  76. package/lib/core/hooks/useTopoEdit.js +134 -170
  77. package/lib/core/models/Alarm.js +12 -24
  78. package/lib/core/models/TopoApp.js +1 -1
  79. package/lib/core/models/topoData.js +7 -11
  80. package/lib/core/models/utils/linkUtils.js +0 -5
  81. package/lib/core/store/models/topoConfig.js +7 -5
  82. package/lib/core/store/models/topoMod.js +10 -7
  83. package/lib/core/utils/saveSerialize.js +1 -3
  84. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +13 -2
  85. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +28 -26
  86. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +4 -0
  87. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +17 -17
  88. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +1 -0
  89. package/lib/core/viewer/components/titlebar/BasicTools.js +3 -17
  90. package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +36 -0
  91. package/lib/networkTopo/getTopoData.js +19 -33
  92. package/lib/networkTopo/index.js +1 -5
  93. package/lib/networkTopo/services/alert.js +66 -0
  94. package/lib/networkTopo/services/authorization.js +145 -0
  95. package/lib/networkTopo/services/cmdb.js +977 -0
  96. package/lib/networkTopo/services/index.js +3 -29
  97. package/lib/networkTopo/services/mdc.js +91 -0
  98. package/lib/networkTopo/services/metric.js +82 -0
  99. package/lib/networkTopo/services/model.js +1387 -0
  100. package/lib/networkTopo/services/risk.js +40 -0
  101. package/lib/networkTopo/services/topo/auth.js +79 -0
  102. package/lib/networkTopo/services/topo/basic.js +753 -0
  103. package/lib/networkTopo/services/topo/blacklist.js +72 -0
  104. package/lib/networkTopo/services/topo/ciInfo.js +82 -0
  105. package/lib/networkTopo/services/topo/constants.js +6 -0
  106. package/lib/networkTopo/services/topo/icon.js +144 -0
  107. package/lib/networkTopo/{components/editor/plugins/LayerConfigPlugin.js → services/topo/index.js} +33 -23
  108. package/lib/networkTopo/services/topo/networkLink.js +45 -0
  109. package/lib/networkTopo/services/topo/relation.js +39 -0
  110. package/lib/networkTopo/services/topo/resourceWebUrl.js +95 -0
  111. package/lib/networkTopo/store/topoTreeMod.js +5 -1
  112. package/lib/networkTopo/utils/storage.js +46 -0
  113. package/lib/style.js +21 -21
  114. package/lib/utils/tree.js +1 -0
  115. package/package.json +3 -3
  116. package/es/core/editor/components/plugins/MultipleResourceSelectPlugin.js +0 -15
  117. package/es/core/editor/components/settings/propertyViews/edge/addEdgeProps.js +0 -10
  118. package/es/networkTopo/components/Topology.js +0 -28
  119. package/es/networkTopo/components/editor/plugins/LayerConfigPlugin.js +0 -22
  120. package/es/networkTopo/components/editor/propertyViews/LayerRelatedResourceList.js +0 -48
  121. package/es/networkTopo/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +0 -35
  122. package/es/networkTopo/components/editor/propertyViews/edge/EdgePropertyView.js +0 -43
  123. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +0 -39
  124. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyView.js +0 -31
  125. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyViewV1.js +0 -37
  126. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Setting/index.js +0 -49
  127. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/index.js +0 -2
  128. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +0 -630
  129. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/NetworkLinkForm.js +0 -4
  130. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +0 -458
  131. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/index.module.scss +0 -34
  132. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/hooks/useAddLink.js +0 -104
  133. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/index.module.scss +0 -12
  134. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/mock.js +0 -55
  135. package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/server.js +0 -187
  136. package/es/networkTopo/components/editor/propertyViews/edge/link/BindExitLinkSelect.js +0 -178
  137. package/es/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.js +0 -103
  138. package/es/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.module.scss +0 -65
  139. package/es/networkTopo/components/editor/useEditorProps.js +0 -32
  140. package/es/networkTopo/event/index.js +0 -6
  141. package/es/networkTopo/hooks/editor/useDeleteEdges.js +0 -200
  142. package/es/networkTopo/hooks/editor/useGroupSortResources.js +0 -16
  143. package/es/networkTopo/hooks/useTopoEdit.js +0 -26
  144. package/lib/core/editor/components/plugins/MultipleResourceSelectPlugin.js +0 -25
  145. package/lib/core/editor/components/settings/propertyViews/edge/addEdgeProps.js +0 -19
  146. package/lib/networkTopo/components/Topology.js +0 -40
  147. package/lib/networkTopo/components/editor/propertyViews/LayerRelatedResourceList.js +0 -63
  148. package/lib/networkTopo/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +0 -51
  149. package/lib/networkTopo/components/editor/propertyViews/edge/EdgePropertyView.js +0 -60
  150. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +0 -54
  151. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyView.js +0 -42
  152. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyViewV1.js +0 -50
  153. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Setting/index.js +0 -66
  154. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/index.js +0 -11
  155. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +0 -661
  156. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/NetworkLinkForm.js +0 -12
  157. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +0 -486
  158. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/index.module.scss +0 -34
  159. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/hooks/useAddLink.js +0 -120
  160. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/index.module.scss +0 -12
  161. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/mock.js +0 -60
  162. package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/server.js +0 -207
  163. package/lib/networkTopo/components/editor/propertyViews/edge/link/BindExitLinkSelect.js +0 -205
  164. package/lib/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.js +0 -121
  165. package/lib/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.module.scss +0 -65
  166. package/lib/networkTopo/components/editor/useEditorProps.js +0 -46
  167. package/lib/networkTopo/event/index.js +0 -11
  168. package/lib/networkTopo/hooks/editor/useDeleteEdges.js +0 -218
  169. package/lib/networkTopo/hooks/editor/useGroupSortResources.js +0 -21
  170. package/lib/networkTopo/hooks/useTopoEdit.js +0 -40
@@ -1,4 +1,3 @@
1
1
  import TopoCenter from "./models/TopoCenter";
2
2
  import createTopo from "./createTopo";
3
- import Topology from "./components/Topology";
4
- export { TopoCenter, createTopo, Topology };
3
+ export { TopoCenter, createTopo };
@@ -0,0 +1,55 @@
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
+ export default {
5
+ /**
6
+ * 根据资源id获取告警
7
+ * @param {*} params Topo ID
8
+ */
9
+ getAlarmByIds: function getAlarmByIds(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.post('/alert/v1/api/alert/getAlertListInResource', params);
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
+
30
+ /**
31
+ * 通过ciId获取组件id
32
+ * ['xxxxxxx']
33
+ *
34
+ */
35
+ getCisComponentIds: function getCisComponentIds(params) {
36
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
37
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
38
+ while (1) {
39
+ switch (_context2.prev = _context2.next) {
40
+ case 0:
41
+ _context2.next = 2;
42
+ return request.post('/topo/v1/api/structure/componentIds', params);
43
+
44
+ case 2:
45
+ return _context2.abrupt("return", _context2.sent);
46
+
47
+ case 3:
48
+ case "end":
49
+ return _context2.stop();
50
+ }
51
+ }
52
+ }, _callee2);
53
+ }))();
54
+ }
55
+ };
@@ -0,0 +1,135 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+
4
+ /**
5
+ * @Author: zhaoshenghua
6
+ * @Date: 2021-04-16 11:11:05
7
+ * @Last Modified by: zhaoshenghua
8
+ * @Last Modified time: 2021-09-27 17:02:55
9
+ */
10
+ import { request } from '@riil-frontend/component-topology-utils';
11
+ export default {
12
+ /**
13
+ * 根据用户对菜单进行预鉴权
14
+ * @param {*} menus url对象数组
15
+ * [{url:'/admin/connectInfo'}]
16
+ * @return [{url:'/admin/connectInfo',passed:'PASS'}]
17
+ */
18
+ checkMenuAuthentication: function checkMenuAuthentication(menus) {
19
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
20
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
21
+ while (1) {
22
+ switch (_context.prev = _context.next) {
23
+ case 0:
24
+ _context.next = 2;
25
+ return request.post('/authorization/v1/api/authority/check/checkMenuAuthentication', menus);
26
+
27
+ case 2:
28
+ return _context.abrupt("return", _context.sent);
29
+
30
+ case 3:
31
+ case "end":
32
+ return _context.stop();
33
+ }
34
+ }
35
+ }, _callee);
36
+ }))();
37
+ },
38
+
39
+ /**
40
+ * 资源预鉴权
41
+ * @param {Array} res id对象集合
42
+ * [{id:'000000000035f663'}]
43
+ * @return [{id:'000000000035f663',passed:'read'/'write'/'delete'/'impermissibility'}]
44
+ */
45
+ checkSourceAuthentication: function checkSourceAuthentication(res) {
46
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
47
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
48
+ while (1) {
49
+ switch (_context2.prev = _context2.next) {
50
+ case 0:
51
+ _context2.next = 2;
52
+ return request.post('/authorization/v1/api/authority/check/checkSourceAuthentication', res);
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
+
66
+ /**
67
+ * 功能鉴权
68
+ */
69
+ checkFuncAuthentication: function checkFuncAuthentication(param) {
70
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
71
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
72
+ while (1) {
73
+ switch (_context3.prev = _context3.next) {
74
+ case 0:
75
+ _context3.next = 2;
76
+ return request.post('/authorization/v1/api/authority/check/checkFuncAuthentication', param);
77
+
78
+ case 2:
79
+ return _context3.abrupt("return", _context3.sent);
80
+
81
+ case 3:
82
+ case "end":
83
+ return _context3.stop();
84
+ }
85
+ }
86
+ }, _callee3);
87
+ }))();
88
+ },
89
+
90
+ /**
91
+ *获得角色列表
92
+ *@param {Array} orders 排序
93
+ *@param {Array} simpleFilter 过滤字段
94
+ * */
95
+ queryRolesList: function queryRolesList(param) {
96
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
97
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
98
+ while (1) {
99
+ switch (_context4.prev = _context4.next) {
100
+ case 0:
101
+ _context4.next = 2;
102
+ return request.post('/authorization/v1/api/roles/list', param);
103
+
104
+ case 2:
105
+ return _context4.abrupt("return", _context4.sent);
106
+
107
+ case 3:
108
+ case "end":
109
+ return _context4.stop();
110
+ }
111
+ }
112
+ }, _callee4);
113
+ }))();
114
+ },
115
+ orgRolePostPage: function orgRolePostPage(param) {
116
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
117
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
118
+ while (1) {
119
+ switch (_context5.prev = _context5.next) {
120
+ case 0:
121
+ _context5.next = 2;
122
+ return request.post('/identity/v1/api/user/orgRolePost/page', param);
123
+
124
+ case 2:
125
+ return _context5.abrupt("return", _context5.sent);
126
+
127
+ case 3:
128
+ case "end":
129
+ return _context5.stop();
130
+ }
131
+ }
132
+ }, _callee5);
133
+ }))();
134
+ }
135
+ };