@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
@@ -56,19 +56,22 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
|
56
56
|
var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
|
57
57
|
|
58
58
|
// eslint-disable-next-line no-undef
|
59
|
-
var version = typeof "11.0.
|
59
|
+
var version = typeof "11.0.35" === 'string' ? "11.0.35" : null;
|
60
60
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
61
61
|
/**
|
62
62
|
* 拓扑显示和编辑
|
63
63
|
*/
|
64
64
|
|
65
65
|
var Topo = /*#__PURE__*/function () {
|
66
|
-
|
67
|
-
|
68
|
-
*/
|
66
|
+
var _exit, _load, _clear, _updateElements, _addElements, _updateData, _open, _close, _refresh, _openViewMode, _onTopoDataLoaded, _enterEditMode, _exitEditMode, _triggerSaveEvent, _save, _exportImage, _switchToViewMode, _switchToEditMode;
|
67
|
+
|
69
68
|
function Topo(options) {
|
70
69
|
this.options = void 0;
|
71
70
|
this.id = void 0;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* @type TopoGraphView
|
74
|
+
*/
|
72
75
|
this.view = void 0;
|
73
76
|
this.alarm = new _Alarm["default"]();
|
74
77
|
this.store = void 0;
|
@@ -124,95 +127,69 @@ var Topo = /*#__PURE__*/function () {
|
|
124
127
|
*/
|
125
128
|
;
|
126
129
|
|
127
|
-
_proto.exit =
|
128
|
-
|
129
|
-
function () {
|
130
|
-
var _exit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
130
|
+
_proto.exit = function exit() {
|
131
|
+
return (_exit = _exit || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
131
132
|
var topoDispatchers;
|
132
133
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
133
|
-
while (1) {
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
return _context.stop();
|
146
|
-
}
|
134
|
+
while (1) switch (_context.prev = _context.next) {
|
135
|
+
case 0:
|
136
|
+
topoDispatchers = this.store.getModelDispatchers('topoMod');
|
137
|
+
_context.next = 3;
|
138
|
+
return topoDispatchers.exit();
|
139
|
+
|
140
|
+
case 3:
|
141
|
+
this.destroy();
|
142
|
+
|
143
|
+
case 4:
|
144
|
+
case "end":
|
145
|
+
return _context.stop();
|
147
146
|
}
|
148
147
|
}, _callee, this);
|
149
|
-
}));
|
150
|
-
|
151
|
-
function exit() {
|
152
|
-
return _exit.apply(this, arguments);
|
153
|
-
}
|
154
|
-
|
155
|
-
return exit;
|
156
|
-
}();
|
148
|
+
}))).apply(this, arguments);
|
149
|
+
};
|
157
150
|
|
158
|
-
_proto.load =
|
159
|
-
|
151
|
+
_proto.load = function load(_x, _x2) {
|
152
|
+
return (_load = _load || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(data, options) {
|
160
153
|
var _data$groups, groups, _data$nodes, nodes, links, lines, topoDispatchers;
|
161
154
|
|
162
155
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
163
|
-
while (1) {
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
return _context2.stop();
|
185
|
-
}
|
156
|
+
while (1) switch (_context2.prev = _context2.next) {
|
157
|
+
case 0:
|
158
|
+
if (options === void 0) {
|
159
|
+
options = {};
|
160
|
+
}
|
161
|
+
|
162
|
+
_data$groups = data.groups, groups = _data$groups === void 0 ? [] : _data$groups, _data$nodes = data.nodes, nodes = _data$nodes === void 0 ? [] : _data$nodes, links = data.links, lines = data.lines;
|
163
|
+
topoDispatchers = this.store.getModelDispatchers('topoMod');
|
164
|
+
_context2.next = 5;
|
165
|
+
return topoDispatchers.openTopoPage((0, _extends2["default"])({
|
166
|
+
data: (0, _extends2["default"])({}, data, {
|
167
|
+
groups: groups,
|
168
|
+
nodes: nodes,
|
169
|
+
links: links || lines || [],
|
170
|
+
linkGroups: data.linkGroups || data.lineGroups || []
|
171
|
+
})
|
172
|
+
}, options));
|
173
|
+
|
174
|
+
case 5:
|
175
|
+
case "end":
|
176
|
+
return _context2.stop();
|
186
177
|
}
|
187
178
|
}, _callee2, this);
|
188
|
-
}));
|
189
|
-
|
190
|
-
function load(_x, _x2) {
|
191
|
-
return _load.apply(this, arguments);
|
192
|
-
}
|
193
|
-
|
194
|
-
return load;
|
195
|
-
}();
|
179
|
+
}))).apply(this, arguments);
|
180
|
+
};
|
196
181
|
|
197
|
-
_proto.clear =
|
198
|
-
|
182
|
+
_proto.clear = function clear() {
|
183
|
+
return (_clear = _clear || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
199
184
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
200
|
-
while (1) {
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
return _context3.stop();
|
205
|
-
}
|
185
|
+
while (1) switch (_context3.prev = _context3.next) {
|
186
|
+
case 0:
|
187
|
+
case "end":
|
188
|
+
return _context3.stop();
|
206
189
|
}
|
207
190
|
}, _callee3);
|
208
|
-
}));
|
209
|
-
|
210
|
-
function clear() {
|
211
|
-
return _clear.apply(this, arguments);
|
212
|
-
}
|
213
|
-
|
214
|
-
return clear;
|
215
|
-
}();
|
191
|
+
}))).apply(this, arguments);
|
192
|
+
};
|
216
193
|
|
217
194
|
_proto.getId = function getId() {
|
218
195
|
return this.id;
|
@@ -264,47 +241,37 @@ var Topo = /*#__PURE__*/function () {
|
|
264
241
|
*/
|
265
242
|
;
|
266
243
|
|
267
|
-
_proto.updateElements =
|
268
|
-
|
269
|
-
function () {
|
270
|
-
var _updateElements = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(data) {
|
244
|
+
_proto.updateElements = function updateElements(_x3) {
|
245
|
+
return (_updateElements = _updateElements || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(data) {
|
271
246
|
var _data$groups2, groups, _data$nodes2, nodes, links, lines;
|
272
247
|
|
273
248
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
274
|
-
while (1) {
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
return _context4.stop();
|
297
|
-
}
|
249
|
+
while (1) switch (_context4.prev = _context4.next) {
|
250
|
+
case 0:
|
251
|
+
_data$groups2 = data.groups, groups = _data$groups2 === void 0 ? [] : _data$groups2, _data$nodes2 = data.nodes, nodes = _data$nodes2 === void 0 ? [] : _data$nodes2, links = data.links, lines = data.lines;
|
252
|
+
this.view.topoClient.updateElements((0, _lodash.cloneDeep)({
|
253
|
+
groups: (0, _topoData.formatGroups)(groups),
|
254
|
+
nodes: nodes.map(function (node) {
|
255
|
+
return (0, _extends2["default"])({}, node, {
|
256
|
+
type: 'node',
|
257
|
+
dtype: 'device'
|
258
|
+
});
|
259
|
+
}),
|
260
|
+
links: (links || lines || []).map(function (link) {
|
261
|
+
return (0, _extends2["default"])({}, link, {
|
262
|
+
type: 'link',
|
263
|
+
dtype: 'link'
|
264
|
+
});
|
265
|
+
})
|
266
|
+
})); // TODO 更新store,触发属性、指标模型加载,更新指标
|
267
|
+
|
268
|
+
case 2:
|
269
|
+
case "end":
|
270
|
+
return _context4.stop();
|
298
271
|
}
|
299
272
|
}, _callee4, this);
|
300
|
-
}));
|
301
|
-
|
302
|
-
function updateElements(_x3) {
|
303
|
-
return _updateElements.apply(this, arguments);
|
304
|
-
}
|
305
|
-
|
306
|
-
return updateElements;
|
307
|
-
}()
|
273
|
+
}))).apply(this, arguments);
|
274
|
+
}
|
308
275
|
/**
|
309
276
|
* 追加元素
|
310
277
|
*
|
@@ -312,36 +279,26 @@ var Topo = /*#__PURE__*/function () {
|
|
312
279
|
*/
|
313
280
|
;
|
314
281
|
|
315
|
-
_proto.addElements =
|
316
|
-
|
317
|
-
function () {
|
318
|
-
var _addElements = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(elements) {
|
282
|
+
_proto.addElements = function addElements(_x4) {
|
283
|
+
return (_addElements = _addElements || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(elements) {
|
319
284
|
var data;
|
320
285
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
321
|
-
while (1) {
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
return _context5.stop();
|
334
|
-
}
|
286
|
+
while (1) switch (_context5.prev = _context5.next) {
|
287
|
+
case 0:
|
288
|
+
data = {
|
289
|
+
groups: [].concat(this.getGroups(), elements.groups || []),
|
290
|
+
nodes: [].concat(this.getNodes(), elements.nodes || []),
|
291
|
+
lines: [].concat(this.getLines(), elements.lines || [])
|
292
|
+
};
|
293
|
+
this.updateElements(data); // TODO 更新store,触发属性、指标模型加载,更新指标
|
294
|
+
|
295
|
+
case 2:
|
296
|
+
case "end":
|
297
|
+
return _context5.stop();
|
335
298
|
}
|
336
299
|
}, _callee5, this);
|
337
|
-
}));
|
338
|
-
|
339
|
-
function addElements(_x4) {
|
340
|
-
return _addElements.apply(this, arguments);
|
341
|
-
}
|
342
|
-
|
343
|
-
return addElements;
|
344
|
-
}()
|
300
|
+
}))).apply(this, arguments);
|
301
|
+
}
|
345
302
|
/**
|
346
303
|
* 全量更新数据
|
347
304
|
*
|
@@ -349,30 +306,20 @@ var Topo = /*#__PURE__*/function () {
|
|
349
306
|
*/
|
350
307
|
;
|
351
308
|
|
352
|
-
_proto.updateData =
|
353
|
-
|
354
|
-
function () {
|
355
|
-
var _updateData = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(data) {
|
309
|
+
_proto.updateData = function updateData(_x5) {
|
310
|
+
return (_updateData = _updateData || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(data) {
|
356
311
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
357
|
-
while (1) {
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
return _context6.stop();
|
365
|
-
}
|
312
|
+
while (1) switch (_context6.prev = _context6.next) {
|
313
|
+
case 0:
|
314
|
+
this.updateElements(data);
|
315
|
+
|
316
|
+
case 1:
|
317
|
+
case "end":
|
318
|
+
return _context6.stop();
|
366
319
|
}
|
367
320
|
}, _callee6, this);
|
368
|
-
}));
|
369
|
-
|
370
|
-
function updateData(_x5) {
|
371
|
-
return _updateData.apply(this, arguments);
|
372
|
-
}
|
373
|
-
|
374
|
-
return updateData;
|
375
|
-
}();
|
321
|
+
}))).apply(this, arguments);
|
322
|
+
};
|
376
323
|
|
377
324
|
_proto.replaceNode = function replaceNode(id, newNode) {
|
378
325
|
this.view.replaceNode(id, newNode); // TODO 更新store,触发属性、指标模型加载,更新指标
|
@@ -389,92 +336,68 @@ var Topo = /*#__PURE__*/function () {
|
|
389
336
|
this.view.fitContent(anim, padding, notZoomIn);
|
390
337
|
};
|
391
338
|
|
392
|
-
_proto.open =
|
393
|
-
|
339
|
+
_proto.open = function open(_x6, _x7) {
|
340
|
+
return (_open = _open || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(id, mode) {
|
394
341
|
var lastId;
|
395
342
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
396
|
-
while (1) {
|
397
|
-
|
398
|
-
|
399
|
-
_rlog["default"].info('TopoApp.open 打开拓扑图', id); // 如果是切换拓扑图,注销原拓扑图
|
343
|
+
while (1) switch (_context7.prev = _context7.next) {
|
344
|
+
case 0:
|
345
|
+
_rlog["default"].info('TopoApp.open 打开拓扑图', id); // 如果是切换拓扑图,注销原拓扑图
|
400
346
|
|
401
347
|
|
402
|
-
|
403
|
-
|
348
|
+
lastId = this.id;
|
349
|
+
this.id = id;
|
404
350
|
|
405
|
-
|
406
|
-
|
407
|
-
|
351
|
+
if (lastId && id !== lastId) {
|
352
|
+
this.alarm.close();
|
353
|
+
} // 加载新拓扑图
|
408
354
|
|
409
355
|
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
}
|
356
|
+
case 4:
|
357
|
+
case "end":
|
358
|
+
return _context7.stop();
|
414
359
|
}
|
415
360
|
}, _callee7, this);
|
416
|
-
}));
|
417
|
-
|
418
|
-
function open(_x6, _x7) {
|
419
|
-
return _open.apply(this, arguments);
|
420
|
-
}
|
421
|
-
|
422
|
-
return open;
|
423
|
-
}();
|
361
|
+
}))).apply(this, arguments);
|
362
|
+
};
|
424
363
|
|
425
|
-
_proto.close =
|
426
|
-
|
364
|
+
_proto.close = function close() {
|
365
|
+
return (_close = _close || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
427
366
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
428
|
-
while (1) {
|
429
|
-
|
430
|
-
|
431
|
-
_rlog["default"].info('关闭拓扑图', this.id);
|
367
|
+
while (1) switch (_context8.prev = _context8.next) {
|
368
|
+
case 0:
|
369
|
+
_rlog["default"].info('关闭拓扑图', this.id);
|
432
370
|
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
371
|
+
if (this.id) {
|
372
|
+
_context8.next = 3;
|
373
|
+
break;
|
374
|
+
}
|
437
375
|
|
438
|
-
|
376
|
+
return _context8.abrupt("return");
|
439
377
|
|
440
|
-
|
441
|
-
|
442
|
-
|
378
|
+
case 3:
|
379
|
+
this.alarm.close();
|
380
|
+
this.id = null;
|
443
381
|
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
}
|
382
|
+
case 5:
|
383
|
+
case "end":
|
384
|
+
return _context8.stop();
|
448
385
|
}
|
449
386
|
}, _callee8, this);
|
450
|
-
}));
|
451
|
-
|
452
|
-
function close() {
|
453
|
-
return _close.apply(this, arguments);
|
454
|
-
}
|
455
|
-
|
456
|
-
return close;
|
457
|
-
}();
|
387
|
+
}))).apply(this, arguments);
|
388
|
+
};
|
458
389
|
|
459
|
-
_proto.refresh =
|
460
|
-
|
390
|
+
_proto.refresh = function refresh() {
|
391
|
+
return (_refresh = _refresh || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
461
392
|
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
462
|
-
while (1) {
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
return _context9.stop();
|
467
|
-
}
|
393
|
+
while (1) switch (_context9.prev = _context9.next) {
|
394
|
+
case 0:
|
395
|
+
case "end":
|
396
|
+
return _context9.stop();
|
468
397
|
}
|
469
398
|
}, _callee9);
|
470
|
-
}));
|
471
|
-
|
472
|
-
function refresh() {
|
473
|
-
return _refresh.apply(this, arguments);
|
474
|
-
}
|
475
|
-
|
476
|
-
return refresh;
|
477
|
-
}();
|
399
|
+
}))).apply(this, arguments);
|
400
|
+
};
|
478
401
|
|
479
402
|
_proto.getGraphView = function getGraphView() {
|
480
403
|
return this.view.topoClient.getGraphView();
|
@@ -501,25 +424,17 @@ var Topo = /*#__PURE__*/function () {
|
|
501
424
|
this.view.topoClient.searchElements(filterType, value);
|
502
425
|
};
|
503
426
|
|
504
|
-
_proto.openViewMode =
|
505
|
-
|
427
|
+
_proto.openViewMode = function openViewMode(_x8) {
|
428
|
+
return (_openViewMode = _openViewMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(id) {
|
506
429
|
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
507
|
-
while (1) {
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
return _context10.stop();
|
512
|
-
}
|
430
|
+
while (1) switch (_context10.prev = _context10.next) {
|
431
|
+
case 0:
|
432
|
+
case "end":
|
433
|
+
return _context10.stop();
|
513
434
|
}
|
514
435
|
}, _callee10);
|
515
|
-
}));
|
516
|
-
|
517
|
-
function openViewMode(_x8) {
|
518
|
-
return _openViewMode.apply(this, arguments);
|
519
|
-
}
|
520
|
-
|
521
|
-
return openViewMode;
|
522
|
-
}();
|
436
|
+
}))).apply(this, arguments);
|
437
|
+
};
|
523
438
|
|
524
439
|
_proto.isViewMode = function isViewMode() {
|
525
440
|
return !this.isEditMode();
|
@@ -533,193 +448,147 @@ var Topo = /*#__PURE__*/function () {
|
|
533
448
|
return this.store.getModelState('topoMod').graphLoaded;
|
534
449
|
};
|
535
450
|
|
536
|
-
_proto.onTopoDataLoaded =
|
537
|
-
|
451
|
+
_proto.onTopoDataLoaded = function onTopoDataLoaded(_x9) {
|
452
|
+
return (_onTopoDataLoaded = _onTopoDataLoaded || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(topoData) {
|
538
453
|
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
539
|
-
while (1) {
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
return _context11.stop();
|
547
|
-
}
|
454
|
+
while (1) switch (_context11.prev = _context11.next) {
|
455
|
+
case 0:
|
456
|
+
this.pluginManager.onTopoDataLoaded(topoData);
|
457
|
+
|
458
|
+
case 1:
|
459
|
+
case "end":
|
460
|
+
return _context11.stop();
|
548
461
|
}
|
549
462
|
}, _callee11, this);
|
550
|
-
}));
|
551
|
-
|
552
|
-
function onTopoDataLoaded(_x9) {
|
553
|
-
return _onTopoDataLoaded.apply(this, arguments);
|
554
|
-
}
|
555
|
-
|
556
|
-
return onTopoDataLoaded;
|
557
|
-
}()
|
463
|
+
}))).apply(this, arguments);
|
464
|
+
}
|
558
465
|
/**
|
559
466
|
* 进入编辑模式
|
560
467
|
*/
|
561
468
|
;
|
562
469
|
|
563
|
-
_proto.enterEditMode =
|
564
|
-
|
565
|
-
function () {
|
566
|
-
var _enterEditMode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
470
|
+
_proto.enterEditMode = function enterEditMode() {
|
471
|
+
return (_enterEditMode = _enterEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
567
472
|
var topoDispatchers, iconManageDispatchers;
|
568
473
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
569
|
-
while (1) {
|
570
|
-
|
571
|
-
|
572
|
-
_rlog["default"].info('TopoApp.enterEditMode');
|
573
|
-
|
574
|
-
if (!this.options.onSwitchToEditModeBegin) {
|
575
|
-
_context12.next = 4;
|
576
|
-
break;
|
577
|
-
}
|
474
|
+
while (1) switch (_context12.prev = _context12.next) {
|
475
|
+
case 0:
|
476
|
+
_rlog["default"].info('TopoApp.enterEditMode');
|
578
477
|
|
478
|
+
if (!this.options.onSwitchToEditModeBegin) {
|
579
479
|
_context12.next = 4;
|
580
|
-
|
480
|
+
break;
|
481
|
+
}
|
581
482
|
|
582
|
-
|
583
|
-
|
584
|
-
_context12.next = 7;
|
585
|
-
return topoDispatchers.update({
|
586
|
-
viewState: 'edit'
|
587
|
-
});
|
483
|
+
_context12.next = 4;
|
484
|
+
return this.options.onSwitchToEditModeBegin(this);
|
588
485
|
|
589
|
-
|
590
|
-
|
591
|
-
|
486
|
+
case 4:
|
487
|
+
topoDispatchers = this.store.getModelDispatchers('topoMod');
|
488
|
+
_context12.next = 7;
|
489
|
+
return topoDispatchers.update({
|
490
|
+
viewState: 'edit'
|
491
|
+
});
|
592
492
|
|
593
|
-
|
594
|
-
|
493
|
+
case 7:
|
494
|
+
_context12.next = 9;
|
495
|
+
return this.view.switchToEditMode();
|
595
496
|
|
596
|
-
|
597
|
-
|
598
|
-
break;
|
599
|
-
}
|
497
|
+
case 9:
|
498
|
+
(0, _edgeUtil.updateEdgeExpanded)(this);
|
600
499
|
|
500
|
+
if (!this.options.onSwitchToEditMode) {
|
601
501
|
_context12.next = 13;
|
602
|
-
|
502
|
+
break;
|
503
|
+
}
|
504
|
+
|
505
|
+
_context12.next = 13;
|
506
|
+
return this.options.onSwitchToEditMode(this);
|
603
507
|
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
508
|
+
case 13:
|
509
|
+
if (this.getDataModel()) {
|
510
|
+
// 更新节点名称显示隐藏
|
511
|
+
this.attributeMetricDisplay.updateNodesNameVisible();
|
512
|
+
} // 加载自定义上传的图标
|
609
513
|
|
610
514
|
|
611
|
-
|
612
|
-
|
515
|
+
iconManageDispatchers = this.store.getModelDispatchers('customIcon');
|
516
|
+
iconManageDispatchers.loadEditorIcons();
|
613
517
|
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
}
|
518
|
+
case 16:
|
519
|
+
case "end":
|
520
|
+
return _context12.stop();
|
618
521
|
}
|
619
522
|
}, _callee12, this);
|
620
|
-
}));
|
621
|
-
|
622
|
-
function enterEditMode() {
|
623
|
-
return _enterEditMode.apply(this, arguments);
|
624
|
-
}
|
625
|
-
|
626
|
-
return enterEditMode;
|
627
|
-
}();
|
523
|
+
}))).apply(this, arguments);
|
524
|
+
};
|
628
525
|
|
629
|
-
_proto.exitEditMode =
|
630
|
-
|
526
|
+
_proto.exitEditMode = function exitEditMode() {
|
527
|
+
return (_exitEditMode = _exitEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13() {
|
631
528
|
var editDispatchers;
|
632
529
|
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
633
|
-
while (1) {
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
return this.view.switchToViewMode();
|
638
|
-
|
639
|
-
case 2:
|
640
|
-
editDispatchers = this.store.getModelDispatchers('topoConfig');
|
641
|
-
editDispatchers.switchToViewMode(this.id);
|
530
|
+
while (1) switch (_context13.prev = _context13.next) {
|
531
|
+
case 0:
|
532
|
+
_context13.next = 2;
|
533
|
+
return this.view.switchToViewMode();
|
642
534
|
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
}
|
535
|
+
case 2:
|
536
|
+
editDispatchers = this.store.getModelDispatchers('topoConfig');
|
537
|
+
editDispatchers.switchToViewMode(this.id);
|
647
538
|
|
539
|
+
if (!this.options.onSwitchToViewMode) {
|
648
540
|
_context13.next = 7;
|
649
|
-
|
541
|
+
break;
|
542
|
+
}
|
543
|
+
|
544
|
+
_context13.next = 7;
|
545
|
+
return this.options.onSwitchToViewMode(this);
|
650
546
|
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
}
|
547
|
+
case 7:
|
548
|
+
case "end":
|
549
|
+
return _context13.stop();
|
655
550
|
}
|
656
551
|
}, _callee13, this);
|
657
|
-
}));
|
658
|
-
|
659
|
-
function exitEditMode() {
|
660
|
-
return _exitEditMode.apply(this, arguments);
|
661
|
-
}
|
662
|
-
|
663
|
-
return exitEditMode;
|
664
|
-
}()
|
552
|
+
}))).apply(this, arguments);
|
553
|
+
}
|
665
554
|
/**
|
666
555
|
* 后续待优化,移除该接口,由ht提供原子接口获取相关数据
|
667
556
|
*/
|
668
557
|
;
|
669
558
|
|
670
|
-
_proto.triggerSaveEvent =
|
671
|
-
|
672
|
-
function () {
|
673
|
-
var _triggerSaveEvent = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
559
|
+
_proto.triggerSaveEvent = function triggerSaveEvent() {
|
560
|
+
return (_triggerSaveEvent = _triggerSaveEvent || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
674
561
|
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
675
|
-
while (1) {
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
return _context14.stop();
|
683
|
-
}
|
562
|
+
while (1) switch (_context14.prev = _context14.next) {
|
563
|
+
case 0:
|
564
|
+
this.view.topoClient.saveExternal();
|
565
|
+
|
566
|
+
case 1:
|
567
|
+
case "end":
|
568
|
+
return _context14.stop();
|
684
569
|
}
|
685
570
|
}, _callee14, this);
|
686
|
-
}));
|
687
|
-
|
688
|
-
function triggerSaveEvent() {
|
689
|
-
return _triggerSaveEvent.apply(this, arguments);
|
690
|
-
}
|
691
|
-
|
692
|
-
return triggerSaveEvent;
|
693
|
-
}()
|
571
|
+
}))).apply(this, arguments);
|
572
|
+
}
|
694
573
|
/**
|
695
574
|
* FIXME 待优化,移除该接口,由ht提供原子接口获取相关数据
|
696
575
|
*/
|
697
576
|
;
|
698
577
|
|
699
|
-
_proto.save =
|
700
|
-
|
701
|
-
function () {
|
702
|
-
var _save = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
578
|
+
_proto.save = function save() {
|
579
|
+
return (_save = _save || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
703
580
|
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
704
|
-
while (1) {
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
return _context15.stop();
|
712
|
-
}
|
581
|
+
while (1) switch (_context15.prev = _context15.next) {
|
582
|
+
case 0:
|
583
|
+
this.triggerSaveEvent();
|
584
|
+
|
585
|
+
case 1:
|
586
|
+
case "end":
|
587
|
+
return _context15.stop();
|
713
588
|
}
|
714
589
|
}, _callee15, this);
|
715
|
-
}));
|
716
|
-
|
717
|
-
function save() {
|
718
|
-
return _save.apply(this, arguments);
|
719
|
-
}
|
720
|
-
|
721
|
-
return save;
|
722
|
-
}()
|
590
|
+
}))).apply(this, arguments);
|
591
|
+
}
|
723
592
|
/**
|
724
593
|
* 导出为图片
|
725
594
|
*
|
@@ -727,36 +596,26 @@ var Topo = /*#__PURE__*/function () {
|
|
727
596
|
*/
|
728
597
|
;
|
729
598
|
|
730
|
-
_proto.exportImage =
|
731
|
-
|
732
|
-
function () {
|
733
|
-
var _exportImage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(name) {
|
599
|
+
_proto.exportImage = function exportImage(_x10) {
|
600
|
+
return (_exportImage = _exportImage || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(name) {
|
734
601
|
var fileName;
|
735
602
|
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
736
|
-
while (1) {
|
737
|
-
|
738
|
-
|
739
|
-
fileName = name;
|
603
|
+
while (1) switch (_context16.prev = _context16.next) {
|
604
|
+
case 0:
|
605
|
+
fileName = name;
|
740
606
|
|
741
|
-
|
742
|
-
|
607
|
+
if (!name) {// TODO 获取拓扑名称,避免改名重绘拓扑图
|
608
|
+
}
|
743
609
|
|
744
|
-
|
610
|
+
this.view.topoClient.exportImage(fileName);
|
745
611
|
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
}
|
612
|
+
case 3:
|
613
|
+
case "end":
|
614
|
+
return _context16.stop();
|
750
615
|
}
|
751
616
|
}, _callee16, this);
|
752
|
-
}));
|
753
|
-
|
754
|
-
function exportImage(_x10) {
|
755
|
-
return _exportImage.apply(this, arguments);
|
756
|
-
}
|
757
|
-
|
758
|
-
return exportImage;
|
759
|
-
}();
|
617
|
+
}))).apply(this, arguments);
|
618
|
+
};
|
760
619
|
|
761
620
|
_proto.loadAlarm = function loadAlarm(alarmList) {
|
762
621
|
this.alarm.updateState({
|
@@ -764,45 +623,29 @@ var Topo = /*#__PURE__*/function () {
|
|
764
623
|
});
|
765
624
|
};
|
766
625
|
|
767
|
-
_proto.switchToViewMode =
|
768
|
-
|
626
|
+
_proto.switchToViewMode = function switchToViewMode() {
|
627
|
+
return (_switchToViewMode = _switchToViewMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17() {
|
769
628
|
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
770
|
-
while (1) {
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
return _context17.stop();
|
775
|
-
}
|
629
|
+
while (1) switch (_context17.prev = _context17.next) {
|
630
|
+
case 0:
|
631
|
+
case "end":
|
632
|
+
return _context17.stop();
|
776
633
|
}
|
777
634
|
}, _callee17);
|
778
|
-
}));
|
779
|
-
|
780
|
-
function switchToViewMode() {
|
781
|
-
return _switchToViewMode.apply(this, arguments);
|
782
|
-
}
|
783
|
-
|
784
|
-
return switchToViewMode;
|
785
|
-
}();
|
635
|
+
}))).apply(this, arguments);
|
636
|
+
};
|
786
637
|
|
787
|
-
_proto.switchToEditMode =
|
788
|
-
|
638
|
+
_proto.switchToEditMode = function switchToEditMode() {
|
639
|
+
return (_switchToEditMode = _switchToEditMode || (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18() {
|
789
640
|
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
790
|
-
while (1) {
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
return _context18.stop();
|
795
|
-
}
|
641
|
+
while (1) switch (_context18.prev = _context18.next) {
|
642
|
+
case 0:
|
643
|
+
case "end":
|
644
|
+
return _context18.stop();
|
796
645
|
}
|
797
646
|
}, _callee18);
|
798
|
-
}));
|
799
|
-
|
800
|
-
function switchToEditMode() {
|
801
|
-
return _switchToEditMode.apply(this, arguments);
|
802
|
-
}
|
803
|
-
|
804
|
-
return switchToEditMode;
|
805
|
-
}();
|
647
|
+
}))).apply(this, arguments);
|
648
|
+
};
|
806
649
|
|
807
650
|
_proto.initStore = function initStore() {
|
808
651
|
var store = (0, _createStore["default"])(this, this.options.storeModels || {});
|