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