@riil-frontend/component-topology 11.0.34 → 12.0.0-dev.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 +4 -2
- package/build/index.js +57 -34
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/MultiResourceDrawer/index.js +16 -18
- package/es/components/ResourceList/ResourceSelect.js +48 -50
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +24 -26
- package/es/components/SingleResourceDrawer/SelectDrawer.js +18 -20
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +23 -25
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +78 -84
- package/es/core/components/titlebar/widgets/TitleWidget.js +5 -3
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -18
- package/es/core/editor/components/BackgroundView/index.js +119 -129
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +20 -22
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +15 -17
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +7 -9
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +37 -41
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +50 -54
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +50 -54
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +11 -13
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +21 -23
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +15 -17
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +10 -12
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +21 -27
- package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
- package/es/core/editor/hooks/useNewElementTheme.js +2 -2
- package/es/core/editor/store/background.js +8 -10
- package/es/core/editor/store/topoEdit.js +4 -6
- package/es/core/editor/utils/copyElementUtil.js +171 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/es/core/hooks/usePolling.js +117 -121
- package/es/core/hooks/useResourceConfig.js +58 -66
- package/es/core/hooks/useTopoEdit.js +473 -503
- package/es/core/models/Alarm.js +281 -298
- package/es/core/models/AttributeMetricDisplay.js +101 -107
- package/es/core/models/PluginManager.js +4 -3
- package/es/core/models/SelectionModel.js +4 -5
- package/es/core/models/TopoApp.js +205 -240
- package/es/core/models/TopoGraphView.js +18 -21
- package/es/core/models/cache/CiCache.js +28 -27
- package/es/core/models/cache/CiTypeCache.js +37 -41
- package/es/core/models/cache/DictCache.js +33 -35
- package/es/core/models/graph/Background.js +15 -17
- package/es/core/models/plugins/resourceWebControllUrl.js +76 -82
- package/es/core/models/tagstips/ElementTagTipConfig.js +34 -38
- package/es/core/models/topoData.js +68 -70
- package/es/core/models/utils/linkUtils.js +41 -43
- package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/es/core/services/alarm.js +14 -16
- package/es/core/services/background.js +59 -67
- package/es/core/services/cmdb/metric.js +9 -11
- package/es/core/services/cmdb.js +20 -20
- package/es/core/services/index.js +39 -45
- package/es/core/services/overview.js +131 -151
- package/es/core/services/topo/basic.js +37 -41
- package/es/core/services/topo/tagtip.js +10 -12
- package/es/core/store/models/ciModel.js +58 -62
- package/es/core/store/models/customIcon.js +120 -134
- package/es/core/store/models/displayConfig.js +15 -19
- package/es/core/store/models/selection.js +4 -6
- package/es/core/store/models/topoAlarm.js +162 -145
- package/es/core/store/models/topoBaseInfoOverview.js +4 -6
- package/es/core/store/models/topoBizMod.js +9 -11
- package/es/core/store/models/topoConfig.js +215 -231
- package/es/core/store/models/topoGraphView.js +4 -6
- package/es/core/store/models/topoMod.js +373 -395
- package/es/core/utils/imageUtil.js +18 -20
- package/es/core/utils/metricUtil.js +5 -0
- package/es/core/utils/saveSerialize.js +9 -11
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +56 -58
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +15 -17
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +343 -357
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +86 -92
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +39 -41
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +189 -205
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +107 -109
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +57 -59
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -37
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +25 -29
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +32 -36
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +17 -19
- package/es/networkTopo/components/Link/hook.js +73 -77
- package/es/networkTopo/components/Link/index.js +86 -94
- package/es/networkTopo/components/Link/setting.js +42 -44
- package/es/networkTopo/getTopoData.js +63 -69
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +30 -32
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +18 -22
- package/es/networkTopo/services/alert.js +18 -22
- package/es/networkTopo/services/authorization.js +45 -55
- package/es/networkTopo/services/cmdb.js +422 -470
- package/es/networkTopo/services/funcAuth.js +22 -24
- package/es/networkTopo/services/link.js +107 -117
- package/es/networkTopo/services/mdc.js +18 -24
- package/es/networkTopo/services/metric.js +23 -27
- package/es/networkTopo/services/model.js +445 -509
- package/es/networkTopo/services/risk.js +9 -11
- package/es/networkTopo/services/topo/auth.js +27 -33
- package/es/networkTopo/services/topo/basic.js +251 -289
- package/es/networkTopo/services/topo/blacklist.js +20 -24
- package/es/networkTopo/services/topo/ciInfo.js +27 -31
- package/es/networkTopo/services/topo/icon.js +49 -59
- package/es/networkTopo/services/topo/networkLink.js +32 -36
- package/es/networkTopo/services/topo/relation.js +9 -11
- package/es/networkTopo/services/topo/resourceWebUrl.js +36 -42
- package/es/networkTopo/store/functionAuth.js +31 -37
- package/es/networkTopo/store/topoCenter.js +142 -152
- package/es/networkTopo/store/topoLinkMod.js +4 -6
- package/es/networkTopo/store/topoTreeMod.js +170 -182
- package/es/networkTopo/utils/exportData.js +52 -54
- package/lib/components/BatchAttrMetric/setting.js +1 -1
- package/lib/components/MultiResourceDrawer/index.js +16 -18
- package/lib/components/ResourceList/ResourceSelect.js +48 -50
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +27 -29
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +18 -20
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +30 -32
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +78 -84
- package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -3
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +18 -18
- package/lib/core/editor/components/BackgroundView/index.js +118 -128
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -24
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +19 -21
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -10
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +37 -41
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +50 -54
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +50 -54
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +12 -14
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +26 -28
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +15 -17
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -14
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +25 -31
- package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
- package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
- package/lib/core/editor/store/background.js +8 -10
- package/lib/core/editor/store/topoEdit.js +4 -6
- package/lib/core/editor/utils/copyElementUtil.js +182 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/lib/core/hooks/usePolling.js +116 -120
- package/lib/core/hooks/useResourceConfig.js +58 -66
- package/lib/core/hooks/useTopoEdit.js +465 -495
- package/lib/core/models/Alarm.js +275 -292
- package/lib/core/models/AttributeMetricDisplay.js +104 -110
- package/lib/core/models/PluginManager.js +4 -3
- package/lib/core/models/SelectionModel.js +4 -5
- package/lib/core/models/TopoApp.js +205 -240
- package/lib/core/models/TopoGraphView.js +18 -21
- package/lib/core/models/cache/CiCache.js +33 -32
- package/lib/core/models/cache/CiTypeCache.js +38 -42
- package/lib/core/models/cache/DictCache.js +33 -35
- package/lib/core/models/graph/Background.js +16 -18
- package/lib/core/models/plugins/resourceWebControllUrl.js +74 -80
- package/lib/core/models/tagstips/ElementTagTipConfig.js +34 -38
- package/lib/core/models/topoData.js +69 -71
- package/lib/core/models/utils/linkUtils.js +41 -43
- package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/lib/core/services/alarm.js +18 -20
- package/lib/core/services/background.js +70 -78
- package/lib/core/services/cmdb/metric.js +10 -12
- package/lib/core/services/cmdb.js +22 -22
- package/lib/core/services/index.js +45 -51
- package/lib/core/services/overview.js +131 -151
- package/lib/core/services/topo/basic.js +37 -41
- package/lib/core/services/topo/tagtip.js +12 -14
- package/lib/core/store/models/ciModel.js +66 -70
- package/lib/core/store/models/customIcon.js +120 -134
- package/lib/core/store/models/displayConfig.js +15 -19
- package/lib/core/store/models/selection.js +4 -6
- package/lib/core/store/models/topoAlarm.js +163 -145
- package/lib/core/store/models/topoBaseInfoOverview.js +4 -6
- package/lib/core/store/models/topoBizMod.js +9 -11
- package/lib/core/store/models/topoConfig.js +222 -238
- package/lib/core/store/models/topoGraphView.js +4 -6
- package/lib/core/store/models/topoMod.js +375 -397
- package/lib/core/utils/imageUtil.js +22 -24
- package/lib/core/utils/metricUtil.js +5 -0
- package/lib/core/utils/saveSerialize.js +9 -11
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +56 -58
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +15 -17
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +344 -358
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +86 -92
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +39 -41
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +190 -206
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +107 -109
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +57 -59
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +29 -33
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +25 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +32 -36
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +18 -20
- package/lib/networkTopo/components/Link/hook.js +73 -77
- package/lib/networkTopo/components/Link/index.js +87 -95
- package/lib/networkTopo/components/Link/setting.js +42 -44
- package/lib/networkTopo/getTopoData.js +63 -69
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +31 -33
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +18 -22
- package/lib/networkTopo/services/alert.js +18 -22
- package/lib/networkTopo/services/authorization.js +55 -65
- package/lib/networkTopo/services/cmdb.js +422 -470
- package/lib/networkTopo/services/funcAuth.js +24 -26
- package/lib/networkTopo/services/link.js +108 -118
- package/lib/networkTopo/services/mdc.js +21 -27
- package/lib/networkTopo/services/metric.js +27 -31
- package/lib/networkTopo/services/model.js +445 -509
- package/lib/networkTopo/services/risk.js +11 -13
- package/lib/networkTopo/services/topo/auth.js +27 -33
- package/lib/networkTopo/services/topo/basic.js +252 -290
- package/lib/networkTopo/services/topo/blacklist.js +20 -24
- package/lib/networkTopo/services/topo/ciInfo.js +34 -38
- package/lib/networkTopo/services/topo/icon.js +59 -69
- package/lib/networkTopo/services/topo/networkLink.js +32 -36
- package/lib/networkTopo/services/topo/relation.js +11 -13
- package/lib/networkTopo/services/topo/resourceWebUrl.js +44 -50
- package/lib/networkTopo/store/functionAuth.js +31 -37
- package/lib/networkTopo/store/topoCenter.js +142 -152
- package/lib/networkTopo/store/topoLinkMod.js +4 -6
- package/lib/networkTopo/store/topoTreeMod.js +166 -178
- package/lib/networkTopo/utils/exportData.js +59 -61
- package/lib/utils/htElementDataUtil.js +4 -2
- package/package.json +5 -3
@@ -19,11 +19,12 @@ var _Background = _interopRequireDefault(require("./graph/Background"));
|
|
19
19
|
* 包含元素操作相关,不同类型拓扑图结构不同,后续支持多种实现
|
20
20
|
*/
|
21
21
|
var TopoGraphView = /*#__PURE__*/function () {
|
22
|
-
/**
|
23
|
-
* @type TopoClient
|
24
|
-
*/
|
25
22
|
function TopoGraphView() {
|
26
23
|
this.store = void 0;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* @type TopoClient
|
27
|
+
*/
|
27
28
|
this.topoClient = void 0;
|
28
29
|
this.background = void 0;
|
29
30
|
this.init();
|
@@ -62,15 +63,13 @@ var TopoGraphView = /*#__PURE__*/function () {
|
|
62
63
|
_proto.switchToViewMode = /*#__PURE__*/function () {
|
63
64
|
var _switchToViewMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
64
65
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
65
|
-
while (1) {
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
return _context.stop();
|
73
|
-
}
|
66
|
+
while (1) switch (_context.prev = _context.next) {
|
67
|
+
case 0:
|
68
|
+
this.topoClient.exitEditMode();
|
69
|
+
|
70
|
+
case 1:
|
71
|
+
case "end":
|
72
|
+
return _context.stop();
|
74
73
|
}
|
75
74
|
}, _callee, this);
|
76
75
|
}));
|
@@ -85,15 +84,13 @@ var TopoGraphView = /*#__PURE__*/function () {
|
|
85
84
|
_proto.switchToEditMode = /*#__PURE__*/function () {
|
86
85
|
var _switchToEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
87
86
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
88
|
-
while (1) {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
return _context2.stop();
|
96
|
-
}
|
87
|
+
while (1) switch (_context2.prev = _context2.next) {
|
88
|
+
case 0:
|
89
|
+
this.topoClient.enterEditMode();
|
90
|
+
|
91
|
+
case 1:
|
92
|
+
case "end":
|
93
|
+
return _context2.stop();
|
97
94
|
}
|
98
95
|
}, _callee2, this);
|
99
96
|
}));
|
@@ -16,6 +16,9 @@ var _services = require("../../services");
|
|
16
16
|
*/
|
17
17
|
var CiCache = /*#__PURE__*/function () {
|
18
18
|
function CiCache() {
|
19
|
+
/**
|
20
|
+
* @param {object<string, object>}
|
21
|
+
*/
|
19
22
|
this.ciMap = {};
|
20
23
|
}
|
21
24
|
|
@@ -34,38 +37,36 @@ var CiCache = /*#__PURE__*/function () {
|
|
34
37
|
|
35
38
|
var unloadCiIds, cis, map;
|
36
39
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
37
|
-
while (1) {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
return _context.stop();
|
68
|
-
}
|
40
|
+
while (1) switch (_context.prev = _context.next) {
|
41
|
+
case 0:
|
42
|
+
unloadCiIds = ids.filter(function (id) {
|
43
|
+
return !_this.ciMap[id];
|
44
|
+
});
|
45
|
+
|
46
|
+
if (!unloadCiIds.length) {
|
47
|
+
_context.next = 6;
|
48
|
+
break;
|
49
|
+
}
|
50
|
+
|
51
|
+
_context.next = 4;
|
52
|
+
return (0, _services.queryCisByIds)(unloadCiIds);
|
53
|
+
|
54
|
+
case 4:
|
55
|
+
cis = _context.sent;
|
56
|
+
cis.forEach(function (ci) {
|
57
|
+
_this.ciMap[ci.id] = ci;
|
58
|
+
});
|
59
|
+
|
60
|
+
case 6:
|
61
|
+
map = {};
|
62
|
+
ids.forEach(function (id) {
|
63
|
+
map[id] = _this.ciMap[id];
|
64
|
+
});
|
65
|
+
return _context.abrupt("return", this.ciMap);
|
66
|
+
|
67
|
+
case 9:
|
68
|
+
case "end":
|
69
|
+
return _context.stop();
|
69
70
|
}
|
70
71
|
}, _callee, this);
|
71
72
|
}));
|
@@ -32,30 +32,28 @@ var CiTypeCache = /*#__PURE__*/function () {
|
|
32
32
|
_proto.getCiTypeMap = /*#__PURE__*/function () {
|
33
33
|
var _getCiTypeMap = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ciTypeIds) {
|
34
34
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
35
|
-
while (1) {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
return _context.stop();
|
58
|
-
}
|
35
|
+
while (1) switch (_context.prev = _context.next) {
|
36
|
+
case 0:
|
37
|
+
_context.prev = 0;
|
38
|
+
_context.next = 3;
|
39
|
+
return this.load(ciTypeIds);
|
40
|
+
|
41
|
+
case 3:
|
42
|
+
_context.next = 8;
|
43
|
+
break;
|
44
|
+
|
45
|
+
case 5:
|
46
|
+
_context.prev = 5;
|
47
|
+
_context.t0 = _context["catch"](0);
|
48
|
+
|
49
|
+
_rlog["default"].error('查询Ci模型异常', _context.t0);
|
50
|
+
|
51
|
+
case 8:
|
52
|
+
return _context.abrupt("return", this.ciTypeMap);
|
53
|
+
|
54
|
+
case 9:
|
55
|
+
case "end":
|
56
|
+
return _context.stop();
|
59
57
|
}
|
60
58
|
}, _callee, this, [[0, 5]]);
|
61
59
|
}));
|
@@ -73,24 +71,22 @@ var CiTypeCache = /*#__PURE__*/function () {
|
|
73
71
|
|
74
72
|
var unLoadCiTypeIds, ciTypeMetas;
|
75
73
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
76
|
-
while (1) {
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
return _context2.stop();
|
93
|
-
}
|
74
|
+
while (1) switch (_context2.prev = _context2.next) {
|
75
|
+
case 0:
|
76
|
+
unLoadCiTypeIds = ciTypeIds.filter(function (id) {
|
77
|
+
return !_this.ciTypeMap[id];
|
78
|
+
});
|
79
|
+
_context2.next = 3;
|
80
|
+
return _topo["default"].ciInfo.batchQueryCiTypeInfo(unLoadCiTypeIds);
|
81
|
+
|
82
|
+
case 3:
|
83
|
+
ciTypeMetas = _context2.sent;
|
84
|
+
this.addCiTypes(ciTypeMetas);
|
85
|
+
return _context2.abrupt("return", this.ciTypeMap);
|
86
|
+
|
87
|
+
case 6:
|
88
|
+
case "end":
|
89
|
+
return _context2.stop();
|
94
90
|
}
|
95
91
|
}, _callee2, this);
|
96
92
|
}));
|
@@ -34,47 +34,45 @@ var DictCache = /*#__PURE__*/function () {
|
|
34
34
|
var _init = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
35
35
|
var distsStr, dicts;
|
36
36
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
37
|
-
while (1) {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
_context.next = 2;
|
42
|
-
break;
|
43
|
-
}
|
44
|
-
|
45
|
-
return _context.abrupt("return");
|
46
|
-
|
47
|
-
case 2:
|
48
|
-
distsStr = sessionStorage.getItem('dists');
|
49
|
-
|
50
|
-
if (!distsStr) {
|
51
|
-
_context.next = 7;
|
52
|
-
break;
|
53
|
-
}
|
54
|
-
|
55
|
-
dicts = JSON.parse(distsStr);
|
56
|
-
_context.next = 10;
|
37
|
+
while (1) switch (_context.prev = _context.next) {
|
38
|
+
case 0:
|
39
|
+
if (!this.dists) {
|
40
|
+
_context.next = 2;
|
57
41
|
break;
|
42
|
+
}
|
58
43
|
|
59
|
-
|
60
|
-
_context.next = 9;
|
61
|
-
return modelService.queryDicts()["catch"](function (e) {
|
62
|
-
_rlog["default"].error('初始化数据字典异常', e);
|
44
|
+
return _context.abrupt("return");
|
63
45
|
|
64
|
-
|
65
|
-
|
46
|
+
case 2:
|
47
|
+
distsStr = sessionStorage.getItem('dists');
|
66
48
|
|
67
|
-
|
68
|
-
|
49
|
+
if (!distsStr) {
|
50
|
+
_context.next = 7;
|
51
|
+
break;
|
52
|
+
}
|
53
|
+
|
54
|
+
dicts = JSON.parse(distsStr);
|
55
|
+
_context.next = 10;
|
56
|
+
break;
|
57
|
+
|
58
|
+
case 7:
|
59
|
+
_context.next = 9;
|
60
|
+
return modelService.queryDicts()["catch"](function (e) {
|
61
|
+
_rlog["default"].error('初始化数据字典异常', e);
|
62
|
+
|
63
|
+
return [];
|
64
|
+
});
|
65
|
+
|
66
|
+
case 9:
|
67
|
+
dicts = _context.sent;
|
69
68
|
|
70
|
-
|
71
|
-
|
72
|
-
|
69
|
+
case 10:
|
70
|
+
this.dists = dicts;
|
71
|
+
this.dictObject = (0, _utils.dictFormat)(dicts);
|
73
72
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
}
|
73
|
+
case 12:
|
74
|
+
case "end":
|
75
|
+
return _context.stop();
|
78
76
|
}
|
79
77
|
}, _callee, this);
|
80
78
|
}));
|
@@ -20,24 +20,22 @@ var Background = /*#__PURE__*/function () {
|
|
20
20
|
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) {
|
21
21
|
var width, height, backgroundNode, backgroundDispatchers;
|
22
22
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
23
|
-
while (1) {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
return _context.stop();
|
40
|
-
}
|
23
|
+
while (1) switch (_context.prev = _context.next) {
|
24
|
+
case 0:
|
25
|
+
width = _ref.width, height = _ref.height;
|
26
|
+
backgroundNode = _this.getBackgroundNode();
|
27
|
+
backgroundNode.setWidth(width);
|
28
|
+
backgroundNode.setHeight(height);
|
29
|
+
backgroundDispatchers = _this.view.store.getModelDispatchers('background');
|
30
|
+
_context.next = 7;
|
31
|
+
return backgroundDispatchers.setSize({
|
32
|
+
width: width,
|
33
|
+
height: height
|
34
|
+
});
|
35
|
+
|
36
|
+
case 7:
|
37
|
+
case "end":
|
38
|
+
return _context.stop();
|
41
39
|
}
|
42
40
|
}, _callee);
|
43
41
|
}));
|
@@ -39,15 +39,13 @@ function _default(topo) {
|
|
39
39
|
function _onTopoDataLoaded() {
|
40
40
|
_onTopoDataLoaded = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topoData) {
|
41
41
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
42
|
-
while (1) {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
return _context.stop();
|
50
|
-
}
|
42
|
+
while (1) switch (_context.prev = _context.next) {
|
43
|
+
case 0:
|
44
|
+
initData(topoData.nodes);
|
45
|
+
|
46
|
+
case 1:
|
47
|
+
case "end":
|
48
|
+
return _context.stop();
|
51
49
|
}
|
52
50
|
}, _callee);
|
53
51
|
}));
|
@@ -62,43 +60,41 @@ function _default(topo) {
|
|
62
60
|
_initData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(nodes) {
|
63
61
|
var ids, list;
|
64
62
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
65
|
-
while (1) {
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
_context2.next = 3;
|
74
|
-
break;
|
75
|
-
}
|
76
|
-
|
77
|
-
return _context2.abrupt("return");
|
78
|
-
|
79
|
-
case 3:
|
80
|
-
_context2.prev = 3;
|
81
|
-
_context2.next = 6;
|
82
|
-
return _topo["default"].resourceWebUrl.list(ids);
|
83
|
-
|
84
|
-
case 6:
|
85
|
-
list = _context2.sent;
|
86
|
-
list.forEach(function (item) {
|
87
|
-
resourceUrlMap[item.ciId] = item.webUrl;
|
88
|
-
});
|
89
|
-
_context2.next = 13;
|
63
|
+
while (1) switch (_context2.prev = _context2.next) {
|
64
|
+
case 0:
|
65
|
+
ids = nodes.map(function (node) {
|
66
|
+
return node.id;
|
67
|
+
});
|
68
|
+
|
69
|
+
if (ids.length) {
|
70
|
+
_context2.next = 3;
|
90
71
|
break;
|
72
|
+
}
|
73
|
+
|
74
|
+
return _context2.abrupt("return");
|
75
|
+
|
76
|
+
case 3:
|
77
|
+
_context2.prev = 3;
|
78
|
+
_context2.next = 6;
|
79
|
+
return _topo["default"].resourceWebUrl.list(ids);
|
91
80
|
|
92
|
-
|
93
|
-
|
94
|
-
|
81
|
+
case 6:
|
82
|
+
list = _context2.sent;
|
83
|
+
list.forEach(function (item) {
|
84
|
+
resourceUrlMap[item.ciId] = item.webUrl;
|
85
|
+
});
|
86
|
+
_context2.next = 13;
|
87
|
+
break;
|
95
88
|
|
96
|
-
|
89
|
+
case 10:
|
90
|
+
_context2.prev = 10;
|
91
|
+
_context2.t0 = _context2["catch"](3);
|
97
92
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
93
|
+
_rlog["default"].error('资源web控制台.加载数据异常', _context2.t0);
|
94
|
+
|
95
|
+
case 13:
|
96
|
+
case "end":
|
97
|
+
return _context2.stop();
|
102
98
|
}
|
103
99
|
}, _callee2, null, [[3, 10]]);
|
104
100
|
}));
|
@@ -147,49 +143,47 @@ function _default(topo) {
|
|
147
143
|
function _saveResourceWebUrl() {
|
148
144
|
_saveResourceWebUrl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(id, url) {
|
149
145
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
150
|
-
while (1) {
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
_context3.next = 4;
|
155
|
-
break;
|
156
|
-
}
|
157
|
-
|
158
|
-
_message["default"].success('链接设置成功');
|
159
|
-
|
160
|
-
closeSettingDialog();
|
161
|
-
return _context3.abrupt("return");
|
162
|
-
|
163
|
-
case 4:
|
164
|
-
updateStore({
|
165
|
-
saving: true
|
166
|
-
});
|
167
|
-
_context3.prev = 5;
|
168
|
-
_context3.next = 8;
|
169
|
-
return _topo["default"].resourceWebUrl.save(id, url || null);
|
170
|
-
|
171
|
-
case 8:
|
172
|
-
_message["default"].success('链接设置成功');
|
173
|
-
|
174
|
-
resourceUrlMap[id] = url;
|
175
|
-
closeSettingDialog();
|
176
|
-
_context3.next = 17;
|
146
|
+
while (1) switch (_context3.prev = _context3.next) {
|
147
|
+
case 0:
|
148
|
+
if (!(!url && !getResourceUrl(id))) {
|
149
|
+
_context3.next = 4;
|
177
150
|
break;
|
151
|
+
}
|
152
|
+
|
153
|
+
_message["default"].success('链接设置成功');
|
154
|
+
|
155
|
+
closeSettingDialog();
|
156
|
+
return _context3.abrupt("return");
|
157
|
+
|
158
|
+
case 4:
|
159
|
+
updateStore({
|
160
|
+
saving: true
|
161
|
+
});
|
162
|
+
_context3.prev = 5;
|
163
|
+
_context3.next = 8;
|
164
|
+
return _topo["default"].resourceWebUrl.save(id, url || null);
|
165
|
+
|
166
|
+
case 8:
|
167
|
+
_message["default"].success('链接设置成功');
|
168
|
+
|
169
|
+
resourceUrlMap[id] = url;
|
170
|
+
closeSettingDialog();
|
171
|
+
_context3.next = 17;
|
172
|
+
break;
|
178
173
|
|
179
|
-
|
180
|
-
|
181
|
-
|
174
|
+
case 13:
|
175
|
+
_context3.prev = 13;
|
176
|
+
_context3.t0 = _context3["catch"](5);
|
182
177
|
|
183
|
-
|
178
|
+
_message["default"].error('链接设置失败');
|
184
179
|
|
185
|
-
|
186
|
-
|
187
|
-
|
180
|
+
updateStore({
|
181
|
+
saving: false
|
182
|
+
});
|
188
183
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
}
|
184
|
+
case 17:
|
185
|
+
case "end":
|
186
|
+
return _context3.stop();
|
193
187
|
}
|
194
188
|
}, _callee3, null, [[5, 13]]);
|
195
189
|
}));
|
@@ -37,20 +37,18 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
|
|
37
37
|
_proto.init = /*#__PURE__*/function () {
|
38
38
|
var _init = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(topoData) {
|
39
39
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
40
|
-
while (1) {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
return _context.stop();
|
53
|
-
}
|
40
|
+
while (1) switch (_context.prev = _context.next) {
|
41
|
+
case 0:
|
42
|
+
this.topoData = topoData;
|
43
|
+
_context.next = 3;
|
44
|
+
return this.initNetworkLinkModel();
|
45
|
+
|
46
|
+
case 3:
|
47
|
+
this.mtCiTypeMap = (0, _utils.getMtCodeCiTypeMap)(topoData);
|
48
|
+
|
49
|
+
case 4:
|
50
|
+
case "end":
|
51
|
+
return _context.stop();
|
54
52
|
}
|
55
53
|
}, _callee, this);
|
56
54
|
}));
|
@@ -66,37 +64,35 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
|
|
66
64
|
var _initNetworkLinkModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
67
65
|
var mtCodes;
|
68
66
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
69
|
-
while (1) {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
mtCodes = ['m.critical_link', 'm.ethernet_link'];
|
67
|
+
while (1) switch (_context2.prev = _context2.next) {
|
68
|
+
case 0:
|
69
|
+
_context2.prev = 0;
|
70
|
+
mtCodes = ['m.critical_link', 'm.ethernet_link'];
|
74
71
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
72
|
+
if (!mtCodes.length) {
|
73
|
+
_context2.next = 6;
|
74
|
+
break;
|
75
|
+
}
|
79
76
|
|
80
|
-
|
81
|
-
|
77
|
+
_context2.next = 5;
|
78
|
+
return (0, _tagtip.getMetricsByMonitorTemplateCodes)(mtCodes);
|
82
79
|
|
83
|
-
|
84
|
-
|
80
|
+
case 5:
|
81
|
+
this.mtMetricsMap = _context2.sent;
|
85
82
|
|
86
|
-
|
87
|
-
|
88
|
-
|
83
|
+
case 6:
|
84
|
+
_context2.next = 11;
|
85
|
+
break;
|
89
86
|
|
90
|
-
|
91
|
-
|
92
|
-
|
87
|
+
case 8:
|
88
|
+
_context2.prev = 8;
|
89
|
+
_context2.t0 = _context2["catch"](0);
|
93
90
|
|
94
|
-
|
91
|
+
_rlog["default"].error('查询监控模板指标失败', _context2.t0);
|
95
92
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
}
|
93
|
+
case 11:
|
94
|
+
case "end":
|
95
|
+
return _context2.stop();
|
100
96
|
}
|
101
97
|
}, _callee2, this, [[0, 8]]);
|
102
98
|
}));
|