@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
package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js
CHANGED
@@ -37,32 +37,34 @@ function BoxBackgroundSetting(props) {
|
|
37
37
|
var backgroundChang = /*#__PURE__*/function () {
|
38
38
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value, type) {
|
39
39
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
40
|
-
while (1)
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
while (1) {
|
41
|
+
switch (_context.prev = _context.next) {
|
42
|
+
case 0:
|
43
|
+
if (!(type === 'select')) {
|
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;
|
44
57
|
break;
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
_context.next = 8;
|
56
|
-
break;
|
57
|
-
|
58
|
-
case 7:
|
59
|
-
setStyle({
|
60
|
-
backgroundColor: value
|
61
|
-
});
|
62
|
-
|
63
|
-
case 8:
|
64
|
-
case "end":
|
65
|
-
return _context.stop();
|
58
|
+
|
59
|
+
case 7:
|
60
|
+
setStyle({
|
61
|
+
backgroundColor: value
|
62
|
+
});
|
63
|
+
|
64
|
+
case 8:
|
65
|
+
case "end":
|
66
|
+
return _context.stop();
|
67
|
+
}
|
66
68
|
}
|
67
69
|
}, _callee);
|
68
70
|
}));
|
@@ -91,32 +93,34 @@ function BoxBackgroundSetting(props) {
|
|
91
93
|
var borderColorChang = /*#__PURE__*/function () {
|
92
94
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(value, type) {
|
93
95
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
94
|
-
while (1)
|
95
|
-
|
96
|
-
|
97
|
-
|
96
|
+
while (1) {
|
97
|
+
switch (_context2.prev = _context2.next) {
|
98
|
+
case 0:
|
99
|
+
if (!(type === 'select')) {
|
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;
|
98
113
|
break;
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
_context2.next = 8;
|
110
|
-
break;
|
111
|
-
|
112
|
-
case 7:
|
113
|
-
setStyle({
|
114
|
-
borderColor: value
|
115
|
-
});
|
116
|
-
|
117
|
-
case 8:
|
118
|
-
case "end":
|
119
|
-
return _context2.stop();
|
114
|
+
|
115
|
+
case 7:
|
116
|
+
setStyle({
|
117
|
+
borderColor: value
|
118
|
+
});
|
119
|
+
|
120
|
+
case 8:
|
121
|
+
case "end":
|
122
|
+
return _context2.stop();
|
123
|
+
}
|
120
124
|
}
|
121
125
|
}, _callee2);
|
122
126
|
}));
|
@@ -38,32 +38,34 @@ function FontColorDropdown(props) {
|
|
38
38
|
var colorChang = /*#__PURE__*/function () {
|
39
39
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value, type) {
|
40
40
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
41
|
-
while (1)
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
while (1) {
|
42
|
+
switch (_context.prev = _context.next) {
|
43
|
+
case 0:
|
44
|
+
if (!(type === 'select')) {
|
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;
|
45
58
|
break;
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
_context.next = 8;
|
57
|
-
break;
|
58
|
-
|
59
|
-
case 7:
|
60
|
-
setStyle({
|
61
|
-
background: value
|
62
|
-
});
|
63
|
-
|
64
|
-
case 8:
|
65
|
-
case "end":
|
66
|
-
return _context.stop();
|
59
|
+
|
60
|
+
case 7:
|
61
|
+
setStyle({
|
62
|
+
background: value
|
63
|
+
});
|
64
|
+
|
65
|
+
case 8:
|
66
|
+
case "end":
|
67
|
+
return _context.stop();
|
68
|
+
}
|
67
69
|
}
|
68
70
|
}, _callee);
|
69
71
|
}));
|
@@ -76,32 +78,34 @@ function FontColorDropdown(props) {
|
|
76
78
|
var backgroundChang = /*#__PURE__*/function () {
|
77
79
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(value, type) {
|
78
80
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
79
|
-
while (1)
|
80
|
-
|
81
|
-
|
82
|
-
|
81
|
+
while (1) {
|
82
|
+
switch (_context2.prev = _context2.next) {
|
83
|
+
case 0:
|
84
|
+
if (!(type === 'select')) {
|
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;
|
83
98
|
break;
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
_context2.next = 8;
|
95
|
-
break;
|
96
|
-
|
97
|
-
case 7:
|
98
|
-
setStyle({
|
99
|
-
background: value
|
100
|
-
});
|
101
|
-
|
102
|
-
case 8:
|
103
|
-
case "end":
|
104
|
-
return _context2.stop();
|
99
|
+
|
100
|
+
case 7:
|
101
|
+
setStyle({
|
102
|
+
background: value
|
103
|
+
});
|
104
|
+
|
105
|
+
case 8:
|
106
|
+
case "end":
|
107
|
+
return _context2.stop();
|
108
|
+
}
|
105
109
|
}
|
106
110
|
}, _callee2);
|
107
111
|
}));
|
@@ -14,18 +14,20 @@ var LayerAddResourceDrawer = function LayerAddResourceDrawer(props) {
|
|
14
14
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
15
15
|
var layerData;
|
16
16
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
17
|
-
while (1)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
while (1) {
|
18
|
+
switch (_context.prev = _context.next) {
|
19
|
+
case 0:
|
20
|
+
layerData = {
|
21
|
+
id: layer.tag,
|
22
|
+
tag: layer.attrObject.tag
|
23
|
+
};
|
24
|
+
_context.next = 3;
|
25
|
+
return topoEdit.addLayerResources(layerData, selected);
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
case 3:
|
28
|
+
case "end":
|
29
|
+
return _context.stop();
|
30
|
+
}
|
29
31
|
}
|
30
32
|
}, _callee);
|
31
33
|
}));
|
@@ -21,32 +21,34 @@ var BindResourceDrawer = function BindResourceDrawer(props) {
|
|
21
21
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
22
22
|
var result;
|
23
23
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
24
|
-
while (1)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
while (1) {
|
25
|
+
switch (_context.prev = _context.next) {
|
26
|
+
case 0:
|
27
|
+
if (selected) {
|
28
|
+
_context.next = 3;
|
29
|
+
break;
|
30
|
+
}
|
30
31
|
|
31
|
-
|
32
|
+
_Message.error('请选择一项资源。');
|
32
33
|
|
33
|
-
|
34
|
+
return _context.abrupt("return", false);
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
case 3:
|
37
|
+
_context.next = 5;
|
38
|
+
return topoEditApi.bindNodeResource({
|
39
|
+
id: node.id,
|
40
|
+
newResId: selected,
|
41
|
+
oldResId: currentResId
|
42
|
+
});
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
|
44
|
+
case 5:
|
45
|
+
result = _context.sent;
|
46
|
+
return _context.abrupt("return", result);
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
|
48
|
+
case 7:
|
49
|
+
case "end":
|
50
|
+
return _context.stop();
|
51
|
+
}
|
50
52
|
}
|
51
53
|
}, _callee);
|
52
54
|
}));
|
@@ -78,21 +78,23 @@ export default function Data(props) {
|
|
78
78
|
var handleBindTopoChange = /*#__PURE__*/function () {
|
79
79
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value, data) {
|
80
80
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
81
|
-
while (1)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
81
|
+
while (1) {
|
82
|
+
switch (_context.prev = _context.next) {
|
83
|
+
case 0:
|
84
|
+
topo.historyManager.beginTransaction(); // 设置名称为拓扑名称,清空自定义名称
|
85
|
+
|
86
|
+
node.a('name', data.label);
|
87
|
+
node.a('customName', null);
|
88
|
+
_context.next = 5;
|
89
|
+
return topoEditApi.deleteExLink(node);
|
90
|
+
|
91
|
+
case 5:
|
92
|
+
topo.historyManager.endTransaction();
|
93
|
+
|
94
|
+
case 6:
|
95
|
+
case "end":
|
96
|
+
return _context.stop();
|
97
|
+
}
|
96
98
|
}
|
97
99
|
}, _callee);
|
98
100
|
}));
|
@@ -15,18 +15,20 @@ export default function BackgroundSize(props) {
|
|
15
15
|
var setSize = /*#__PURE__*/function () {
|
16
16
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(size) {
|
17
17
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
18
|
-
while (1)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
while (1) {
|
19
|
+
switch (_context.prev = _context.next) {
|
20
|
+
case 0:
|
21
|
+
topo.historyManager.beginTransaction();
|
22
|
+
_context.next = 3;
|
23
|
+
return backgroundSizeConfig.setSize(size);
|
23
24
|
|
24
|
-
|
25
|
-
|
25
|
+
case 3:
|
26
|
+
topo.historyManager.endTransaction();
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
case 4:
|
29
|
+
case "end":
|
30
|
+
return _context.stop();
|
31
|
+
}
|
30
32
|
}
|
31
33
|
}, _callee);
|
32
34
|
}));
|
@@ -28,17 +28,19 @@ export default function TopoEditorTitleBar(props) {
|
|
28
28
|
var saveAndExit = /*#__PURE__*/function () {
|
29
29
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
30
30
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
31
|
-
while (1)
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
while (1) {
|
32
|
+
switch (_context.prev = _context.next) {
|
33
|
+
case 0:
|
34
|
+
_context.next = 2;
|
35
|
+
return topo.save();
|
35
36
|
|
36
|
-
|
37
|
-
|
37
|
+
case 2:
|
38
|
+
setExitFlag(true);
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
case 3:
|
41
|
+
case "end":
|
42
|
+
return _context.stop();
|
43
|
+
}
|
42
44
|
}
|
43
45
|
}, _callee);
|
44
46
|
}));
|
@@ -81,13 +83,15 @@ export default function TopoEditorTitleBar(props) {
|
|
81
83
|
onOk: function () {
|
82
84
|
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
83
85
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
84
|
-
while (1)
|
85
|
-
|
86
|
-
|
86
|
+
while (1) {
|
87
|
+
switch (_context2.prev = _context2.next) {
|
88
|
+
case 0:
|
89
|
+
saveAndExit();
|
87
90
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
+
case 1:
|
92
|
+
case "end":
|
93
|
+
return _context2.stop();
|
94
|
+
}
|
91
95
|
}
|
92
96
|
}, _callee2);
|
93
97
|
}));
|
@@ -101,13 +105,15 @@ export default function TopoEditorTitleBar(props) {
|
|
101
105
|
onCancel: function () {
|
102
106
|
var _onCancel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
103
107
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
104
|
-
while (1)
|
105
|
-
|
106
|
-
|
108
|
+
while (1) {
|
109
|
+
switch (_context3.prev = _context3.next) {
|
110
|
+
case 0:
|
111
|
+
topo.exitEditMode();
|
107
112
|
|
108
|
-
|
109
|
-
|
110
|
-
|
113
|
+
case 1:
|
114
|
+
case "end":
|
115
|
+
return _context3.stop();
|
116
|
+
}
|
111
117
|
}
|
112
118
|
}, _callee3);
|
113
119
|
}));
|
@@ -24,8 +24,8 @@ export default function useKeyboardShortcut(props) {
|
|
24
24
|
|
25
25
|
if (e.keyCode === 32 && e.target.nodeName !== 'TEXTAREA') {
|
26
26
|
// 空格
|
27
|
-
var _topo$store$
|
28
|
-
viewMouseMode = _topo$store$
|
27
|
+
var _topo$store$getModelS = topo.store.getModelState('topoEdit'),
|
28
|
+
viewMouseMode = _topo$store$getModelS.viewMouseMode;
|
29
29
|
|
30
30
|
topoEdit.setViewMouseMode(viewMouseMode === 'select' ? 'move' : 'select');
|
31
31
|
}
|
@@ -28,10 +28,10 @@ function useNewElementTheme(props) {
|
|
28
28
|
return item.name === theme;
|
29
29
|
});
|
30
30
|
|
31
|
-
var
|
31
|
+
var _ThemeUtil = ThemeUtil({
|
32
32
|
topo: topo
|
33
33
|
}),
|
34
|
-
setElementTheme =
|
34
|
+
setElementTheme = _ThemeUtil.setElementTheme;
|
35
35
|
|
36
36
|
setElementTheme(data, themeConfig); // 临时放这里,新加入节点按配置显示隐藏名称
|
37
37
|
|
@@ -36,15 +36,17 @@ export default {
|
|
36
36
|
|
37
37
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
38
38
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
39
|
-
while (1)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
while (1) {
|
40
|
+
switch (_context.prev = _context.next) {
|
41
|
+
case 0:
|
42
|
+
_this.update({
|
43
|
+
current: extraConfig.background
|
44
|
+
});
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
case 1:
|
47
|
+
case "end":
|
48
|
+
return _context.stop();
|
49
|
+
}
|
48
50
|
}
|
49
51
|
}, _callee);
|
50
52
|
}))();
|
@@ -37,10 +37,12 @@ export default function (topo) {
|
|
37
37
|
init: function init(payload, rootState) {
|
38
38
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
39
39
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
40
|
-
while (1)
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
while (1) {
|
41
|
+
switch (_context.prev = _context.next) {
|
42
|
+
case 0:
|
43
|
+
case "end":
|
44
|
+
return _context.stop();
|
45
|
+
}
|
44
46
|
}
|
45
47
|
}, _callee);
|
46
48
|
}))();
|
@@ -68,12 +68,14 @@ export function isNodeAllEdges(topo) {
|
|
68
68
|
return nodeLineList[i]._id == edge._id;
|
69
69
|
}).length == 0) {
|
70
70
|
inEdges = true;
|
71
|
-
return
|
71
|
+
return "break";
|
72
72
|
}
|
73
73
|
};
|
74
74
|
|
75
75
|
for (var i = 0; i < nodeLineList.length; i++) {
|
76
|
-
|
76
|
+
var _ret = _loop(i);
|
77
|
+
|
78
|
+
if (_ret === "break") break;
|
77
79
|
}
|
78
80
|
});
|
79
81
|
return inEdges;
|