@riil-frontend/component-topology 10.0.57 → 10.0.59
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/IndexSettingDrawer/index.js +6 -5
- 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/ResourceDisplay/useElementTagTipConfig.js +78 -100
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- package/es/core/components/titlebar/widgets/TitleWidget.js +5 -4
- 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/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/useCanvasTheme.js +1 -1
- package/es/core/hooks/usePolling.js +110 -122
- package/es/core/hooks/useResourceConfig.js +76 -100
- package/es/core/hooks/useTopoEdit.js +539 -638
- package/es/core/models/Alarm.js +311 -394
- 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 +287 -454
- package/es/core/models/TopoGraphView.js +28 -41
- package/es/core/models/cache/CiCache.js +34 -39
- package/es/core/models/cache/CiTypeCache.js +70 -84
- 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 +34 -40
- package/es/core/models/topoData.js +73 -77
- package/es/core/models/utils/linkUtils.js +46 -51
- 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 +11 -13
- 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 +28 -32
- package/es/core/store/models/topoConfig.js +217 -233
- package/es/core/store/models/topoGraphView.js +4 -6
- package/es/core/store/models/topoMod.js +379 -401
- 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 copy.js +104 -126
- 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 +274 -314
- 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/linkDynamicStyle.js +102 -108
- package/es/networkTopo/store/linkDynamicStyleConfig.js +42 -44
- package/es/networkTopo/store/linkManager.js +4 -6
- 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/IndexSettingDrawer/index.js +6 -5
- 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/ResourceDisplay/useElementTagTipConfig.js +82 -104
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +92 -108
- package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -4
- 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/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/useCanvasTheme.js +1 -1
- package/lib/core/hooks/usePolling.js +108 -120
- package/lib/core/hooks/useResourceConfig.js +76 -100
- package/lib/core/hooks/useTopoEdit.js +530 -629
- package/lib/core/models/Alarm.js +308 -391
- 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 +287 -454
- package/lib/core/models/TopoGraphView.js +28 -41
- package/lib/core/models/cache/CiCache.js +39 -44
- package/lib/core/models/cache/CiTypeCache.js +71 -85
- 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 +34 -40
- package/lib/core/models/topoData.js +73 -78
- package/lib/core/models/utils/linkUtils.js +45 -51
- 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 +13 -15
- 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 +34 -38
- package/lib/core/store/models/topoConfig.js +224 -240
- package/lib/core/store/models/topoGraphView.js +4 -6
- package/lib/core/store/models/topoMod.js +381 -403
- 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 copy.js +105 -127
- 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 +277 -317
- 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/linkDynamicStyle.js +103 -109
- package/lib/networkTopo/store/linkDynamicStyleConfig.js +42 -44
- package/lib/networkTopo/store/linkManager.js +4 -6
- 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 +3 -3
@@ -18,6 +18,8 @@ import { mergeExportLinkData } from "../models/utils/linkUtils";
|
|
18
18
|
import { isUniqueIp, buildIpNode } from "../../networkTopo/utils/exitLinkUtil";
|
19
19
|
|
20
20
|
var useTopoEdit = function useTopoEdit(params) {
|
21
|
+
var _ref2, _ref3, _ref4, _bindGroupResources, _addGroupResources, _bindViewResources, _addLayerResources, _addResourceToFirstLayer, _ref5, _ref6, _ref8, _relateNodeIp;
|
22
|
+
|
21
23
|
var topo = params.topo,
|
22
24
|
topoId = params.topoId,
|
23
25
|
isEditing = params.isEditing,
|
@@ -71,97 +73,87 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
71
73
|
setShowComboResDrawer(true);
|
72
74
|
};
|
73
75
|
|
74
|
-
var onLayerAdded =
|
75
|
-
|
76
|
+
var onLayerAdded = function onLayerAdded(_x) {
|
77
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
76
78
|
var target, direction, config;
|
77
79
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
78
|
-
while (1) {
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
}); // 如果非分层拓扑且有分层,切换到分层模板,设置方向
|
88
|
-
|
89
|
-
if (!(!isLayerTopo && config.layers.length)) {
|
90
|
-
_context.next = 7;
|
91
|
-
break;
|
92
|
-
}
|
80
|
+
while (1) switch (_context.prev = _context.next) {
|
81
|
+
case 0:
|
82
|
+
target = _ref.target, direction = _ref.direction;
|
83
|
+
topo.historyManager.beginTransaction(); // 从拓扑图获取分层和资源配置
|
84
|
+
|
85
|
+
config = resourceConfig.getConfigFromHt(topo.getDataModel());
|
86
|
+
rlog.info("onLayerAdd", {
|
87
|
+
config: config
|
88
|
+
}); // 如果非分层拓扑且有分层,切换到分层模板,设置方向
|
93
89
|
|
90
|
+
if (!(!isLayerTopo && config.layers.length)) {
|
94
91
|
_context.next = 7;
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
92
|
+
break;
|
93
|
+
}
|
94
|
+
|
95
|
+
_context.next = 7;
|
96
|
+
return topoDispatchers.setTopoType(TPL_TREE);
|
97
|
+
|
98
|
+
case 7:
|
99
|
+
// 更新配置
|
100
|
+
// resourceConfig.updateConfig(config);
|
101
|
+
// 更新配置对应的资源、链路
|
102
|
+
// editDispatchers.fetchDataByConfig();
|
103
|
+
topo.historyManager.endTransaction();
|
104
|
+
|
105
|
+
case 8:
|
106
|
+
case "end":
|
107
|
+
return _context.stop();
|
108
108
|
}
|
109
109
|
}, _callee);
|
110
|
-
}));
|
111
|
-
|
112
|
-
return function onLayerAdded(_x) {
|
113
|
-
return _ref2.apply(this, arguments);
|
114
|
-
};
|
115
|
-
}();
|
110
|
+
}))).apply(this, arguments);
|
111
|
+
};
|
116
112
|
|
117
|
-
var deleteLayer =
|
118
|
-
|
113
|
+
var deleteLayer = function deleteLayer(_x2) {
|
114
|
+
return (_ref3 = _ref3 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(layerElement) {
|
119
115
|
var config;
|
120
116
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
121
|
-
while (1) {
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
}); // 如果没有分层,将拓扑类型切换为空白模板
|
131
|
-
|
132
|
-
if (config.layers.length) {
|
133
|
-
_context2.next = 7;
|
134
|
-
break;
|
135
|
-
}
|
117
|
+
while (1) switch (_context2.prev = _context2.next) {
|
118
|
+
case 0:
|
119
|
+
topo.historyManager.beginTransaction();
|
120
|
+
emitEvent(TopoEvent.EVENT_TRIGGER_DELETE, layerElement); // 获取资源配置
|
121
|
+
|
122
|
+
config = resourceConfig.getConfigFromHt(topo.getDataModel());
|
123
|
+
rlog.info("deleteLayer", {
|
124
|
+
config: config
|
125
|
+
}); // 如果没有分层,将拓扑类型切换为空白模板
|
136
126
|
|
127
|
+
if (config.layers.length) {
|
137
128
|
_context2.next = 7;
|
138
|
-
|
129
|
+
break;
|
130
|
+
}
|
139
131
|
|
140
|
-
|
141
|
-
|
142
|
-
return resourceConfig.updateConfig(config);
|
132
|
+
_context2.next = 7;
|
133
|
+
return topoDispatchers.setTopoType(TPL_BLANK);
|
143
134
|
|
144
|
-
|
145
|
-
|
146
|
-
|
135
|
+
case 7:
|
136
|
+
_context2.next = 9;
|
137
|
+
return resourceConfig.updateConfig(config);
|
147
138
|
|
148
|
-
|
149
|
-
|
139
|
+
case 9:
|
140
|
+
_context2.next = 11;
|
141
|
+
return editDispatchers.fetchDataByConfig();
|
150
142
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
143
|
+
case 11:
|
144
|
+
topo.historyManager.endTransaction();
|
145
|
+
|
146
|
+
case 12:
|
147
|
+
case "end":
|
148
|
+
return _context2.stop();
|
155
149
|
}
|
156
150
|
}, _callee2);
|
157
|
-
}));
|
158
|
-
|
159
|
-
return function deleteLayer(_x2) {
|
160
|
-
return _ref3.apply(this, arguments);
|
161
|
-
};
|
162
|
-
}();
|
151
|
+
}))).apply(this, arguments);
|
152
|
+
};
|
163
153
|
|
164
154
|
var handleDeleteLayer = function handleDeleteLayer(layerElement) {
|
155
|
+
var _onOk;
|
156
|
+
|
165
157
|
var hasChildren = !!layerElement.getChildren().toArray().length;
|
166
158
|
|
167
159
|
if (!hasChildren) {
|
@@ -179,28 +171,20 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
179
171
|
messageProps: {
|
180
172
|
type: "warning"
|
181
173
|
},
|
182
|
-
onOk: function () {
|
183
|
-
|
174
|
+
onOk: function onOk() {
|
175
|
+
return (_onOk = _onOk || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
184
176
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
185
|
-
while (1) {
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
return _context3.stop();
|
193
|
-
}
|
177
|
+
while (1) switch (_context3.prev = _context3.next) {
|
178
|
+
case 0:
|
179
|
+
deleteLayer(layerElement);
|
180
|
+
|
181
|
+
case 1:
|
182
|
+
case "end":
|
183
|
+
return _context3.stop();
|
194
184
|
}
|
195
185
|
}, _callee3);
|
196
|
-
}));
|
197
|
-
|
198
|
-
function onOk() {
|
199
|
-
return _onOk.apply(this, arguments);
|
200
|
-
}
|
201
|
-
|
202
|
-
return onOk;
|
203
|
-
}()
|
186
|
+
}))).apply(this, arguments);
|
187
|
+
}
|
204
188
|
});
|
205
189
|
};
|
206
190
|
/**
|
@@ -213,6 +197,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
213
197
|
|
214
198
|
|
215
199
|
var deleteGroup = function deleteGroup(data) {
|
200
|
+
var _onOk2;
|
201
|
+
|
216
202
|
var id = data.id,
|
217
203
|
tag = data.tag; // 新加的容器 tag 格式为 group_${id}
|
218
204
|
|
@@ -237,28 +223,20 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
237
223
|
messageProps: {
|
238
224
|
type: "warning"
|
239
225
|
},
|
240
|
-
onOk: function () {
|
241
|
-
|
226
|
+
onOk: function onOk() {
|
227
|
+
return (_onOk2 = _onOk2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
242
228
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
243
|
-
while (1) {
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
return _context4.stop();
|
251
|
-
}
|
229
|
+
while (1) switch (_context4.prev = _context4.next) {
|
230
|
+
case 0:
|
231
|
+
doDelete();
|
232
|
+
|
233
|
+
case 1:
|
234
|
+
case "end":
|
235
|
+
return _context4.stop();
|
252
236
|
}
|
253
237
|
}, _callee4);
|
254
|
-
}));
|
255
|
-
|
256
|
-
function onOk() {
|
257
|
-
return _onOk2.apply(this, arguments);
|
258
|
-
}
|
259
|
-
|
260
|
-
return onOk;
|
261
|
-
}()
|
238
|
+
}))).apply(this, arguments);
|
239
|
+
}
|
262
240
|
});
|
263
241
|
|
264
242
|
function doDelete() {
|
@@ -295,49 +273,43 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
295
273
|
}; // 删除关联在节点上的出口链路
|
296
274
|
|
297
275
|
|
298
|
-
var deleteExLink =
|
299
|
-
|
276
|
+
var deleteExLink = function deleteExLink(_x3) {
|
277
|
+
return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(node) {
|
300
278
|
var _node$getEdges$toArra, _node$getEdges;
|
301
279
|
|
302
280
|
var config, edges, exportLinkIdList;
|
303
281
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
304
|
-
while (1) {
|
305
|
-
|
306
|
-
|
307
|
-
config = resourceConfig.getConfig(); // console.log("删除关联在节点上的出口链路- node, config", node, config);
|
308
|
-
|
309
|
-
edges = (_node$getEdges$toArra = (_node$getEdges = node.getEdges()) === null || _node$getEdges === void 0 ? void 0 : _node$getEdges.toArray()) !== null && _node$getEdges$toArra !== void 0 ? _node$getEdges$toArra : []; // const exLink = [];
|
310
|
-
|
311
|
-
if (!(edges.length > 0)) {
|
312
|
-
_context5.next = 8;
|
313
|
-
break;
|
314
|
-
}
|
282
|
+
while (1) switch (_context5.prev = _context5.next) {
|
283
|
+
case 0:
|
284
|
+
config = resourceConfig.getConfig(); // console.log("删除关联在节点上的出口链路- node, config", node, config);
|
315
285
|
|
316
|
-
|
286
|
+
edges = (_node$getEdges$toArra = (_node$getEdges = node.getEdges()) === null || _node$getEdges === void 0 ? void 0 : _node$getEdges.toArray()) !== null && _node$getEdges$toArra !== void 0 ? _node$getEdges$toArra : []; // const exLink = [];
|
317
287
|
|
318
|
-
|
319
|
-
if (edge.a("dtype") === "link" && exportLinkIdList.indexOf(edge.getTag()) >= 0) {
|
320
|
-
// exLink.push(edge);
|
321
|
-
topo.getGraphView().dm().remove(edge);
|
322
|
-
exportLinkIdList.splice(config.exportLinkIdList.indexOf(edge.getTag()), 1);
|
323
|
-
}
|
324
|
-
});
|
325
|
-
config.exportLinkIdList = exportLinkIdList;
|
288
|
+
if (!(edges.length > 0)) {
|
326
289
|
_context5.next = 8;
|
327
|
-
|
290
|
+
break;
|
291
|
+
}
|
328
292
|
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
293
|
+
exportLinkIdList = [].concat(config.exportLinkIdList); //console.log("删除关联在节点上的出口链路- edges", edges,exportLinkIdList);
|
294
|
+
|
295
|
+
edges.map(function (edge) {
|
296
|
+
if (edge.a("dtype") === "link" && exportLinkIdList.indexOf(edge.getTag()) >= 0) {
|
297
|
+
// exLink.push(edge);
|
298
|
+
topo.getGraphView().dm().remove(edge);
|
299
|
+
exportLinkIdList.splice(config.exportLinkIdList.indexOf(edge.getTag()), 1);
|
300
|
+
}
|
301
|
+
});
|
302
|
+
config.exportLinkIdList = exportLinkIdList;
|
303
|
+
_context5.next = 8;
|
304
|
+
return resourceConfig.updateConfig(config);
|
305
|
+
|
306
|
+
case 8:
|
307
|
+
case "end":
|
308
|
+
return _context5.stop();
|
333
309
|
}
|
334
310
|
}, _callee5);
|
335
|
-
}));
|
336
|
-
|
337
|
-
return function deleteExLink(_x3) {
|
338
|
-
return _ref4.apply(this, arguments);
|
339
|
-
};
|
340
|
-
}();
|
311
|
+
}))).apply(this, arguments);
|
312
|
+
};
|
341
313
|
|
342
314
|
var onDeleteElement = function onDeleteElement(data) {
|
343
315
|
var dtype = data.dtype;
|
@@ -412,93 +384,109 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
412
384
|
|
413
385
|
|
414
386
|
function bindGroupResources(_x4, _x5) {
|
415
|
-
return _bindGroupResources.
|
416
|
-
|
387
|
+
return (_bindGroupResources = _bindGroupResources || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(group, resources) {
|
388
|
+
var id, tag, _yield$editDispatcher, elements, nodeElements, newLinkElements, updateElements;
|
417
389
|
|
418
|
-
|
419
|
-
|
420
|
-
|
390
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
391
|
+
while (1) switch (_context6.prev = _context6.next) {
|
392
|
+
case 0:
|
393
|
+
id = group.id, tag = group.tag;
|
394
|
+
rlog.debug("bindGroupResources--id, tag", id, tag);
|
395
|
+
topo.historyManager.beginTransaction();
|
396
|
+
_context6.next = 5;
|
397
|
+
return resourceConfig.updateGroupResources(group, resources);
|
398
|
+
|
399
|
+
case 5:
|
400
|
+
_context6.next = 7;
|
401
|
+
return editDispatchers.fetchDataByConfig();
|
402
|
+
|
403
|
+
case 7:
|
404
|
+
_yield$editDispatcher = _context6.sent;
|
405
|
+
elements = _yield$editDispatcher.elements;
|
406
|
+
// 区域里的子区域及子区域的节点、新增的链路
|
407
|
+
nodeElements = findGroupChildren(elements, group);
|
408
|
+
newLinkElements = findUNExistedLinkElements(elements);
|
409
|
+
updateElements = [].concat(nodeElements, newLinkElements);
|
410
|
+
|
411
|
+
if (updateElements.length) {
|
412
|
+
saveBind(TopoEvent.DATA_TYPE_RESOURCE_CONTAINER, updateElements); // 临时放这里,仅拓扑中心有
|
421
413
|
|
422
|
-
|
423
|
-
|
424
|
-
switch (_context11.prev = _context11.next) {
|
425
|
-
case 0:
|
426
|
-
id = group.id, tag = group.tag;
|
427
|
-
rlog.debug("bindGroupResources--id, tag", id, tag);
|
428
|
-
topo.historyManager.beginTransaction();
|
429
|
-
_context11.next = 5;
|
430
|
-
return resourceConfig.updateGroupResources(group, resources);
|
431
|
-
|
432
|
-
case 5:
|
433
|
-
_context11.next = 7;
|
434
|
-
return editDispatchers.fetchDataByConfig();
|
435
|
-
|
436
|
-
case 7:
|
437
|
-
_yield$editDispatcher2 = _context11.sent;
|
438
|
-
elements = _yield$editDispatcher2.elements;
|
439
|
-
// 区域里的子区域及子区域的节点、新增的链路
|
440
|
-
nodeElements = findGroupChildren(elements, group);
|
441
|
-
newLinkElements = findUNExistedLinkElements(elements);
|
442
|
-
updateElements = [].concat(nodeElements, newLinkElements);
|
443
|
-
|
444
|
-
if (updateElements.length) {
|
445
|
-
saveBind(TopoEvent.DATA_TYPE_RESOURCE_CONTAINER, updateElements); // 临时放这里,仅拓扑中心有
|
446
|
-
|
447
|
-
if (topo.linkDynamicStyleExecutor) {
|
448
|
-
topo.linkDynamicStyleExecutor.execute();
|
449
|
-
}
|
414
|
+
if (topo.linkDynamicStyleExecutor) {
|
415
|
+
topo.linkDynamicStyleExecutor.execute();
|
450
416
|
}
|
417
|
+
}
|
451
418
|
|
452
|
-
|
419
|
+
topo.historyManager.endTransaction();
|
453
420
|
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
}
|
421
|
+
case 14:
|
422
|
+
case "end":
|
423
|
+
return _context6.stop();
|
458
424
|
}
|
459
|
-
},
|
460
|
-
}));
|
461
|
-
return _bindGroupResources.apply(this, arguments);
|
425
|
+
}, _callee6);
|
426
|
+
}))).apply(this, arguments);
|
462
427
|
}
|
463
428
|
|
464
429
|
function addGroupResources(_x6, _x7) {
|
465
|
-
return _addGroupResources.
|
430
|
+
return (_addGroupResources = _addGroupResources || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(group, newResourceIds) {
|
431
|
+
var groupConfig, resources, groupData;
|
432
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
433
|
+
while (1) switch (_context7.prev = _context7.next) {
|
434
|
+
case 0:
|
435
|
+
groupConfig = resourceConfig.getGroupConfigByElement(group);
|
436
|
+
resources = {
|
437
|
+
"static": [].concat(groupConfig.resources["static"], newResourceIds)
|
438
|
+
};
|
439
|
+
groupData = {
|
440
|
+
id: group.getTag(),
|
441
|
+
tag: group.a("tag")
|
442
|
+
};
|
443
|
+
_context7.next = 5;
|
444
|
+
return bindGroupResources(groupData, resources, newResourceIds);
|
445
|
+
|
446
|
+
case 5:
|
447
|
+
case "end":
|
448
|
+
return _context7.stop();
|
449
|
+
}
|
450
|
+
}, _callee7);
|
451
|
+
}))).apply(this, arguments);
|
466
452
|
}
|
467
453
|
/**
|
468
454
|
* 关联视图的资源
|
469
455
|
*/
|
470
456
|
|
471
457
|
|
472
|
-
function
|
473
|
-
|
474
|
-
var
|
475
|
-
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
476
|
-
while (1) {
|
477
|
-
switch (_context12.prev = _context12.next) {
|
478
|
-
case 0:
|
479
|
-
groupConfig = resourceConfig.getGroupConfigByElement(group);
|
480
|
-
resources = {
|
481
|
-
"static": [].concat(groupConfig.resources["static"], newResourceIds)
|
482
|
-
};
|
483
|
-
groupData = {
|
484
|
-
id: group.getTag(),
|
485
|
-
tag: group.a("tag")
|
486
|
-
};
|
487
|
-
_context12.next = 5;
|
488
|
-
return bindGroupResources(groupData, resources, newResourceIds);
|
458
|
+
function bindViewResources(_x8) {
|
459
|
+
return (_bindViewResources = _bindViewResources || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(data) {
|
460
|
+
var config, _yield$editDispatcher2, elements;
|
489
461
|
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
462
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
463
|
+
while (1) switch (_context8.prev = _context8.next) {
|
464
|
+
case 0:
|
465
|
+
// console.log("关联视图的资源", data);
|
466
|
+
config = resourceConfig.getConfig();
|
467
|
+
config.resources = data;
|
468
|
+
_context8.next = 4;
|
469
|
+
return resourceConfig.updateConfig(config);
|
470
|
+
|
471
|
+
case 4:
|
472
|
+
_context8.next = 6;
|
473
|
+
return editDispatchers.fetchDataByConfig();
|
474
|
+
|
475
|
+
case 6:
|
476
|
+
_yield$editDispatcher2 = _context8.sent;
|
477
|
+
elements = _yield$editDispatcher2.elements;
|
478
|
+
saveBind(TopoEvent.DATA_TYPE_RESOURCE_COMBO, elements); // 临时放这里,仅拓扑中心有
|
479
|
+
|
480
|
+
if (topo.linkDynamicStyleExecutor) {
|
481
|
+
topo.linkDynamicStyleExecutor.execute();
|
482
|
+
}
|
499
483
|
|
500
|
-
|
501
|
-
|
484
|
+
case 10:
|
485
|
+
case "end":
|
486
|
+
return _context8.stop();
|
487
|
+
}
|
488
|
+
}, _callee8);
|
489
|
+
}))).apply(this, arguments);
|
502
490
|
}
|
503
491
|
/**
|
504
492
|
* 分层添加资源
|
@@ -508,119 +496,68 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
508
496
|
*/
|
509
497
|
|
510
498
|
|
511
|
-
function _bindViewResources() {
|
512
|
-
_bindViewResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(data) {
|
513
|
-
var config, _yield$editDispatcher3, elements;
|
514
|
-
|
515
|
-
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
516
|
-
while (1) {
|
517
|
-
switch (_context13.prev = _context13.next) {
|
518
|
-
case 0:
|
519
|
-
// console.log("关联视图的资源", data);
|
520
|
-
config = resourceConfig.getConfig();
|
521
|
-
config.resources = data;
|
522
|
-
_context13.next = 4;
|
523
|
-
return resourceConfig.updateConfig(config);
|
524
|
-
|
525
|
-
case 4:
|
526
|
-
_context13.next = 6;
|
527
|
-
return editDispatchers.fetchDataByConfig();
|
528
|
-
|
529
|
-
case 6:
|
530
|
-
_yield$editDispatcher3 = _context13.sent;
|
531
|
-
elements = _yield$editDispatcher3.elements;
|
532
|
-
saveBind(TopoEvent.DATA_TYPE_RESOURCE_COMBO, elements); // 临时放这里,仅拓扑中心有
|
533
|
-
|
534
|
-
if (topo.linkDynamicStyleExecutor) {
|
535
|
-
topo.linkDynamicStyleExecutor.execute();
|
536
|
-
}
|
537
|
-
|
538
|
-
case 10:
|
539
|
-
case "end":
|
540
|
-
return _context13.stop();
|
541
|
-
}
|
542
|
-
}
|
543
|
-
}, _callee13);
|
544
|
-
}));
|
545
|
-
return _bindViewResources.apply(this, arguments);
|
546
|
-
}
|
547
|
-
|
548
499
|
function addLayerResources(_x9, _x10) {
|
549
|
-
return _addLayerResources.
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
topo.getHtTopo().addElements(newElements); // 临时放这里,仅拓扑中心有
|
579
|
-
|
580
|
-
if (topo.linkDynamicStyleExecutor) {
|
581
|
-
topo.linkDynamicStyleExecutor.execute();
|
582
|
-
}
|
500
|
+
return (_addLayerResources = _addLayerResources || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(group, newResourceIds) {
|
501
|
+
var _yield$editDispatcher3, elements, newElements;
|
502
|
+
|
503
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
504
|
+
while (1) switch (_context9.prev = _context9.next) {
|
505
|
+
case 0:
|
506
|
+
topo.historyManager.beginTransaction(); // 构造新的配置
|
507
|
+
|
508
|
+
_context9.next = 3;
|
509
|
+
return resourceConfig.addLayerStaticResources(group, newResourceIds);
|
510
|
+
|
511
|
+
case 3:
|
512
|
+
_context9.next = 5;
|
513
|
+
return editDispatchers.fetchDataByConfig();
|
514
|
+
|
515
|
+
case 5:
|
516
|
+
_yield$editDispatcher3 = _context9.sent;
|
517
|
+
elements = _yield$editDispatcher3.elements;
|
518
|
+
// 2022-11-10 修复 添加资源后分层重新布局问题,仅布局新增资源。替换api topo.updateElements(data)
|
519
|
+
newElements = findUNExistedElements(elements);
|
520
|
+
rlog.debug("添加分层资源", {
|
521
|
+
layer: group,
|
522
|
+
newElements: newElements
|
523
|
+
});
|
524
|
+
topo.getHtTopo().addElements(newElements); // 临时放这里,仅拓扑中心有
|
525
|
+
|
526
|
+
if (topo.linkDynamicStyleExecutor) {
|
527
|
+
topo.linkDynamicStyleExecutor.execute();
|
528
|
+
}
|
583
529
|
|
584
|
-
|
585
|
-
|
530
|
+
topo.historyManager.endTransaction();
|
531
|
+
topo.getHtTopo().getGraphView().fitContent(undefined, undefined, true); // 添加资源后隐藏资源面板
|
586
532
|
|
587
|
-
|
588
|
-
|
589
|
-
|
533
|
+
topoEditDispatchers.update({
|
534
|
+
resourceTabActiveKey: null
|
535
|
+
});
|
590
536
|
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
}
|
537
|
+
case 14:
|
538
|
+
case "end":
|
539
|
+
return _context9.stop();
|
595
540
|
}
|
596
|
-
},
|
597
|
-
}));
|
598
|
-
return _addLayerResources.apply(this, arguments);
|
541
|
+
}, _callee9);
|
542
|
+
}))).apply(this, arguments);
|
599
543
|
}
|
600
544
|
|
601
545
|
function addResourceToFirstLayer(_x11) {
|
602
|
-
return _addResourceToFirstLayer.
|
603
|
-
}
|
604
|
-
|
605
|
-
function _addResourceToFirstLayer() {
|
606
|
-
_addResourceToFirstLayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(data) {
|
546
|
+
return (_addResourceToFirstLayer = _addResourceToFirstLayer || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(data) {
|
607
547
|
var group;
|
608
|
-
return _regeneratorRuntime.wrap(function
|
609
|
-
while (1) {
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
return _context15.stop();
|
619
|
-
}
|
548
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
549
|
+
while (1) switch (_context10.prev = _context10.next) {
|
550
|
+
case 0:
|
551
|
+
group = resourceConfig.getGroups()[0];
|
552
|
+
_context10.next = 3;
|
553
|
+
return addLayerResources(group, data);
|
554
|
+
|
555
|
+
case 3:
|
556
|
+
case "end":
|
557
|
+
return _context10.stop();
|
620
558
|
}
|
621
|
-
},
|
622
|
-
}));
|
623
|
-
return _addResourceToFirstLayer.apply(this, arguments);
|
559
|
+
}, _callee10);
|
560
|
+
}))).apply(this, arguments);
|
624
561
|
}
|
625
562
|
|
626
563
|
function getAddResourceType() {
|
@@ -649,109 +586,91 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
649
586
|
*/
|
650
587
|
|
651
588
|
|
652
|
-
var onSaveComboRes =
|
653
|
-
|
654
|
-
return _regeneratorRuntime.wrap(function
|
655
|
-
while (1) {
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
topo.historyManager.beginTransaction();
|
660
|
-
|
661
|
-
if (!(getAddResourceType() === "addToFirstLayer")) {
|
662
|
-
_context6.next = 7;
|
663
|
-
break;
|
664
|
-
}
|
665
|
-
|
666
|
-
_context6.next = 5;
|
667
|
-
return addResourceToFirstLayer(data);
|
589
|
+
var onSaveComboRes = function onSaveComboRes(_x12) {
|
590
|
+
return (_ref5 = _ref5 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(data) {
|
591
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
592
|
+
while (1) switch (_context11.prev = _context11.next) {
|
593
|
+
case 0:
|
594
|
+
rlog.debug("关联资源-----onSaveComboRes", data);
|
595
|
+
topo.historyManager.beginTransaction();
|
668
596
|
|
669
|
-
|
670
|
-
|
597
|
+
if (!(getAddResourceType() === "addToFirstLayer")) {
|
598
|
+
_context11.next = 7;
|
671
599
|
break;
|
600
|
+
}
|
672
601
|
|
673
|
-
|
674
|
-
|
675
|
-
return bindViewResources(data);
|
602
|
+
_context11.next = 5;
|
603
|
+
return addResourceToFirstLayer(data);
|
676
604
|
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
topoEditDispatchers.update({
|
681
|
-
resourceTabActiveKey: null
|
682
|
-
});
|
605
|
+
case 5:
|
606
|
+
_context11.next = 9;
|
607
|
+
break;
|
683
608
|
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
609
|
+
case 7:
|
610
|
+
_context11.next = 9;
|
611
|
+
return bindViewResources(data);
|
612
|
+
|
613
|
+
case 9:
|
614
|
+
topo.historyManager.endTransaction();
|
615
|
+
topo.getHtTopo().fitContent();
|
616
|
+
topoEditDispatchers.update({
|
617
|
+
resourceTabActiveKey: null
|
618
|
+
});
|
619
|
+
|
620
|
+
case 12:
|
621
|
+
case "end":
|
622
|
+
return _context11.stop();
|
688
623
|
}
|
689
|
-
},
|
690
|
-
}));
|
624
|
+
}, _callee11);
|
625
|
+
}))).apply(this, arguments);
|
626
|
+
};
|
691
627
|
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
}();
|
628
|
+
var onSaveTopo = function onSaveTopo(_x13) {
|
629
|
+
return (_ref6 = _ref6 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(data) {
|
630
|
+
var id, config, serialize, _config$layout, template, layout, _ref7, saveConfig;
|
696
631
|
|
697
|
-
|
698
|
-
|
699
|
-
|
632
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
633
|
+
while (1) switch (_context13.prev = _context13.next) {
|
634
|
+
case 0:
|
635
|
+
id = data.id, config = data.config, serialize = data.serialize;
|
636
|
+
_config$layout = config === null || config === void 0 ? void 0 : config.layout, template = _config$layout.type, layout = _config$layout.layout;
|
637
|
+
|
638
|
+
if (onSave) {
|
639
|
+
// 自定义保存
|
640
|
+
saveConfig = function saveConfig() {
|
641
|
+
return (_ref7 = _ref7 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
642
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
643
|
+
while (1) switch (_context12.prev = _context12.next) {
|
644
|
+
case 0:
|
645
|
+
_context12.next = 2;
|
646
|
+
return editDispatchers.saveTopo({
|
647
|
+
id: id,
|
648
|
+
layout: layout,
|
649
|
+
serialize: serialize
|
650
|
+
});
|
651
|
+
|
652
|
+
case 2:
|
653
|
+
case "end":
|
654
|
+
return _context12.stop();
|
655
|
+
}
|
656
|
+
}, _callee12);
|
657
|
+
}))).apply(this, arguments);
|
658
|
+
};
|
700
659
|
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
if (onSave) {
|
709
|
-
// 自定义保存
|
710
|
-
saveConfig = /*#__PURE__*/function () {
|
711
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
712
|
-
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
713
|
-
while (1) {
|
714
|
-
switch (_context7.prev = _context7.next) {
|
715
|
-
case 0:
|
716
|
-
_context7.next = 2;
|
717
|
-
return editDispatchers.saveTopo({
|
718
|
-
id: id,
|
719
|
-
layout: layout,
|
720
|
-
serialize: serialize
|
721
|
-
});
|
722
|
-
|
723
|
-
case 2:
|
724
|
-
case "end":
|
725
|
-
return _context7.stop();
|
726
|
-
}
|
727
|
-
}
|
728
|
-
}, _callee7);
|
729
|
-
}));
|
730
|
-
|
731
|
-
return function saveConfig() {
|
732
|
-
return _ref7.apply(this, arguments);
|
733
|
-
};
|
734
|
-
}();
|
735
|
-
|
736
|
-
onSave({
|
737
|
-
topo: topo,
|
738
|
-
data: data,
|
739
|
-
saveConfig: saveConfig
|
740
|
-
});
|
741
|
-
}
|
660
|
+
onSave({
|
661
|
+
topo: topo,
|
662
|
+
data: data,
|
663
|
+
saveConfig: saveConfig
|
664
|
+
});
|
665
|
+
}
|
742
666
|
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
}
|
667
|
+
case 3:
|
668
|
+
case "end":
|
669
|
+
return _context13.stop();
|
747
670
|
}
|
748
|
-
},
|
749
|
-
}));
|
750
|
-
|
751
|
-
return function onSaveTopo(_x13) {
|
752
|
-
return _ref6.apply(this, arguments);
|
753
|
-
};
|
754
|
-
}();
|
671
|
+
}, _callee13);
|
672
|
+
}))).apply(this, arguments);
|
673
|
+
};
|
755
674
|
|
756
675
|
var saveBind = function saveBind(type, data) {
|
757
676
|
var eventData = {
|
@@ -774,284 +693,266 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
774
693
|
*/
|
775
694
|
|
776
695
|
|
777
|
-
var bindNodeResource =
|
778
|
-
|
779
|
-
var
|
696
|
+
var bindNodeResource = function bindNodeResource(_x14) {
|
697
|
+
return (_ref8 = _ref8 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(params) {
|
698
|
+
var _doBind;
|
780
699
|
|
781
|
-
|
782
|
-
while (1) {
|
783
|
-
switch (_context10.prev = _context10.next) {
|
784
|
-
case 0:
|
785
|
-
replaceOrAddRes = function _replaceOrAddRes(resources, oldResId, newResId) {
|
786
|
-
return _extends({}, resources, {
|
787
|
-
"static": [].concat(resources["static"].filter(function (item) {
|
788
|
-
return item !== oldResId;
|
789
|
-
}), [newResId])
|
790
|
-
});
|
791
|
-
};
|
700
|
+
var id, oldResId, newResId, node, parentGroupElement, htTopo, config, groupId, groupTag, _yield$editDispatcher4, elements, newData, doBind, replaceOrAddRes;
|
792
701
|
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
linkGroups: newLinkElements.filter(function (item) {
|
825
|
-
return item.type === "linkGroup";
|
826
|
-
})
|
827
|
-
};
|
828
|
-
htTopo.createElements(createElementsData); // 切换前图上如果存在集群内的节点,切换节点为集群后,移到集群内
|
829
|
-
|
830
|
-
groupElement = dm.getDataByTag(newData.id);
|
831
|
-
existedGroupChildren.forEach(function (groupChildData) {
|
832
|
-
var nodeElement = dm.getDataByTag(groupChildData.id);
|
833
|
-
nodeElement.setParent(groupElement);
|
834
|
-
});
|
702
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
703
|
+
while (1) switch (_context15.prev = _context15.next) {
|
704
|
+
case 0:
|
705
|
+
replaceOrAddRes = function _replaceOrAddRes(resources, oldResId, newResId) {
|
706
|
+
return _extends({}, resources, {
|
707
|
+
"static": [].concat(resources["static"].filter(function (item) {
|
708
|
+
return item !== oldResId;
|
709
|
+
}), [newResId])
|
710
|
+
});
|
711
|
+
};
|
712
|
+
|
713
|
+
doBind = function _doBind2() {
|
714
|
+
return (_doBind = _doBind || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
715
|
+
var dm, newLinkElements, createElementsData, groupChildren, newGroupChildren, existedGroupChildren, groupElement, newElement, sm;
|
716
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
717
|
+
while (1) switch (_context14.prev = _context14.next) {
|
718
|
+
case 0:
|
719
|
+
dm = htTopo.getGraphView().dm(); // 创建
|
720
|
+
|
721
|
+
newLinkElements = findUNExistedLinkElements(elements);
|
722
|
+
createElementsData = null;
|
723
|
+
|
724
|
+
if (newData.type === "group") {
|
725
|
+
groupChildren = findGroupChildren(elements, newData);
|
726
|
+
newGroupChildren = [];
|
727
|
+
existedGroupChildren = [];
|
728
|
+
groupChildren.forEach(function (groupChildData) {
|
729
|
+
var ele = dm.getDataByTag(groupChildData.id);
|
730
|
+
|
731
|
+
if (ele) {
|
732
|
+
existedGroupChildren.push(groupChildData);
|
835
733
|
} else {
|
836
|
-
|
837
|
-
groups: [],
|
838
|
-
nodes: [newData],
|
839
|
-
links: newLinkElements.filter(function (item) {
|
840
|
-
return item.type === "link";
|
841
|
-
}),
|
842
|
-
linkGroups: newLinkElements.filter(function (item) {
|
843
|
-
return item.type === "linkGroup";
|
844
|
-
})
|
845
|
-
};
|
846
|
-
htTopo.createElements(createElementsData);
|
734
|
+
newGroupChildren.push(groupChildData);
|
847
735
|
}
|
736
|
+
});
|
737
|
+
createElementsData = {
|
738
|
+
groups: [newData],
|
739
|
+
nodes: newGroupChildren,
|
740
|
+
links: newLinkElements.filter(function (item) {
|
741
|
+
return item.type === "link";
|
742
|
+
}),
|
743
|
+
linkGroups: newLinkElements.filter(function (item) {
|
744
|
+
return item.type === "linkGroup";
|
745
|
+
})
|
746
|
+
};
|
747
|
+
htTopo.createElements(createElementsData); // 切换前图上如果存在集群内的节点,切换节点为集群后,移到集群内
|
748
|
+
|
749
|
+
groupElement = dm.getDataByTag(newData.id);
|
750
|
+
existedGroupChildren.forEach(function (groupChildData) {
|
751
|
+
var nodeElement = dm.getDataByTag(groupChildData.id);
|
752
|
+
nodeElement.setParent(groupElement);
|
753
|
+
});
|
754
|
+
} else {
|
755
|
+
createElementsData = {
|
756
|
+
groups: [],
|
757
|
+
nodes: [newData],
|
758
|
+
links: newLinkElements.filter(function (item) {
|
759
|
+
return item.type === "link";
|
760
|
+
}),
|
761
|
+
linkGroups: newLinkElements.filter(function (item) {
|
762
|
+
return item.type === "linkGroup";
|
763
|
+
})
|
764
|
+
};
|
765
|
+
htTopo.createElements(createElementsData);
|
766
|
+
}
|
848
767
|
|
849
|
-
|
850
|
-
|
851
|
-
newElement = dm.getDataByTag(newData.id);
|
768
|
+
rlog.debug("批量创建元素", createElementsData); // 恢复图标、大小、位置
|
852
769
|
|
853
|
-
|
854
|
-
newElement.setSize(node.getSize());
|
855
|
-
newElement.setPosition(node.getPosition());
|
856
|
-
newElement.setImage(node.getImage());
|
857
|
-
} // 选中
|
770
|
+
newElement = dm.getDataByTag(newData.id);
|
858
771
|
|
772
|
+
if (newElement) {
|
773
|
+
newElement.setSize(node.getSize());
|
774
|
+
newElement.setPosition(node.getPosition());
|
775
|
+
newElement.setImage(node.getImage());
|
776
|
+
} // 选中
|
859
777
|
|
860
|
-
sm = htTopo.getGraphView().sm();
|
861
|
-
sm.setSelection([newElement]); // 移除旧节点
|
862
778
|
|
863
|
-
|
864
|
-
|
865
|
-
// 删除关联在节点上的出口链路
|
779
|
+
sm = htTopo.getGraphView().sm();
|
780
|
+
sm.setSelection([newElement]); // 移除旧节点
|
866
781
|
|
867
|
-
|
868
|
-
|
782
|
+
dm.remove(node); // saveBind(TopoEvent.DATA_TYPE_RESOURCE_SINGLE, newDatas);
|
783
|
+
// node.a("customName", null);
|
784
|
+
// 删除关联在节点上的出口链路
|
869
785
|
|
870
|
-
|
871
|
-
|
872
|
-
if (topo.linkDynamicStyleExecutor) {
|
873
|
-
topo.linkDynamicStyleExecutor.execute();
|
874
|
-
}
|
786
|
+
_context14.next = 12;
|
787
|
+
return deleteExLink(node);
|
875
788
|
|
876
|
-
|
877
|
-
|
878
|
-
|
789
|
+
case 12:
|
790
|
+
// 临时放这里,仅拓扑中心有
|
791
|
+
if (topo.linkDynamicStyleExecutor) {
|
792
|
+
topo.linkDynamicStyleExecutor.execute();
|
879
793
|
}
|
880
|
-
}
|
881
|
-
}, _callee9);
|
882
|
-
}));
|
883
|
-
return _doBind.apply(this, arguments);
|
884
|
-
};
|
885
794
|
|
886
|
-
|
887
|
-
|
888
|
-
|
795
|
+
case 13:
|
796
|
+
case "end":
|
797
|
+
return _context14.stop();
|
798
|
+
}
|
799
|
+
}, _callee14);
|
800
|
+
}))).apply(this, arguments);
|
801
|
+
};
|
889
802
|
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
803
|
+
topo.historyManager.beginTransaction();
|
804
|
+
id = params.id, oldResId = params.oldResId, newResId = params.newResId;
|
805
|
+
rlog.debug("bindNodeResource", params);
|
806
|
+
node = topo.getDataModel().getDataById(id); // 节点所属容器
|
894
807
|
|
895
|
-
|
896
|
-
|
897
|
-
|
808
|
+
parentGroupElement = node.getParent();
|
809
|
+
htTopo = topo.getHtTopo();
|
810
|
+
config = resourceConfig.getConfig();
|
898
811
|
|
899
|
-
|
900
|
-
|
901
|
-
|
812
|
+
if (parentGroupElement) {
|
813
|
+
// 在容器中
|
814
|
+
groupId = parentGroupElement.getTag(); // 容器业务id
|
902
815
|
|
903
|
-
|
816
|
+
groupTag = parentGroupElement.a("tag"); // 容器临时id
|
904
817
|
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
818
|
+
config.groups = config.groups.map(function (g) {
|
819
|
+
// 匹配到容器,替换资源或增加
|
820
|
+
if (g.id === groupId || g.tag === groupTag) {
|
821
|
+
return _extends({}, g, {
|
822
|
+
resources: replaceOrAddRes(g.resources, oldResId, newResId)
|
823
|
+
});
|
824
|
+
} // 未匹配到容器
|
912
825
|
|
913
826
|
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
827
|
+
return g;
|
828
|
+
});
|
829
|
+
} else {
|
830
|
+
// 在画布上
|
831
|
+
config.resources = replaceOrAddRes(config.resources, oldResId, newResId);
|
832
|
+
}
|
920
833
|
|
921
|
-
|
922
|
-
|
834
|
+
_context15.next = 12;
|
835
|
+
return resourceConfig.updateConfig(config);
|
923
836
|
|
924
|
-
|
925
|
-
|
926
|
-
|
837
|
+
case 12:
|
838
|
+
_context15.next = 14;
|
839
|
+
return editDispatchers.fetchDataByConfig();
|
927
840
|
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
841
|
+
case 14:
|
842
|
+
_yield$editDispatcher4 = _context15.sent;
|
843
|
+
elements = _yield$editDispatcher4.elements;
|
844
|
+
newData = elements.find(function (item) {
|
845
|
+
return item.id === newResId;
|
846
|
+
});
|
934
847
|
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
848
|
+
if (newData) {
|
849
|
+
_context15.next = 22;
|
850
|
+
break;
|
851
|
+
}
|
939
852
|
|
940
|
-
|
853
|
+
_Message.error("关联资源失败");
|
941
854
|
|
942
|
-
|
943
|
-
|
944
|
-
|
855
|
+
rlog.warn("关联资源失败");
|
856
|
+
topo.historyManager.endTransaction();
|
857
|
+
return _context15.abrupt("return", false);
|
945
858
|
|
946
|
-
|
947
|
-
|
948
|
-
|
859
|
+
case 22:
|
860
|
+
_context15.next = 24;
|
861
|
+
return doBind();
|
949
862
|
|
950
|
-
|
951
|
-
|
863
|
+
case 24:
|
864
|
+
topo.historyManager.endTransaction();
|
952
865
|
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
}
|
866
|
+
case 25:
|
867
|
+
case "end":
|
868
|
+
return _context15.stop();
|
957
869
|
}
|
958
|
-
},
|
959
|
-
}));
|
960
|
-
|
961
|
-
return function bindNodeResource(_x14) {
|
962
|
-
return _ref8.apply(this, arguments);
|
963
|
-
};
|
964
|
-
}();
|
870
|
+
}, _callee15);
|
871
|
+
}))).apply(this, arguments);
|
872
|
+
};
|
965
873
|
/**
|
966
874
|
* 关联IP的图片节点
|
967
875
|
*/
|
968
876
|
|
969
877
|
|
970
878
|
function relateNodeIp(_x15, _x16) {
|
971
|
-
return _relateNodeIp.
|
972
|
-
}
|
973
|
-
|
974
|
-
function _relateNodeIp() {
|
975
|
-
_relateNodeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(txtValue, nodeElement) {
|
879
|
+
return (_relateNodeIp = _relateNodeIp || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(txtValue, nodeElement) {
|
976
880
|
var dm, isUnique, ip, configObj, configData, _elements, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
|
977
881
|
|
978
882
|
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
979
|
-
while (1) {
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
}
|
986
|
-
|
987
|
-
return _context16.abrupt("return");
|
988
|
-
|
989
|
-
case 2:
|
990
|
-
// if (txtValue === nodeElement.a('bindIp')) {
|
991
|
-
// return;
|
992
|
-
// }
|
993
|
-
// 根据配置查询拓扑数据
|
994
|
-
dm = topo.getDataModel(); // 执行唯一性验证
|
995
|
-
|
996
|
-
isUnique = isUniqueIp(dm, txtValue, nodeElement); // 获取关联链路
|
997
|
-
|
998
|
-
if (!isUnique) {
|
999
|
-
_context16.next = 23;
|
1000
|
-
break;
|
1001
|
-
}
|
1002
|
-
|
1003
|
-
ip = buildIpNode(txtValue);
|
1004
|
-
_context16.next = 8;
|
1005
|
-
return deleteExLink(nodeElement);
|
883
|
+
while (1) switch (_context16.prev = _context16.next) {
|
884
|
+
case 0:
|
885
|
+
if (txtValue) {
|
886
|
+
_context16.next = 2;
|
887
|
+
break;
|
888
|
+
}
|
1006
889
|
|
1007
|
-
|
1008
|
-
nodeElement.a(ip);
|
1009
|
-
nodeElement.setName(txtValue);
|
1010
|
-
nodeElement.setTag("ip:" + txtValue); // 获取配置
|
890
|
+
return _context16.abrupt("return");
|
1011
891
|
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
892
|
+
case 2:
|
893
|
+
// if (txtValue === nodeElement.a('bindIp')) {
|
894
|
+
// return;
|
895
|
+
// }
|
896
|
+
// 根据配置查询拓扑数据
|
897
|
+
dm = topo.getDataModel(); // 执行唯一性验证
|
1015
898
|
|
1016
|
-
|
1017
|
-
_context16.next = 16;
|
1018
|
-
return editDispatchers.fetchDataByConfig();
|
899
|
+
isUnique = isUniqueIp(dm, txtValue, nodeElement); // 获取关联链路
|
1019
900
|
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
newLinkElements = findUNExistedLinkElements(_elements); // console.log("configData", configData, newLinkElements);
|
901
|
+
if (!isUnique) {
|
902
|
+
_context16.next = 23;
|
903
|
+
break;
|
904
|
+
}
|
1025
905
|
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
906
|
+
ip = buildIpNode(txtValue);
|
907
|
+
_context16.next = 8;
|
908
|
+
return deleteExLink(nodeElement);
|
909
|
+
|
910
|
+
case 8:
|
911
|
+
nodeElement.a(ip);
|
912
|
+
nodeElement.setName(txtValue);
|
913
|
+
nodeElement.setTag("ip:" + txtValue); // 获取配置
|
914
|
+
|
915
|
+
configObj = topo.resourceConfig.getConfig();
|
916
|
+
_context16.next = 14;
|
917
|
+
return resourceConfig.updateConfig(configObj);
|
918
|
+
|
919
|
+
case 14:
|
920
|
+
_context16.next = 16;
|
921
|
+
return editDispatchers.fetchDataByConfig();
|
922
|
+
|
923
|
+
case 16:
|
924
|
+
configData = _context16.sent;
|
925
|
+
// console.log("configData",configObj, configData);
|
926
|
+
_elements = configData.elements;
|
927
|
+
newLinkElements = findUNExistedLinkElements(_elements); // console.log("configData", configData, newLinkElements);
|
928
|
+
|
929
|
+
newLink = newLinkElements.filter(function (item) {
|
930
|
+
return item.type === "link";
|
931
|
+
});
|
932
|
+
newLinkGroup = newLinkElements.filter(function (item) {
|
933
|
+
return item.type === "linkGroup";
|
934
|
+
}); // const newData = elements.find((item) => item.id === `ip:${txtValue}`);
|
935
|
+
// console.log("newData",newLinkElements, newLink);
|
936
|
+
|
937
|
+
createElementsData = {
|
938
|
+
groups: [],
|
939
|
+
nodes: [],
|
940
|
+
links: newLink,
|
941
|
+
linkGroups: newLinkGroup
|
942
|
+
}; // console.log("createElementsData", createElementsData);
|
943
|
+
|
944
|
+
if ([].concat(newLink, newLinkGroup).length > 0) {
|
945
|
+
_htTopo = topo.getHtTopo();
|
946
|
+
|
947
|
+
_htTopo.createElements(createElementsData);
|
948
|
+
}
|
1046
949
|
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
}
|
950
|
+
case 23:
|
951
|
+
case "end":
|
952
|
+
return _context16.stop();
|
1051
953
|
}
|
1052
954
|
}, _callee16);
|
1053
|
-
}));
|
1054
|
-
return _relateNodeIp.apply(this, arguments);
|
955
|
+
}))).apply(this, arguments);
|
1055
956
|
}
|
1056
957
|
|
1057
958
|
var onEvent = function onEvent(e) {
|