@riil-frontend/component-topology 11.0.30 → 11.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +2 -4
- package/build/index.js +34 -49
- package/es/components/MultiResourceDrawer/index.js +18 -16
- package/es/components/ResourceList/ResourceSelect.js +50 -48
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +26 -24
- package/es/components/SingleResourceDrawer/SelectDrawer.js +20 -18
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +25 -23
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
- package/es/core/components/titlebar/widgets/TitleWidget.js +3 -5
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
- package/es/core/editor/components/BackgroundView/index.js +129 -119
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -20
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +17 -15
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +9 -7
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -11
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +23 -21
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -10
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +27 -21
- package/es/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/es/core/editor/hooks/useNewElementTheme.js +2 -2
- package/es/core/editor/store/background.js +10 -8
- package/es/core/editor/store/topoEdit.js +6 -4
- package/es/core/editor/utils/edgeTypeStyleUtil.js +4 -2
- package/es/core/hooks/usePolling.js +121 -117
- package/es/core/hooks/useResourceConfig.js +66 -58
- package/es/core/hooks/useTopoEdit.js +511 -476
- package/es/core/models/Alarm.js +298 -281
- package/es/core/models/AttributeMetricDisplay.js +107 -101
- package/es/core/models/PluginManager.js +3 -4
- package/es/core/models/SelectionModel.js +5 -4
- package/es/core/models/TopoApp.js +240 -205
- package/es/core/models/TopoGraphView.js +21 -18
- package/es/core/models/cache/CiCache.js +27 -28
- package/es/core/models/cache/CiTypeCache.js +41 -37
- package/es/core/models/cache/DictCache.js +35 -33
- package/es/core/models/graph/Background.js +17 -15
- package/es/core/models/plugins/resourceWebControllUrl.js +82 -76
- package/es/core/models/tagstips/ElementTagTipConfig.js +38 -34
- package/es/core/models/topoData.js +70 -68
- package/es/core/models/utils/linkUtils.js +43 -41
- package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/es/core/services/alarm.js +16 -14
- package/es/core/services/background.js +67 -59
- package/es/core/services/cmdb/metric.js +11 -9
- package/es/core/services/cmdb.js +20 -18
- package/es/core/services/index.js +45 -39
- package/es/core/services/overview.js +151 -131
- package/es/core/services/topo/basic.js +13 -11
- package/es/core/services/topo/tagtip.js +12 -10
- package/es/core/store/models/ciModel.js +62 -58
- package/es/core/store/models/customIcon.js +134 -120
- package/es/core/store/models/displayConfig.js +19 -15
- package/es/core/store/models/selection.js +6 -4
- package/es/core/store/models/topoAlarm.js +145 -162
- package/es/core/store/models/topoBaseInfoOverview.js +6 -4
- package/es/core/store/models/topoBizMod.js +32 -28
- package/es/core/store/models/topoConfig.js +231 -215
- package/es/core/store/models/topoGraphView.js +6 -4
- package/es/core/store/models/topoMod.js +395 -373
- package/es/core/utils/imageUtil.js +20 -18
- package/es/core/utils/saveSerialize.js +11 -9
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +357 -343
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +205 -189
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +37 -33
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +19 -17
- package/es/networkTopo/components/Link/hook.js +77 -73
- package/es/networkTopo/components/Link/index.js +94 -86
- package/es/networkTopo/components/Link/setting.js +44 -42
- package/es/networkTopo/getTopoData.js +69 -63
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +32 -30
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +22 -18
- package/es/networkTopo/services/alert.js +22 -18
- package/es/networkTopo/services/authorization.js +55 -45
- package/es/networkTopo/services/cmdb.js +470 -422
- package/es/networkTopo/services/funcAuth.js +24 -22
- package/es/networkTopo/services/link.js +117 -107
- package/es/networkTopo/services/mdc.js +24 -18
- package/es/networkTopo/services/metric.js +27 -23
- package/es/networkTopo/services/model.js +509 -445
- package/es/networkTopo/services/risk.js +11 -9
- package/es/networkTopo/services/topo/auth.js +33 -27
- package/es/networkTopo/services/topo/basic.js +314 -274
- package/es/networkTopo/services/topo/blacklist.js +24 -20
- package/es/networkTopo/services/topo/ciInfo.js +31 -27
- package/es/networkTopo/services/topo/icon.js +59 -49
- package/es/networkTopo/services/topo/networkLink.js +36 -32
- package/es/networkTopo/services/topo/relation.js +11 -9
- package/es/networkTopo/services/topo/resourceWebUrl.js +42 -36
- package/es/networkTopo/store/functionAuth.js +37 -31
- package/es/networkTopo/store/topoCenter.js +152 -142
- package/es/networkTopo/store/topoLinkMod.js +6 -4
- package/es/networkTopo/store/topoTreeMod.js +182 -170
- package/es/networkTopo/utils/exportData.js +54 -52
- package/lib/components/MultiResourceDrawer/index.js +18 -16
- package/lib/components/ResourceList/ResourceSelect.js +50 -48
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +29 -27
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +20 -18
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +32 -30
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -78
- package/lib/core/components/titlebar/widgets/TitleWidget.js +3 -5
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +17 -15
- package/lib/core/editor/components/BackgroundView/index.js +128 -118
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +24 -22
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -31
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +21 -19
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +10 -8
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +41 -37
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +54 -50
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +54 -50
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +14 -12
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +28 -26
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +17 -15
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +14 -12
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +31 -25
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -2
- package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
- package/lib/core/editor/store/background.js +10 -8
- package/lib/core/editor/store/topoEdit.js +6 -4
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +4 -2
- package/lib/core/hooks/usePolling.js +120 -116
- package/lib/core/hooks/useResourceConfig.js +66 -58
- package/lib/core/hooks/useTopoEdit.js +503 -468
- package/lib/core/models/Alarm.js +292 -275
- package/lib/core/models/AttributeMetricDisplay.js +110 -104
- package/lib/core/models/PluginManager.js +3 -4
- package/lib/core/models/SelectionModel.js +5 -4
- package/lib/core/models/TopoApp.js +240 -205
- package/lib/core/models/TopoGraphView.js +21 -18
- package/lib/core/models/cache/CiCache.js +32 -33
- package/lib/core/models/cache/CiTypeCache.js +42 -38
- package/lib/core/models/cache/DictCache.js +35 -33
- package/lib/core/models/graph/Background.js +18 -16
- package/lib/core/models/plugins/resourceWebControllUrl.js +80 -74
- package/lib/core/models/tagstips/ElementTagTipConfig.js +38 -34
- package/lib/core/models/topoData.js +71 -69
- package/lib/core/models/utils/linkUtils.js +43 -41
- package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/lib/core/services/alarm.js +20 -18
- package/lib/core/services/background.js +78 -70
- package/lib/core/services/cmdb/metric.js +12 -10
- package/lib/core/services/cmdb.js +22 -20
- package/lib/core/services/index.js +51 -45
- package/lib/core/services/overview.js +151 -131
- package/lib/core/services/topo/basic.js +15 -13
- package/lib/core/services/topo/tagtip.js +14 -12
- package/lib/core/store/models/ciModel.js +70 -66
- package/lib/core/store/models/customIcon.js +134 -120
- package/lib/core/store/models/displayConfig.js +19 -15
- package/lib/core/store/models/selection.js +6 -4
- package/lib/core/store/models/topoAlarm.js +145 -163
- package/lib/core/store/models/topoBaseInfoOverview.js +6 -4
- package/lib/core/store/models/topoBizMod.js +38 -34
- package/lib/core/store/models/topoConfig.js +238 -222
- package/lib/core/store/models/topoGraphView.js +6 -4
- package/lib/core/store/models/topoMod.js +397 -375
- package/lib/core/utils/imageUtil.js +24 -22
- package/lib/core/utils/saveSerialize.js +11 -9
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +58 -56
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -15
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +358 -344
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +92 -86
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +41 -39
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +206 -190
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +109 -107
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +59 -57
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +29 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +36 -32
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +20 -18
- package/lib/networkTopo/components/Link/hook.js +77 -73
- package/lib/networkTopo/components/Link/index.js +95 -87
- package/lib/networkTopo/components/Link/setting.js +44 -42
- package/lib/networkTopo/getTopoData.js +69 -63
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +33 -31
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +22 -18
- package/lib/networkTopo/services/alert.js +22 -18
- package/lib/networkTopo/services/authorization.js +65 -55
- package/lib/networkTopo/services/cmdb.js +470 -422
- package/lib/networkTopo/services/funcAuth.js +26 -24
- package/lib/networkTopo/services/link.js +118 -108
- package/lib/networkTopo/services/mdc.js +27 -21
- package/lib/networkTopo/services/metric.js +31 -27
- package/lib/networkTopo/services/model.js +509 -445
- package/lib/networkTopo/services/risk.js +13 -11
- package/lib/networkTopo/services/topo/auth.js +33 -27
- package/lib/networkTopo/services/topo/basic.js +317 -277
- package/lib/networkTopo/services/topo/blacklist.js +24 -20
- package/lib/networkTopo/services/topo/ciInfo.js +38 -34
- package/lib/networkTopo/services/topo/icon.js +69 -59
- package/lib/networkTopo/services/topo/networkLink.js +36 -32
- package/lib/networkTopo/services/topo/relation.js +13 -11
- package/lib/networkTopo/services/topo/resourceWebUrl.js +50 -44
- package/lib/networkTopo/store/functionAuth.js +37 -31
- package/lib/networkTopo/store/topoCenter.js +152 -142
- package/lib/networkTopo/store/topoLinkMod.js +6 -4
- package/lib/networkTopo/store/topoTreeMod.js +178 -166
- package/lib/networkTopo/utils/exportData.js +61 -59
- package/package.json +3 -3
@@ -33,27 +33,29 @@ var _default = {
|
|
33
33
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
34
34
|
var modelTree, dicts;
|
35
35
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
36
|
-
while (1)
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
36
|
+
while (1) {
|
37
|
+
switch (_context.prev = _context.next) {
|
38
|
+
case 0:
|
39
|
+
_context.next = 2;
|
40
|
+
return (0, _model.queryAllModel)();
|
41
|
+
|
42
|
+
case 2:
|
43
|
+
modelTree = _context.sent;
|
44
|
+
dicts = (0, _ciType.getAllCiTypes)(modelTree);
|
45
|
+
|
46
|
+
_this.update({
|
47
|
+
typeDicts: dicts.map(function (item) {
|
48
|
+
return (0, _extends2["default"])({}, item, {
|
49
|
+
label: item.name,
|
50
|
+
value: item.code
|
51
|
+
});
|
52
|
+
})
|
53
|
+
});
|
54
|
+
|
55
|
+
case 5:
|
56
|
+
case "end":
|
57
|
+
return _context.stop();
|
58
|
+
}
|
57
59
|
}
|
58
60
|
}, _callee);
|
59
61
|
}))();
|
@@ -65,51 +67,53 @@ var _default = {
|
|
65
67
|
var attrData, metricsData, code, _attrData$attributes, attributes, _metricsData$metrics, metrics, meta;
|
66
68
|
|
67
69
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
68
|
-
while (1)
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
70
|
+
while (1) {
|
71
|
+
switch (_context2.prev = _context2.next) {
|
72
|
+
case 0:
|
73
|
+
_this2.update({
|
74
|
+
currentCi: {
|
75
|
+
code: ciCode,
|
76
|
+
meta: []
|
77
|
+
}
|
78
|
+
});
|
79
|
+
|
80
|
+
_context2.next = 3;
|
81
|
+
return (0, _model.getCi)(ciCode);
|
82
|
+
|
83
|
+
case 3:
|
84
|
+
attrData = _context2.sent;
|
85
|
+
_context2.next = 6;
|
86
|
+
return (0, _model.getCiMetric)(ciCode);
|
87
|
+
|
88
|
+
case 6:
|
89
|
+
metricsData = _context2.sent;
|
90
|
+
code = attrData.code, _attrData$attributes = attrData.attributes, attributes = _attrData$attributes === void 0 ? [] : _attrData$attributes;
|
91
|
+
_metricsData$metrics = metricsData.metrics, metrics = _metricsData$metrics === void 0 ? [] : _metricsData$metrics;
|
92
|
+
meta = attributes.map(function (attr) {
|
93
|
+
return {
|
94
|
+
code: attr.code,
|
95
|
+
name: attr.name,
|
96
|
+
type: 'attributes'
|
97
|
+
};
|
98
|
+
}).concat(metrics.map(function (metric) {
|
99
|
+
return {
|
100
|
+
code: metric.code,
|
101
|
+
name: metric.name,
|
102
|
+
type: 'metrics'
|
103
|
+
};
|
104
|
+
}));
|
105
|
+
|
106
|
+
_this2.update({
|
107
|
+
currentCi: {
|
108
|
+
code: code,
|
109
|
+
meta: meta
|
110
|
+
}
|
111
|
+
});
|
112
|
+
|
113
|
+
case 11:
|
114
|
+
case "end":
|
115
|
+
return _context2.stop();
|
116
|
+
}
|
113
117
|
}
|
114
118
|
}, _callee2);
|
115
119
|
}))();
|
@@ -81,23 +81,25 @@ function _default(engine) {
|
|
81
81
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
82
82
|
var icons;
|
83
83
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
84
|
-
while (1)
|
85
|
-
|
86
|
-
|
87
|
-
|
84
|
+
while (1) {
|
85
|
+
switch (_context.prev = _context.next) {
|
86
|
+
case 0:
|
87
|
+
_context.next = 2;
|
88
|
+
return _this.getIcons();
|
88
89
|
|
89
|
-
|
90
|
-
|
90
|
+
case 2:
|
91
|
+
icons = _context.sent;
|
91
92
|
|
92
|
-
|
93
|
-
|
94
|
-
|
93
|
+
_this.update({
|
94
|
+
icons: icons
|
95
|
+
});
|
95
96
|
|
96
|
-
|
97
|
+
return _context.abrupt("return", icons);
|
97
98
|
|
98
|
-
|
99
|
-
|
100
|
-
|
99
|
+
case 5:
|
100
|
+
case "end":
|
101
|
+
return _context.stop();
|
102
|
+
}
|
101
103
|
}
|
102
104
|
}, _callee);
|
103
105
|
}))();
|
@@ -112,17 +114,19 @@ function _default(engine) {
|
|
112
114
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
113
115
|
var icons;
|
114
116
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
115
|
-
while (1)
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
117
|
+
while (1) {
|
118
|
+
switch (_context2.prev = _context2.next) {
|
119
|
+
case 0:
|
120
|
+
_context2.next = 2;
|
121
|
+
return _this2.loadCustomIcons();
|
122
|
+
|
123
|
+
case 2:
|
124
|
+
icons = _context2.sent;
|
125
|
+
|
126
|
+
case 3:
|
127
|
+
case "end":
|
128
|
+
return _context2.stop();
|
129
|
+
}
|
126
130
|
}
|
127
131
|
}, _callee2);
|
128
132
|
}))();
|
@@ -131,22 +135,24 @@ function _default(engine) {
|
|
131
135
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
132
136
|
var iconList, data;
|
133
137
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
134
|
-
while (1)
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
138
|
+
while (1) {
|
139
|
+
switch (_context3.prev = _context3.next) {
|
140
|
+
case 0:
|
141
|
+
_context3.next = 2;
|
142
|
+
return _topo["default"].icon.listAll();
|
143
|
+
|
144
|
+
case 2:
|
145
|
+
iconList = _context3.sent;
|
146
|
+
data = {
|
147
|
+
node: iconList.map(addIconUrlData),
|
148
|
+
container: []
|
149
|
+
};
|
150
|
+
return _context3.abrupt("return", data);
|
151
|
+
|
152
|
+
case 5:
|
153
|
+
case "end":
|
154
|
+
return _context3.stop();
|
155
|
+
}
|
150
156
|
}
|
151
157
|
}, _callee3);
|
152
158
|
}))();
|
@@ -161,38 +167,40 @@ function _default(engine) {
|
|
161
167
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
162
168
|
var data, allIcons, newIcons;
|
163
169
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
164
|
-
while (1)
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
_this3.update({
|
169
|
-
visible: false
|
170
|
-
}); // 注册
|
170
|
+
while (1) {
|
171
|
+
switch (_context4.prev = _context4.next) {
|
172
|
+
case 0:
|
173
|
+
data = payload.data;
|
171
174
|
|
175
|
+
_this3.update({
|
176
|
+
visible: false
|
177
|
+
}); // 注册
|
172
178
|
|
173
|
-
data.forEach(function (icon) {
|
174
|
-
var iconUrl = _topo["default"].icon.getIconImageUrl(icon.id);
|
175
179
|
|
176
|
-
|
177
|
-
|
178
|
-
_context4.next = 5;
|
179
|
-
return _this3.loadCustomIcons();
|
180
|
+
data.forEach(function (icon) {
|
181
|
+
var iconUrl = _topo["default"].icon.getIconImageUrl(icon.id);
|
180
182
|
|
181
|
-
|
182
|
-
allIcons = _context4.sent;
|
183
|
-
newIcons = allIcons.node.filter(function (icon) {
|
184
|
-
return !!data.find(function (item) {
|
185
|
-
return item.id === icon.id;
|
183
|
+
window.ht.Default.setImage((0, _icon.getCustomIconHtId)(icon.id), iconUrl);
|
186
184
|
});
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
185
|
+
_context4.next = 5;
|
186
|
+
return _this3.loadCustomIcons();
|
187
|
+
|
188
|
+
case 5:
|
189
|
+
allIcons = _context4.sent;
|
190
|
+
newIcons = allIcons.node.filter(function (icon) {
|
191
|
+
return !!data.find(function (item) {
|
192
|
+
return item.id === icon.id;
|
193
|
+
});
|
194
|
+
}); // 通知ht
|
195
|
+
|
196
|
+
engine.view.topoClient.emitEvent('topo_shape_upload_finish', (0, _extends2["default"])({}, payload, {
|
197
|
+
data: (0, _icon.transformCustomIcons2HtIcons)(newIcons)
|
198
|
+
}));
|
199
|
+
|
200
|
+
case 8:
|
201
|
+
case "end":
|
202
|
+
return _context4.stop();
|
203
|
+
}
|
196
204
|
}
|
197
205
|
}, _callee4);
|
198
206
|
}))();
|
@@ -217,40 +225,42 @@ function _default(engine) {
|
|
217
225
|
var _onOk = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
218
226
|
var success;
|
219
227
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
220
|
-
while (1)
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
228
|
+
while (1) {
|
229
|
+
switch (_context5.prev = _context5.next) {
|
230
|
+
case 0:
|
231
|
+
_context5.prev = 0;
|
232
|
+
_context5.next = 3;
|
233
|
+
return _topo["default"].icon["delete"](id);
|
234
|
+
|
235
|
+
case 3:
|
236
|
+
success = _context5.sent;
|
237
|
+
_context5.next = 6;
|
238
|
+
return _this4.loadCustomIcons();
|
239
|
+
|
240
|
+
case 6:
|
241
|
+
if (success) {
|
242
|
+
_componentTopologyGraph.iconFactory.remove((0, _icon.getCustomIconHtId)(id));
|
243
|
+
|
244
|
+
engine.view.topoClient.emitEvent('topo_shape_delete_finish', htIconId);
|
245
|
+
|
246
|
+
_message["default"].success('删除成功');
|
247
|
+
} else {
|
248
|
+
_message["default"].error('删除失败');
|
249
|
+
}
|
250
|
+
|
251
|
+
_context5.next = 12;
|
252
|
+
break;
|
253
|
+
|
254
|
+
case 9:
|
255
|
+
_context5.prev = 9;
|
256
|
+
_context5.t0 = _context5["catch"](0);
|
257
|
+
|
258
|
+
_rlog["default"].warn('删除图标失败', _context5.t0);
|
259
|
+
|
260
|
+
case 12:
|
261
|
+
case "end":
|
262
|
+
return _context5.stop();
|
263
|
+
}
|
254
264
|
}
|
255
265
|
}, _callee5, null, [[0, 9]]);
|
256
266
|
}));
|
@@ -285,26 +295,28 @@ function _default(engine) {
|
|
285
295
|
|
286
296
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
287
297
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
288
|
-
while (1)
|
289
|
-
|
290
|
-
|
291
|
-
|
298
|
+
while (1) {
|
299
|
+
switch (_context6.prev = _context6.next) {
|
300
|
+
case 0:
|
301
|
+
_context6.next = 2;
|
302
|
+
return _topo["default"].icon.rename(icon);
|
292
303
|
|
293
|
-
|
294
|
-
|
304
|
+
case 2:
|
305
|
+
_message["default"].success('重命名成功');
|
295
306
|
|
296
|
-
|
297
|
-
|
298
|
-
|
307
|
+
engine.view.topoClient.emitEvent('topo_shape_rename_finish', (0, _extends2["default"])({}, icon, {
|
308
|
+
id: (0, _icon.getCustomIconHtId)(icon.id)
|
309
|
+
}));
|
299
310
|
|
300
|
-
|
311
|
+
_this5.closeRenameDialog();
|
301
312
|
|
302
|
-
|
303
|
-
|
313
|
+
_context6.next = 7;
|
314
|
+
return _this5.loadCustomIcons();
|
304
315
|
|
305
|
-
|
306
|
-
|
307
|
-
|
316
|
+
case 7:
|
317
|
+
case "end":
|
318
|
+
return _context6.stop();
|
319
|
+
}
|
308
320
|
}
|
309
321
|
}, _callee6);
|
310
322
|
}))();
|
@@ -312,10 +324,12 @@ function _default(engine) {
|
|
312
324
|
downloadIcons: function downloadIcons() {
|
313
325
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
314
326
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
315
|
-
while (1)
|
316
|
-
|
317
|
-
|
318
|
-
|
327
|
+
while (1) {
|
328
|
+
switch (_context7.prev = _context7.next) {
|
329
|
+
case 0:
|
330
|
+
case "end":
|
331
|
+
return _context7.stop();
|
332
|
+
}
|
319
333
|
}
|
320
334
|
}, _callee7);
|
321
335
|
}))();
|
@@ -42,13 +42,15 @@ function _default(topo) {
|
|
42
42
|
getConfig: function getConfig(payload, rootState) {
|
43
43
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
44
44
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
45
|
-
while (1)
|
46
|
-
|
47
|
-
|
45
|
+
while (1) {
|
46
|
+
switch (_context.prev = _context.next) {
|
47
|
+
case 0:
|
48
|
+
return _context.abrupt("return", rootState.displayConfig);
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
case 1:
|
51
|
+
case "end":
|
52
|
+
return _context.stop();
|
53
|
+
}
|
52
54
|
}
|
53
55
|
}, _callee);
|
54
56
|
}))();
|
@@ -67,17 +69,19 @@ function _default(topo) {
|
|
67
69
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
68
70
|
var styleConfig;
|
69
71
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
70
|
-
while (1)
|
71
|
-
|
72
|
-
|
73
|
-
|
72
|
+
while (1) {
|
73
|
+
switch (_context2.prev = _context2.next) {
|
74
|
+
case 0:
|
75
|
+
_context2.next = 2;
|
76
|
+
return _this.getConfig();
|
74
77
|
|
75
|
-
|
76
|
-
|
78
|
+
case 2:
|
79
|
+
styleConfig = _context2.sent;
|
77
80
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
+
case 3:
|
82
|
+
case "end":
|
83
|
+
return _context2.stop();
|
84
|
+
}
|
81
85
|
}
|
82
86
|
}, _callee2);
|
83
87
|
}))();
|
@@ -36,10 +36,12 @@ var _default = {
|
|
36
36
|
init: function init(payload, rootState) {
|
37
37
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
38
38
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
39
|
-
while (1)
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
while (1) {
|
40
|
+
switch (_context.prev = _context.next) {
|
41
|
+
case 0:
|
42
|
+
case "end":
|
43
|
+
return _context.stop();
|
44
|
+
}
|
43
45
|
}
|
44
46
|
}, _callee);
|
45
47
|
}))();
|