@riil-frontend/component-topology 11.0.35 → 12.0.0-dev.2
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.js +45 -29
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/MultiResourceDrawer/index.js +8 -6
- package/es/components/ResourceList/ResourceSelect.js +8 -7
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
- package/es/components/SingleResourceDrawer/SelectDrawer.js +8 -6
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
- package/es/core/editor/components/BackgroundView/index.js +73 -54
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -5
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
- package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
- package/es/core/editor/utils/copyElementUtil.js +174 -0
- package/es/core/hooks/useCiAttributeChange.js +6 -3
- package/es/core/hooks/usePolling.js +21 -13
- package/es/core/hooks/useResourceConfig.js +37 -21
- package/es/core/hooks/useTopoEdit.js +202 -139
- package/es/core/models/Alarm.js +104 -38
- package/es/core/models/AttributeMetricDisplay.js +36 -14
- package/es/core/models/TopoApp.js +197 -75
- package/es/core/models/TopoGraphView.js +20 -10
- package/es/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
- package/es/core/models/cache/CiCache.js +12 -6
- package/es/core/models/cache/CiTypeCache.js +20 -10
- package/es/core/models/cache/DictCache.js +10 -6
- package/es/core/models/graph/Background.js +9 -6
- package/es/core/models/plugins/resourceWebControllUrl.js +21 -8
- package/es/core/models/tagstips/ElementTagTipConfig.js +20 -10
- package/es/core/models/topoData.js +7 -5
- package/es/core/models/utils/linkUtils.js +8 -5
- package/es/core/services/cmdb/metric.js +7 -5
- package/es/core/services/cmdb.js +9 -5
- package/es/core/services/index.js +23 -9
- package/es/core/services/topo/tagtip.js +7 -5
- package/es/core/store/models/customIcon.js +11 -6
- package/es/core/utils/imageUtil.js +7 -5
- package/es/core/utils/metricUtil.js +13 -1
- package/es/core/utils/saveSerialize.js +7 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +8 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +47 -34
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +74 -34
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -26
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +15 -7
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
- package/es/networkTopo/components/Link/hook.js +21 -14
- package/es/networkTopo/components/Link/index.js +32 -18
- package/es/networkTopo/components/Link/setting.js +8 -6
- package/es/networkTopo/getTopoData.js +23 -10
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
- package/es/networkTopo/models/TopoCenter.js +24 -10
- package/es/networkTopo/services/cmdb.js +333 -233
- package/es/networkTopo/services/mdc.js +24 -15
- package/es/networkTopo/services/metric.js +16 -11
- package/es/networkTopo/services/model.js +412 -283
- package/es/networkTopo/utils/exportData.js +7 -5
- package/es/utils/clipboardUtil.d.ts +7 -0
- package/es/utils/clipboardUtil.js +104 -0
- package/lib/components/BatchAttrMetric/setting.js +1 -1
- package/lib/components/MultiResourceDrawer/index.js +8 -6
- package/lib/components/ResourceList/ResourceSelect.js +8 -6
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +8 -6
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +8 -6
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +8 -6
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +24 -14
- package/lib/core/editor/components/BackgroundView/index.js +74 -55
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +8 -6
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +7 -4
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -6
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +15 -8
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -10
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +16 -10
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +8 -6
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +8 -6
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +28 -16
- package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
- package/lib/core/editor/utils/copyElementUtil.js +187 -0
- package/lib/core/hooks/useCiAttributeChange.js +6 -3
- package/lib/core/hooks/usePolling.js +21 -13
- package/lib/core/hooks/useResourceConfig.js +37 -21
- package/lib/core/hooks/useTopoEdit.js +202 -139
- package/lib/core/models/Alarm.js +104 -38
- package/lib/core/models/AttributeMetricDisplay.js +36 -14
- package/lib/core/models/TopoApp.js +197 -75
- package/lib/core/models/TopoGraphView.js +20 -10
- package/lib/core/models/attributeFormatter/formatter/commonTransform.js +0 -5
- package/lib/core/models/cache/CiCache.js +12 -6
- package/lib/core/models/cache/CiTypeCache.js +20 -10
- package/lib/core/models/cache/DictCache.js +10 -6
- package/lib/core/models/graph/Background.js +9 -6
- package/lib/core/models/plugins/resourceWebControllUrl.js +21 -8
- package/lib/core/models/tagstips/ElementTagTipConfig.js +20 -10
- package/lib/core/models/topoData.js +7 -4
- package/lib/core/models/utils/linkUtils.js +8 -4
- package/lib/core/services/cmdb/metric.js +7 -4
- package/lib/core/services/cmdb.js +9 -4
- package/lib/core/services/index.js +21 -8
- package/lib/core/services/topo/tagtip.js +7 -4
- package/lib/core/store/models/customIcon.js +11 -6
- package/lib/core/utils/imageUtil.js +7 -4
- package/lib/core/utils/metricUtil.js +13 -1
- package/lib/core/utils/saveSerialize.js +7 -4
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +8 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +57 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +49 -36
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +9 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +73 -35
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +9 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +31 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +14 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +7 -4
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +8 -6
- package/lib/networkTopo/components/Link/hook.js +23 -15
- package/lib/networkTopo/components/Link/index.js +32 -18
- package/lib/networkTopo/components/Link/setting.js +8 -6
- package/lib/networkTopo/getTopoData.js +23 -10
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +7 -4
- package/lib/networkTopo/models/TopoCenter.js +24 -10
- package/lib/networkTopo/services/cmdb.js +336 -235
- package/lib/networkTopo/services/mdc.js +24 -14
- package/lib/networkTopo/services/metric.js +16 -10
- package/lib/networkTopo/services/model.js +414 -284
- package/lib/networkTopo/utils/exportData.js +7 -4
- package/lib/utils/clipboardUtil.d.ts +7 -0
- package/lib/utils/clipboardUtil.js +113 -0
- package/lib/utils/htElementDataUtil.js +4 -2
- package/package.json +3 -2
@@ -6,14 +6,12 @@ import { getElements } from "../../utils/htElementUtils";
|
|
6
6
|
import ResourceConfigUtil from "../../utils/ResourceConfigUtil";
|
7
7
|
import { DEFAULT_GROUP } from "../../utils/template";
|
8
8
|
export default function (props) {
|
9
|
-
var _ref, _ref2, _updateGroupResources, _addLayerStaticResources;
|
10
|
-
|
11
9
|
var topo = props.topo;
|
12
10
|
var store = topo.store;
|
13
11
|
var editDispatchers = store.useModelDispatchers('topoConfig');
|
14
12
|
|
15
|
-
var loadConfig = function
|
16
|
-
|
13
|
+
var loadConfig = /*#__PURE__*/function () {
|
14
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
17
15
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
18
16
|
while (1) switch (_context.prev = _context.next) {
|
19
17
|
case 0:
|
@@ -25,8 +23,12 @@ export default function (props) {
|
|
25
23
|
return _context.stop();
|
26
24
|
}
|
27
25
|
}, _callee);
|
28
|
-
}))
|
29
|
-
|
26
|
+
}));
|
27
|
+
|
28
|
+
return function loadConfig() {
|
29
|
+
return _ref.apply(this, arguments);
|
30
|
+
};
|
31
|
+
}();
|
30
32
|
/**
|
31
33
|
* 获取拓扑资源配置
|
32
34
|
*
|
@@ -54,8 +56,8 @@ export default function (props) {
|
|
54
56
|
return getConfig().groups;
|
55
57
|
}
|
56
58
|
|
57
|
-
var updateConfig = function
|
58
|
-
|
59
|
+
var updateConfig = /*#__PURE__*/function () {
|
60
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(config) {
|
59
61
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
60
62
|
while (1) switch (_context2.prev = _context2.next) {
|
61
63
|
case 0:
|
@@ -67,8 +69,12 @@ export default function (props) {
|
|
67
69
|
return _context2.stop();
|
68
70
|
}
|
69
71
|
}, _callee2);
|
70
|
-
}))
|
71
|
-
|
72
|
+
}));
|
73
|
+
|
74
|
+
return function updateConfig(_x) {
|
75
|
+
return _ref2.apply(this, arguments);
|
76
|
+
};
|
77
|
+
}(); // 查找分组
|
72
78
|
|
73
79
|
|
74
80
|
var getGroupById = function getGroupById(groupId) {
|
@@ -165,7 +171,11 @@ export default function (props) {
|
|
165
171
|
function addGroupAt(group, index) {}
|
166
172
|
|
167
173
|
function updateGroupResources(_x2, _x3) {
|
168
|
-
return
|
174
|
+
return _updateGroupResources.apply(this, arguments);
|
175
|
+
}
|
176
|
+
|
177
|
+
function _updateGroupResources() {
|
178
|
+
_updateGroupResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(groupData, resources) {
|
169
179
|
var config;
|
170
180
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
171
181
|
while (1) switch (_context3.prev = _context3.next) {
|
@@ -190,7 +200,8 @@ export default function (props) {
|
|
190
200
|
return _context3.stop();
|
191
201
|
}
|
192
202
|
}, _callee3);
|
193
|
-
}))
|
203
|
+
}));
|
204
|
+
return _updateGroupResources.apply(this, arguments);
|
194
205
|
}
|
195
206
|
|
196
207
|
function matchGroup(group, data) {
|
@@ -198,7 +209,18 @@ export default function (props) {
|
|
198
209
|
}
|
199
210
|
|
200
211
|
function addLayerStaticResources(_x4, _x5) {
|
201
|
-
return
|
212
|
+
return _addLayerStaticResources.apply(this, arguments);
|
213
|
+
}
|
214
|
+
/**
|
215
|
+
* 从拓扑图解析出拓扑资源配置
|
216
|
+
*
|
217
|
+
* @param {ht.DataModel} dataModel
|
218
|
+
* @returns {{layers, groups, resources}}
|
219
|
+
*/
|
220
|
+
|
221
|
+
|
222
|
+
function _addLayerStaticResources() {
|
223
|
+
_addLayerStaticResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data, newResourceIds) {
|
202
224
|
var config;
|
203
225
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
204
226
|
while (1) switch (_context4.prev = _context4.next) {
|
@@ -225,15 +247,9 @@ export default function (props) {
|
|
225
247
|
return _context4.stop();
|
226
248
|
}
|
227
249
|
}, _callee4);
|
228
|
-
}))
|
250
|
+
}));
|
251
|
+
return _addLayerStaticResources.apply(this, arguments);
|
229
252
|
}
|
230
|
-
/**
|
231
|
-
* 从拓扑图解析出拓扑资源配置
|
232
|
-
*
|
233
|
-
* @param {ht.DataModel} dataModel
|
234
|
-
* @returns {{layers, groups, resources}}
|
235
|
-
*/
|
236
|
-
|
237
253
|
|
238
254
|
function getConfigFromHt() {
|
239
255
|
return ResourceConfigUtil.getResourceConfigFromHt(topo);
|