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