@riil-frontend/component-topology 7.0.0-dev.8 → 7.0.1
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/editor/hooks/useKeyboardShortcut.js +1 -1
- 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/TopoApp.js +5 -3
- package/es/core/models/utils/linkUtils.js +0 -3
- package/es/core/store/models/topoMod.js +7 -6
- 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/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/editor/hooks/useKeyboardShortcut.js +1 -1
- 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/TopoApp.js +5 -3
- package/lib/core/models/utils/linkUtils.js +0 -5
- package/lib/core/store/models/topoMod.js +9 -6
- 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/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
@@ -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
|
+
}();
|