@riil-frontend/component-topology 11.0.29 → 11.0.30
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 +50 -35
- package/es/common/components/ColorPicker/ColorPicker.js +18 -9
- package/es/common/components/ResourceTable/ResourceTable.js +9 -6
- package/es/common/plugins/useSelectionPlugin.js +23 -14
- package/es/components/BatchAttrMetric/constant.js +2 -2
- package/es/components/BatchAttrMetric/index.js +17 -10
- package/es/components/BatchAttrMetric/setting.js +52 -30
- package/es/components/BatchAttrMetric/utils.js +4 -2
- package/es/components/BooleanRadio.js +7 -5
- package/es/components/ColorPanel/components/ColorBlock/index.js +4 -3
- package/es/components/ColorPanel/components/FontColorRange/index.js +13 -9
- package/es/components/ColorPanel/index.js +40 -18
- package/es/components/Drawer/Drawer.js +18 -14
- package/es/components/FormTable/index.js +18 -13
- package/es/components/FullheightTab/FullheightTab.js +2 -0
- package/es/components/LayoutDirectionSelect/LayoutDirectionSelect.js +3 -6
- package/es/components/LayoutSelect/LayoutSelect.js +3 -6
- package/es/components/ModelAttrSelectDrawer/components/ModelAttrSelectDrawer.js +4 -4
- package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +20 -15
- package/es/components/MultiResourceDrawer/Content.js +22 -12
- package/es/components/MultiResourceDrawer/Dynamic.js +4 -2
- package/es/components/MultiResourceDrawer/ResourceCard/index.js +6 -4
- package/es/components/MultiResourceDrawer/ResourceSelect.js +4 -2
- package/es/components/MultiResourceDrawer/Static.js +4 -2
- package/es/components/MultiResourceDrawer/index.js +16 -8
- package/es/components/ResourceList/ResourceSelect.js +44 -27
- package/es/components/ResourceList/ResourceSelectConnect.js +7 -3
- package/es/components/ResourceSelect/ResourceSelectDrawer.js +11 -7
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +27 -14
- package/es/components/ResourceSelectDrawer/ResourceSelectList.js +8 -4
- package/es/components/SingleResourceDrawer/SelectDrawer.js +15 -6
- package/es/components/SingleResourceDrawer/SingleResourceDrawer.js +14 -7
- package/es/components/TagImageSelect/index.js +11 -8
- package/es/components/TagSelect/index.js +12 -8
- package/es/components/TemplateButton/Icon.js +7 -5
- package/es/components/TemplateButton/index.js +9 -6
- package/es/components/VerticalIconTab/VerticalIconTab.js +11 -7
- package/es/components/collapse/Collapse.js +8 -4
- package/es/components/collapse/Panel.js +17 -7
- package/es/constants/ResourceInfoDisplay.js +6 -6
- package/es/constants/ResourceTypeLimit.js +11 -20
- package/es/contextmenu/createMenuCommands.js +8 -7
- package/es/core/common/contextmenu/mergeContextmenu.js +2 -2
- package/es/core/common/hooks/ht/useDataModelDataPropertyChange.js +2 -0
- package/es/core/common/hooks/useHtElement.js +2 -1
- package/es/core/common/hooks/useHtElements.js +6 -5
- package/es/core/common/icons/icon.js +18 -17
- package/es/core/common/icons/useIcons.js +4 -1
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +13 -4
- package/es/core/components/AlarmListPanel/hooks/useAlarmList.js +7 -2
- package/es/core/components/AlarmListPanel/index.js +4 -2
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +17 -11
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +23 -13
- package/es/core/components/DisplaySettingDrawer/EdgeFlow.js +3 -1
- package/es/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +3 -1
- package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +25 -14
- package/es/core/components/DisplaySettingDrawer/LinkTag.js +3 -3
- package/es/core/components/DisplaySettingDrawer/NodeTag.js +1 -1
- package/es/core/components/DisplaySettingDrawer/NodeTip.js +1 -1
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +32 -25
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/CommonCheckboxGroup.js +7 -3
- package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +9 -6
- package/es/core/components/DisplaySettingDrawer/demo/Demo.js +3 -4
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +33 -10
- package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +5 -3
- package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +2 -0
- package/es/core/components/ResourceViewAttributeSetting/Setting.js +12 -7
- package/es/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +25 -7
- package/es/core/components/TopoView/GraphViewPanel.js +15 -10
- package/es/core/components/TopoView/topoView.js +62 -38
- package/es/core/components/titlebar/TitleBar.js +12 -4
- package/es/core/components/titlebar/widgets/TitleWidget.js +4 -2
- package/es/core/createTopoApp.js +1 -1
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +53 -21
- package/es/core/editor/components/BackgroundView/index.js +65 -24
- package/es/core/editor/components/BottomFloatTool/HelpIcon.js +15 -8
- package/es/core/editor/components/CustomIconPlugin/CustomIconPlugin.js +2 -5
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +19 -7
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +67 -24
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialogWrapper.js +5 -3
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +8 -3
- package/es/core/editor/components/EditorPlugin.js +8 -4
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +12 -6
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/index.js +6 -6
- package/es/core/editor/components/Sidebar/Sidebar.js +17 -8
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +7 -5
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +30 -14
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +7 -7
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +2 -2
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +2 -2
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +10 -7
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +10 -7
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +7 -7
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +12 -4
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +8 -7
- package/es/core/editor/components/Toolbar/EditorToolbar.js +7 -2
- package/es/core/editor/components/Toolbar/Toolbar.js +2 -0
- package/es/core/editor/components/Toolbar/buttons.js +15 -30
- package/es/core/editor/components/Toolbar/components/Tooltip.js +3 -2
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +11 -8
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +13 -7
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +42 -19
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundUtil.js +29 -9
- package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +7 -3
- package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +7 -3
- package/es/core/editor/components/Toolbar/widgets/Divider.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +8 -6
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +27 -13
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +17 -10
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +6 -5
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +3 -2
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +27 -14
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +44 -24
- package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +7 -4
- package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +10 -8
- package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +27 -16
- package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +6 -2
- package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +8 -4
- package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +23 -9
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +23 -9
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +6 -2
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +14 -10
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +12 -9
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +16 -12
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +7 -5
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +9 -6
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +46 -27
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +33 -20
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +18 -12
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +25 -16
- package/es/core/editor/components/Toolbar/widgets/SearchWidget.js +5 -1
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +11 -6
- package/es/core/editor/components/Toolbar/widgets/components/ArrowButton.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +9 -5
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +18 -9
- package/es/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +10 -5
- package/es/core/editor/components/Toolbar/widgets/components/MenuSelect.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +11 -5
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +9 -4
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +6 -3
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +15 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +10 -5
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +13 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +17 -7
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +6 -2
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +22 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +7 -3
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +32 -13
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +2 -0
- package/es/core/editor/components/plugins/AddElementThemePlugin.js +2 -0
- package/es/core/editor/components/plugins/CorePlugin.js +5 -3
- package/es/core/editor/components/plugins/SaveLoading.js +4 -2
- package/es/core/editor/components/settings/CloseablePanel.js +5 -3
- package/es/core/editor/components/settings/PropertyView.js +17 -7
- package/es/core/editor/components/settings/Settings.js +13 -7
- package/es/core/editor/components/settings/common/AddResourceButton.js +2 -0
- package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +14 -11
- package/es/core/editor/components/settings/common/AlignSetting/index.js +11 -5
- package/es/core/editor/components/settings/common/GroupNodeList/ResourceList.js +10 -2
- package/es/core/editor/components/settings/common/LayoutSettings.js +15 -12
- package/es/core/editor/components/settings/common/LineType/index.js +2 -0
- package/es/core/editor/components/settings/common/NameInput.js +3 -1
- package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +28 -9
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +20 -12
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +21 -10
- package/es/core/editor/components/settings/common/tab/TabView.js +2 -0
- package/es/core/editor/components/settings/common/text/FontStyleCheckbox.js +5 -1
- package/es/core/editor/components/settings/common/text/TextStyle.js +7 -2
- package/es/core/editor/components/settings/common/text/fontStyleUtil.js +6 -2
- package/es/core/editor/components/settings/core/PropertyViewManager.js +19 -0
- package/es/core/editor/components/settings/core/edgePropertyViewAdapter.js +2 -0
- package/es/core/editor/components/settings/core/getPropertyViewType.js +4 -0
- package/es/core/editor/components/settings/core/updateElementProperty.js +1 -0
- package/es/core/editor/components/settings/propertyViews/PropertyViewFactory.js +1 -0
- package/es/core/editor/components/settings/propertyViews/box/BoxPropertyView.js +9 -3
- package/es/core/editor/components/settings/propertyViews/box/BoxPropertyViewV1.js +8 -2
- package/es/core/editor/components/settings/propertyViews/box/NameInput.js +11 -3
- package/es/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +13 -5
- package/es/core/editor/components/settings/propertyViews/edge/EdgeGroupPropertyView.js +2 -0
- package/es/core/editor/components/settings/propertyViews/edge/EdgePropertyView.js +10 -4
- package/es/core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting.js +9 -3
- package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupAddResourceButton.js +4 -2
- package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +8 -7
- package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupRelateData/GroupRelateData.js +10 -4
- package/es/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +4 -4
- package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +12 -11
- package/es/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +3 -3
- package/es/core/editor/components/settings/propertyViews/group/GroupPropertyViewV1.js +3 -3
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupBasicSetting.js +11 -7
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +19 -17
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandStatus.js +5 -3
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupIconSelect.js +4 -2
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +15 -6
- package/es/core/editor/components/settings/propertyViews/group/cluster/ClusterGroupRelateData.js +6 -4
- package/es/core/editor/components/settings/propertyViews/index.js +2 -0
- package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +7 -3
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -7
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +6 -4
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +4 -2
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +2 -2
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +6 -4
- package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyView.js +6 -6
- package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyViewV1.js +6 -6
- package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +16 -9
- package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting_bak.js +18 -16
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +2 -2
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +35 -13
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +2 -0
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +11 -7
- package/es/core/editor/components/settings/propertyViews/node/NodeIconSelect.js +6 -4
- package/es/core/editor/components/settings/propertyViews/node/NodeIconSelectTest.js +2 -2
- package/es/core/editor/components/settings/propertyViews/node/NodePropertyView.js +9 -7
- package/es/core/editor/components/settings/propertyViews/node/NodePropertyViewV1.js +12 -7
- package/es/core/editor/components/settings/propertyViews/node/Setting/BasicSetting.js +11 -6
- package/es/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +11 -3
- package/es/core/editor/components/settings/propertyViews/node/Setting/Setting.js +14 -6
- package/es/core/editor/components/settings/propertyViews/node/data/BindIpInput.js +23 -18
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +17 -8
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +29 -19
- package/es/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +10 -7
- package/es/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +5 -1
- package/es/core/editor/components/settings/propertyViews/text/TextPropertyView.js +17 -5
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +10 -5
- package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +3 -5
- package/es/core/editor/components/settings/propertyViews/view/GlobalEdgeToggle.js +11 -5
- package/es/core/editor/components/settings/propertyViews/view/GlobalLayout.js +7 -6
- package/es/core/editor/components/settings/propertyViews/view/GlobalNodeLabelStyle.js +7 -2
- package/es/core/editor/components/settings/propertyViews/view/ViewLineTypeSetting.js +3 -0
- package/es/core/editor/components/settings/propertyViews/view/ViewPropertyView.js +3 -3
- package/es/core/editor/components/settings/propertyViews/view/ViewPropertyViewV2.js +3 -3
- package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundConfig.js +4 -3
- package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +12 -4
- package/es/core/editor/components/settings/useSettingRuntimeState.js +6 -2
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +26 -12
- package/es/core/editor/components/titlebar/widgets/DebugTools.js +4 -1
- package/es/core/editor/config/themes.js +7 -8
- package/es/core/editor/contextmenu/buildContextmenu.js +1 -2
- package/es/core/editor/hooks/useKeyboardShortcut.js +10 -7
- package/es/core/editor/hooks/useLayerAddResource.js +6 -4
- package/es/core/editor/hooks/useNewElementTheme.js +14 -7
- package/es/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +3 -2
- package/es/core/editor/store/background.js +8 -4
- package/es/core/editor/store/historyManager.js +1 -0
- package/es/core/editor/store/topoEdit.js +4 -3
- package/es/core/editor/utils/edgeTypeStyleUtil.js +15 -9
- package/es/core/editor/utils/themeUtil.js +3 -0
- package/es/core/event/topoEventListener.js +2 -0
- package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +7 -3
- package/es/core/hooks/useAlarm.js +24 -12
- package/es/core/hooks/useCanvasTheme.js +10 -9
- package/es/core/hooks/useCanvasThemeConfig.js +4 -2
- package/es/core/hooks/useCiAttributeChange.js +10 -3
- package/es/core/hooks/useEventData.js +4 -2
- package/es/core/hooks/useGraphAlarmDisplay.js +27 -11
- package/es/core/hooks/useGroupAddResource.js +5 -2
- package/es/core/hooks/useManageStatus.js +1 -1
- package/es/core/hooks/usePolling.js +61 -33
- package/es/core/hooks/useResourceConfig.js +57 -22
- package/es/core/hooks/useRouterAdapter.js +4 -2
- package/es/core/hooks/useSelection.js +4 -1
- package/es/core/hooks/useTopoEdit.js +261 -112
- package/es/core/hooks/useTopoEventListener.js +1 -1
- package/es/core/hooks/useTopoFullscreen.js +8 -7
- package/es/core/models/Alarm.js +139 -50
- package/es/core/models/AttributeMetricDisplay.js +166 -89
- package/es/core/models/DataModel.js +37 -4
- package/es/core/models/EdgeGroup.js +7 -2
- package/es/core/models/GraphDataModel.js +7 -0
- package/es/core/models/HistoryManager.js +52 -21
- package/es/core/models/PluginManager.js +9 -0
- package/es/core/models/SelectionModel.js +36 -11
- package/es/core/models/TopoApp.js +178 -74
- package/es/core/models/TopoGraphView.js +30 -8
- package/es/core/models/TopoViewer.js +5 -1
- package/es/core/models/attributeFormatter/formatter/ciTypeAttrTransform.js +3 -2
- package/es/core/models/attributeFormatter/formatter/commonTransform.js +8 -6
- package/es/core/models/attributeFormatter/formatter/graphTransform.js +5 -2
- package/es/core/models/attributeFormatter/index.js +8 -1
- package/es/core/models/cache/CiCache.js +17 -4
- package/es/core/models/cache/CiTypeCache.js +35 -8
- package/es/core/models/cache/DictCache.js +19 -4
- package/es/core/models/common/ContextMenu.js +9 -0
- package/es/core/models/graph/Background.js +16 -3
- package/es/core/models/plugins/index.js +1 -3
- package/es/core/models/plugins/resourceWebControllUrl.js +39 -9
- package/es/core/models/tagstips/ElementTagTipConfig.js +55 -16
- package/es/core/models/tagstips/utils.js +4 -4
- package/es/core/models/topoData.js +24 -8
- package/es/core/models/topoFactory.js +6 -0
- package/es/core/models/utils/linkUtils.js +35 -24
- package/es/core/models/utils/nodeNameVisibleUtil.js +25 -16
- package/es/core/services/alarm.js +5 -3
- package/es/core/services/background.js +24 -9
- package/es/core/services/cmdb/metric.js +5 -3
- package/es/core/services/cmdb.js +6 -3
- package/es/core/services/index.js +18 -7
- package/es/core/services/overview.js +58 -25
- package/es/core/services/topo/basic.js +5 -3
- package/es/core/services/topo/tagtip.js +6 -3
- package/es/core/store/coreModels.js +2 -4
- package/es/core/store/createStore.js +3 -0
- package/es/core/store/models/ciModel.js +16 -5
- package/es/core/store/models/customIcon.js +55 -19
- package/es/core/store/models/displayConfig.js +11 -5
- package/es/core/store/models/selection.js +5 -4
- package/es/core/store/models/topoAlarm.js +42 -10
- package/es/core/store/models/topoBaseInfoOverview.js +5 -4
- package/es/core/store/models/topoBizMod.js +14 -5
- package/es/core/store/models/topoConfig.js +85 -39
- package/es/core/store/models/topoGraphView.js +7 -5
- package/es/core/store/models/topoMod.js +111 -38
- package/es/core/store/models/viewer/lock.js +1 -0
- package/es/core/store/models/viewer/resourceDetail.js +5 -2
- package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -0
- package/es/core/test/Test.js +13 -10
- package/es/core/upgrade/v140UpgradeSerializeNodeImageSize.js +5 -0
- package/es/core/utils/backgroundUtil.js +7 -5
- package/es/core/utils/edgeUtil.js +11 -4
- package/es/core/utils/graphLinkUtil.js +8 -5
- package/es/core/utils/imageUtil.js +9 -3
- package/es/core/utils/metricUtil.js +1 -1
- package/es/core/utils/resourceUtil.js +3 -3
- package/es/core/utils/saveSerialize.js +6 -3
- package/es/core/utils/showGraphManageStatusUtil.js +18 -14
- package/es/core/utils/showMessage.js +2 -0
- package/es/core/viewer/components/plugins/ElementDetailDrawer/components/DetailDrawer.js +2 -0
- package/es/core/viewer/components/plugins/ElementDetailDrawer/hooks/useElementDetailManager.js +59 -32
- package/es/core/viewer/components/plugins/ResourceDetail/DefaultDetailContent.js +14 -8
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +11 -6
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +12 -9
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailPlugin.js +7 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +22 -10
- package/es/core/viewer/components/plugins/ResourceDetail/components/DrawerTitle.js +16 -7
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +23 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +10 -10
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BlockBox.js +2 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -10
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/NetworkBaseInfo.js +27 -19
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +200 -90
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +29 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/SingleResourceStrategyLink.js +6 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +70 -33
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +27 -13
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/constants.js +4 -8
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +18 -14
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +62 -23
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +37 -24
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +43 -22
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/useCiAttrAndMetricData.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleContainer.js +4 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +15 -8
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +24 -10
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +12 -5
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +16 -7
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +18 -6
- package/es/core/viewer/components/plugins/ViewerPlugin.js +1 -1
- package/es/core/viewer/components/titlebar/BasicTools.js +3 -3
- package/es/core/viewer/components/titlebar/TopoViewerTitleBar.js +4 -4
- package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +6 -2
- package/es/core/viewer/components/titlebar/widgets/AlarmListShowButton.js +16 -14
- package/es/core/viewer/components/titlebar/widgets/EditButton.js +8 -4
- package/es/core/viewer/components/titlebar/widgets/MoreButtonMenu.js +1 -1
- package/es/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +18 -14
- package/es/core/viewer/components/titlebar/widgets/NodesDragSwitchWrapper.js +5 -1
- package/es/core/viewer/components/titlebar/widgets/SearchWidget.js +17 -9
- package/es/core/viewer/components/titlebar/widgets/SettingButton.js +10 -7
- package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +5 -5
- package/es/core/viewer/contextmenu/buildLinkContextmenu.js +1 -2
- package/es/core/viewer/contextmenu/buildNodeContextmenu.js +2 -8
- package/es/createTopo.js +1 -2
- package/es/mock/mock.js +4 -6
- package/es/networkTopo/components/Link/form.js +41 -25
- package/es/networkTopo/components/Link/hook.js +86 -48
- package/es/networkTopo/components/Link/index.js +63 -33
- package/es/networkTopo/components/Link/setting.js +65 -45
- package/es/networkTopo/components/TopoView.js +20 -14
- package/es/networkTopo/getTopoData.js +37 -21
- package/es/networkTopo/hooks/useEdgeExpand.js +3 -2
- package/es/networkTopo/hooks/useGroupResources.js +4 -2
- package/es/networkTopo/hooks/useLinkDynamicStyle.js +4 -2
- package/es/networkTopo/hooks/viewer/useEdgeFlow.js +7 -6
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +23 -8
- package/es/networkTopo/models/EdgeGroupTagTipBuilder.js +10 -2
- package/es/networkTopo/models/ExtElementTagTipBuilder.js +5 -0
- package/es/networkTopo/models/IpNodeTagsTipsBuilder.js +11 -2
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +49 -28
- package/es/networkTopo/models/LinkTagsTipsBuilder.js +51 -41
- package/es/networkTopo/models/TopoCenter.js +26 -8
- package/es/networkTopo/services/alert.js +10 -5
- package/es/networkTopo/services/authorization.js +25 -11
- package/es/networkTopo/services/cmdb.js +165 -80
- package/es/networkTopo/services/funcAuth.js +5 -3
- package/es/networkTopo/services/link.js +34 -11
- package/es/networkTopo/services/mdc.js +17 -10
- package/es/networkTopo/services/metric.js +12 -6
- package/es/networkTopo/services/model.js +223 -92
- package/es/networkTopo/services/risk.js +5 -3
- package/es/networkTopo/services/topo/auth.js +13 -7
- package/es/networkTopo/services/topo/basic.js +137 -57
- package/es/networkTopo/services/topo/blacklist.js +11 -5
- package/es/networkTopo/services/topo/ciInfo.js +13 -5
- package/es/networkTopo/services/topo/icon.js +24 -11
- package/es/networkTopo/services/topo/networkLink.js +11 -5
- package/es/networkTopo/services/topo/relation.js +5 -3
- package/es/networkTopo/services/topo/resourceWebUrl.js +17 -7
- package/es/networkTopo/store/functionAuth.js +16 -7
- package/es/networkTopo/store/topoCenter.js +53 -18
- package/es/networkTopo/store/topoLinkMod.js +4 -3
- package/es/networkTopo/store/topoTreeMod.js +71 -19
- package/es/networkTopo/utils/SortResourcesUtil.js +3 -1
- package/es/networkTopo/utils/__tests__/resourcePermissionUtil.test.js +7 -4
- package/es/networkTopo/utils/edgeGroupTagUtil.js +15 -8
- package/es/networkTopo/utils/exitLinkUtil.js +54 -38
- package/es/networkTopo/utils/exportData.js +16 -10
- package/es/networkTopo/utils/linPermissionUtil.js +2 -4
- package/es/networkTopo/utils/resourcePermissionUtil.js +6 -4
- package/es/networkTopo/utils/storage.js +3 -2
- package/es/networkTopo/viewer/components/TopologyViewer.js +4 -3
- package/es/networkTopo/viewer/index.js +1 -2
- package/es/utils/ResourceConfigUtil.js +23 -18
- package/es/utils/SpecialCharacterValidateUtil.js +1 -0
- package/es/utils/ciType.js +5 -1
- package/es/utils/clusterUtil.js +20 -15
- package/es/utils/format.js +26 -12
- package/es/utils/htElementUtils.js +51 -25
- package/es/utils/template.js +7 -6
- package/es/utils/topoData.js +64 -52
- package/es/utils/topoMocks.js +4 -3
- package/es/utils/tree.js +33 -14
- package/es/utils/treeUtil.js +1 -0
- package/lib/common/components/ColorPicker/ColorPicker.js +30 -9
- package/lib/common/components/ColorPicker/index.js +3 -0
- package/lib/common/components/ResourceTable/ResourceTable.js +18 -6
- package/lib/common/plugins/useSelectionPlugin.js +24 -13
- package/lib/components/BatchAttrMetric/SelectTable.js +3 -0
- package/lib/components/BatchAttrMetric/constant.js +2 -2
- package/lib/components/BatchAttrMetric/index.js +27 -9
- package/lib/components/BatchAttrMetric/setting.js +72 -30
- package/lib/components/BatchAttrMetric/utils.js +9 -1
- package/lib/components/BooleanRadio.js +15 -5
- package/lib/components/ColorPanel/components/ColorBlock/index.js +8 -2
- package/lib/components/ColorPanel/components/FontColorRange/index.js +19 -9
- package/lib/components/ColorPanel/index.js +50 -17
- package/lib/components/Drawer/Drawer.js +25 -14
- package/lib/components/Drawer/index.js +3 -0
- package/lib/components/FormTable/index.js +32 -13
- package/lib/components/FullheightTab/FullheightTab.js +7 -0
- package/lib/components/FullheightTab/index.js +3 -0
- package/lib/components/LayoutDirectionSelect/Item.js +9 -0
- package/lib/components/LayoutDirectionSelect/LayoutDirectionSelect.js +13 -5
- package/lib/components/LayoutDirectionSelect/index.js +3 -0
- package/lib/components/LayoutSelect/LayoutSelect.js +12 -5
- package/lib/components/LayoutSelect/index.js +3 -0
- package/lib/components/Link.js +7 -0
- package/lib/components/ModelAttrSelectDrawer/components/ModelAttrSelectDrawer.js +11 -4
- package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +27 -15
- package/lib/components/ModelAttrSelectDrawer/index.js +3 -0
- package/lib/components/MultiResourceDrawer/Content.js +31 -11
- package/lib/components/MultiResourceDrawer/Dynamic.js +10 -2
- package/lib/components/MultiResourceDrawer/ResourceCard/index.js +11 -4
- package/lib/components/MultiResourceDrawer/ResourceSelect.js +10 -2
- package/lib/components/MultiResourceDrawer/Static.js +10 -2
- package/lib/components/MultiResourceDrawer/index.js +23 -8
- package/lib/components/NetworkTopoResourceSelectDrawer/NetworkTopoResourceSelectDrawer.js +6 -0
- package/lib/components/NetworkTopoResourceSelectDrawer/index.js +3 -0
- package/lib/components/ResourceList/ResourceSelect.js +64 -27
- package/lib/components/ResourceList/ResourceSelectConnect.js +17 -3
- package/lib/components/ResourceList/index.js +3 -0
- package/lib/components/ResourceSelect/ResourceSelectDrawer.js +21 -6
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +39 -13
- package/lib/components/ResourceSelectDrawer/ResourceSelectList.js +15 -4
- package/lib/components/ResourceSelectDrawer/index.js +3 -0
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +23 -6
- package/lib/components/SingleResourceDrawer/SingleResourceDrawer.js +22 -6
- package/lib/components/SingleResourceDrawer/index.js +3 -0
- package/lib/components/TagImageSelect/index.js +18 -8
- package/lib/components/TagSelect/index.js +22 -8
- package/lib/components/TemplateButton/Icon.js +10 -5
- package/lib/components/TemplateButton/assets/index.js +5 -0
- package/lib/components/TemplateButton/index.js +16 -6
- package/lib/components/VerticalIconTab/VerticalIconTab.js +23 -6
- package/lib/components/VerticalIconTab/index.js +3 -0
- package/lib/components/collapse/Collapse.js +16 -4
- package/lib/components/collapse/Panel.js +33 -7
- package/lib/components/collapse/index.js +3 -0
- package/lib/constants/ResourceInfoDisplay.js +6 -6
- package/lib/constants/ResourceTypeLimit.js +20 -20
- package/lib/contextmenu/createMenuCommands.js +11 -6
- package/lib/core/common/contextmenu/mergeContextmenu.js +6 -2
- package/lib/core/common/hooks/ht/useDataModelDataPropertyChange.js +5 -0
- package/lib/core/common/hooks/useHtElement.js +4 -1
- package/lib/core/common/hooks/useHtElements.js +8 -5
- package/lib/core/common/icons/icon.js +36 -16
- package/lib/core/common/icons/useIcons.js +10 -1
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +22 -4
- package/lib/core/components/AlarmListPanel/constants/uicbb.js +1 -0
- package/lib/core/components/AlarmListPanel/hooks/useAlarmList.js +9 -2
- package/lib/core/components/AlarmListPanel/index.js +18 -2
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +34 -10
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +38 -13
- package/lib/core/components/DisplaySettingDrawer/EdgeFlow.js +8 -1
- package/lib/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +8 -1
- package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +38 -14
- package/lib/core/components/DisplaySettingDrawer/LinkTag.js +10 -1
- package/lib/core/components/DisplaySettingDrawer/NodeTag.js +10 -1
- package/lib/core/components/DisplaySettingDrawer/NodeTip.js +10 -1
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +46 -24
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/CommonCheckboxGroup.js +14 -3
- package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +21 -5
- package/lib/core/components/DisplaySettingDrawer/demo/Demo.js +6 -4
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +39 -10
- package/lib/core/components/DisplaySettingDrawer/index.js +3 -0
- package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +11 -3
- package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +5 -0
- package/lib/core/components/ResourceViewAttributeSetting/Setting.js +22 -6
- package/lib/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +27 -6
- package/lib/core/components/TopoAppProvider.js +5 -0
- package/lib/core/components/TopoView/GraphViewPanel.js +24 -10
- package/lib/core/components/TopoView/index.js +3 -0
- package/lib/core/components/TopoView/topoView.js +97 -35
- package/lib/core/components/buildProvider.js +5 -0
- package/lib/core/components/titlebar/TitleBar.js +21 -4
- package/lib/core/components/titlebar/index.js +17 -0
- package/lib/core/components/titlebar/widgets/TitleWidget.js +9 -2
- package/lib/core/createTopoApp.js +5 -0
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +69 -21
- package/lib/core/editor/components/BackgroundView/index.js +87 -24
- package/lib/core/editor/components/BottomFloatTool/HelpIcon.js +25 -8
- package/lib/core/editor/components/CustomIconPlugin/CustomIconPlugin.js +10 -5
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +35 -7
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +87 -24
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialogWrapper.js +11 -3
- package/lib/core/editor/components/CustomIconPlugin/index.js +3 -0
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +13 -3
- package/lib/core/editor/components/EditorPlugin.js +23 -4
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +19 -6
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/index.js +11 -5
- package/lib/core/editor/components/Sidebar/Sidebar.js +26 -8
- package/lib/core/editor/components/Sidebar/panes.js +7 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +4 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/index.js +3 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +15 -5
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +38 -14
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +3 -0
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +12 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +8 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +9 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +17 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +17 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +12 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +29 -4
- package/lib/core/editor/components/Sidebar/views/ImagePanel/index.js +3 -0
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +13 -6
- package/lib/core/editor/components/Toolbar/EditorToolbar.js +17 -2
- package/lib/core/editor/components/Toolbar/Toolbar.js +5 -0
- package/lib/core/editor/components/Toolbar/buttons.js +35 -30
- package/lib/core/editor/components/Toolbar/components/Tooltip.js +8 -2
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +21 -8
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +21 -7
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +52 -19
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundUtil.js +37 -9
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/index.js +3 -0
- package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -3
- package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -3
- package/lib/core/editor/components/Toolbar/widgets/Divider.js +5 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +12 -6
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +36 -12
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/index.js +3 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +28 -10
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +16 -4
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +3 -2
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +37 -13
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +57 -24
- package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +15 -4
- package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +18 -8
- package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +39 -16
- package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +10 -2
- package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +10 -3
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +32 -9
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +31 -9
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +12 -2
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +23 -10
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +19 -9
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +26 -13
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +10 -5
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +6 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +16 -6
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +55 -28
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +44 -20
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +10 -2
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +26 -12
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/index.js +3 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +4 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +33 -13
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/index.js +3 -0
- package/lib/core/editor/components/Toolbar/widgets/SearchWidget.js +12 -1
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +20 -6
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowButton.js +11 -2
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +11 -1
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +17 -5
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +27 -9
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +16 -5
- package/lib/core/editor/components/Toolbar/widgets/components/MenuSelect.js +8 -2
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +17 -5
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +14 -2
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +14 -3
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +24 -6
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +24 -5
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/index.js +8 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +21 -6
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +26 -7
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +14 -2
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +30 -6
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +14 -3
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +36 -13
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +7 -0
- package/lib/core/editor/components/plugins/AddElementThemePlugin.js +5 -0
- package/lib/core/editor/components/plugins/CorePlugin.js +9 -3
- package/lib/core/editor/components/plugins/SaveLoading.js +11 -2
- package/lib/core/editor/components/settings/CloseablePanel.js +12 -3
- package/lib/core/editor/components/settings/PropertyView.js +27 -7
- package/lib/core/editor/components/settings/Settings.js +20 -7
- package/lib/core/editor/components/settings/common/AddResourceButton.js +7 -0
- package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +25 -11
- package/lib/core/editor/components/settings/common/AlignSetting/index.js +18 -5
- package/lib/core/editor/components/settings/common/GroupNodeList/ResourceList.js +18 -2
- package/lib/core/editor/components/settings/common/LayoutSettings.js +24 -12
- package/lib/core/editor/components/settings/common/LineType/index.js +7 -0
- package/lib/core/editor/components/settings/common/NameInput.js +11 -1
- package/lib/core/editor/components/settings/common/NodeAlignType.js +8 -0
- package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +42 -9
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +32 -12
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +29 -10
- package/lib/core/editor/components/settings/common/SizeInput/index.js +3 -0
- package/lib/core/editor/components/settings/common/tab/TabView.js +6 -0
- package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.js +18 -1
- package/lib/core/editor/components/settings/common/text/TextStyle.js +19 -2
- package/lib/core/editor/components/settings/common/text/fontStyleUtil.js +8 -2
- package/lib/core/editor/components/settings/core/PropertyViewManager.js +23 -0
- package/lib/core/editor/components/settings/core/edgePropertyViewAdapter.js +5 -0
- package/lib/core/editor/components/settings/core/getPropertyViewType.js +5 -0
- package/lib/core/editor/components/settings/core/updateElementProperty.js +3 -0
- package/lib/core/editor/components/settings/propertyViews/PropertyViewFactory.js +2 -0
- package/lib/core/editor/components/settings/propertyViews/box/BoxPropertyView.js +20 -3
- package/lib/core/editor/components/settings/propertyViews/box/BoxPropertyViewV1.js +19 -2
- package/lib/core/editor/components/settings/propertyViews/box/NameInput.js +19 -3
- package/lib/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +29 -5
- package/lib/core/editor/components/settings/propertyViews/edge/EdgeGroupPropertyView.js +7 -0
- package/lib/core/editor/components/settings/propertyViews/edge/EdgePropertyView.js +16 -4
- package/lib/core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting.js +19 -3
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupAddResourceButton.js +9 -2
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +14 -7
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupRelateData/GroupRelateData.js +20 -4
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +10 -4
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +17 -11
- package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +11 -3
- package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyViewV1.js +13 -3
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupBasicSetting.js +27 -7
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +29 -15
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandStatus.js +10 -3
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupIconSelect.js +11 -2
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +31 -6
- package/lib/core/editor/components/settings/propertyViews/group/cluster/ClusterGroupRelateData.js +19 -4
- package/lib/core/editor/components/settings/propertyViews/group/hooks/useGroup.js +4 -0
- package/lib/core/editor/components/settings/propertyViews/index.js +10 -0
- package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +18 -3
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +20 -7
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +13 -4
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +8 -2
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +9 -1
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +14 -4
- package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyView.js +13 -6
- package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyViewV1.js +14 -6
- package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +31 -7
- package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting_bak.js +35 -16
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +7 -2
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +44 -13
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +7 -0
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +25 -7
- package/lib/core/editor/components/settings/propertyViews/node/NodeIconSelect.js +11 -3
- package/lib/core/editor/components/settings/propertyViews/node/NodeIconSelectTest.js +9 -2
- package/lib/core/editor/components/settings/propertyViews/node/NodePropertyView.js +17 -8
- package/lib/core/editor/components/settings/propertyViews/node/NodePropertyViewV1.js +22 -7
- package/lib/core/editor/components/settings/propertyViews/node/Setting/BasicSetting.js +19 -6
- package/lib/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +19 -3
- package/lib/core/editor/components/settings/propertyViews/node/Setting/Setting.js +26 -6
- package/lib/core/editor/components/settings/propertyViews/node/Setting/index.js +3 -0
- package/lib/core/editor/components/settings/propertyViews/node/TopoTreeSelect.js +8 -0
- package/lib/core/editor/components/settings/propertyViews/node/data/BindIpInput.js +32 -18
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +25 -7
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +47 -19
- package/lib/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +19 -6
- package/lib/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +7 -1
- package/lib/core/editor/components/settings/propertyViews/text/TextPropertyView.js +29 -5
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -5
- package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -3
- package/lib/core/editor/components/settings/propertyViews/view/GlobalEdgeToggle.js +15 -4
- package/lib/core/editor/components/settings/propertyViews/view/GlobalLayout.js +12 -5
- package/lib/core/editor/components/settings/propertyViews/view/GlobalNodeLabelStyle.js +17 -2
- package/lib/core/editor/components/settings/propertyViews/view/ViewLineTypeSetting.js +8 -0
- package/lib/core/editor/components/settings/propertyViews/view/ViewPropertyView.js +19 -3
- package/lib/core/editor/components/settings/propertyViews/view/ViewPropertyViewV2.js +11 -3
- package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundConfig.js +6 -3
- package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +19 -4
- package/lib/core/editor/components/settings/useSettingRuntimeState.js +10 -2
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +42 -12
- package/lib/core/editor/components/titlebar/widgets/DebugTools.js +8 -1
- package/lib/core/editor/components/titlebar/widgets/SaveButton.js +5 -0
- package/lib/core/editor/config/themes.js +10 -8
- package/lib/core/editor/contextmenu/buildContextmenu.js +2 -2
- package/lib/core/editor/hooks/useKeyboardShortcut.js +14 -7
- package/lib/core/editor/hooks/useLayerAddResource.js +8 -4
- package/lib/core/editor/hooks/useNewElementTheme.js +20 -7
- package/lib/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +6 -1
- package/lib/core/editor/store/background.js +16 -6
- package/lib/core/editor/store/historyManager.js +6 -1
- package/lib/core/editor/store/topoEdit.js +13 -5
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +22 -9
- package/lib/core/editor/utils/themeUtil.js +6 -0
- package/lib/core/event/topoEventListener.js +3 -0
- package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +11 -3
- package/lib/core/hooks/useAlarm.js +33 -11
- package/lib/core/hooks/useCanvasTheme.js +16 -9
- package/lib/core/hooks/useCanvasThemeConfig.js +8 -2
- package/lib/core/hooks/useCiAttributeChange.js +14 -3
- package/lib/core/hooks/useEventData.js +7 -2
- package/lib/core/hooks/useGraphAlarmDisplay.js +34 -11
- package/lib/core/hooks/useGroupAddResource.js +7 -2
- package/lib/core/hooks/useManageStatus.js +6 -1
- package/lib/core/hooks/usePolling.js +74 -32
- package/lib/core/hooks/useResourceConfig.js +66 -22
- package/lib/core/hooks/useRouterAdapter.js +6 -1
- package/lib/core/hooks/useSelection.js +5 -1
- package/lib/core/hooks/useTopoEdit.js +301 -112
- package/lib/core/hooks/useTopoEventListener.js +4 -1
- package/lib/core/hooks/useTopoFullscreen.js +12 -7
- package/lib/core/index.js +2 -0
- package/lib/core/models/Alarm.js +159 -49
- package/lib/core/models/AttributeMetricDisplay.js +173 -89
- package/lib/core/models/DataModel.js +39 -4
- package/lib/core/models/EdgeGroup.js +8 -2
- package/lib/core/models/GraphDataModel.js +8 -0
- package/lib/core/models/HistoryManager.js +64 -21
- package/lib/core/models/PluginManager.js +11 -0
- package/lib/core/models/SelectionModel.js +44 -11
- package/lib/core/models/TopoApp.js +204 -72
- package/lib/core/models/TopoGraphView.js +35 -7
- package/lib/core/models/TopoViewer.js +7 -0
- package/lib/core/models/attributeFormatter/formatter/attributeTransform.js +3 -0
- package/lib/core/models/attributeFormatter/formatter/ciTypeAttrTransform.js +4 -2
- package/lib/core/models/attributeFormatter/formatter/commonTransform.js +10 -6
- package/lib/core/models/attributeFormatter/formatter/graphTransform.js +8 -2
- package/lib/core/models/attributeFormatter/formatter/metricTransform.js +3 -0
- package/lib/core/models/attributeFormatter/index.js +14 -0
- package/lib/core/models/cache/CiCache.js +22 -3
- package/lib/core/models/cache/CiTypeCache.js +43 -7
- package/lib/core/models/cache/DictCache.js +29 -3
- package/lib/core/models/common/ContextMenu.js +10 -0
- package/lib/core/models/graph/Background.js +19 -3
- package/lib/core/models/plugins/index.js +1 -2
- package/lib/core/models/plugins/resourceWebControllUrl.js +47 -9
- package/lib/core/models/tagstips/ElementTagTipConfig.js +64 -15
- package/lib/core/models/tagstips/utils.js +9 -3
- package/lib/core/models/topoData.js +36 -8
- package/lib/core/models/topoFactory.js +6 -0
- package/lib/core/models/utils/getRelationDetailByIds.js +1 -0
- package/lib/core/models/utils/linkUtils.js +48 -19
- package/lib/core/models/utils/nodeNameVisibleUtil.js +30 -15
- package/lib/core/services/alarm.js +14 -3
- package/lib/core/services/background.js +29 -9
- package/lib/core/services/cmdb/metric.js +10 -3
- package/lib/core/services/cmdb.js +12 -3
- package/lib/core/services/index.js +24 -7
- package/lib/core/services/overview.js +63 -23
- package/lib/core/services/topo/basic.js +11 -3
- package/lib/core/services/topo/index.js +6 -0
- package/lib/core/services/topo/tagtip.js +11 -3
- package/lib/core/store/coreModels.js +16 -0
- package/lib/core/store/createStore.js +7 -0
- package/lib/core/store/models/ciModel.js +23 -5
- package/lib/core/store/models/customIcon.js +72 -21
- package/lib/core/store/models/displayConfig.js +21 -7
- package/lib/core/store/models/selection.js +13 -6
- package/lib/core/store/models/topoAlarm.js +52 -12
- package/lib/core/store/models/topoBaseInfoOverview.js +14 -6
- package/lib/core/store/models/topoBizMod.js +22 -5
- package/lib/core/store/models/topoConfig.js +109 -41
- package/lib/core/store/models/topoGraphView.js +16 -7
- package/lib/core/store/models/topoMod.js +131 -36
- package/lib/core/store/models/viewer/lock.js +4 -0
- package/lib/core/store/models/viewer/resourceDetail.js +8 -2
- package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +5 -0
- package/lib/core/test/Test.js +14 -10
- package/lib/core/upgrade/v140UpgradeSerializeNodeImageSize.js +6 -0
- package/lib/core/utils/backgroundUtil.js +9 -5
- package/lib/core/utils/edgeUtil.js +17 -3
- package/lib/core/utils/graphLinkUtil.js +9 -4
- package/lib/core/utils/imageUtil.js +12 -3
- package/lib/core/utils/linkUtil.js +1 -0
- package/lib/core/utils/manageStatusUtil.js +1 -0
- package/lib/core/utils/metricUtil.js +4 -0
- package/lib/core/utils/resourceUtil.js +4 -2
- package/lib/core/utils/saveSerialize.js +9 -3
- package/lib/core/utils/showGraphManageStatusUtil.js +23 -14
- package/lib/core/utils/showMessage.js +9 -0
- package/lib/core/viewer/components/plugins/ElementDetailDrawer/components/DetailDrawer.js +7 -0
- package/lib/core/viewer/components/plugins/ElementDetailDrawer/hooks/useElementDetailManager.js +64 -32
- package/lib/core/viewer/components/plugins/MetricPollingPlugin.js +4 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/DefaultDetailContent.js +23 -8
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +20 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +21 -9
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailPlugin.js +11 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +36 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/components/DrawerTitle.js +24 -7
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +24 -15
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +17 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BlockBox.js +7 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +29 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/NetworkBaseInfo.js +36 -17
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +229 -88
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +40 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/SingleResourceStrategyLink.js +8 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +87 -32
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +12 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +38 -13
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/constants.js +4 -8
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +31 -12
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +83 -19
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +44 -23
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +49 -21
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.js +3 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/useCiAttrAndMetricData.js +5 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleContainer.js +8 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +27 -8
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +17 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +23 -7
- package/lib/core/viewer/components/plugins/ResourceDetail/index.js +3 -0
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +33 -6
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +9 -1
- package/lib/core/viewer/components/titlebar/BasicTools.js +12 -3
- package/lib/core/viewer/components/titlebar/TopoViewerTitleBar.js +14 -4
- package/lib/core/viewer/components/titlebar/ViewerTools.js +5 -0
- package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +11 -2
- package/lib/core/viewer/components/titlebar/widgets/AlarmListShowButton.js +28 -15
- package/lib/core/viewer/components/titlebar/widgets/EditButton.js +14 -3
- package/lib/core/viewer/components/titlebar/widgets/MoreButtonMenu.js +10 -1
- package/lib/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +26 -13
- package/lib/core/viewer/components/titlebar/widgets/NodesDragSwitchWrapper.js +10 -1
- package/lib/core/viewer/components/titlebar/widgets/SearchWidget.js +25 -9
- package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +18 -6
- package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +9 -4
- package/lib/core/viewer/contextmenu/buildContextmenu.js +5 -0
- package/lib/core/viewer/contextmenu/buildLinkContextmenu.js +2 -2
- package/lib/core/viewer/contextmenu/buildNodeContextmenu.js +3 -8
- package/lib/core/viewer/contextmenu/buildViewContextmenu.js +1 -0
- package/lib/createTopo.js +8 -2
- package/lib/index.js +19 -0
- package/lib/mock/mock.js +4 -5
- package/lib/networkTopo/components/Link/form.js +57 -25
- package/lib/networkTopo/components/Link/hook.js +100 -48
- package/lib/networkTopo/components/Link/index.js +77 -32
- package/lib/networkTopo/components/Link/setting.js +86 -45
- package/lib/networkTopo/components/Topo404.js +9 -0
- package/lib/networkTopo/components/TopoNoPermission.js +9 -0
- package/lib/networkTopo/components/TopoView.js +37 -13
- package/lib/networkTopo/createTopo.js +6 -0
- package/lib/networkTopo/getTopoData.js +43 -16
- package/lib/networkTopo/hooks/useEdgeExpand.js +6 -1
- package/lib/networkTopo/hooks/useGroupResources.js +5 -2
- package/lib/networkTopo/hooks/useLinkDynamicStyle.js +7 -1
- package/lib/networkTopo/hooks/viewer/useEdgeFlow.js +8 -5
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +31 -7
- package/lib/networkTopo/index.js +7 -0
- package/lib/networkTopo/models/EdgeGroupTagTipBuilder.js +12 -2
- package/lib/networkTopo/models/ExtElementTagTipBuilder.js +8 -0
- package/lib/networkTopo/models/IpNodeTagsTipsBuilder.js +15 -2
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +54 -26
- package/lib/networkTopo/models/LinkTagsTipsBuilder.js +55 -40
- package/lib/networkTopo/models/TopoCenter.js +39 -8
- package/lib/networkTopo/services/alert.js +15 -5
- package/lib/networkTopo/services/authorization.js +35 -16
- package/lib/networkTopo/services/cmdb.js +211 -72
- package/lib/networkTopo/services/funcAuth.js +10 -3
- package/lib/networkTopo/services/index.js +7 -0
- package/lib/networkTopo/services/link.js +47 -11
- package/lib/networkTopo/services/mdc.js +26 -9
- package/lib/networkTopo/services/metric.js +20 -6
- package/lib/networkTopo/services/model.js +291 -89
- package/lib/networkTopo/services/risk.js +10 -3
- package/lib/networkTopo/services/topo/auth.js +19 -7
- package/lib/networkTopo/services/topo/basic.js +154 -57
- package/lib/networkTopo/services/topo/blacklist.js +17 -5
- package/lib/networkTopo/services/topo/ciInfo.js +20 -5
- package/lib/networkTopo/services/topo/icon.js +30 -11
- package/lib/networkTopo/services/topo/index.js +15 -0
- package/lib/networkTopo/services/topo/networkLink.js +17 -5
- package/lib/networkTopo/services/topo/relation.js +11 -3
- package/lib/networkTopo/services/topo/resourceWebUrl.js +25 -9
- package/lib/networkTopo/store/functionAuth.js +24 -9
- package/lib/networkTopo/store/index.js +6 -0
- package/lib/networkTopo/store/topoCenter.js +63 -22
- package/lib/networkTopo/store/topoLinkMod.js +12 -5
- package/lib/networkTopo/store/topoTreeMod.js +83 -19
- package/lib/networkTopo/utils/SortResourcesUtil.js +4 -1
- package/lib/networkTopo/utils/__tests__/resourcePermissionUtil.test.js +7 -4
- package/lib/networkTopo/utils/edgeGroupTagUtil.js +19 -7
- package/lib/networkTopo/utils/exitLinkUtil.js +58 -38
- package/lib/networkTopo/utils/exportData.js +25 -10
- package/lib/networkTopo/utils/linPermissionUtil.js +3 -3
- package/lib/networkTopo/utils/linkUtil.js +2 -0
- package/lib/networkTopo/utils/resourcePermissionUtil.js +14 -4
- package/lib/networkTopo/utils/storage.js +5 -3
- package/lib/networkTopo/viewer/components/TitleBar.js +6 -0
- package/lib/networkTopo/viewer/components/TopologyViewer.js +12 -3
- package/lib/networkTopo/viewer/createTopoViewer.js +5 -0
- package/lib/networkTopo/viewer/index.js +9 -0
- package/lib/utils/ResourceConfigUtil.js +31 -17
- package/lib/utils/SpecialCharacterValidateUtil.js +2 -0
- package/lib/utils/ciType.js +7 -1
- package/lib/utils/clusterUtil.js +35 -15
- package/lib/utils/copyUtil.js +2 -0
- package/lib/utils/format.js +38 -12
- package/lib/utils/htElementDataUtil.js +12 -0
- package/lib/utils/htElementUtils.js +87 -26
- package/lib/utils/listToTree.js +3 -0
- package/lib/utils/resourceElementUtil.js +2 -0
- package/lib/utils/template.js +7 -6
- package/lib/utils/topoData.js +97 -51
- package/lib/utils/topoMocks.js +4 -3
- package/lib/utils/topoPermissionUtil.js +1 -0
- package/lib/utils/tree.js +46 -14
- package/lib/utils/treeUtil.js +3 -0
- package/package.json +3 -3
@@ -1,12 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import Icons from "./assets";
|
3
|
+
|
3
4
|
var Icon = function Icon(props) {
|
4
5
|
var _props$alt = props.alt,
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
alt = _props$alt === void 0 ? '' : _props$alt,
|
7
|
+
img = props.img,
|
8
|
+
type = props.type,
|
9
|
+
className = props.className,
|
10
|
+
rotate = props.rotate;
|
10
11
|
var style = rotate ? {
|
11
12
|
transform: "rotate(" + rotate + "deg)"
|
12
13
|
} : null;
|
@@ -18,4 +19,5 @@ var Icon = function Icon(props) {
|
|
18
19
|
alt: alt
|
19
20
|
});
|
20
21
|
};
|
22
|
+
|
21
23
|
export default Icon;
|
@@ -5,14 +5,16 @@ import React from "react";
|
|
5
5
|
import classnames from "classnames";
|
6
6
|
import Icon from "./Icon";
|
7
7
|
import styles from "./index.module.scss";
|
8
|
+
|
8
9
|
var TemplateButton = function TemplateButton(props) {
|
9
10
|
var className = props.className,
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
children = props.children,
|
12
|
+
icon = props.icon,
|
13
|
+
img = props.img,
|
14
|
+
iconClassName = props.iconClassName,
|
15
|
+
textClassName = props.textClassName,
|
16
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
17
|
+
|
16
18
|
return /*#__PURE__*/React.createElement("div", {
|
17
19
|
className: classnames(styles.card, className)
|
18
20
|
}, /*#__PURE__*/React.createElement("div", {
|
@@ -25,4 +27,5 @@ var TemplateButton = function TemplateButton(props) {
|
|
25
27
|
className: classnames(styles.text, textClassName)
|
26
28
|
}, /*#__PURE__*/React.createElement("span", null, children)));
|
27
29
|
};
|
30
|
+
|
28
31
|
export default TemplateButton;
|
@@ -5,16 +5,16 @@ import React, { useState } from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
6
6
|
import variables from '@alifd/theme-19926/variables.js';
|
7
7
|
import styles from "./VerticalIconTab.module.scss";
|
8
|
-
|
9
8
|
/**
|
10
9
|
* 自定义标题
|
11
10
|
* @param {*} param0
|
12
11
|
* @returns
|
13
12
|
*/
|
13
|
+
|
14
14
|
function CustomTabItem(_ref) {
|
15
15
|
var title = _ref.title,
|
16
|
-
|
17
|
-
|
16
|
+
titleTootip = _ref.titleTootip,
|
17
|
+
icon = _ref.icon;
|
18
18
|
var tabItem = /*#__PURE__*/React.createElement("div", {
|
19
19
|
className: "v-icon-tab-item"
|
20
20
|
}, /*#__PURE__*/React.createElement("img", {
|
@@ -25,8 +25,7 @@ function CustomTabItem(_ref) {
|
|
25
25
|
}, title));
|
26
26
|
return /*#__PURE__*/React.createElement(_Balloon.Tooltip, {
|
27
27
|
trigger: tabItem,
|
28
|
-
align: "r"
|
29
|
-
// 解决遮挡下拉浮层问题
|
28
|
+
align: "r" // 解决遮挡下拉浮层问题
|
30
29
|
,
|
31
30
|
popupStyle: {
|
32
31
|
zIndex: 1000,
|
@@ -34,19 +33,23 @@ function CustomTabItem(_ref) {
|
|
34
33
|
}
|
35
34
|
}, titleTootip);
|
36
35
|
}
|
37
|
-
|
38
36
|
/**
|
39
37
|
* 竖向
|
40
38
|
* @param {*} props
|
41
39
|
* @returns
|
42
40
|
*/
|
41
|
+
|
42
|
+
|
43
43
|
function VerticalIconTab(props) {
|
44
44
|
var _classNames;
|
45
|
+
|
45
46
|
var activeKey = props.activeKey,
|
46
|
-
|
47
|
+
onChange = props.onChange;
|
48
|
+
|
47
49
|
var handleClick = function handleClick() {
|
48
50
|
onChange(null);
|
49
51
|
};
|
52
|
+
|
50
53
|
return /*#__PURE__*/React.createElement(_Tab, _extends({
|
51
54
|
shape: "wrapped",
|
52
55
|
tabPosition: "left",
|
@@ -62,5 +65,6 @@ function VerticalIconTab(props) {
|
|
62
65
|
onClick: handleClick
|
63
66
|
}));
|
64
67
|
}
|
68
|
+
|
65
69
|
VerticalIconTab.Item = _Tab.Item;
|
66
70
|
export default VerticalIconTab;
|
@@ -6,17 +6,21 @@ import React from 'react';
|
|
6
6
|
import classNames from 'classnames';
|
7
7
|
import Panel from "./Panel";
|
8
8
|
import styles from "./Collapse.module.scss";
|
9
|
+
|
9
10
|
function CollapseWrapper(props) {
|
10
11
|
var _classNames;
|
12
|
+
|
11
13
|
var className = props.className,
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
accordion = props.accordion,
|
15
|
+
fullheight = props.fullheight,
|
16
|
+
noContentPadding = props.noContentPadding,
|
17
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
18
|
+
|
16
19
|
return /*#__PURE__*/React.createElement(_Collapse, _extends({}, otherProps, {
|
17
20
|
accordion: accordion,
|
18
21
|
className: classNames(className, styles.collapse, (_classNames = {}, _classNames[styles.fullheight] = accordion && fullheight, _classNames[styles.contentNoPadding] = noContentPadding, _classNames))
|
19
22
|
}));
|
20
23
|
}
|
24
|
+
|
21
25
|
CollapseWrapper.Panel = Panel;
|
22
26
|
export default CollapseWrapper;
|
@@ -8,21 +8,24 @@ import PropTypes from 'prop-types';
|
|
8
8
|
import classNames from 'classnames';
|
9
9
|
import styles from "./Panel.module.scss";
|
10
10
|
var config = _ConfigProvider.config;
|
11
|
-
|
12
11
|
/**
|
13
12
|
* 定制折叠面板Panel,支持标题右侧工具
|
14
13
|
* @param {*} props
|
15
14
|
* @returns
|
16
15
|
*/
|
16
|
+
|
17
17
|
function CollapsePanel(props) {
|
18
18
|
var _classNames;
|
19
|
+
|
19
20
|
var title = props.title,
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
extra = props.extra,
|
22
|
+
className = props.className,
|
23
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
24
|
+
|
23
25
|
var _useState = useState(false),
|
24
|
-
|
25
|
-
|
26
|
+
hoverExtra = _useState[0],
|
27
|
+
setHoverExtra = _useState[1];
|
28
|
+
|
26
29
|
var panelTitle = /*#__PURE__*/React.createElement("div", {
|
27
30
|
style: {
|
28
31
|
display: 'flex',
|
@@ -35,7 +38,9 @@ function CollapsePanel(props) {
|
|
35
38
|
}, title), /*#__PURE__*/React.createElement("div", {
|
36
39
|
onClick: function onClick(e) {
|
37
40
|
return e.stopPropagation();
|
38
|
-
}
|
41
|
+
}
|
42
|
+
/* 解决点击按钮触发折叠面板展开折叠问题 */
|
43
|
+
,
|
39
44
|
onMouseOver: function onMouseOver() {
|
40
45
|
setHoverExtra(true);
|
41
46
|
},
|
@@ -57,27 +62,32 @@ function CollapsePanel(props) {
|
|
57
62
|
className: classNames(className, (_classNames = {}, _classNames[styles.removeTitleHoverWhenHoverExtra] = hoverExtra, _classNames))
|
58
63
|
}, otherProps), props.children);
|
59
64
|
}
|
65
|
+
|
60
66
|
;
|
61
67
|
CollapsePanel.propTypes = {
|
62
68
|
/**
|
63
69
|
* 样式类名的品牌前缀
|
64
70
|
*/
|
65
71
|
prefix: PropTypes.string,
|
72
|
+
|
66
73
|
/**
|
67
74
|
* 子组件接受行内样式
|
68
75
|
*/
|
69
76
|
style: PropTypes.object,
|
70
77
|
children: PropTypes.any,
|
71
78
|
isExpanded: PropTypes.bool,
|
79
|
+
|
72
80
|
/**
|
73
81
|
* 是否禁止用户操作
|
74
82
|
*/
|
75
83
|
disabled: PropTypes.bool,
|
84
|
+
|
76
85
|
/**
|
77
86
|
* 标题
|
78
87
|
*/
|
79
88
|
title: PropTypes.node,
|
80
89
|
extra: PropTypes.node,
|
90
|
+
|
81
91
|
/**
|
82
92
|
* 扩展class
|
83
93
|
*/
|
@@ -7,50 +7,50 @@ export var DEFAULT_TAG_COMMON_CONFIG = {
|
|
7
7
|
isCustom: false,
|
8
8
|
data: []
|
9
9
|
};
|
10
|
-
|
11
10
|
/**
|
12
11
|
* 默认通用悬浮框配置
|
13
12
|
*/
|
13
|
+
|
14
14
|
export var DEFAULT_TIP_COMMON_CONFIG = {
|
15
15
|
isCustom: false,
|
16
16
|
data: []
|
17
17
|
};
|
18
|
-
|
19
18
|
/**
|
20
19
|
* 默认自定义配置
|
21
20
|
*/
|
21
|
+
|
22
22
|
export var DEFAULT_CUSTOM_CONFIG = {
|
23
23
|
isCustom: true,
|
24
24
|
data: {}
|
25
25
|
};
|
26
|
-
|
27
26
|
/**
|
28
27
|
* 资源标注默认显示项
|
29
28
|
*/
|
29
|
+
|
30
30
|
export var NODE_TAG_DEFAULT_DATA = {
|
31
31
|
type: 'graph',
|
32
32
|
code: 'name'
|
33
33
|
};
|
34
|
-
|
35
34
|
/**
|
36
35
|
* 默认资源标注通用配置
|
37
36
|
*/
|
37
|
+
|
38
38
|
export var DEFAULT_NODE_TAG_COMMON_CONFIG = {
|
39
39
|
isCustom: false,
|
40
40
|
data: [NODE_TAG_DEFAULT_DATA]
|
41
41
|
};
|
42
|
-
|
43
42
|
/**
|
44
43
|
* 资源悬浮框默认配置
|
45
44
|
*/
|
45
|
+
|
46
46
|
export var NODE_TIP_DEFAULT_CONFIG = {
|
47
47
|
isCustom: false,
|
48
48
|
data: []
|
49
49
|
};
|
50
|
-
|
51
50
|
/**
|
52
51
|
* 链路标注默认配置
|
53
52
|
*/
|
53
|
+
|
54
54
|
export var DEFAULT_LINK_TAG_COMMON_CONFIG = {
|
55
55
|
isCustom: false,
|
56
56
|
data: []
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import rlog from "@riil-frontend/component-topology-utils/es/rlog";
|
3
|
-
var excludeTypes = ['data_center', 'manage_assets', 'network_link', 'access_link'];
|
3
|
+
var excludeTypes = ['data_center', 'manage_assets', 'network_link', 'access_link']; // 过滤模型树
|
4
4
|
|
5
|
-
// 过滤模型树
|
6
5
|
export function filterModelTree(modelTree) {
|
7
6
|
return modelTree.filter(function (node) {
|
8
7
|
return !excludeTypes.includes(node.code);
|
@@ -20,9 +19,8 @@ export function getCiModels(modelTree) {
|
|
20
19
|
list.push.apply(list, domainModel.childs);
|
21
20
|
});
|
22
21
|
return list;
|
23
|
-
}
|
22
|
+
} // 资源选择组件过滤类型
|
24
23
|
|
25
|
-
// 资源选择组件过滤类型
|
26
24
|
export var filterCiTypes = function filterCiTypes(tree) {
|
27
25
|
var resultTree = tree.filter(function (node) {
|
28
26
|
return !excludeTypes.includes(node.value);
|
@@ -30,8 +28,8 @@ export var filterCiTypes = function filterCiTypes(tree) {
|
|
30
28
|
return _extends({}, node, {
|
31
29
|
children: filterCiTypes(node.children || [])
|
32
30
|
});
|
33
|
-
});
|
34
|
-
|
31
|
+
}); // rlog.debug('资源选择组件过滤类型', tree, resultTree)
|
32
|
+
|
35
33
|
return resultTree;
|
36
34
|
};
|
37
35
|
export var getNetworkTopoCommonResListProps = function getNetworkTopoCommonResListProps() {
|
@@ -40,19 +38,12 @@ export var getNetworkTopoCommonResListProps = function getNetworkTopoCommonResLi
|
|
40
38
|
// innerTreeFilters: ['monitorable', 'discoverable'],
|
41
39
|
filterCiRes: filterCiTypes
|
42
40
|
};
|
43
|
-
};
|
41
|
+
}; // 拓扑中心资源类型限制
|
44
42
|
|
45
|
-
//
|
46
|
-
|
47
|
-
//
|
48
|
-
'
|
49
|
-
//
|
50
|
-
'
|
51
|
-
// 数据库
|
52
|
-
'oracle', 'asm_disk_group', 'oracle_rac',
|
53
|
-
// 中间件
|
54
|
-
'tomcat',
|
55
|
-
// 业务
|
56
|
-
'app', 'service',
|
57
|
-
// 虚拟化
|
43
|
+
export var RESOURCE_LIMIT_TYPES = [// 网络设备
|
44
|
+
'common_network', 'switch', 'switch_cluster', 'router', // 操作系统
|
45
|
+
'linux', 'windows', // 数据库
|
46
|
+
'oracle', 'asm_disk_group', 'oracle_rac', // 中间件
|
47
|
+
'tomcat', // 业务
|
48
|
+
'app', 'service', // 虚拟化
|
58
49
|
'virtual_mgmt_node', 'virtual_data_center', 'virtual_cluster', 'virtual_storage', 'virtual_vm', 'virtual_host', 'virtual_switch'];
|
@@ -1,24 +1,25 @@
|
|
1
1
|
import { getHistory } from '@riil-frontend/component-topology-utils';
|
2
2
|
import { RES_DETAIL_PATH } from "../constants/ResDetailContants";
|
3
3
|
import { gotoMonitoringStrategyPage } from "../core/utils/resourceUtil";
|
4
|
-
|
5
4
|
/**
|
6
5
|
* 跳转资源详情指定页签
|
7
6
|
* @param topoApp
|
8
7
|
* @param data
|
9
8
|
* @param tab
|
10
9
|
*/
|
10
|
+
|
11
11
|
function openResourceDetail(_ref) {
|
12
12
|
var topoApp = _ref.topoApp,
|
13
|
-
|
14
|
-
|
13
|
+
data = _ref.data,
|
14
|
+
tab = _ref.tab;
|
15
15
|
var ciType = data.ciType,
|
16
|
-
|
17
|
-
|
16
|
+
id = data.id,
|
17
|
+
name = data.name;
|
18
18
|
var ciMeta = topoApp.ciTyeCache.getCiType(ciType);
|
19
19
|
var url = RES_DETAIL_PATH + "/" + id + "?resId=" + id + "&domainCode=" + ciMeta.domain + "&title=" + encodeURIComponent(name) + "&tabByComType=" + tab;
|
20
20
|
getHistory().push(url);
|
21
21
|
}
|
22
|
+
|
22
23
|
export default function createMenuCommands(topoApp) {
|
23
24
|
return {
|
24
25
|
// 跳转到资源监控页面
|
@@ -40,7 +41,7 @@ export default function createMenuCommands(topoApp) {
|
|
40
41
|
data: data.bussiInformation,
|
41
42
|
tab: 'uicbb-res-emotion-log'
|
42
43
|
});
|
43
|
-
}
|
44
|
-
|
44
|
+
} // 链路操作
|
45
|
+
|
45
46
|
};
|
46
47
|
}
|
@@ -2,9 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import { loopTreeFun } from "../../../utils/tree";
|
3
3
|
export default function mergeContextmenu(defaultMenu, customMenu, topo) {
|
4
4
|
var _customMenu2$bg, _customMenu2$group, _customMenu2$node, _customMenu2$line;
|
5
|
-
var customMenu2 = typeof customMenu === 'function' ? customMenu(topo) : customMenu || {};
|
6
5
|
|
7
|
-
// 注册自定义右键菜单
|
6
|
+
var customMenu2 = typeof customMenu === 'function' ? customMenu(topo) : customMenu || {}; // 注册自定义右键菜单
|
7
|
+
|
8
8
|
loopTreeFun([].concat(((_customMenu2$bg = customMenu2.bg) === null || _customMenu2$bg === void 0 ? void 0 : _customMenu2$bg.items) || [], ((_customMenu2$group = customMenu2.group) === null || _customMenu2$group === void 0 ? void 0 : _customMenu2$group.items) || [], ((_customMenu2$node = customMenu2.node) === null || _customMenu2$node === void 0 ? void 0 : _customMenu2$node.items) || [], ((_customMenu2$line = customMenu2.line) === null || _customMenu2$line === void 0 ? void 0 : _customMenu2$line.items) || []), function (item) {
|
9
9
|
if (item.onClick) {
|
10
10
|
topo.view.contextMenu.registerCommand(item.id, item.onClick);
|
@@ -4,10 +4,12 @@ export default (function (topo, fn) {
|
|
4
4
|
var graphLoaded = topoModState.graphLoaded;
|
5
5
|
useEffect(function () {
|
6
6
|
var dataModel;
|
7
|
+
|
7
8
|
if (graphLoaded) {
|
8
9
|
dataModel = topo.getDataModel();
|
9
10
|
dataModel.addDataPropertyChangeListener(fn);
|
10
11
|
}
|
12
|
+
|
11
13
|
return function () {
|
12
14
|
if (dataModel) {
|
13
15
|
dataModel.removeDataPropertyChangeListener(fn);
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import { useMemo } from "react";
|
2
2
|
export default function useHtElement(props) {
|
3
3
|
var topo = props.topo,
|
4
|
-
|
4
|
+
id = props.id;
|
5
5
|
var element = useMemo(function () {
|
6
6
|
if (!id) {
|
7
7
|
return null;
|
8
8
|
}
|
9
|
+
|
9
10
|
return topo.getDataModel().getDataById(id);
|
10
11
|
}, [id]);
|
11
12
|
return element;
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import { useEffect, useMemo, useState } from "react";
|
2
2
|
export default function useHtElements(props) {
|
3
3
|
var topo = props.topo,
|
4
|
-
|
4
|
+
ids = props.ids;
|
5
|
+
|
5
6
|
var _useState = useState(ids),
|
6
|
-
|
7
|
-
|
7
|
+
idList = _useState[0],
|
8
|
+
setIdList = _useState[1];
|
9
|
+
|
8
10
|
useEffect(function () {
|
9
11
|
if (ids.join(',') !== idList.join(',')) {
|
10
12
|
setIdList(ids);
|
@@ -14,8 +16,7 @@ export default function useHtElements(props) {
|
|
14
16
|
//
|
15
17
|
return idList.map(function (id) {
|
16
18
|
return topo.getDataModel().getDataById(id);
|
17
|
-
})
|
18
|
-
// 多选删除时,被删除的元素是undefined
|
19
|
+
}) // 多选删除时,被删除的元素是undefined
|
19
20
|
.filter(function (element) {
|
20
21
|
return !!element;
|
21
22
|
});
|
@@ -2,47 +2,49 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import topoManager from '@riil-frontend/component-topology-graph/es/manager';
|
3
3
|
import { getCiModels } from "../../../constants/ResourceTypeLimit";
|
4
4
|
import basicIcons from "./basicIcons";
|
5
|
-
|
6
5
|
/**
|
7
6
|
* 获取默认图标
|
8
7
|
* @param {*} topo
|
9
8
|
* @returns
|
10
9
|
*/
|
10
|
+
|
11
11
|
export function getNodeDefaultIcons(topo) {
|
12
12
|
return [].concat(topoManager.iconLibManager.getNodeIcons(), topo.options.icons || []);
|
13
13
|
}
|
14
|
-
|
15
14
|
/**
|
16
15
|
* 获取资源图标列表
|
17
16
|
* 模型树可监控的模型图标
|
18
17
|
*
|
19
18
|
* @param {*} topo
|
20
19
|
*/
|
20
|
+
|
21
21
|
export function getResourceIcons(topo) {
|
22
22
|
// 获取模型树缓存
|
23
|
-
var modelTree = topoManager.ciModel.getModelTreeCache();
|
24
|
-
|
23
|
+
var modelTree = topoManager.ciModel.getModelTreeCache(); // 过滤出可监控的模型
|
24
|
+
|
25
25
|
var models = getCiModels(modelTree).filter(function (model) {
|
26
26
|
return !!model.icon;
|
27
|
-
});
|
28
|
-
|
27
|
+
}); // 获得图标
|
28
|
+
|
29
29
|
var icons = models.map(function (model) {
|
30
30
|
return topoManager.iconFactory.getIcon("ciType." + model.code);
|
31
31
|
});
|
32
32
|
return [].concat(icons, topo.options.icons || []);
|
33
33
|
}
|
34
|
-
|
35
34
|
/**
|
36
35
|
* 获取基础图标列表。排除模型图标
|
37
36
|
* @param {*} topo
|
38
37
|
*/
|
38
|
+
|
39
39
|
export function getBasicIcons(topo, containsGroupIcon) {
|
40
40
|
var nodeIcons = topoManager.iconLibManager.getNodeIcons().filter(function (icon) {
|
41
41
|
return !icon.ciType;
|
42
42
|
});
|
43
|
+
|
43
44
|
if (containsGroupIcon === false) {
|
44
45
|
return [].concat(nodeIcons, basicIcons);
|
45
46
|
}
|
47
|
+
|
46
48
|
return [topoManager.iconLibManager.getGroupIcon()].concat(nodeIcons, basicIcons);
|
47
49
|
}
|
48
50
|
export function getGroupDefaultIcons(topo) {
|
@@ -51,9 +53,9 @@ export function getGroupDefaultIcons(topo) {
|
|
51
53
|
export function getUserCustomIconsForHt(topo) {
|
52
54
|
return getUserCustomIcons(topo).map(function (_ref) {
|
53
55
|
var id = _ref.id,
|
54
|
-
|
55
|
-
|
56
|
-
|
56
|
+
name = _ref.name,
|
57
|
+
url = _ref.url,
|
58
|
+
jsonUrl = _ref.jsonUrl;
|
57
59
|
return {
|
58
60
|
id: id,
|
59
61
|
name: name,
|
@@ -61,11 +63,11 @@ export function getUserCustomIconsForHt(topo) {
|
|
61
63
|
};
|
62
64
|
});
|
63
65
|
}
|
64
|
-
|
65
66
|
/**
|
66
67
|
* 获取编辑模式左侧图片列表
|
67
68
|
* @param {*} topo
|
68
69
|
*/
|
70
|
+
|
69
71
|
export function getEditorIcons(topo) {
|
70
72
|
return {
|
71
73
|
// 默认图标
|
@@ -73,9 +75,9 @@ export function getEditorIcons(topo) {
|
|
73
75
|
// 自定义上传图标
|
74
76
|
custom: getUserCustomIcons(topo).map(function (_ref2) {
|
75
77
|
var id = _ref2.id,
|
76
|
-
|
77
|
-
|
78
|
-
|
78
|
+
name = _ref2.name,
|
79
|
+
url = _ref2.url,
|
80
|
+
jsonUrl = _ref2.jsonUrl;
|
79
81
|
return {
|
80
82
|
id: id,
|
81
83
|
name: name,
|
@@ -98,18 +100,17 @@ export function transformCustomIcon2HtIcon(icon) {
|
|
98
100
|
export function transformCustomIcons2HtIcons(icons) {
|
99
101
|
return icons.map(transformCustomIcon2HtIcon);
|
100
102
|
}
|
101
|
-
|
102
103
|
/**
|
103
104
|
* 获取自定义图标
|
104
105
|
* @param {*} topo
|
105
106
|
* @returns
|
106
107
|
*/
|
108
|
+
|
107
109
|
export function getUserCustomIcons(topo) {
|
108
110
|
var uploadIcons = topo.store.getModelState('customIcon').icons;
|
109
111
|
return [].concat(transformCustomIcons2HtIcons(uploadIcons.node));
|
110
|
-
}
|
112
|
+
} // 获得节点图标列表
|
111
113
|
|
112
|
-
// 获得节点图标列表
|
113
114
|
export function getNodeIconGroups(topo) {
|
114
115
|
return [{
|
115
116
|
name: '默认',
|
@@ -2,7 +2,8 @@ import topoManager from '@riil-frontend/component-topology-graph/es/manager';
|
|
2
2
|
import { getBasicIcons, getGroupDefaultIcons, getResourceIcons, transformCustomIcon2HtIcon } from "./icon";
|
3
3
|
export function useCustomIcons(topo) {
|
4
4
|
var _topo$store$useModelS = topo.store.useModelState('customIcon'),
|
5
|
-
|
5
|
+
icons = _topo$store$useModelS.icons;
|
6
|
+
|
6
7
|
var customIcons = icons.node.map(transformCustomIcon2HtIcon);
|
7
8
|
return customIcons;
|
8
9
|
}
|
@@ -15,12 +16,14 @@ export function useNodeIcons(topo) {
|
|
15
16
|
name: '基础图片',
|
16
17
|
icons: getBasicIcons(topo)
|
17
18
|
}];
|
19
|
+
|
18
20
|
if (customIcons.length) {
|
19
21
|
groups.push({
|
20
22
|
name: '自定义',
|
21
23
|
icons: customIcons
|
22
24
|
});
|
23
25
|
}
|
26
|
+
|
24
27
|
return groups;
|
25
28
|
}
|
26
29
|
export function useGroupIcons(topo) {
|
@@ -4,10 +4,12 @@ import React, { useState, useEffect } from 'react';
|
|
4
4
|
import styles from "./index.module.scss";
|
5
5
|
import { PAGE_TYPE } from "../constants/uicbb";
|
6
6
|
import Link from "../../../../components/Link";
|
7
|
+
|
7
8
|
var alarmLink = function alarmLink(alarmInfo) {
|
8
9
|
// console.log('alarmLink', alarmInfo);
|
9
10
|
return "/default/pagecenter/" + PAGE_TYPE.ALERT_DETAIL + "/view/" + alarmInfo.alertId + "?alertId=" + alarmInfo.alertId + "&resId=" + alarmInfo.ciId + "&title=&ruleId=" + alarmInfo.ruleId + "&ciCode=" + alarmInfo.ciTypeCode + "&ciType=" + alarmInfo.ciType;
|
10
11
|
};
|
12
|
+
|
11
13
|
var getNode = function getNode(topo, alarmInfo) {
|
12
14
|
var id = alarmInfo.resourceId || alarmInfo.ciId;
|
13
15
|
var node = topo.getHtTopo().getGraphView().dm().getDataByTag(id);
|
@@ -15,6 +17,7 @@ var getNode = function getNode(topo, alarmInfo) {
|
|
15
17
|
topo.getHtTopo().getGraphView().fitData(ele, true, 20, true);
|
16
18
|
topo.getHtTopo().getGraphView().dm().getSelectionModel().setSelection(ele);
|
17
19
|
};
|
20
|
+
|
18
21
|
var getNodeParents = function getNodeParents(node) {
|
19
22
|
if (node.getParent() && node.getParent().isExpanded && !node.getParent().isExpanded()) {
|
20
23
|
return getNodeParents(node.getParent());
|
@@ -22,11 +25,12 @@ var getNodeParents = function getNodeParents(node) {
|
|
22
25
|
return node;
|
23
26
|
}
|
24
27
|
};
|
28
|
+
|
25
29
|
function AlarmListItem(props) {
|
26
30
|
// 传入参数
|
27
31
|
var topo = props.topo,
|
28
|
-
|
29
|
-
|
32
|
+
alarmInfo = props.alarmInfo,
|
33
|
+
onClick = props.onClick;
|
30
34
|
return /*#__PURE__*/React.createElement(_List.Item, {
|
31
35
|
className: styles.AlarmListItem,
|
32
36
|
media: /*#__PURE__*/React.createElement(_Icon, {
|
@@ -48,14 +52,17 @@ function AlarmListItem(props) {
|
|
48
52
|
to: alarmLink(alarmInfo)
|
49
53
|
}, "\u67E5\u770B\u8BE6\u60C5"))));
|
50
54
|
}
|
55
|
+
|
51
56
|
function RiskListItem(props) {
|
52
57
|
// 传入参数
|
53
58
|
var topo = props.topo,
|
54
|
-
|
55
|
-
|
59
|
+
alarmInfo = props.alarmInfo,
|
60
|
+
onClick = props.onClick;
|
61
|
+
|
56
62
|
var riskLink = function riskLink(item) {
|
57
63
|
return "/default/healthCheck/riskReport/" + item.id + "?title=\u68C0\u67E5\u62A5\u544A";
|
58
64
|
};
|
65
|
+
|
59
66
|
return /*#__PURE__*/React.createElement(_List.Item, {
|
60
67
|
className: styles.AlarmListItem,
|
61
68
|
media: /*#__PURE__*/React.createElement(_Icon, {
|
@@ -77,9 +84,11 @@ function RiskListItem(props) {
|
|
77
84
|
to: riskLink(alarmInfo)
|
78
85
|
}, "\u67E5\u770B\u8BE6\u60C5"))));
|
79
86
|
}
|
87
|
+
|
80
88
|
function ListItem(props) {
|
81
89
|
var alarmInfo = props.alarmInfo;
|
82
90
|
var ListItemWidget = alarmInfo.eventType === 'risk' ? RiskListItem : AlarmListItem;
|
83
91
|
return /*#__PURE__*/React.createElement(ListItemWidget, props);
|
84
92
|
}
|
93
|
+
|
85
94
|
export default ListItem;
|