@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
@@ -7,6 +7,9 @@ import { queryCisByIds } from "../../services";
|
|
7
7
|
|
8
8
|
var CiCache = /*#__PURE__*/function () {
|
9
9
|
function CiCache() {
|
10
|
+
/**
|
11
|
+
* @param {object<string, object>}
|
12
|
+
*/
|
10
13
|
this.ciMap = {};
|
11
14
|
}
|
12
15
|
|
@@ -25,38 +28,36 @@ var CiCache = /*#__PURE__*/function () {
|
|
25
28
|
|
26
29
|
var unloadCiIds, cis, map;
|
27
30
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
28
|
-
while (1) {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
});
|
31
|
+
while (1) switch (_context.prev = _context.next) {
|
32
|
+
case 0:
|
33
|
+
unloadCiIds = ids.filter(function (id) {
|
34
|
+
return !_this.ciMap[id];
|
35
|
+
});
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
if (!unloadCiIds.length) {
|
38
|
+
_context.next = 6;
|
39
|
+
break;
|
40
|
+
}
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
+
_context.next = 4;
|
43
|
+
return queryCisByIds(unloadCiIds);
|
42
44
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
45
|
+
case 4:
|
46
|
+
cis = _context.sent;
|
47
|
+
cis.forEach(function (ci) {
|
48
|
+
_this.ciMap[ci.id] = ci;
|
49
|
+
});
|
48
50
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
case 6:
|
52
|
+
map = {};
|
53
|
+
ids.forEach(function (id) {
|
54
|
+
map[id] = _this.ciMap[id];
|
55
|
+
});
|
56
|
+
return _context.abrupt("return", this.ciMap);
|
55
57
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
}
|
58
|
+
case 9:
|
59
|
+
case "end":
|
60
|
+
return _context.stop();
|
60
61
|
}
|
61
62
|
}, _callee, this);
|
62
63
|
}));
|
@@ -19,29 +19,27 @@ var CiTypeCache = /*#__PURE__*/function () {
|
|
19
19
|
_proto.getCiTypeMap = /*#__PURE__*/function () {
|
20
20
|
var _getCiTypeMap = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ciTypeIds) {
|
21
21
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
22
|
-
while (1) {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
return _context.stop();
|
44
|
-
}
|
22
|
+
while (1) switch (_context.prev = _context.next) {
|
23
|
+
case 0:
|
24
|
+
_context.prev = 0;
|
25
|
+
_context.next = 3;
|
26
|
+
return this.load(ciTypeIds);
|
27
|
+
|
28
|
+
case 3:
|
29
|
+
_context.next = 8;
|
30
|
+
break;
|
31
|
+
|
32
|
+
case 5:
|
33
|
+
_context.prev = 5;
|
34
|
+
_context.t0 = _context["catch"](0);
|
35
|
+
rlog.error('查询Ci模型异常', _context.t0);
|
36
|
+
|
37
|
+
case 8:
|
38
|
+
return _context.abrupt("return", this.ciTypeMap);
|
39
|
+
|
40
|
+
case 9:
|
41
|
+
case "end":
|
42
|
+
return _context.stop();
|
45
43
|
}
|
46
44
|
}, _callee, this, [[0, 5]]);
|
47
45
|
}));
|
@@ -59,24 +57,22 @@ var CiTypeCache = /*#__PURE__*/function () {
|
|
59
57
|
|
60
58
|
var unLoadCiTypeIds, ciTypeMetas;
|
61
59
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
62
|
-
while (1) {
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
return _context2.stop();
|
79
|
-
}
|
60
|
+
while (1) switch (_context2.prev = _context2.next) {
|
61
|
+
case 0:
|
62
|
+
unLoadCiTypeIds = ciTypeIds.filter(function (id) {
|
63
|
+
return !_this.ciTypeMap[id];
|
64
|
+
});
|
65
|
+
_context2.next = 3;
|
66
|
+
return topoService.ciInfo.batchQueryCiTypeInfo(unLoadCiTypeIds);
|
67
|
+
|
68
|
+
case 3:
|
69
|
+
ciTypeMetas = _context2.sent;
|
70
|
+
this.addCiTypes(ciTypeMetas);
|
71
|
+
return _context2.abrupt("return", this.ciTypeMap);
|
72
|
+
|
73
|
+
case 6:
|
74
|
+
case "end":
|
75
|
+
return _context2.stop();
|
80
76
|
}
|
81
77
|
}, _callee2, this);
|
82
78
|
}));
|
@@ -19,46 +19,44 @@ var DictCache = /*#__PURE__*/function () {
|
|
19
19
|
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
20
20
|
var distsStr, dicts;
|
21
21
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
22
|
-
while (1) {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
_context.next = 2;
|
27
|
-
break;
|
28
|
-
}
|
29
|
-
|
30
|
-
return _context.abrupt("return");
|
31
|
-
|
32
|
-
case 2:
|
33
|
-
distsStr = sessionStorage.getItem('dists');
|
34
|
-
|
35
|
-
if (!distsStr) {
|
36
|
-
_context.next = 7;
|
37
|
-
break;
|
38
|
-
}
|
39
|
-
|
40
|
-
dicts = JSON.parse(distsStr);
|
41
|
-
_context.next = 10;
|
22
|
+
while (1) switch (_context.prev = _context.next) {
|
23
|
+
case 0:
|
24
|
+
if (!this.dists) {
|
25
|
+
_context.next = 2;
|
42
26
|
break;
|
27
|
+
}
|
43
28
|
|
44
|
-
|
45
|
-
_context.next = 9;
|
46
|
-
return modelService.queryDicts()["catch"](function (e) {
|
47
|
-
rlog.error('初始化数据字典异常', e);
|
48
|
-
return [];
|
49
|
-
});
|
29
|
+
return _context.abrupt("return");
|
50
30
|
|
51
|
-
|
52
|
-
|
31
|
+
case 2:
|
32
|
+
distsStr = sessionStorage.getItem('dists');
|
53
33
|
|
54
|
-
|
55
|
-
|
56
|
-
|
34
|
+
if (!distsStr) {
|
35
|
+
_context.next = 7;
|
36
|
+
break;
|
37
|
+
}
|
38
|
+
|
39
|
+
dicts = JSON.parse(distsStr);
|
40
|
+
_context.next = 10;
|
41
|
+
break;
|
42
|
+
|
43
|
+
case 7:
|
44
|
+
_context.next = 9;
|
45
|
+
return modelService.queryDicts()["catch"](function (e) {
|
46
|
+
rlog.error('初始化数据字典异常', e);
|
47
|
+
return [];
|
48
|
+
});
|
49
|
+
|
50
|
+
case 9:
|
51
|
+
dicts = _context.sent;
|
52
|
+
|
53
|
+
case 10:
|
54
|
+
this.dists = dicts;
|
55
|
+
this.dictObject = dictFormat(dicts);
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
}
|
57
|
+
case 12:
|
58
|
+
case "end":
|
59
|
+
return _context.stop();
|
62
60
|
}
|
63
61
|
}, _callee, this);
|
64
62
|
}));
|
@@ -12,24 +12,22 @@ var Background = /*#__PURE__*/function () {
|
|
12
12
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
13
13
|
var width, height, backgroundNode, backgroundDispatchers;
|
14
14
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
15
|
-
while (1) {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
});
|
15
|
+
while (1) switch (_context.prev = _context.next) {
|
16
|
+
case 0:
|
17
|
+
width = _ref.width, height = _ref.height;
|
18
|
+
backgroundNode = _this.getBackgroundNode();
|
19
|
+
backgroundNode.setWidth(width);
|
20
|
+
backgroundNode.setHeight(height);
|
21
|
+
backgroundDispatchers = _this.view.store.getModelDispatchers('background');
|
22
|
+
_context.next = 7;
|
23
|
+
return backgroundDispatchers.setSize({
|
24
|
+
width: width,
|
25
|
+
height: height
|
26
|
+
});
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
28
|
+
case 7:
|
29
|
+
case "end":
|
30
|
+
return _context.stop();
|
33
31
|
}
|
34
32
|
}, _callee);
|
35
33
|
}));
|
@@ -27,15 +27,13 @@ export default function (topo) {
|
|
27
27
|
function _onTopoDataLoaded() {
|
28
28
|
_onTopoDataLoaded = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(topoData) {
|
29
29
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
30
|
-
while (1) {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
return _context.stop();
|
38
|
-
}
|
30
|
+
while (1) switch (_context.prev = _context.next) {
|
31
|
+
case 0:
|
32
|
+
initData(topoData.nodes);
|
33
|
+
|
34
|
+
case 1:
|
35
|
+
case "end":
|
36
|
+
return _context.stop();
|
39
37
|
}
|
40
38
|
}, _callee);
|
41
39
|
}));
|
@@ -50,42 +48,40 @@ export default function (topo) {
|
|
50
48
|
_initData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(nodes) {
|
51
49
|
var ids, list;
|
52
50
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
53
|
-
while (1) {
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
_context2.next = 3;
|
62
|
-
break;
|
63
|
-
}
|
64
|
-
|
65
|
-
return _context2.abrupt("return");
|
66
|
-
|
67
|
-
case 3:
|
68
|
-
_context2.prev = 3;
|
69
|
-
_context2.next = 6;
|
70
|
-
return topoService.resourceWebUrl.list(ids);
|
71
|
-
|
72
|
-
case 6:
|
73
|
-
list = _context2.sent;
|
74
|
-
list.forEach(function (item) {
|
75
|
-
resourceUrlMap[item.ciId] = item.webUrl;
|
76
|
-
});
|
77
|
-
_context2.next = 13;
|
51
|
+
while (1) switch (_context2.prev = _context2.next) {
|
52
|
+
case 0:
|
53
|
+
ids = nodes.map(function (node) {
|
54
|
+
return node.id;
|
55
|
+
});
|
56
|
+
|
57
|
+
if (ids.length) {
|
58
|
+
_context2.next = 3;
|
78
59
|
break;
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
60
|
+
}
|
61
|
+
|
62
|
+
return _context2.abrupt("return");
|
63
|
+
|
64
|
+
case 3:
|
65
|
+
_context2.prev = 3;
|
66
|
+
_context2.next = 6;
|
67
|
+
return topoService.resourceWebUrl.list(ids);
|
68
|
+
|
69
|
+
case 6:
|
70
|
+
list = _context2.sent;
|
71
|
+
list.forEach(function (item) {
|
72
|
+
resourceUrlMap[item.ciId] = item.webUrl;
|
73
|
+
});
|
74
|
+
_context2.next = 13;
|
75
|
+
break;
|
76
|
+
|
77
|
+
case 10:
|
78
|
+
_context2.prev = 10;
|
79
|
+
_context2.t0 = _context2["catch"](3);
|
80
|
+
rlog.error('资源web控制台.加载数据异常', _context2.t0);
|
81
|
+
|
82
|
+
case 13:
|
83
|
+
case "end":
|
84
|
+
return _context2.stop();
|
89
85
|
}
|
90
86
|
}, _callee2, null, [[3, 10]]);
|
91
87
|
}));
|
@@ -134,49 +130,47 @@ export default function (topo) {
|
|
134
130
|
function _saveResourceWebUrl() {
|
135
131
|
_saveResourceWebUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id, url) {
|
136
132
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
137
|
-
while (1) {
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
_context3.next = 4;
|
142
|
-
break;
|
143
|
-
}
|
144
|
-
|
145
|
-
_Message.success('链接设置成功');
|
146
|
-
|
147
|
-
closeSettingDialog();
|
148
|
-
return _context3.abrupt("return");
|
149
|
-
|
150
|
-
case 4:
|
151
|
-
updateStore({
|
152
|
-
saving: true
|
153
|
-
});
|
154
|
-
_context3.prev = 5;
|
155
|
-
_context3.next = 8;
|
156
|
-
return topoService.resourceWebUrl.save(id, url || null);
|
157
|
-
|
158
|
-
case 8:
|
159
|
-
_Message.success('链接设置成功');
|
160
|
-
|
161
|
-
resourceUrlMap[id] = url;
|
162
|
-
closeSettingDialog();
|
163
|
-
_context3.next = 17;
|
133
|
+
while (1) switch (_context3.prev = _context3.next) {
|
134
|
+
case 0:
|
135
|
+
if (!(!url && !getResourceUrl(id))) {
|
136
|
+
_context3.next = 4;
|
164
137
|
break;
|
138
|
+
}
|
139
|
+
|
140
|
+
_Message.success('链接设置成功');
|
141
|
+
|
142
|
+
closeSettingDialog();
|
143
|
+
return _context3.abrupt("return");
|
144
|
+
|
145
|
+
case 4:
|
146
|
+
updateStore({
|
147
|
+
saving: true
|
148
|
+
});
|
149
|
+
_context3.prev = 5;
|
150
|
+
_context3.next = 8;
|
151
|
+
return topoService.resourceWebUrl.save(id, url || null);
|
152
|
+
|
153
|
+
case 8:
|
154
|
+
_Message.success('链接设置成功');
|
155
|
+
|
156
|
+
resourceUrlMap[id] = url;
|
157
|
+
closeSettingDialog();
|
158
|
+
_context3.next = 17;
|
159
|
+
break;
|
165
160
|
|
166
|
-
|
167
|
-
|
168
|
-
|
161
|
+
case 13:
|
162
|
+
_context3.prev = 13;
|
163
|
+
_context3.t0 = _context3["catch"](5);
|
169
164
|
|
170
|
-
|
165
|
+
_Message.error('链接设置失败');
|
171
166
|
|
172
|
-
|
173
|
-
|
174
|
-
|
167
|
+
updateStore({
|
168
|
+
saving: false
|
169
|
+
});
|
175
170
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
}
|
171
|
+
case 17:
|
172
|
+
case "end":
|
173
|
+
return _context3.stop();
|
180
174
|
}
|
181
175
|
}, _callee3, null, [[5, 13]]);
|
182
176
|
}));
|
@@ -24,20 +24,18 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
|
|
24
24
|
_proto.init = /*#__PURE__*/function () {
|
25
25
|
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(topoData) {
|
26
26
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
27
|
-
while (1) {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
return _context.stop();
|
40
|
-
}
|
27
|
+
while (1) switch (_context.prev = _context.next) {
|
28
|
+
case 0:
|
29
|
+
this.topoData = topoData;
|
30
|
+
_context.next = 3;
|
31
|
+
return this.initNetworkLinkModel();
|
32
|
+
|
33
|
+
case 3:
|
34
|
+
this.mtCiTypeMap = getMtCodeCiTypeMap(topoData);
|
35
|
+
|
36
|
+
case 4:
|
37
|
+
case "end":
|
38
|
+
return _context.stop();
|
41
39
|
}
|
42
40
|
}, _callee, this);
|
43
41
|
}));
|
@@ -53,36 +51,34 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
|
|
53
51
|
var _initNetworkLinkModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
54
52
|
var mtCodes;
|
55
53
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
56
|
-
while (1) {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
mtCodes = ['m.critical_link', 'm.ethernet_link'];
|
54
|
+
while (1) switch (_context2.prev = _context2.next) {
|
55
|
+
case 0:
|
56
|
+
_context2.prev = 0;
|
57
|
+
mtCodes = ['m.critical_link', 'm.ethernet_link'];
|
61
58
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
59
|
+
if (!mtCodes.length) {
|
60
|
+
_context2.next = 6;
|
61
|
+
break;
|
62
|
+
}
|
66
63
|
|
67
|
-
|
68
|
-
|
64
|
+
_context2.next = 5;
|
65
|
+
return getMetricsByMonitorTemplateCodes(mtCodes);
|
69
66
|
|
70
|
-
|
71
|
-
|
67
|
+
case 5:
|
68
|
+
this.mtMetricsMap = _context2.sent;
|
72
69
|
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
case 6:
|
71
|
+
_context2.next = 11;
|
72
|
+
break;
|
76
73
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
74
|
+
case 8:
|
75
|
+
_context2.prev = 8;
|
76
|
+
_context2.t0 = _context2["catch"](0);
|
77
|
+
rlog.error('查询监控模板指标失败', _context2.t0);
|
81
78
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
}
|
79
|
+
case 11:
|
80
|
+
case "end":
|
81
|
+
return _context2.stop();
|
86
82
|
}
|
87
83
|
}, _callee2, this, [[0, 8]]);
|
88
84
|
}));
|