@riil-frontend/component-topology 12.0.0-dev.2 → 12.0.0-dev.21
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 +1 -1
- package/build/index.css +1 -1
- package/build/index.js +13 -13
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +1 -1
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +58 -3
- package/es/core/components/AlarmListPanel/index.js +1 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +1 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +1 -1
- package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +1 -1
- package/es/core/components/ResourceViewAttributeSetting/Setting.js +1 -1
- package/es/core/components/TopoView/topoView.js +6 -2
- package/es/core/editor/components/BackgroundView/index.js +1 -1
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +1 -1
- package/es/core/editor/components/EditorPlugin.js +1 -1
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +1 -1
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +5 -12
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -10
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +9 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +2 -2
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
- package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +1 -1
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +1 -1
- package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +1 -1
- package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
- package/es/core/editor/store/background.js +1 -1
- package/es/core/editor/store/historyManager.js +1 -1
- package/es/core/editor/store/topoEdit.js +1 -1
- package/es/core/editor/utils/copyElementUtil.js +12 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -7
- package/es/core/hooks/__tests__/useCiAttributeChange.test.js +0 -0
- package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -1
- package/es/core/hooks/useCiAttributeChange.js +31 -15
- package/es/core/hooks/useGraphAlarmDisplay.js +62 -40
- package/es/core/hooks/useManageStatus.js +1 -1
- package/es/core/hooks/usePolling.js +1 -1
- package/es/core/hooks/useResourceConfig.js +1 -3
- package/es/core/hooks/useTopoEdit.js +51 -54
- package/es/core/models/Alarm.js +29 -17
- package/es/core/models/AttributeMetricDisplay.js +15 -6
- package/es/core/models/HistoryManager.js +1 -1
- package/es/core/models/SelectionModel.js +1 -1
- package/es/core/models/TopoApp.js +2 -2
- package/es/core/models/attributeFormatter/formatter/graphTransform.js +1 -1
- package/es/core/models/attributeFormatter/index.js +1 -1
- package/es/core/models/cache/CiCache.d.ts +1 -1
- package/es/core/models/cache/CiCache.js +3 -3
- package/es/core/models/cache/CiTypeCache.js +5 -1
- package/es/core/models/cache/DictCache.js +1 -1
- package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
- package/es/core/models/tagstips/ElementTagTipConfig.js +1 -1
- package/es/core/models/topoData.js +0 -1
- package/es/core/services/alarm.js +1 -1
- package/es/core/services/index.js +1 -1
- package/es/core/services/topo/basic.js +2 -2
- package/es/core/store/models/customIcon.js +1 -1
- package/es/core/store/models/displayConfig.js +1 -1
- package/es/core/store/models/selection.js +1 -1
- package/es/core/store/models/topoBaseInfoOverview.js +1 -1
- package/es/core/store/models/topoBizMod.js +1 -1
- package/es/core/store/models/topoConfig.js +7 -10
- package/es/core/store/models/topoGraphView.js +1 -1
- package/es/core/store/models/topoMod.js +82 -135
- package/es/core/store/models/viewer/lock.js +1 -1
- package/es/core/store/models/viewer/resourceDetail.js +1 -1
- package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
- package/es/core/utils/edgeUtil.js +10 -1
- package/es/core/utils/metricUtil.js +1 -1
- package/es/core/utils/showGraphManageStatusUtil.js +3 -2
- package/es/core/utils/showMessage.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +1 -1
- package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/es/networkTopo/components/Link/index.js +1 -1
- package/es/networkTopo/components/TopoView.js +6 -11
- package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +1 -1
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +1 -1
- package/es/networkTopo/models/LinkTagsTipsBuilder.js +1 -1
- package/es/networkTopo/models/TopoCenter.js +1 -1
- package/es/networkTopo/services/model.js +1 -1
- package/es/networkTopo/services/topo/basic.js +4 -4
- package/es/networkTopo/services/topo/ciInfo.js +1 -1
- package/es/networkTopo/store/functionAuth.js +1 -1
- package/es/networkTopo/store/topoCenter.js +1 -1
- package/es/networkTopo/store/topoTreeMod.js +1 -1
- package/es/networkTopo/utils/exportData.js +1 -1
- package/es/style.js +1 -1
- package/es/utils/ResourceConfigUtil.js +4 -37
- package/es/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
- package/es/utils/ciRefAttributeTranslateUtil.js +155 -0
- package/es/utils/format.js +1 -1
- package/es/utils/topoData.js +4 -2
- package/lib/components/BatchAttrMetric/setting.js +2 -2
- package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +2 -2
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +2 -2
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +60 -3
- package/lib/core/components/AlarmListPanel/index.js +1 -1
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -3
- package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +2 -2
- package/lib/core/components/ResourceViewAttributeSetting/Setting.js +2 -2
- package/lib/core/components/TopoView/topoView.js +14 -10
- package/lib/core/editor/components/BackgroundView/index.js +3 -3
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +2 -2
- package/lib/core/editor/components/EditorPlugin.js +3 -3
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +2 -4
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +2 -4
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +2 -4
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +6 -12
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -9
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +8 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
- package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +5 -5
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +3 -3
- package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +2 -2
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
- package/lib/core/editor/store/background.js +1 -1
- package/lib/core/editor/store/historyManager.js +1 -1
- package/lib/core/editor/store/topoEdit.js +1 -1
- package/lib/core/editor/utils/copyElementUtil.js +15 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -6
- package/lib/core/hooks/__tests__/useCiAttributeChange.test.js +1 -0
- package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -3
- package/lib/core/hooks/useCiAttributeChange.js +30 -14
- package/lib/core/hooks/useGraphAlarmDisplay.js +62 -40
- package/lib/core/hooks/useManageStatus.js +1 -1
- package/lib/core/hooks/usePolling.js +3 -3
- package/lib/core/hooks/useResourceConfig.js +1 -3
- package/lib/core/hooks/useTopoEdit.js +50 -53
- package/lib/core/models/Alarm.js +38 -26
- package/lib/core/models/AttributeMetricDisplay.js +18 -6
- package/lib/core/models/HistoryManager.js +8 -8
- package/lib/core/models/SelectionModel.js +5 -5
- package/lib/core/models/TopoApp.js +4 -6
- package/lib/core/models/attributeFormatter/formatter/graphTransform.js +2 -4
- package/lib/core/models/attributeFormatter/index.js +1 -1
- package/lib/core/models/cache/CiCache.d.ts +1 -1
- package/lib/core/models/cache/CiCache.js +3 -3
- package/lib/core/models/cache/CiTypeCache.js +6 -2
- package/lib/core/models/cache/DictCache.js +2 -2
- package/lib/core/models/plugins/resourceWebControllUrl.js +2 -2
- package/lib/core/models/tagstips/ElementTagTipConfig.js +2 -2
- package/lib/core/models/topoData.js +0 -1
- package/lib/core/services/alarm.js +2 -2
- package/lib/core/services/index.js +1 -1
- package/lib/core/services/topo/basic.js +2 -2
- package/lib/core/store/models/customIcon.js +3 -3
- package/lib/core/store/models/displayConfig.js +1 -1
- package/lib/core/store/models/selection.js +1 -1
- package/lib/core/store/models/topoBaseInfoOverview.js +1 -1
- package/lib/core/store/models/topoBizMod.js +1 -1
- package/lib/core/store/models/topoConfig.js +7 -10
- package/lib/core/store/models/topoGraphView.js +1 -1
- package/lib/core/store/models/topoMod.js +89 -142
- package/lib/core/store/models/viewer/lock.js +1 -1
- package/lib/core/store/models/viewer/resourceDetail.js +1 -1
- package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
- package/lib/core/utils/edgeUtil.js +12 -1
- package/lib/core/utils/metricUtil.js +1 -1
- package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
- package/lib/core/utils/showMessage.js +2 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +6 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +3 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +2 -2
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/lib/networkTopo/components/Link/index.js +2 -2
- package/lib/networkTopo/components/TopoView.js +5 -14
- package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +4 -4
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -5
- package/lib/networkTopo/models/LinkTagsTipsBuilder.js +3 -3
- package/lib/networkTopo/models/TopoCenter.js +1 -1
- package/lib/networkTopo/services/model.js +1 -3
- package/lib/networkTopo/services/topo/basic.js +4 -6
- package/lib/networkTopo/services/topo/ciInfo.js +0 -2
- package/lib/networkTopo/store/functionAuth.js +1 -1
- package/lib/networkTopo/store/topoCenter.js +1 -1
- package/lib/networkTopo/store/topoTreeMod.js +5 -5
- package/lib/networkTopo/utils/exportData.js +1 -3
- package/lib/style.js +1 -1
- package/lib/utils/ResourceConfigUtil.js +4 -39
- package/lib/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
- package/lib/utils/ciRefAttributeTranslateUtil.js +168 -0
- package/lib/utils/format.js +1 -1
- package/lib/utils/topoData.js +4 -2
- package/package.json +4 -4
@@ -383,33 +383,26 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
383
383
|
var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(node) {
|
384
384
|
var _node$getEdges$toArra, _node$getEdges;
|
385
385
|
|
386
|
-
var
|
386
|
+
var edges;
|
387
387
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
388
388
|
while (1) switch (_context4.prev = _context4.next) {
|
389
389
|
case 0:
|
390
|
-
|
390
|
+
// console.log("删除关联在节点上的出口链路- node, config", node, config);
|
391
|
+
edges = (_node$getEdges$toArra = (_node$getEdges = node.getEdges()) === null || _node$getEdges === void 0 ? void 0 : _node$getEdges.toArray()) !== null && _node$getEdges$toArra !== void 0 ? _node$getEdges$toArra : [];
|
391
392
|
|
392
|
-
|
393
|
+
if (edges.length > 0) {
|
394
|
+
edges.map(function (edge) {
|
395
|
+
if (edge.getTag()) {
|
396
|
+
var link = topo.dataModel.getDataById(edge.getTag());
|
393
397
|
|
394
|
-
|
395
|
-
|
396
|
-
|
398
|
+
if (link && (0, _linkUtils.isExitLink)(link)) {
|
399
|
+
topo.getGraphView().dm().remove(edge);
|
400
|
+
}
|
401
|
+
}
|
402
|
+
});
|
397
403
|
}
|
398
404
|
|
399
|
-
|
400
|
-
|
401
|
-
edges.map(function (edge) {
|
402
|
-
if (edge.a("dtype") === "link" && exportLinkIdList.indexOf(edge.getTag()) >= 0) {
|
403
|
-
// exLink.push(edge);
|
404
|
-
topo.getGraphView().dm().remove(edge);
|
405
|
-
exportLinkIdList.splice(config.exportLinkIdList.indexOf(edge.getTag()), 1);
|
406
|
-
}
|
407
|
-
});
|
408
|
-
config.exportLinkIdList = exportLinkIdList;
|
409
|
-
_context4.next = 8;
|
410
|
-
return resourceConfig.updateConfig(config);
|
411
|
-
|
412
|
-
case 8:
|
405
|
+
case 2:
|
413
406
|
case "end":
|
414
407
|
return _context4.stop();
|
415
408
|
}
|
@@ -591,7 +584,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
591
584
|
|
592
585
|
function _bindViewResources() {
|
593
586
|
_bindViewResources = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(data) {
|
594
|
-
var config,
|
587
|
+
var config, result, _elements;
|
595
588
|
|
596
589
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
597
590
|
while (1) switch (_context12.prev = _context12.next) {
|
@@ -607,15 +600,19 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
607
600
|
return editDispatchers.fetchDataByConfig();
|
608
601
|
|
609
602
|
case 6:
|
610
|
-
|
611
|
-
|
612
|
-
saveBind(_componentTopologyGraph.TopoEvent.DATA_TYPE_RESOURCE_COMBO, elements); // 临时放这里,仅拓扑中心有
|
603
|
+
result = _context12.sent;
|
604
|
+
console.log("fetchDataByConfig", result);
|
613
605
|
|
614
|
-
if (
|
615
|
-
|
606
|
+
if (result) {
|
607
|
+
_elements = result.elements;
|
608
|
+
saveBind(_componentTopologyGraph.TopoEvent.DATA_TYPE_RESOURCE_COMBO, _elements); // 临时放这里,仅拓扑中心有
|
609
|
+
|
610
|
+
if (topo.linkDynamicStyleExecutor) {
|
611
|
+
topo.linkDynamicStyleExecutor.execute();
|
612
|
+
}
|
616
613
|
}
|
617
614
|
|
618
|
-
case
|
615
|
+
case 9:
|
619
616
|
case "end":
|
620
617
|
return _context12.stop();
|
621
618
|
}
|
@@ -630,7 +627,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
630
627
|
|
631
628
|
function _addLayerResources() {
|
632
629
|
_addLayerResources = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(group, newResourceIds) {
|
633
|
-
var _yield$
|
630
|
+
var _yield$editDispatcher3, elements, newElements;
|
634
631
|
|
635
632
|
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
636
633
|
while (1) switch (_context13.prev = _context13.next) {
|
@@ -645,8 +642,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
645
642
|
return editDispatchers.fetchDataByConfig();
|
646
643
|
|
647
644
|
case 5:
|
648
|
-
_yield$
|
649
|
-
elements = _yield$
|
645
|
+
_yield$editDispatcher3 = _context13.sent;
|
646
|
+
elements = _yield$editDispatcher3.elements;
|
650
647
|
// 2022-11-10 修复 添加资源后分层重新布局问题,仅布局新增资源。替换api topo.updateElements(data)
|
651
648
|
newElements = findUNExistedElements(elements);
|
652
649
|
|
@@ -869,7 +866,9 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
869
866
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
870
867
|
while (1) switch (_context8.prev = _context8.next) {
|
871
868
|
case 0:
|
872
|
-
dm = htTopo.getGraphView().dm(); //
|
869
|
+
dm = htTopo.getGraphView().dm(); // 移除旧节点。先删除后创建,解决ip节点替换ping资源后链路丢失问题
|
870
|
+
|
871
|
+
dm.remove(node); // 创建
|
873
872
|
|
874
873
|
newLinkElements = findUNExistedLinkElements(elements);
|
875
874
|
createElementsData = null;
|
@@ -931,22 +930,13 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
931
930
|
|
932
931
|
|
933
932
|
sm = htTopo.getGraphView().sm();
|
934
|
-
sm.setSelection([newElement]); //
|
933
|
+
sm.setSelection([newElement]); // 临时放这里,仅拓扑中心有
|
935
934
|
|
936
|
-
dm.remove(node); // saveBind(TopoEvent.DATA_TYPE_RESOURCE_SINGLE, newDatas);
|
937
|
-
// node.a("customName", null);
|
938
|
-
// 删除关联在节点上的出口链路
|
939
|
-
|
940
|
-
_context8.next = 12;
|
941
|
-
return deleteExLink(node);
|
942
|
-
|
943
|
-
case 12:
|
944
|
-
// 临时放这里,仅拓扑中心有
|
945
935
|
if (topo.linkDynamicStyleExecutor) {
|
946
936
|
topo.linkDynamicStyleExecutor.execute();
|
947
937
|
}
|
948
938
|
|
949
|
-
case
|
939
|
+
case 11:
|
950
940
|
case "end":
|
951
941
|
return _context8.stop();
|
952
942
|
}
|
@@ -1011,11 +1001,12 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1011
1001
|
break;
|
1012
1002
|
}
|
1013
1003
|
|
1004
|
+
topo.historyManager.endTransaction();
|
1005
|
+
|
1014
1006
|
_message["default"].error("关联资源失败");
|
1015
1007
|
|
1016
|
-
_rlog["default"].
|
1008
|
+
_rlog["default"].error("关联资源失败");
|
1017
1009
|
|
1018
|
-
topo.historyManager.endTransaction();
|
1019
1010
|
return _context9.abrupt("return", false);
|
1020
1011
|
|
1021
1012
|
case 23:
|
@@ -1047,7 +1038,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1047
1038
|
|
1048
1039
|
function _relateNodeIp() {
|
1049
1040
|
_relateNodeIp = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(txtValue, nodeElement) {
|
1050
|
-
var dm, isUnique,
|
1041
|
+
var dm, isUnique, ipNodeData, configObj, configData, _elements2, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
|
1051
1042
|
|
1052
1043
|
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
1053
1044
|
while (1) switch (_context15.prev = _context15.next) {
|
@@ -1069,16 +1060,16 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1069
1060
|
isUnique = (0, _exitLinkUtil.isUniqueIp)(dm, txtValue, nodeElement); // 获取关联链路
|
1070
1061
|
|
1071
1062
|
if (!isUnique) {
|
1072
|
-
_context15.next =
|
1063
|
+
_context15.next = 24;
|
1073
1064
|
break;
|
1074
1065
|
}
|
1075
1066
|
|
1076
|
-
|
1067
|
+
ipNodeData = (0, _exitLinkUtil.buildIpNode)(txtValue);
|
1077
1068
|
_context15.next = 8;
|
1078
1069
|
return deleteExLink(nodeElement);
|
1079
1070
|
|
1080
1071
|
case 8:
|
1081
|
-
nodeElement.a(
|
1072
|
+
nodeElement.a(ipNodeData);
|
1082
1073
|
nodeElement.setName(txtValue);
|
1083
1074
|
nodeElement.setTag("ip:" + txtValue); // 获取配置
|
1084
1075
|
|
@@ -1093,8 +1084,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1093
1084
|
case 16:
|
1094
1085
|
configData = _context15.sent;
|
1095
1086
|
// console.log("configData",configObj, configData);
|
1096
|
-
|
1097
|
-
newLinkElements = findUNExistedLinkElements(
|
1087
|
+
_elements2 = configData.elements;
|
1088
|
+
newLinkElements = findUNExistedLinkElements(_elements2); // console.log("configData", configData, newLinkElements);
|
1098
1089
|
|
1099
1090
|
newLink = newLinkElements.filter(function (item) {
|
1100
1091
|
return item.type === "link";
|
@@ -1109,15 +1100,21 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1109
1100
|
nodes: [],
|
1110
1101
|
links: newLink,
|
1111
1102
|
linkGroups: newLinkGroup
|
1112
|
-
};
|
1103
|
+
};
|
1104
|
+
console.log("createElementsData", createElementsData);
|
1113
1105
|
|
1114
1106
|
if ([].concat(newLink, newLinkGroup).length > 0) {
|
1115
1107
|
_htTopo = topo.getHtTopo();
|
1116
1108
|
|
1117
|
-
_htTopo.createElements(createElementsData);
|
1109
|
+
_htTopo.createElements(createElementsData); // 临时放这里,仅拓扑中心有
|
1110
|
+
|
1111
|
+
|
1112
|
+
if (topo.linkDynamicStyleExecutor) {
|
1113
|
+
topo.linkDynamicStyleExecutor.execute();
|
1114
|
+
}
|
1118
1115
|
}
|
1119
1116
|
|
1120
|
-
case
|
1117
|
+
case 24:
|
1121
1118
|
case "end":
|
1122
1119
|
return _context15.stop();
|
1123
1120
|
}
|
package/lib/core/models/Alarm.js
CHANGED
@@ -13,7 +13,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
13
13
|
|
14
14
|
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
17
17
|
|
18
18
|
var _utils = require("@riil-frontend/utils");
|
19
19
|
|
@@ -94,7 +94,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
94
94
|
return;
|
95
95
|
}
|
96
96
|
|
97
|
-
|
97
|
+
_componentTopologyUtils.rlog.info('Alarm.open 打开告警通道', id);
|
98
98
|
|
99
99
|
this.openTopoAlarm(id); // this.hmGetTopoAlarm(id);
|
100
100
|
|
@@ -116,7 +116,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
116
116
|
return;
|
117
117
|
}
|
118
118
|
|
119
|
-
|
119
|
+
_componentTopologyUtils.rlog.info('关闭告警通道', currentTopoId); // 取消订阅告警推送
|
120
120
|
// 关闭告警推送通道
|
121
121
|
|
122
122
|
|
@@ -199,7 +199,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
199
199
|
case 0:
|
200
200
|
result = this.getAlarms();
|
201
201
|
|
202
|
-
|
202
|
+
_componentTopologyUtils.rlog.debug('hmGetTopoAlarmByDoc', result);
|
203
203
|
|
204
204
|
alarms = result.map(function (item) {
|
205
205
|
return item.obj;
|
@@ -284,7 +284,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
284
284
|
case 9:
|
285
285
|
result = _context3.sent;
|
286
286
|
|
287
|
-
|
287
|
+
_componentTopologyUtils.rlog.debug('getAlarmById-result', result); // if (alarmIsOpened) {
|
288
288
|
// //this.topo.loadAlarm(result.datas);
|
289
289
|
// this.handleAlarmEvent({ type: "alarm", data: result.datas });
|
290
290
|
// }
|
@@ -414,7 +414,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
414
414
|
case 11:
|
415
415
|
this.secretKey = _context6.sent;
|
416
416
|
|
417
|
-
|
417
|
+
_componentTopologyUtils.rlog.info('openTopoAlarm 打开拓扑告警推送-------------------开始');
|
418
418
|
|
419
419
|
this.updateState({
|
420
420
|
alarmOpening: false,
|
@@ -427,7 +427,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
427
427
|
_context6.prev = 16;
|
428
428
|
_context6.t0 = _context6["catch"](8);
|
429
429
|
|
430
|
-
|
430
|
+
_componentTopologyUtils.rlog.error('打开拓扑告警推送 失败');
|
431
431
|
|
432
432
|
this.updateState({
|
433
433
|
alarmOpening: false
|
@@ -475,7 +475,7 @@ var Alarm = /*#__PURE__*/function () {
|
|
475
475
|
case 3:
|
476
476
|
this.currentTopoId = null;
|
477
477
|
|
478
|
-
|
478
|
+
_componentTopologyUtils.rlog.debug('useAlarm.useEffect 告警WebSocket 结束');
|
479
479
|
|
480
480
|
this.updateState({
|
481
481
|
topoAlarmIsOpen: false,
|
@@ -557,25 +557,34 @@ var Alarm = /*#__PURE__*/function () {
|
|
557
557
|
resAndMetrics = this.topo.store.getState().topoMod.resAndMetrics;
|
558
558
|
resIdsList = resAndMetrics.resIdsList, nodeIdsList = resAndMetrics.nodeIdsList, linkIdsList = resAndMetrics.linkIdsList;
|
559
559
|
alarmDispatchers = this.topo.store.getModelDispatchers('topoAlarm'); // 添加事件
|
560
|
-
|
560
|
+
|
561
|
+
console.log("handleAlarmEvent-接收到推送的原始告警信息", alertData);
|
561
562
|
|
562
563
|
if (!((0, _utils.isAvailableArray)(alertData) && (0, _utils.isAvailableArray)(resIdsList))) {
|
563
|
-
_context9.next =
|
564
|
+
_context9.next = 27;
|
564
565
|
break;
|
565
566
|
}
|
566
567
|
|
567
568
|
sendAl = [];
|
568
569
|
idsList = [].concat(nodeIdsList, linkIdsList);
|
569
570
|
operations = [];
|
571
|
+
console.log('idsList---------', idsList);
|
570
572
|
idsList.forEach(function (idItem) {
|
571
573
|
if (idItem.operation === null) {
|
572
574
|
operations.push(idItem.ciId);
|
573
575
|
}
|
574
576
|
});
|
575
577
|
alertData.forEach(function (item, index) {
|
576
|
-
var _item$resourceId;
|
578
|
+
var _item$resourceId, _item$alertCode;
|
577
579
|
|
578
580
|
var ciId = (_item$resourceId = item.resourceId) !== null && _item$resourceId !== void 0 ? _item$resourceId : item.ciId;
|
581
|
+
var isSub = false;
|
582
|
+
|
583
|
+
if ((_item$alertCode = item.alertCode) !== null && _item$alertCode !== void 0 && _item$alertCode.startsWith("cmp")) {
|
584
|
+
ciId = "sub:" + item.mainCiId;
|
585
|
+
isSub = true;
|
586
|
+
}
|
587
|
+
|
579
588
|
var obj = {
|
580
589
|
id: ciId,
|
581
590
|
level: item.alertLevel,
|
@@ -584,28 +593,31 @@ var Alarm = /*#__PURE__*/function () {
|
|
584
593
|
obj: item,
|
585
594
|
info: item.alertType,
|
586
595
|
ciCode: item === null || item === void 0 ? void 0 : item.ciCode,
|
587
|
-
ruleId: item === null || item === void 0 ? void 0 : item.ruleId
|
596
|
+
ruleId: item === null || item === void 0 ? void 0 : item.ruleId,
|
597
|
+
isSub: isSub
|
588
598
|
};
|
589
599
|
|
590
600
|
if (resIdsList.indexOf(ciId) >= 0 && operations.indexOf(ciId) < 0) {
|
591
601
|
sendAl.push(obj);
|
592
|
-
}
|
593
|
-
|
602
|
+
} // const ciId = `${isSub}+${item.resourceId ?? item.ciId}`;
|
603
|
+
|
604
|
+
});
|
605
|
+
console.log("before-combAlarmData", sendAl, idsList);
|
594
606
|
|
595
607
|
if (!(sendAl.length > 0)) {
|
596
|
-
_context9.next =
|
608
|
+
_context9.next = 27;
|
597
609
|
break;
|
598
610
|
}
|
599
611
|
|
600
|
-
|
612
|
+
_componentTopologyUtils.rlog.debug('过滤掉非本拓扑的告警信息 告警开关-推送告警到ht-alarmIsOpened-sendAl', alarmIsOpened, sendAl);
|
601
613
|
|
602
|
-
_context9.prev =
|
603
|
-
_context9.next =
|
614
|
+
_context9.prev = 15;
|
615
|
+
_context9.next = 18;
|
604
616
|
return alarmDispatchers.combAlarmData({
|
605
617
|
alarmdata: sendAl
|
606
618
|
});
|
607
619
|
|
608
|
-
case
|
620
|
+
case 18:
|
609
621
|
_yield$alarmDispatche2 = _context9.sent;
|
610
622
|
eqFlag = _yield$alarmDispatche2.eqFlag;
|
611
623
|
alarmlist = _yield$alarmDispatche2.alarmlist;
|
@@ -626,20 +638,20 @@ var Alarm = /*#__PURE__*/function () {
|
|
626
638
|
}
|
627
639
|
}
|
628
640
|
|
629
|
-
_context9.next =
|
641
|
+
_context9.next = 27;
|
630
642
|
break;
|
631
643
|
|
632
|
-
case
|
633
|
-
_context9.prev =
|
634
|
-
_context9.t0 = _context9["catch"](
|
644
|
+
case 24:
|
645
|
+
_context9.prev = 24;
|
646
|
+
_context9.t0 = _context9["catch"](15);
|
635
647
|
|
636
|
-
|
648
|
+
_componentTopologyUtils.rlog.error('告警发送异常', _context9.t0);
|
637
649
|
|
638
|
-
case
|
650
|
+
case 27:
|
639
651
|
case "end":
|
640
652
|
return _context9.stop();
|
641
653
|
}
|
642
|
-
}, _callee9, this, [[
|
654
|
+
}, _callee9, this, [[15, 24]]);
|
643
655
|
}));
|
644
656
|
|
645
657
|
function handleAlarmEvent(_x7) {
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
11
11
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
15
15
|
|
16
16
|
var _ResourceInfoDisplay = require("../../constants/ResourceInfoDisplay");
|
17
17
|
|
@@ -23,6 +23,8 @@ var _DictCache = _interopRequireDefault(require("./cache/DictCache"));
|
|
23
23
|
|
24
24
|
var _nodeNameVisibleUtil = require("./utils/nodeNameVisibleUtil");
|
25
25
|
|
26
|
+
var _ciRefAttributeTranslateUtil = require("../../utils/ciRefAttributeTranslateUtil");
|
27
|
+
|
26
28
|
function isGraphField(item) {
|
27
29
|
return item.type === 'graph';
|
28
30
|
}
|
@@ -346,7 +348,7 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
346
348
|
}); // 翻译引用属性
|
347
349
|
|
348
350
|
_context.next = 4;
|
349
|
-
return
|
351
|
+
return (0, _ciRefAttributeTranslateUtil.translateCisRefAttributeName)(ciDatas);
|
350
352
|
|
351
353
|
case 4:
|
352
354
|
ciDatas = _context.sent;
|
@@ -449,7 +451,7 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
449
451
|
});
|
450
452
|
});
|
451
453
|
} else {
|
452
|
-
|
454
|
+
_componentTopologyUtils.rlog.warn("\u63A8\u9001\u5C5E\u6027\u6307\u6807\u6570\u636E\uFF1A\u672A\u67E5\u8BE2\u5230ciType " + ciType, ciData);
|
453
455
|
}
|
454
456
|
});
|
455
457
|
refIds = Object.keys(refIdMap);
|
@@ -474,8 +476,10 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
474
476
|
var refCi = refCiMap[refAttrs.id];
|
475
477
|
|
476
478
|
if (refCi) {
|
479
|
+
// 引用ci名称获取规则:如果ci是树形结构(例如区域),取 tree_name_path;非树形,取display_name
|
480
|
+
var displayName = refCi.attributes.tree_name_path || refCi.attributes.display_name;
|
477
481
|
attributeMap[refAttrs.attrCode + "_object"] = {
|
478
|
-
displayName:
|
482
|
+
displayName: displayName
|
479
483
|
};
|
480
484
|
}
|
481
485
|
});
|
@@ -535,7 +539,9 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
535
539
|
return (0, _extends2["default"])({}, item, {
|
536
540
|
tags: tags
|
537
541
|
});
|
538
|
-
});
|
542
|
+
});
|
543
|
+
|
544
|
+
_componentTopologyUtils.rlog.debug('推送标注 => ht 失败', elementTagsAndTips);
|
539
545
|
|
540
546
|
var htTopo = topo.getHtTopo();
|
541
547
|
|
@@ -543,7 +549,13 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
|
|
543
549
|
var _topo$historyManager, _topo$historyManager2;
|
544
550
|
|
545
551
|
(_topo$historyManager = topo.historyManager) === null || _topo$historyManager === void 0 ? void 0 : _topo$historyManager.setDisabled(true, '加载标注');
|
546
|
-
|
552
|
+
|
553
|
+
try {
|
554
|
+
htTopo.loadTagAndTip(JSON.parse(JSON.stringify(elementTagsAndTips)));
|
555
|
+
} catch (error) {
|
556
|
+
_componentTopologyUtils.rlog.error('推送标注 => ht 失败', error);
|
557
|
+
}
|
558
|
+
|
547
559
|
(_topo$historyManager2 = topo.historyManager) === null || _topo$historyManager2 === void 0 ? void 0 : _topo$historyManager2.setDisabled(false, '加载标注');
|
548
560
|
}
|
549
561
|
}
|
@@ -7,7 +7,7 @@ exports["default"] = void 0;
|
|
7
7
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
9
|
|
10
|
-
var
|
10
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
11
11
|
|
12
12
|
var ht = window.ht;
|
13
13
|
|
@@ -20,7 +20,7 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
20
20
|
this.htHistoryManager = htHistoryManager;
|
21
21
|
htHistoryManager.clear();
|
22
22
|
|
23
|
-
|
23
|
+
_componentTopologyUtils.rlog.info('HistoryManager 初始化', htHistoryManager);
|
24
24
|
|
25
25
|
this.updateStore = this.updateStore.bind(this);
|
26
26
|
this.init();
|
@@ -70,7 +70,7 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
70
70
|
_proto.setDisabled = function setDisabled(disabled, message) {
|
71
71
|
this.htHistoryManager.setDisabled(disabled);
|
72
72
|
|
73
|
-
|
73
|
+
_componentTopologyUtils.rlog.debug("HistoryManager.setDisabled " + (disabled ? '禁用' : '启用') + (message ? "(" + message + ")" : '') + ": " + this.toString(), this.getHistories());
|
74
74
|
};
|
75
75
|
|
76
76
|
_proto.beginTransaction = function beginTransaction() {
|
@@ -105,7 +105,7 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
105
105
|
});
|
106
106
|
});
|
107
107
|
|
108
|
-
|
108
|
+
_componentTopologyUtils.rlog.debug("HistoryManager.beginTransaction: " + this.toString(), this.getHistories());
|
109
109
|
};
|
110
110
|
|
111
111
|
_proto.addStoreHistory = function addStoreHistory() {
|
@@ -131,7 +131,7 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
131
131
|
data: storeChanged
|
132
132
|
});
|
133
133
|
|
134
|
-
|
134
|
+
_componentTopologyUtils.rlog.debug('HistoryManager.addStoreHistory', storeChanged);
|
135
135
|
}
|
136
136
|
|
137
137
|
this.storeHistory = [];
|
@@ -141,7 +141,7 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
141
141
|
this.addStoreHistory();
|
142
142
|
this.htHistoryManager.endTransaction();
|
143
143
|
|
144
|
-
|
144
|
+
_componentTopologyUtils.rlog.debug("HistoryManager.endTransaction: " + this.toString(), this.getHistories());
|
145
145
|
};
|
146
146
|
|
147
147
|
_proto.clear = function clear() {
|
@@ -185,7 +185,7 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
185
185
|
return;
|
186
186
|
}
|
187
187
|
|
188
|
-
|
188
|
+
_componentTopologyUtils.rlog.debug('HistoryManager.undo', this.getHistories(), this.getHistoryIndex());
|
189
189
|
|
190
190
|
var storeHistory = this.getCurrentStoreHistory(true);
|
191
191
|
|
@@ -204,7 +204,7 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
204
204
|
_proto.redo = function redo() {
|
205
205
|
var _this4 = this;
|
206
206
|
|
207
|
-
|
207
|
+
_componentTopologyUtils.rlog.debug('HistoryManager.redo', this.getHistories(), this.getHistoryIndex());
|
208
208
|
|
209
209
|
var storeHistory = this.getCurrentStoreHistory(false);
|
210
210
|
|
@@ -7,7 +7,7 @@ exports["default"] = void 0;
|
|
7
7
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
9
|
|
10
|
-
var
|
10
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
11
11
|
|
12
12
|
var _useHtElements = _interopRequireDefault(require("../common/hooks/useHtElements"));
|
13
13
|
|
@@ -33,7 +33,7 @@ var SelectionModel = /*#__PURE__*/function () {
|
|
33
33
|
|
34
34
|
_this.updateStoreSelection(selectionArr);
|
35
35
|
} catch (e) {
|
36
|
-
|
36
|
+
_componentTopologyUtils.rlog.error('updateSelection error', e);
|
37
37
|
}
|
38
38
|
};
|
39
39
|
|
@@ -103,7 +103,7 @@ var SelectionModel = /*#__PURE__*/function () {
|
|
103
103
|
};
|
104
104
|
|
105
105
|
_proto.handleSelectionChange = function handleSelectionChange(e) {
|
106
|
-
|
106
|
+
_componentTopologyUtils.rlog.info('Selection handleSelectionChange', e);
|
107
107
|
|
108
108
|
this.updateSelection();
|
109
109
|
};
|
@@ -130,7 +130,7 @@ var SelectionModel = /*#__PURE__*/function () {
|
|
130
130
|
};
|
131
131
|
|
132
132
|
_proto.initListener = function initListener() {
|
133
|
-
|
133
|
+
_componentTopologyUtils.rlog.info('Selection initListener');
|
134
134
|
|
135
135
|
var dataModel = this.topo.getDataModel();
|
136
136
|
var selectionModel = this.topo.getSelectionModel();
|
@@ -143,7 +143,7 @@ var SelectionModel = /*#__PURE__*/function () {
|
|
143
143
|
return;
|
144
144
|
}
|
145
145
|
|
146
|
-
|
146
|
+
_componentTopologyUtils.rlog.info('Selection removeListener');
|
147
147
|
|
148
148
|
var dataModel = this.topo.getDataModel();
|
149
149
|
var selectionModel = this.topo.getSelectionModel();
|
@@ -13,8 +13,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
13
13
|
|
14
14
|
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
15
15
|
|
16
|
-
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
17
|
-
|
18
16
|
var _lodash = require("lodash");
|
19
17
|
|
20
18
|
var _topo = _interopRequireDefault(require("../services/topo"));
|
@@ -56,7 +54,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
|
56
54
|
var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
|
57
55
|
|
58
56
|
// eslint-disable-next-line no-undef
|
59
|
-
var version = typeof "12.0.0-dev.
|
57
|
+
var version = typeof "12.0.0-dev.21" === 'string' ? "12.0.0-dev.21" : null;
|
60
58
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
61
59
|
/**
|
62
60
|
* 拓扑显示和编辑
|
@@ -384,7 +382,7 @@ var Topo = /*#__PURE__*/function () {
|
|
384
382
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
385
383
|
while (1) switch (_context7.prev = _context7.next) {
|
386
384
|
case 0:
|
387
|
-
|
385
|
+
_componentTopologyUtils.rlog.info('TopoApp.open 打开拓扑图', id); // 如果是切换拓扑图,注销原拓扑图
|
388
386
|
|
389
387
|
|
390
388
|
lastId = this.id;
|
@@ -414,7 +412,7 @@ var Topo = /*#__PURE__*/function () {
|
|
414
412
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
415
413
|
while (1) switch (_context8.prev = _context8.next) {
|
416
414
|
case 0:
|
417
|
-
|
415
|
+
_componentTopologyUtils.rlog.info('关闭拓扑图', this.id);
|
418
416
|
|
419
417
|
if (this.id) {
|
420
418
|
_context8.next = 3;
|
@@ -547,7 +545,7 @@ var Topo = /*#__PURE__*/function () {
|
|
547
545
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
548
546
|
while (1) switch (_context12.prev = _context12.next) {
|
549
547
|
case 0:
|
550
|
-
|
548
|
+
_componentTopologyUtils.rlog.info('TopoApp.enterEditMode');
|
551
549
|
|
552
550
|
if (!this.options.onSwitchToEditModeBegin) {
|
553
551
|
_context12.next = 4;
|
@@ -1,11 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
3
|
exports.__esModule = true;
|
6
4
|
exports["default"] = graphTransform;
|
7
5
|
|
8
|
-
var
|
6
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
9
7
|
|
10
8
|
function graphTransform(options) {
|
11
9
|
var item = options.item,
|
@@ -17,7 +15,7 @@ function graphTransform(options) {
|
|
17
15
|
var node = topo.getDataModel().getDataByTag(ciData.id);
|
18
16
|
value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
|
19
17
|
} catch (error) {
|
20
|
-
|
18
|
+
_componentTopologyUtils.rlog.error(error);
|
21
19
|
}
|
22
20
|
|
23
21
|
return {
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
exports["default"] = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
9
9
|
|
10
10
|
var _attributeTransform = _interopRequireDefault(require("./formatter/attributeTransform"));
|
11
11
|
|
@@ -11,7 +11,7 @@ declare class CiCache {
|
|
11
11
|
* @param ids {string[]}
|
12
12
|
* @returns {Promise<Object>}
|
13
13
|
*/
|
14
|
-
load(ids: string[]): Promise<Object>;
|
14
|
+
load(ids: string[], refreshCiCache?: boolean): Promise<Object>;
|
15
15
|
getCi(id: string): Object;
|
16
16
|
}
|
17
17
|
declare const _default: CiCache;
|