@riil-frontend/component-topology 7.0.0-dev.19 → 7.0.0-dev.20

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 (45) 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 +29 -29
  5. package/es/core/models/TopoApp.js +1 -1
  6. package/es/networkTopo/services/alert.js +55 -0
  7. package/es/networkTopo/services/authorization.js +135 -0
  8. package/es/networkTopo/services/cmdb.js +897 -0
  9. package/es/networkTopo/services/index.js +2 -26
  10. package/es/networkTopo/services/mdc.js +74 -0
  11. package/es/networkTopo/services/metric.js +68 -0
  12. package/es/networkTopo/services/model.js +1283 -0
  13. package/es/networkTopo/services/risk.js +29 -0
  14. package/es/networkTopo/services/topo/auth.js +67 -0
  15. package/es/networkTopo/services/topo/basic.js +727 -0
  16. package/es/networkTopo/services/topo/blacklist.js +60 -0
  17. package/es/networkTopo/services/topo/ciInfo.js +69 -0
  18. package/es/networkTopo/services/topo/constants.js +1 -0
  19. package/es/networkTopo/services/topo/icon.js +131 -0
  20. package/es/networkTopo/services/topo/index.js +18 -0
  21. package/es/networkTopo/services/topo/networkLink.js +33 -0
  22. package/es/networkTopo/services/topo/relation.js +27 -0
  23. package/es/networkTopo/services/topo/resourceWebUrl.js +84 -0
  24. package/es/networkTopo/utils/storage.js +38 -0
  25. package/lib/core/models/TopoApp.js +1 -1
  26. package/lib/networkTopo/services/alert.js +66 -0
  27. package/lib/networkTopo/services/authorization.js +145 -0
  28. package/lib/networkTopo/services/cmdb.js +977 -0
  29. package/lib/networkTopo/services/index.js +3 -29
  30. package/lib/networkTopo/services/mdc.js +91 -0
  31. package/lib/networkTopo/services/metric.js +82 -0
  32. package/lib/networkTopo/services/model.js +1387 -0
  33. package/lib/networkTopo/services/risk.js +40 -0
  34. package/lib/networkTopo/services/topo/auth.js +79 -0
  35. package/lib/networkTopo/services/topo/basic.js +753 -0
  36. package/lib/networkTopo/services/topo/blacklist.js +72 -0
  37. package/lib/networkTopo/services/topo/ciInfo.js +82 -0
  38. package/lib/networkTopo/services/topo/constants.js +6 -0
  39. package/lib/networkTopo/services/topo/icon.js +144 -0
  40. package/lib/networkTopo/services/topo/index.js +42 -0
  41. package/lib/networkTopo/services/topo/networkLink.js +45 -0
  42. package/lib/networkTopo/services/topo/relation.js +39 -0
  43. package/lib/networkTopo/services/topo/resourceWebUrl.js +95 -0
  44. package/lib/networkTopo/utils/storage.js +46 -0
  45. package/package.json +2 -2
@@ -23,7 +23,7 @@ import topoFactory from "./topoFactory";
23
23
  import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
24
24
  import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
25
25
 
26
- var version = typeof "7.0.0-dev.19" === 'string' ? "7.0.0-dev.19" : null;
26
+ var version = typeof "7.0.0-dev.20" === 'string' ? "7.0.0-dev.20" : null;
27
27
  console.info("\u62D3\u6251\u7248\u672C: " + version);
28
28
  /**
29
29
  * 拓扑显示和编辑
@@ -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
+ };