@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.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +31 -31
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -23
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +3 -2
- package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +1 -2
- package/es/core/components/TopoView/GraphViewPanel.js +18 -2
- package/es/core/editor/components/Toolbar/buttons.js +2 -2
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +10 -3
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +9 -2
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +7 -1
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +21 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +5 -0
- package/es/core/editor/components/settings/PropertyView.js +11 -10
- package/es/core/editor/components/settings/Settings.js +8 -1
- package/es/core/editor/components/settings/core/PropertyViewManager.js +4 -3
- package/es/core/editor/components/settings/core/edgePropertyViewAdapter.js +1 -7
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +4 -2
- package/es/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +15 -0
- package/es/core/hooks/usePolling.js +1 -6
- package/es/core/hooks/useTopoEdit.js +3 -1
- package/es/core/models/Alarm.js +12 -24
- package/es/core/models/AttributeMetricDisplay.js +24 -10
- package/es/core/models/TopoApp.js +5 -3
- package/es/core/models/attributeFormatter/index.js +4 -0
- package/es/core/models/utils/linkUtils.js +0 -3
- package/es/core/store/models/topoMod.js +7 -6
- package/es/core/utils/manageStatusUtil.js +4 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +28 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +4 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +17 -17
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +1 -0
- package/es/core/viewer/components/titlebar/widgets/SettingButton.js +3 -11
- package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +5 -3
- package/es/networkTopo/getTopoData.js +16 -27
- package/es/networkTopo/index.js +2 -2
- package/es/networkTopo/services/alert.js +55 -0
- package/es/networkTopo/services/authorization.js +135 -0
- package/es/networkTopo/services/cmdb.js +897 -0
- package/es/networkTopo/services/index.js +2 -26
- package/es/networkTopo/services/mdc.js +74 -0
- package/es/networkTopo/services/metric.js +68 -0
- package/es/networkTopo/services/model.js +1283 -0
- package/es/networkTopo/services/risk.js +29 -0
- package/es/networkTopo/services/topo/auth.js +67 -0
- package/es/networkTopo/services/topo/basic.js +727 -0
- package/es/networkTopo/services/topo/blacklist.js +60 -0
- package/es/networkTopo/services/topo/ciInfo.js +69 -0
- package/es/networkTopo/services/topo/constants.js +1 -0
- package/es/networkTopo/services/topo/icon.js +131 -0
- package/es/networkTopo/services/topo/index.js +18 -0
- package/es/networkTopo/services/topo/networkLink.js +33 -0
- package/es/networkTopo/services/topo/relation.js +27 -0
- package/es/networkTopo/services/topo/resourceWebUrl.js +84 -0
- package/es/networkTopo/store/topoTreeMod.js +5 -1
- package/es/networkTopo/utils/storage.js +38 -0
- package/es/style.js +1 -1
- package/es/utils/topoData.js +6 -67
- package/es/utils/tree.js +1 -0
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +3 -24
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +3 -3
- package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +1 -2
- package/lib/core/components/TopoView/GraphViewPanel.js +22 -2
- package/lib/core/editor/components/Toolbar/buttons.js +2 -2
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +10 -3
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +9 -3
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +8 -1
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +21 -7
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +5 -0
- package/lib/core/editor/components/settings/PropertyView.js +10 -10
- package/lib/core/editor/components/settings/Settings.js +9 -1
- package/lib/core/editor/components/settings/core/PropertyViewManager.js +4 -3
- package/lib/core/editor/components/settings/core/edgePropertyViewAdapter.js +1 -10
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +5 -3
- package/lib/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +23 -0
- package/lib/core/hooks/usePolling.js +1 -6
- package/lib/core/hooks/useTopoEdit.js +3 -1
- package/lib/core/models/Alarm.js +12 -24
- package/lib/core/models/AttributeMetricDisplay.js +25 -10
- package/lib/core/models/TopoApp.js +5 -3
- package/lib/core/models/attributeFormatter/index.js +4 -0
- package/lib/core/models/utils/linkUtils.js +0 -5
- package/lib/core/store/models/topoMod.js +9 -6
- package/lib/core/utils/manageStatusUtil.js +9 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +28 -26
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +4 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +17 -17
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +1 -0
- package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +3 -11
- package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +5 -3
- package/lib/networkTopo/getTopoData.js +16 -28
- package/lib/networkTopo/index.js +4 -4
- package/lib/networkTopo/services/alert.js +66 -0
- package/lib/networkTopo/services/authorization.js +145 -0
- package/lib/networkTopo/services/cmdb.js +977 -0
- package/lib/networkTopo/services/index.js +3 -29
- package/lib/networkTopo/services/mdc.js +91 -0
- package/lib/networkTopo/services/metric.js +82 -0
- package/lib/networkTopo/services/model.js +1387 -0
- package/lib/networkTopo/services/risk.js +40 -0
- package/lib/networkTopo/services/topo/auth.js +79 -0
- package/lib/networkTopo/services/topo/basic.js +753 -0
- package/lib/networkTopo/services/topo/blacklist.js +72 -0
- package/lib/networkTopo/services/topo/ciInfo.js +82 -0
- package/lib/networkTopo/services/topo/constants.js +6 -0
- package/lib/networkTopo/services/topo/icon.js +144 -0
- package/lib/networkTopo/{components/editor/plugins/LayerConfigPlugin.js → services/topo/index.js} +33 -23
- package/lib/networkTopo/services/topo/networkLink.js +45 -0
- package/lib/networkTopo/services/topo/relation.js +39 -0
- package/lib/networkTopo/services/topo/resourceWebUrl.js +95 -0
- package/lib/networkTopo/store/topoTreeMod.js +5 -1
- package/lib/networkTopo/utils/storage.js +46 -0
- package/lib/style.js +1 -1
- package/lib/utils/topoData.js +7 -75
- package/lib/utils/tree.js +1 -0
- package/package.json +3 -3
- package/es/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +0 -122
- package/es/core/editor/components/settings/propertyViews/edge/addEdgeProps.js +0 -10
- package/es/networkTopo/components/Topology.js +0 -28
- package/es/networkTopo/components/editor/plugins/LayerConfigPlugin.js +0 -22
- package/es/networkTopo/components/editor/propertyViews/LayerRelatedResourceList.js +0 -48
- package/es/networkTopo/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +0 -35
- package/es/networkTopo/components/editor/propertyViews/edge/EdgePropertyView.js +0 -43
- package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +0 -39
- package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyView.js +0 -31
- package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyViewV1.js +0 -37
- package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Setting/index.js +0 -49
- package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/index.js +0 -2
- package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +0 -630
- package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/NetworkLinkForm.js +0 -4
- package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +0 -458
- package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/index.module.scss +0 -34
- package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/hooks/useAddLink.js +0 -104
- package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/index.module.scss +0 -12
- package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/mock.js +0 -55
- package/es/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/server.js +0 -187
- package/es/networkTopo/components/editor/propertyViews/edge/link/BindExitLinkSelect.js +0 -178
- package/es/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.js +0 -103
- package/es/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.module.scss +0 -65
- package/es/networkTopo/components/editor/useEditorProps.js +0 -32
- package/es/networkTopo/event/index.js +0 -6
- package/es/networkTopo/hooks/editor/useDeleteEdges.js +0 -200
- package/es/networkTopo/hooks/editor/useGroupSortResources.js +0 -16
- package/es/networkTopo/hooks/useTopoEdit.js +0 -26
- package/lib/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +0 -147
- package/lib/core/editor/components/settings/propertyViews/edge/addEdgeProps.js +0 -19
- package/lib/networkTopo/components/Topology.js +0 -40
- package/lib/networkTopo/components/editor/propertyViews/LayerRelatedResourceList.js +0 -63
- package/lib/networkTopo/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +0 -51
- package/lib/networkTopo/components/editor/propertyViews/edge/EdgePropertyView.js +0 -60
- package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +0 -54
- package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyView.js +0 -42
- package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyViewV1.js +0 -50
- package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/Setting/index.js +0 -66
- package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/index.js +0 -11
- package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +0 -661
- package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/NetworkLinkForm.js +0 -12
- package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +0 -486
- package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/components/index.module.scss +0 -34
- package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/hooks/useAddLink.js +0 -120
- package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/index.module.scss +0 -12
- package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/mock.js +0 -60
- package/lib/networkTopo/components/editor/propertyViews/edge/addLinkDrawer/server.js +0 -207
- package/lib/networkTopo/components/editor/propertyViews/edge/link/BindExitLinkSelect.js +0 -205
- package/lib/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.js +0 -121
- package/lib/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.module.scss +0 -65
- package/lib/networkTopo/components/editor/useEditorProps.js +0 -46
- package/lib/networkTopo/event/index.js +0 -11
- package/lib/networkTopo/hooks/editor/useDeleteEdges.js +0 -218
- package/lib/networkTopo/hooks/editor/useGroupSortResources.js +0 -21
- package/lib/networkTopo/hooks/useTopoEdit.js +0 -40
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
9
|
+
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
11
|
+
|
12
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
13
|
+
|
14
|
+
var _default = {
|
15
|
+
/**
|
16
|
+
* 根据资源id获取风险
|
17
|
+
* @param {*} params ciIdList
|
18
|
+
*/
|
19
|
+
getRiskByIds: function getRiskByIds(params) {
|
20
|
+
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
21
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
22
|
+
while (1) {
|
23
|
+
switch (_context.prev = _context.next) {
|
24
|
+
case 0:
|
25
|
+
_context.next = 2;
|
26
|
+
return _componentTopologyUtils.request.post('/health/v1/api/management/getRiskList', params);
|
27
|
+
|
28
|
+
case 2:
|
29
|
+
return _context.abrupt("return", _context.sent);
|
30
|
+
|
31
|
+
case 3:
|
32
|
+
case "end":
|
33
|
+
return _context.stop();
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}, _callee);
|
37
|
+
}))();
|
38
|
+
}
|
39
|
+
};
|
40
|
+
exports["default"] = _default;
|
@@ -0,0 +1,79 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
9
|
+
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
11
|
+
|
12
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
13
|
+
|
14
|
+
var _constants = require("./constants");
|
15
|
+
|
16
|
+
var API_ROOT = _constants.TOPO_API_ROOT;
|
17
|
+
var _default = {
|
18
|
+
queryTopoPermissionsByRole: function queryTopoPermissionsByRole(roleId) {
|
19
|
+
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
20
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
21
|
+
while (1) {
|
22
|
+
switch (_context.prev = _context.next) {
|
23
|
+
case 0:
|
24
|
+
_context.next = 2;
|
25
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/auth/role/" + roleId + "/permission");
|
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
|
+
saveTopoPermissionsByRole: function saveTopoPermissionsByRole(roleId, permissions) {
|
39
|
+
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
40
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
41
|
+
while (1) {
|
42
|
+
switch (_context2.prev = _context2.next) {
|
43
|
+
case 0:
|
44
|
+
_context2.next = 2;
|
45
|
+
return _componentTopologyUtils.request.post(API_ROOT + "/auth/role/" + roleId + "/permission", permissions);
|
46
|
+
|
47
|
+
case 2:
|
48
|
+
return _context2.abrupt("return", _context2.sent);
|
49
|
+
|
50
|
+
case 3:
|
51
|
+
case "end":
|
52
|
+
return _context2.stop();
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}, _callee2);
|
56
|
+
}))();
|
57
|
+
},
|
58
|
+
getTopoPermission: function getTopoPermission(topoId) {
|
59
|
+
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
60
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
61
|
+
while (1) {
|
62
|
+
switch (_context3.prev = _context3.next) {
|
63
|
+
case 0:
|
64
|
+
_context3.next = 2;
|
65
|
+
return _componentTopologyUtils.request.get(API_ROOT + "/auth/permission/" + topoId);
|
66
|
+
|
67
|
+
case 2:
|
68
|
+
return _context3.abrupt("return", _context3.sent);
|
69
|
+
|
70
|
+
case 3:
|
71
|
+
case "end":
|
72
|
+
return _context3.stop();
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}, _callee3);
|
76
|
+
}))();
|
77
|
+
}
|
78
|
+
};
|
79
|
+
exports["default"] = _default;
|