@riil-frontend/component-topology 11.0.33 → 11.0.35
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 +52 -45
- package/es/components/MultiResourceDrawer/index.js +22 -26
- package/es/components/ResourceList/ResourceSelect.js +55 -58
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +30 -34
- package/es/components/SingleResourceDrawer/SelectDrawer.js +24 -28
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +29 -33
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- 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 +149 -178
- package/es/core/editor/components/BackgroundView/index.module.scss +2 -1
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +26 -30
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +20 -24
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +13 -17
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +17 -21
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +27 -31
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +16 -20
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +37 -55
- 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 +8 -10
- package/es/core/editor/store/topoEdit.js +4 -6
- package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/es/core/hooks/usePolling.js +130 -142
- package/es/core/hooks/useResourceConfig.js +76 -100
- package/es/core/hooks/useTopoEdit.js +525 -623
- package/es/core/models/Alarm.js +319 -402
- package/es/core/models/AttributeMetricDisplay.js +115 -143
- package/es/core/models/PluginManager.js +4 -3
- package/es/core/models/SelectionModel.js +4 -5
- package/es/core/models/TopoApp.js +279 -436
- package/es/core/models/TopoGraphView.js +28 -41
- package/es/core/models/cache/CiCache.js +34 -39
- package/es/core/models/cache/CiTypeCache.js +47 -61
- package/es/core/models/cache/DictCache.js +36 -42
- package/es/core/models/graph/Background.js +21 -26
- package/es/core/models/plugins/resourceWebControllUrl.js +84 -103
- package/es/core/models/tagstips/ElementTagTipConfig.js +44 -58
- package/es/core/models/topoData.js +73 -77
- package/es/core/models/utils/linkUtils.js +46 -51
- 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 +14 -18
- package/es/core/services/cmdb.js +23 -27
- package/es/core/services/index.js +48 -68
- package/es/core/services/overview.js +131 -151
- package/es/core/services/topo/basic.js +37 -41
- package/es/core/services/topo/tagtip.js +15 -19
- package/es/core/store/models/ciModel.js +58 -62
- package/es/core/store/models/customIcon.js +126 -145
- 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 +23 -27
- package/es/core/utils/saveSerialize.js +14 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +20 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +363 -409
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +112 -131
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +40 -46
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +219 -275
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +45 -54
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +32 -44
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +23 -27
- package/es/networkTopo/components/Link/hook.js +85 -96
- package/es/networkTopo/components/Link/index.js +104 -126
- package/es/networkTopo/components/Link/setting.js +48 -52
- package/es/networkTopo/getTopoData.js +73 -92
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +34 -39
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +28 -46
- package/es/networkTopo/services/alert.js +18 -22
- package/es/networkTopo/services/authorization.js +45 -55
- package/es/networkTopo/services/cmdb.js +548 -696
- package/es/networkTopo/services/funcAuth.js +22 -24
- package/es/networkTopo/services/link.js +107 -117
- package/es/networkTopo/services/mdc.js +33 -48
- package/es/networkTopo/services/metric.js +38 -47
- package/es/networkTopo/services/model.js +616 -809
- 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 +57 -61
- package/lib/components/MultiResourceDrawer/index.js +22 -26
- package/lib/components/ResourceList/ResourceSelect.js +54 -58
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +33 -37
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +24 -28
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +36 -40
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- 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 +148 -177
- package/lib/core/editor/components/BackgroundView/index.module.scss +2 -1
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +28 -32
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +23 -28
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +14 -18
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +45 -56
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +60 -70
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +60 -70
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +18 -22
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +32 -36
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +21 -25
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -22
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +41 -59
- 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 +8 -10
- package/lib/core/editor/store/topoEdit.js +4 -6
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/lib/core/hooks/usePolling.js +129 -141
- package/lib/core/hooks/useResourceConfig.js +76 -100
- package/lib/core/hooks/useTopoEdit.js +517 -615
- package/lib/core/models/Alarm.js +313 -396
- package/lib/core/models/AttributeMetricDisplay.js +118 -146
- package/lib/core/models/PluginManager.js +4 -3
- package/lib/core/models/SelectionModel.js +4 -5
- package/lib/core/models/TopoApp.js +279 -436
- package/lib/core/models/TopoGraphView.js +28 -41
- package/lib/core/models/cache/CiCache.js +39 -44
- package/lib/core/models/cache/CiTypeCache.js +48 -62
- package/lib/core/models/cache/DictCache.js +39 -45
- package/lib/core/models/graph/Background.js +22 -27
- package/lib/core/models/plugins/resourceWebControllUrl.js +82 -101
- package/lib/core/models/tagstips/ElementTagTipConfig.js +44 -58
- package/lib/core/models/topoData.js +73 -78
- package/lib/core/models/utils/linkUtils.js +45 -51
- 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 +14 -19
- package/lib/core/services/cmdb.js +24 -29
- package/lib/core/services/index.js +53 -72
- package/lib/core/services/overview.js +131 -151
- package/lib/core/services/topo/basic.js +37 -41
- package/lib/core/services/topo/tagtip.js +16 -21
- package/lib/core/store/models/ciModel.js +66 -70
- package/lib/core/store/models/customIcon.js +126 -145
- 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 +26 -31
- package/lib/core/utils/saveSerialize.js +13 -18
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +62 -66
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +21 -26
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +364 -410
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +114 -133
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +44 -50
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +220 -274
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +113 -118
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +63 -68
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +40 -50
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +35 -47
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -43
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +24 -28
- package/lib/networkTopo/components/Link/hook.js +86 -98
- package/lib/networkTopo/components/Link/index.js +105 -127
- package/lib/networkTopo/components/Link/setting.js +48 -52
- package/lib/networkTopo/getTopoData.js +73 -92
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +35 -40
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +28 -46
- package/lib/networkTopo/services/alert.js +18 -22
- package/lib/networkTopo/services/authorization.js +55 -65
- package/lib/networkTopo/services/cmdb.js +551 -700
- package/lib/networkTopo/services/funcAuth.js +24 -26
- package/lib/networkTopo/services/link.js +108 -118
- package/lib/networkTopo/services/mdc.js +35 -51
- package/lib/networkTopo/services/metric.js +37 -47
- package/lib/networkTopo/services/model.js +615 -809
- 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 +63 -68
- package/package.json +4 -3
@@ -4,32 +4,28 @@ import React, { useState, useEffect } from 'react';
|
|
4
4
|
import ResourceSelectDrawer from "../../../../components/NetworkTopoResourceSelectDrawer";
|
5
5
|
|
6
6
|
var GroupAddResourceDrawer = function GroupAddResourceDrawer(props) {
|
7
|
+
var _ref;
|
8
|
+
|
7
9
|
var group = props.group,
|
8
10
|
topoEdit = props.topoEdit,
|
9
11
|
visible = props.visible,
|
10
12
|
onClose = props.onClose;
|
11
13
|
|
12
|
-
var onOk =
|
13
|
-
|
14
|
+
var onOk = function onOk(_x) {
|
15
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
14
16
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
15
|
-
while (1) {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
return topoEdit.addGroupResources(group, selected);
|
17
|
+
while (1) switch (_context.prev = _context.next) {
|
18
|
+
case 0:
|
19
|
+
_context.next = 2;
|
20
|
+
return topoEdit.addGroupResources(group, selected);
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
22
|
+
case 2:
|
23
|
+
case "end":
|
24
|
+
return _context.stop();
|
25
25
|
}
|
26
26
|
}, _callee);
|
27
|
-
}));
|
28
|
-
|
29
|
-
return function onOk(_x) {
|
30
|
-
return _ref.apply(this, arguments);
|
31
|
-
};
|
32
|
-
}();
|
27
|
+
}))).apply(this, arguments);
|
28
|
+
};
|
33
29
|
|
34
30
|
return /*#__PURE__*/React.createElement(ResourceSelectDrawer, {
|
35
31
|
visible: visible,
|
@@ -7,6 +7,8 @@ import THEMES from "../../../../../config/themes";
|
|
7
7
|
import ThemeUtil from "../../../../../utils/themeUtil";
|
8
8
|
|
9
9
|
function useCanvasThemeConfig(props) {
|
10
|
+
var _ref, _setGlobalTagTheme;
|
11
|
+
|
10
12
|
var topo = props.topo;
|
11
13
|
|
12
14
|
var _topo$store$useModel = topo.store.useModel('displayConfig'),
|
@@ -15,74 +17,61 @@ function useCanvasThemeConfig(props) {
|
|
15
17
|
|
16
18
|
var canvasThemeName = displayConfig.canvasTheme || 'white';
|
17
19
|
|
18
|
-
var setCanvasTheme =
|
19
|
-
|
20
|
+
var setCanvasTheme = function setCanvasTheme(_x) {
|
21
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(themeName) {
|
20
22
|
var themeConfig;
|
21
23
|
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
|
-
|
44
|
-
return _context.stop();
|
45
|
-
}
|
24
|
+
while (1) switch (_context.prev = _context.next) {
|
25
|
+
case 0:
|
26
|
+
themeConfig = THEMES.find(function (item) {
|
27
|
+
return item.name === themeName;
|
28
|
+
});
|
29
|
+
topo.historyManager.beginTransaction();
|
30
|
+
_context.next = 4;
|
31
|
+
return displayConfigDispatchers.update({
|
32
|
+
canvasTheme: themeName
|
33
|
+
});
|
34
|
+
|
35
|
+
case 4:
|
36
|
+
_context.next = 6;
|
37
|
+
return setGlobalTagTheme(themeConfig);
|
38
|
+
|
39
|
+
case 6:
|
40
|
+
setElementsTheme(themeConfig);
|
41
|
+
topo.historyManager.endTransaction();
|
42
|
+
|
43
|
+
case 8:
|
44
|
+
case "end":
|
45
|
+
return _context.stop();
|
46
46
|
}
|
47
47
|
}, _callee);
|
48
|
-
}));
|
49
|
-
|
50
|
-
return function setCanvasTheme(_x) {
|
51
|
-
return _ref.apply(this, arguments);
|
52
|
-
};
|
53
|
-
}(); // 设置资源/链路标注样式
|
48
|
+
}))).apply(this, arguments);
|
49
|
+
}; // 设置资源/链路标注样式
|
54
50
|
|
55
51
|
|
56
52
|
function setGlobalTagTheme(_x2) {
|
57
|
-
return _setGlobalTagTheme.
|
58
|
-
}
|
59
|
-
|
60
|
-
function _setGlobalTagTheme() {
|
61
|
-
_setGlobalTagTheme = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(themeConfig) {
|
53
|
+
return (_setGlobalTagTheme = _setGlobalTagTheme || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(themeConfig) {
|
62
54
|
var _topo$store$getModelS, nodeLabelStyle, defaultEdgeLabelStyle;
|
63
55
|
|
64
56
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
65
|
-
while (1) {
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
return _context2.stop();
|
81
|
-
}
|
57
|
+
while (1) switch (_context2.prev = _context2.next) {
|
58
|
+
case 0:
|
59
|
+
topo.getHtTopo().setGlobalNodeLabelStyle(themeConfig.globalNodeLabelStyle);
|
60
|
+
topo.getHtTopo().setGlobalEdgeTagStyle(themeConfig.globalEdgeTagStyle); // 更新默认配置
|
61
|
+
|
62
|
+
_topo$store$getModelS = topo.store.getModelState('displayConfig'), nodeLabelStyle = _topo$store$getModelS.nodeLabelStyle, defaultEdgeLabelStyle = _topo$store$getModelS.defaultEdgeLabelStyle;
|
63
|
+
_context2.next = 5;
|
64
|
+
return displayConfigDispatchers.update({
|
65
|
+
nodeLabelStyle: _extends({}, nodeLabelStyle, themeConfig.globalNodeLabelStyle),
|
66
|
+
defaultEdgeLabelStyle: _extends({}, defaultEdgeLabelStyle, themeConfig.globalEdgeTagStyle)
|
67
|
+
});
|
68
|
+
|
69
|
+
case 5:
|
70
|
+
case "end":
|
71
|
+
return _context2.stop();
|
82
72
|
}
|
83
73
|
}, _callee2);
|
84
|
-
}));
|
85
|
-
return _setGlobalTagTheme.apply(this, arguments);
|
74
|
+
}))).apply(this, arguments);
|
86
75
|
}
|
87
76
|
|
88
77
|
function setElementsTheme(themeConfig) {
|
package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js
CHANGED
@@ -7,6 +7,8 @@ import ColorPanel from "../../../../../../components/ColorPanel";
|
|
7
7
|
import FontColorRange from "../../../../../../components/ColorPanel/components/FontColorRange";
|
8
8
|
|
9
9
|
function BoxBackgroundSetting(props) {
|
10
|
+
var _ref, _ref2;
|
11
|
+
|
10
12
|
var topo = props.topo,
|
11
13
|
fieldProps = props.fieldProps,
|
12
14
|
setStyle = props.setStyle,
|
@@ -34,45 +36,39 @@ function BoxBackgroundSetting(props) {
|
|
34
36
|
topo.historyManager.endTransaction();
|
35
37
|
};
|
36
38
|
|
37
|
-
var backgroundChang =
|
38
|
-
|
39
|
+
var backgroundChang = function backgroundChang(_x, _x2) {
|
40
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value, type) {
|
39
41
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
40
|
-
while (1) {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
_context.next = 7;
|
45
|
-
break;
|
46
|
-
}
|
47
|
-
|
48
|
-
topo.historyManager.beginTransaction();
|
49
|
-
_context.next = 4;
|
50
|
-
return setStyle({
|
51
|
-
backgroundColor: value
|
52
|
-
});
|
53
|
-
|
54
|
-
case 4:
|
55
|
-
topo.historyManager.endTransaction();
|
56
|
-
_context.next = 8;
|
42
|
+
while (1) switch (_context.prev = _context.next) {
|
43
|
+
case 0:
|
44
|
+
if (!(type === 'select')) {
|
45
|
+
_context.next = 7;
|
57
46
|
break;
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
47
|
+
}
|
48
|
+
|
49
|
+
topo.historyManager.beginTransaction();
|
50
|
+
_context.next = 4;
|
51
|
+
return setStyle({
|
52
|
+
backgroundColor: value
|
53
|
+
});
|
54
|
+
|
55
|
+
case 4:
|
56
|
+
topo.historyManager.endTransaction();
|
57
|
+
_context.next = 8;
|
58
|
+
break;
|
59
|
+
|
60
|
+
case 7:
|
61
|
+
setStyle({
|
62
|
+
backgroundColor: value
|
63
|
+
});
|
64
|
+
|
65
|
+
case 8:
|
66
|
+
case "end":
|
67
|
+
return _context.stop();
|
68
68
|
}
|
69
69
|
}, _callee);
|
70
|
-
}));
|
71
|
-
|
72
|
-
return function backgroundChang(_x, _x2) {
|
73
|
-
return _ref.apply(this, arguments);
|
74
|
-
};
|
75
|
-
}();
|
70
|
+
}))).apply(this, arguments);
|
71
|
+
};
|
76
72
|
|
77
73
|
var borderOpacityChange = function borderOpacityChange(value) {
|
78
74
|
topo.historyManager.beginTransaction();
|
@@ -90,45 +86,39 @@ function BoxBackgroundSetting(props) {
|
|
90
86
|
topo.historyManager.endTransaction();
|
91
87
|
};
|
92
88
|
|
93
|
-
var borderColorChang =
|
94
|
-
|
89
|
+
var borderColorChang = function borderColorChang(_x3, _x4) {
|
90
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(value, type) {
|
95
91
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
96
|
-
while (1) {
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
_context2.next = 7;
|
101
|
-
break;
|
102
|
-
}
|
103
|
-
|
104
|
-
topo.historyManager.beginTransaction();
|
105
|
-
_context2.next = 4;
|
106
|
-
return setStyle({
|
107
|
-
borderColor: value
|
108
|
-
});
|
109
|
-
|
110
|
-
case 4:
|
111
|
-
topo.historyManager.endTransaction();
|
112
|
-
_context2.next = 8;
|
92
|
+
while (1) switch (_context2.prev = _context2.next) {
|
93
|
+
case 0:
|
94
|
+
if (!(type === 'select')) {
|
95
|
+
_context2.next = 7;
|
113
96
|
break;
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
97
|
+
}
|
98
|
+
|
99
|
+
topo.historyManager.beginTransaction();
|
100
|
+
_context2.next = 4;
|
101
|
+
return setStyle({
|
102
|
+
borderColor: value
|
103
|
+
});
|
104
|
+
|
105
|
+
case 4:
|
106
|
+
topo.historyManager.endTransaction();
|
107
|
+
_context2.next = 8;
|
108
|
+
break;
|
109
|
+
|
110
|
+
case 7:
|
111
|
+
setStyle({
|
112
|
+
borderColor: value
|
113
|
+
});
|
114
|
+
|
115
|
+
case 8:
|
116
|
+
case "end":
|
117
|
+
return _context2.stop();
|
124
118
|
}
|
125
119
|
}, _callee2);
|
126
|
-
}));
|
127
|
-
|
128
|
-
return function borderColorChang(_x3, _x4) {
|
129
|
-
return _ref2.apply(this, arguments);
|
130
|
-
};
|
131
|
-
}();
|
120
|
+
}))).apply(this, arguments);
|
121
|
+
};
|
132
122
|
|
133
123
|
var leftInputChange = function leftInputChange(val) {
|
134
124
|
setLeftInputVal(val);
|
@@ -11,6 +11,8 @@ import styles from "./FontColorButton.module.scss";
|
|
11
11
|
import textStyleSettingRouter from "./components/textStyleSetting/textStyleSettingRouter.js";
|
12
12
|
|
13
13
|
function FontColorDropdown(props) {
|
14
|
+
var _ref, _ref2;
|
15
|
+
|
14
16
|
var color = props.color,
|
15
17
|
onChange = props.onChange,
|
16
18
|
topo = props.topo,
|
@@ -35,85 +37,73 @@ function FontColorDropdown(props) {
|
|
35
37
|
topo.historyManager.endTransaction();
|
36
38
|
};
|
37
39
|
|
38
|
-
var colorChang =
|
39
|
-
|
40
|
+
var colorChang = function colorChang(_x, _x2) {
|
41
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value, type) {
|
40
42
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
41
|
-
while (1) {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
_context.next = 7;
|
46
|
-
break;
|
47
|
-
}
|
48
|
-
|
49
|
-
topo.historyManager.beginTransaction();
|
50
|
-
_context.next = 4;
|
51
|
-
return setStyle({
|
52
|
-
color: value
|
53
|
-
});
|
54
|
-
|
55
|
-
case 4:
|
56
|
-
topo.historyManager.endTransaction();
|
57
|
-
_context.next = 8;
|
43
|
+
while (1) switch (_context.prev = _context.next) {
|
44
|
+
case 0:
|
45
|
+
if (!(type === 'select')) {
|
46
|
+
_context.next = 7;
|
58
47
|
break;
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
48
|
+
}
|
49
|
+
|
50
|
+
topo.historyManager.beginTransaction();
|
51
|
+
_context.next = 4;
|
52
|
+
return setStyle({
|
53
|
+
color: value
|
54
|
+
});
|
55
|
+
|
56
|
+
case 4:
|
57
|
+
topo.historyManager.endTransaction();
|
58
|
+
_context.next = 8;
|
59
|
+
break;
|
60
|
+
|
61
|
+
case 7:
|
62
|
+
setStyle({
|
63
|
+
background: value
|
64
|
+
});
|
65
|
+
|
66
|
+
case 8:
|
67
|
+
case "end":
|
68
|
+
return _context.stop();
|
69
69
|
}
|
70
70
|
}, _callee);
|
71
|
-
}));
|
72
|
-
|
73
|
-
return function colorChang(_x, _x2) {
|
74
|
-
return _ref.apply(this, arguments);
|
75
|
-
};
|
76
|
-
}();
|
71
|
+
}))).apply(this, arguments);
|
72
|
+
};
|
77
73
|
|
78
|
-
var backgroundChang =
|
79
|
-
|
74
|
+
var backgroundChang = function backgroundChang(_x3, _x4) {
|
75
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(value, type) {
|
80
76
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
81
|
-
while (1) {
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
_context2.next = 7;
|
86
|
-
break;
|
87
|
-
}
|
88
|
-
|
89
|
-
topo.historyManager.beginTransaction();
|
90
|
-
_context2.next = 4;
|
91
|
-
return setStyle({
|
92
|
-
background: value
|
93
|
-
});
|
94
|
-
|
95
|
-
case 4:
|
96
|
-
topo.historyManager.endTransaction();
|
97
|
-
_context2.next = 8;
|
77
|
+
while (1) switch (_context2.prev = _context2.next) {
|
78
|
+
case 0:
|
79
|
+
if (!(type === 'select')) {
|
80
|
+
_context2.next = 7;
|
98
81
|
break;
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
82
|
+
}
|
83
|
+
|
84
|
+
topo.historyManager.beginTransaction();
|
85
|
+
_context2.next = 4;
|
86
|
+
return setStyle({
|
87
|
+
background: value
|
88
|
+
});
|
89
|
+
|
90
|
+
case 4:
|
91
|
+
topo.historyManager.endTransaction();
|
92
|
+
_context2.next = 8;
|
93
|
+
break;
|
94
|
+
|
95
|
+
case 7:
|
96
|
+
setStyle({
|
97
|
+
background: value
|
98
|
+
});
|
99
|
+
|
100
|
+
case 8:
|
101
|
+
case "end":
|
102
|
+
return _context2.stop();
|
109
103
|
}
|
110
104
|
}, _callee2);
|
111
|
-
}));
|
112
|
-
|
113
|
-
return function backgroundChang(_x3, _x4) {
|
114
|
-
return _ref2.apply(this, arguments);
|
115
|
-
};
|
116
|
-
}();
|
105
|
+
}))).apply(this, arguments);
|
106
|
+
};
|
117
107
|
|
118
108
|
var onFocus = function onFocus() {// topo.historyManager.beginTransaction();
|
119
109
|
};
|
@@ -4,38 +4,34 @@ import React, { useState, useEffect } from 'react';
|
|
4
4
|
import ResourceSelectDrawer from "../../../../../../../components/NetworkTopoResourceSelectDrawer";
|
5
5
|
|
6
6
|
var LayerAddResourceDrawer = function LayerAddResourceDrawer(props) {
|
7
|
+
var _ref;
|
8
|
+
|
7
9
|
var visible = props.visible,
|
8
10
|
layer = props.layer,
|
9
11
|
topo = props.topo,
|
10
12
|
topoEdit = props.topoEdit,
|
11
13
|
onClose = props.onClose;
|
12
14
|
|
13
|
-
var onOk =
|
14
|
-
|
15
|
+
var onOk = function onOk(_x) {
|
16
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
15
17
|
var layerData;
|
16
18
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
17
|
-
while (1) {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
return topoEdit.addLayerResources(layerData, selected);
|
19
|
+
while (1) switch (_context.prev = _context.next) {
|
20
|
+
case 0:
|
21
|
+
layerData = {
|
22
|
+
id: layer.tag,
|
23
|
+
tag: layer.attrObject.tag
|
24
|
+
};
|
25
|
+
_context.next = 3;
|
26
|
+
return topoEdit.addLayerResources(layerData, selected);
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
28
|
+
case 3:
|
29
|
+
case "end":
|
30
|
+
return _context.stop();
|
31
31
|
}
|
32
32
|
}, _callee);
|
33
|
-
}));
|
34
|
-
|
35
|
-
return function onOk(_x) {
|
36
|
-
return _ref.apply(this, arguments);
|
37
|
-
};
|
38
|
-
}();
|
33
|
+
}))).apply(this, arguments);
|
34
|
+
};
|
39
35
|
|
40
36
|
return /*#__PURE__*/React.createElement(ResourceSelectDrawer, {
|
41
37
|
visible: visible,
|
@@ -11,52 +11,48 @@ import ResourceSelectDrawer from "../../../../../../../components/NetworkTopoRes
|
|
11
11
|
*/
|
12
12
|
|
13
13
|
var BindResourceDrawer = function BindResourceDrawer(props) {
|
14
|
+
var _ref;
|
15
|
+
|
14
16
|
var visible = props.visible,
|
15
17
|
topoEditApi = props.topoEditApi,
|
16
18
|
node = props.node,
|
17
19
|
currentResId = props.currentResId,
|
18
20
|
onClose = props.onClose;
|
19
21
|
|
20
|
-
var handleSave =
|
21
|
-
|
22
|
+
var handleSave = function handleSave(_x) {
|
23
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
22
24
|
var result;
|
23
25
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
24
|
-
while (1) {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
26
|
+
while (1) switch (_context.prev = _context.next) {
|
27
|
+
case 0:
|
28
|
+
if (selected) {
|
29
|
+
_context.next = 3;
|
30
|
+
break;
|
31
|
+
}
|
31
32
|
|
32
|
-
|
33
|
+
_Message.error('请选择一项资源。');
|
33
34
|
|
34
|
-
|
35
|
+
return _context.abrupt("return", false);
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
case 3:
|
38
|
+
_context.next = 5;
|
39
|
+
return topoEditApi.bindNodeResource({
|
40
|
+
id: node.id,
|
41
|
+
newResId: selected,
|
42
|
+
oldResId: currentResId
|
43
|
+
});
|
43
44
|
|
44
|
-
|
45
|
-
|
46
|
-
|
45
|
+
case 5:
|
46
|
+
result = _context.sent;
|
47
|
+
return _context.abrupt("return", result);
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
}
|
49
|
+
case 7:
|
50
|
+
case "end":
|
51
|
+
return _context.stop();
|
52
52
|
}
|
53
53
|
}, _callee);
|
54
|
-
}));
|
55
|
-
|
56
|
-
return function handleSave(_x) {
|
57
|
-
return _ref.apply(this, arguments);
|
58
|
-
};
|
59
|
-
}();
|
54
|
+
}))).apply(this, arguments);
|
55
|
+
};
|
60
56
|
|
61
57
|
return /*#__PURE__*/React.createElement(ResourceSelectDrawer, {
|
62
58
|
visible: visible,
|