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