@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,53 +1,74 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
exports.__esModule = true;
|
5
6
|
exports["default"] = LinkTopoCard;
|
7
|
+
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
9
|
+
|
6
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
11
|
+
|
7
12
|
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
8
14
|
var _BlockBox = _interopRequireDefault(require("../../BlockBox"));
|
15
|
+
|
9
16
|
var _Configurator = _interopRequireDefault(require("../Configurator"));
|
17
|
+
|
10
18
|
var _LinkTopo = _interopRequireDefault(require("./LinkTopo"));
|
19
|
+
|
11
20
|
var _services = require("./services");
|
21
|
+
|
12
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
23
|
+
|
13
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
14
|
-
|
25
|
+
|
15
26
|
function LinkTopoCard(props) {
|
16
27
|
var _data$attributes;
|
28
|
+
|
17
29
|
var topoId = props.topoId,
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
30
|
+
data = props.data,
|
31
|
+
defaultCols = props.defaultCols,
|
32
|
+
metricCol = props.metricCol,
|
33
|
+
metricColChange = props.metricColChange,
|
34
|
+
metricCodes = props.metricCodes; // eslint-disable-next-line camelcase
|
35
|
+
|
24
36
|
var supportTemplates = (data === null || data === void 0 ? void 0 : (_data$attributes = data.attributes) === null || _data$attributes === void 0 ? void 0 : _data$attributes.support_templates) || ''; // 该资源监控模板
|
37
|
+
|
25
38
|
var isCrucial = data === null || data === void 0 ? void 0 : data.attributes['network_link.is_crucial']; //是不是关键链路
|
39
|
+
|
26
40
|
var _useState = (0, _react.useState)(null),
|
27
|
-
|
28
|
-
|
41
|
+
openFlow = _useState[0],
|
42
|
+
setOpenFlow = _useState[1];
|
43
|
+
|
29
44
|
var analysisUrl = "../../default/trafficControl/linkConfigure?id=" + data.attributes.name + "&num=0";
|
30
45
|
var linkDetailsUrl = "/default/pagecenter/linkDetail/view/" + data.id + "?resId=" + data.id + "&domainCode=network&title=" + data.attributes.name + "&ciCode=network_link&tabByComType=uicbb-res-crucial-link-flow";
|
46
|
+
|
31
47
|
var isOpenFlows = /*#__PURE__*/function () {
|
32
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
48
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
33
49
|
var checkMenus, isOpen;
|
34
|
-
return
|
50
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
35
51
|
while (1) switch (_context.prev = _context.next) {
|
36
52
|
case 0:
|
37
53
|
_context.next = 2;
|
38
54
|
return (0, _services.checkMenu)();
|
55
|
+
|
39
56
|
case 2:
|
40
57
|
checkMenus = _context.sent;
|
58
|
+
|
41
59
|
if (!(checkMenus[0].passed == 'PASS' && isCrucial)) {
|
42
60
|
_context.next = 10;
|
43
61
|
break;
|
44
62
|
}
|
63
|
+
|
45
64
|
_context.next = 6;
|
46
65
|
return (0, _services.isOpenFlow)({
|
47
66
|
'name': data.attributes.display_name
|
48
67
|
});
|
68
|
+
|
49
69
|
case 6:
|
50
70
|
isOpen = _context.sent;
|
71
|
+
|
51
72
|
//判断是不是有流量分析
|
52
73
|
if (isOpen) {
|
53
74
|
setOpenFlow({
|
@@ -60,20 +81,25 @@ function LinkTopoCard(props) {
|
|
60
81
|
url: analysisUrl
|
61
82
|
});
|
62
83
|
}
|
84
|
+
|
63
85
|
_context.next = 11;
|
64
86
|
break;
|
87
|
+
|
65
88
|
case 10:
|
66
89
|
setOpenFlow(null);
|
90
|
+
|
67
91
|
case 11:
|
68
92
|
case "end":
|
69
93
|
return _context.stop();
|
70
94
|
}
|
71
95
|
}, _callee);
|
72
96
|
}));
|
97
|
+
|
73
98
|
return function isOpenFlows() {
|
74
99
|
return _ref.apply(this, arguments);
|
75
100
|
};
|
76
101
|
}();
|
102
|
+
|
77
103
|
(0, _react.useEffect)(function () {
|
78
104
|
isOpenFlows();
|
79
105
|
}, [data]);
|
@@ -82,8 +108,7 @@ function LinkTopoCard(props) {
|
|
82
108
|
headerExtra: /*#__PURE__*/_react["default"].createElement(_Configurator["default"], {
|
83
109
|
topoId: topoId,
|
84
110
|
templateCode: supportTemplates,
|
85
|
-
type: "keyIndicators"
|
86
|
-
// 关键链路默认展示的指标展示【端到端ping时延】和【端到端ping丢包率】
|
111
|
+
type: "keyIndicators" // 关键链路默认展示的指标展示【端到端ping时延】和【端到端ping丢包率】
|
87
112
|
,
|
88
113
|
defaultCol: isCrucial ? ['remote_ping_delayed', 'remote_ping_discards_rate'] : [],
|
89
114
|
max: 5,
|
@@ -2,14 +2,10 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.INTERFACE_METRIC_CODES = void 0;
|
5
|
-
var INTERFACE_METRIC_CODES = ['out_rate',
|
6
|
-
//
|
7
|
-
'
|
8
|
-
//
|
9
|
-
'in_rate',
|
10
|
-
// 接收速率
|
11
|
-
'in_bandwidth_utilization',
|
12
|
-
// 接收带宽利用率
|
5
|
+
var INTERFACE_METRIC_CODES = ['out_rate', // 发送速率、接收速率发送接收利用率、总错包数
|
6
|
+
'out_bandwidth_utilization', // 发送带宽利用率
|
7
|
+
'in_rate', // 接收速率
|
8
|
+
'in_bandwidth_utilization', // 接收带宽利用率
|
13
9
|
'total_errors_packets' // 总错包数
|
14
10
|
];
|
15
11
|
exports.INTERFACE_METRIC_CODES = INTERFACE_METRIC_CODES;
|
@@ -1,19 +1,28 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
exports.__esModule = true;
|
5
6
|
exports["default"] = useMetricPolling;
|
7
|
+
|
6
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
+
|
7
10
|
var _react = _interopRequireWildcard(require("react"));
|
11
|
+
|
8
12
|
var _ahooks = require("ahooks");
|
13
|
+
|
9
14
|
var _services = require("../services");
|
15
|
+
|
10
16
|
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
17
|
+
|
11
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
19
|
+
|
12
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
21
|
+
|
13
22
|
// 资源节点上方色块展示资源的发送速率发送带宽利用率、接收速率发送接收利用率、总错包数
|
14
23
|
function useMetricPolling(_ref) {
|
15
24
|
var linkCi = _ref.linkCi,
|
16
|
-
|
25
|
+
linkMetricCodes = _ref.linkMetricCodes;
|
17
26
|
var linkId = linkCi.id;
|
18
27
|
var arr = ['netDelayRatio', 'retansRatio'];
|
19
28
|
var codes = [];
|
@@ -21,16 +30,18 @@ function useMetricPolling(_ref) {
|
|
21
30
|
linkMetricCodes.map(function (item) {
|
22
31
|
arr.indexOf(item) > -1 ? retansRatioNetDelayRatioCodes.push(item) : codes.push(item);
|
23
32
|
});
|
33
|
+
|
24
34
|
var _useState = (0, _react.useState)({
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
35
|
+
sourceMetrics: null,
|
36
|
+
destinationMetrics: null,
|
37
|
+
// 链路指标列表
|
38
|
+
linkMetrics: [],
|
39
|
+
linkMetricsTs: null,
|
40
|
+
linkOther: []
|
41
|
+
}),
|
42
|
+
data = _useState[0],
|
43
|
+
setData = _useState[1];
|
44
|
+
|
34
45
|
var queryLastestValues = (0, _ahooks.useRequest)(_services.queryRetansRatioNetDelayRatio, {
|
35
46
|
pollingInterval: 1000 * 15,
|
36
47
|
pollingWhenHidden: false,
|
@@ -41,8 +52,8 @@ function useMetricPolling(_ref) {
|
|
41
52
|
linkOther: result
|
42
53
|
}));
|
43
54
|
}
|
44
|
-
});
|
45
|
-
|
55
|
+
}); // 轮询hooks
|
56
|
+
|
46
57
|
var queryLinkMetricsRequest = (0, _ahooks.useRequest)(_services.queryLinkLatestMetrics, {
|
47
58
|
pollingInterval: 60 * 1000,
|
48
59
|
pollingWhenHidden: false,
|
@@ -50,6 +61,7 @@ function useMetricPolling(_ref) {
|
|
50
61
|
manual: true,
|
51
62
|
onSuccess: function onSuccess(result) {
|
52
63
|
setData((0, _extends2["default"])({}, data, result));
|
64
|
+
|
53
65
|
_rlog["default"].info('链路拓扑指标轮询', result);
|
54
66
|
}
|
55
67
|
});
|
@@ -60,6 +72,7 @@ function useMetricPolling(_ref) {
|
|
60
72
|
manual: true,
|
61
73
|
onSuccess: function onSuccess(result) {
|
62
74
|
setData((0, _extends2["default"])({}, data, result));
|
75
|
+
|
63
76
|
_rlog["default"].info('链路拓扑指标轮询 queryInterfaceMetricsRequest 结果', result);
|
64
77
|
}
|
65
78
|
});
|
@@ -72,8 +85,10 @@ function useMetricPolling(_ref) {
|
|
72
85
|
linkCi: linkCi,
|
73
86
|
codes: codes
|
74
87
|
});
|
88
|
+
|
75
89
|
queryLinkMetricsRequest.run(linkCi, codes);
|
76
90
|
}
|
91
|
+
|
77
92
|
return function () {};
|
78
93
|
}, [linkId, linkMetricCodesStr]);
|
79
94
|
var retansRatioNetDelayRatioCodesStr = retansRatioNetDelayRatioCodes.map(function (item) {
|
@@ -85,10 +100,12 @@ function useMetricPolling(_ref) {
|
|
85
100
|
linkCi: linkCi,
|
86
101
|
retansRatioNetDelayRatioCodes: retansRatioNetDelayRatioCodes
|
87
102
|
});
|
103
|
+
|
88
104
|
queryLastestValues.run({
|
89
105
|
'id': linkCi.attributes.name
|
90
106
|
}, retansRatioNetDelayRatioCodes);
|
91
107
|
}
|
108
|
+
|
92
109
|
return function () {};
|
93
110
|
}, [linkId, retansRatioNetDelayRatioCodesStr]);
|
94
111
|
(0, _react.useEffect)(function () {
|
@@ -96,8 +113,10 @@ function useMetricPolling(_ref) {
|
|
96
113
|
_rlog["default"].info('链路拓扑指标轮询 queryInterfaceMetricsRequest 开始', {
|
97
114
|
linkCi: linkCi
|
98
115
|
});
|
116
|
+
|
99
117
|
queryInterfaceMetricsRequest.run(linkCi);
|
100
118
|
}
|
119
|
+
|
101
120
|
return function () {};
|
102
121
|
}, [linkId]);
|
103
122
|
return data;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
exports.__esModule = true;
|
5
6
|
exports.checkMenu = checkMenu;
|
6
7
|
exports.isOpenFlow = isOpenFlow;
|
@@ -10,27 +11,38 @@ exports.queryLatestMetrics = queryLatestMetrics;
|
|
10
11
|
exports.queryLinkInterfacesLatestMetrics = queryLinkInterfacesLatestMetrics;
|
11
12
|
exports.queryLinkLatestMetrics = queryLinkLatestMetrics;
|
12
13
|
exports.queryRetansRatioNetDelayRatio = queryRetansRatioNetDelayRatio;
|
14
|
+
|
15
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
16
|
+
|
13
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
18
|
+
|
14
19
|
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
20
|
+
|
15
21
|
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
22
|
+
|
16
23
|
var _CiTypeCache = _interopRequireDefault(require("../../../../../../../../../models/cache/CiTypeCache"));
|
24
|
+
|
17
25
|
var _constants = require("../constants");
|
26
|
+
|
18
27
|
var _metricUtil = require("../../../../../../../../../utils/metricUtil");
|
19
|
-
|
28
|
+
|
20
29
|
function queryAssetModel(_x) {
|
21
30
|
return _queryAssetModel.apply(this, arguments);
|
22
31
|
}
|
32
|
+
|
23
33
|
function _queryAssetModel() {
|
24
|
-
_queryAssetModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
34
|
+
_queryAssetModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(code) {
|
25
35
|
var result;
|
26
|
-
return
|
36
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
27
37
|
while (1) switch (_context.prev = _context.next) {
|
28
38
|
case 0:
|
29
39
|
_context.next = 2;
|
30
40
|
return _componentTopologyUtils.request.get("/mdc/v1/api/model-asset/" + code);
|
41
|
+
|
31
42
|
case 2:
|
32
43
|
result = _context.sent;
|
33
44
|
return _context.abrupt("return", result);
|
45
|
+
|
34
46
|
case 4:
|
35
47
|
case "end":
|
36
48
|
return _context.stop();
|
@@ -39,6 +51,7 @@ function _queryAssetModel() {
|
|
39
51
|
}));
|
40
52
|
return _queryAssetModel.apply(this, arguments);
|
41
53
|
}
|
54
|
+
|
42
55
|
function queryLatestMetrics(_x2) {
|
43
56
|
return _queryLatestMetrics.apply(this, arguments);
|
44
57
|
}
|
@@ -49,12 +62,15 @@ function queryLatestMetrics(_x2) {
|
|
49
62
|
* @param {*} linkMetricCodes
|
50
63
|
* @returns
|
51
64
|
*/
|
65
|
+
|
66
|
+
|
52
67
|
function _queryLatestMetrics() {
|
53
|
-
_queryLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
54
|
-
return
|
68
|
+
_queryLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(params) {
|
69
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
55
70
|
while (1) switch (_context2.prev = _context2.next) {
|
56
71
|
case 0:
|
57
72
|
return _context2.abrupt("return", _componentTopologyUtils.request.post('/mdc/v1/api/cmdb/metric/queryLatestMetrics', params));
|
73
|
+
|
58
74
|
case 1:
|
59
75
|
case "end":
|
60
76
|
return _context2.stop();
|
@@ -63,35 +79,43 @@ function _queryLatestMetrics() {
|
|
63
79
|
}));
|
64
80
|
return _queryLatestMetrics.apply(this, arguments);
|
65
81
|
}
|
82
|
+
|
66
83
|
function queryLinkLatestMetrics(_x3, _x4) {
|
67
84
|
return _queryLinkLatestMetrics.apply(this, arguments);
|
68
85
|
}
|
86
|
+
|
69
87
|
function _queryLinkLatestMetrics() {
|
70
|
-
_queryLinkLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
88
|
+
_queryLinkLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(linkCi, linkMetricCodes) {
|
71
89
|
var _linkMetrics$;
|
90
|
+
|
72
91
|
var linkMetrics, resultData;
|
73
|
-
return
|
92
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
74
93
|
while (1) switch (_context3.prev = _context3.next) {
|
75
94
|
case 0:
|
76
95
|
_rlog["default"].debug('链路拓扑指标轮询 queryLinkLatestMetrics', linkCi, linkMetricCodes);
|
96
|
+
|
77
97
|
if (linkMetricCodes.length) {
|
78
98
|
_context3.next = 3;
|
79
99
|
break;
|
80
100
|
}
|
101
|
+
|
81
102
|
return _context3.abrupt("return", {
|
82
103
|
linkMetrics: [],
|
83
104
|
linkMetricsTs: undefined
|
84
105
|
});
|
106
|
+
|
85
107
|
case 3:
|
86
108
|
_context3.next = 5;
|
87
109
|
return queryLatestMetrics({
|
88
110
|
ciId: [linkCi.id],
|
89
111
|
'metricCode': linkMetricCodes
|
90
112
|
});
|
113
|
+
|
91
114
|
case 5:
|
92
115
|
linkMetrics = _context3.sent;
|
93
116
|
_context3.next = 8;
|
94
117
|
return _CiTypeCache["default"].load([linkCi.ciType || linkCi.typeCode]);
|
118
|
+
|
95
119
|
case 8:
|
96
120
|
// format
|
97
121
|
resultData = linkMetricCodes.map(function (code) {
|
@@ -99,7 +123,9 @@ function _queryLinkLatestMetrics() {
|
|
99
123
|
return m.metricCode === code;
|
100
124
|
});
|
101
125
|
var value = metric === null || metric === void 0 ? void 0 : metric.metricValue;
|
126
|
+
|
102
127
|
var metricDef = _CiTypeCache["default"].getMetric(linkCi.ciType || linkCi.typeCode, code);
|
128
|
+
|
103
129
|
return {
|
104
130
|
code: code,
|
105
131
|
name: metricDef.name,
|
@@ -111,6 +137,7 @@ function _queryLinkLatestMetrics() {
|
|
111
137
|
linkMetrics: resultData,
|
112
138
|
linkMetricsTs: (_linkMetrics$ = linkMetrics[0]) === null || _linkMetrics$ === void 0 ? void 0 : _linkMetrics$.ts
|
113
139
|
});
|
140
|
+
|
114
141
|
case 10:
|
115
142
|
case "end":
|
116
143
|
return _context3.stop();
|
@@ -119,6 +146,7 @@ function _queryLinkLatestMetrics() {
|
|
119
146
|
}));
|
120
147
|
return _queryLinkLatestMetrics.apply(this, arguments);
|
121
148
|
}
|
149
|
+
|
122
150
|
function queryLinkInterfacesLatestMetrics(_x5) {
|
123
151
|
return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
|
124
152
|
}
|
@@ -126,49 +154,62 @@ function queryLinkInterfacesLatestMetrics(_x5) {
|
|
126
154
|
* @name checkMenu 判断当前流量监控权限
|
127
155
|
* @returns
|
128
156
|
*/
|
157
|
+
|
158
|
+
|
129
159
|
function _queryLinkInterfacesLatestMetrics() {
|
130
|
-
_queryLinkInterfacesLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
160
|
+
_queryLinkInterfacesLatestMetrics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(linkCi) {
|
131
161
|
var _linkCi$attributes, sourceType, sourceId, destinationId, destinationType, typeCodes, queryInterfaceMetricsParam, interfaceMetrics, resultData, findMetricsBySubCiId, parseInterfaceMetrics;
|
132
|
-
|
162
|
+
|
163
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
133
164
|
while (1) switch (_context4.prev = _context4.next) {
|
134
165
|
case 0:
|
135
166
|
parseInterfaceMetrics = function _parseInterfaceMetric(subCiId) {
|
136
167
|
var metrics = findMetricsBySubCiId(subCiId);
|
137
168
|
return _constants.INTERFACE_METRIC_CODES.reduce(function (res, code) {
|
138
169
|
var _metrics$find;
|
170
|
+
|
139
171
|
var value = (_metrics$find = metrics.find(function (m) {
|
140
172
|
return m.metricCode === code;
|
141
173
|
})) === null || _metrics$find === void 0 ? void 0 : _metrics$find.metricValue;
|
174
|
+
|
142
175
|
var metricDef = _CiTypeCache["default"].getMetric(linkCi.ciType || linkCi.typeCode, code);
|
176
|
+
|
143
177
|
var formatValue = (0, _metricUtil.formatMetric)(value, metricDef);
|
144
178
|
res[code] = formatValue === 'undefined' ? '-' : formatValue;
|
145
179
|
return res;
|
146
180
|
}, {});
|
147
181
|
};
|
182
|
+
|
148
183
|
findMetricsBySubCiId = function _findMetricsBySubCiId(subCiId) {
|
149
184
|
var metrics = interfaceMetrics.filter(function (metric) {
|
150
185
|
return metric.subCiId === subCiId;
|
151
186
|
});
|
152
187
|
return metrics;
|
153
188
|
};
|
189
|
+
|
154
190
|
_linkCi$attributes = linkCi.attributes, sourceType = _linkCi$attributes.source_type, sourceId = _linkCi$attributes.source_id, destinationId = _linkCi$attributes.destination_id, destinationType = _linkCi$attributes.destination_type;
|
155
|
-
_rlog["default"].debug('查询链路接口指标', linkCi);
|
156
191
|
|
157
|
-
// 查询指标模型
|
192
|
+
_rlog["default"].debug('查询链路接口指标', linkCi); // 查询指标模型
|
193
|
+
|
194
|
+
|
158
195
|
typeCodes = [sourceType];
|
159
196
|
queryInterfaceMetricsParam = {
|
160
197
|
'subCiId': [sourceId],
|
161
198
|
'metricCode': [].concat(_constants.INTERFACE_METRIC_CODES)
|
162
199
|
};
|
200
|
+
|
163
201
|
if (destinationId) {
|
164
202
|
queryInterfaceMetricsParam.subCiId.push(destinationId);
|
165
203
|
typeCodes.push(destinationType);
|
166
204
|
}
|
205
|
+
|
167
206
|
_context4.next = 9;
|
168
207
|
return _CiTypeCache["default"].load(typeCodes);
|
208
|
+
|
169
209
|
case 9:
|
170
210
|
_context4.next = 11;
|
171
211
|
return queryLatestMetrics(queryInterfaceMetricsParam);
|
212
|
+
|
172
213
|
case 11:
|
173
214
|
interfaceMetrics = _context4.sent;
|
174
215
|
// format
|
@@ -181,8 +222,11 @@ function _queryLinkInterfacesLatestMetrics() {
|
|
181
222
|
destination: destinationId ? findMetricsBySubCiId(destinationId) : []
|
182
223
|
}
|
183
224
|
};
|
225
|
+
|
184
226
|
_rlog["default"].debug('查询链路接口指标 结果', linkCi);
|
227
|
+
|
185
228
|
return _context4.abrupt("return", resultData);
|
229
|
+
|
186
230
|
case 15:
|
187
231
|
case "end":
|
188
232
|
return _context4.stop();
|
@@ -191,6 +235,7 @@ function _queryLinkInterfacesLatestMetrics() {
|
|
191
235
|
}));
|
192
236
|
return _queryLinkInterfacesLatestMetrics.apply(this, arguments);
|
193
237
|
}
|
238
|
+
|
194
239
|
function checkMenu() {
|
195
240
|
return _checkMenu.apply(this, arguments);
|
196
241
|
}
|
@@ -198,14 +243,17 @@ function checkMenu() {
|
|
198
243
|
* @name isOpenFlow 是否配置流量分析
|
199
244
|
* @returns
|
200
245
|
*/
|
246
|
+
|
247
|
+
|
201
248
|
function _checkMenu() {
|
202
|
-
_checkMenu = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
203
|
-
return
|
249
|
+
_checkMenu = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
250
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
204
251
|
while (1) switch (_context5.prev = _context5.next) {
|
205
252
|
case 0:
|
206
253
|
return _context5.abrupt("return", _componentTopologyUtils.request.post('/authorization/v1/api/authority/check/checkMenuAuthentication', [{
|
207
254
|
"url": "/default/trafficControl"
|
208
255
|
}]));
|
256
|
+
|
209
257
|
case 1:
|
210
258
|
case "end":
|
211
259
|
return _context5.stop();
|
@@ -214,6 +262,7 @@ function _checkMenu() {
|
|
214
262
|
}));
|
215
263
|
return _checkMenu.apply(this, arguments);
|
216
264
|
}
|
265
|
+
|
217
266
|
function isOpenFlow(_x6) {
|
218
267
|
return _isOpenFlow.apply(this, arguments);
|
219
268
|
}
|
@@ -221,12 +270,15 @@ function isOpenFlow(_x6) {
|
|
221
270
|
* @name queryLastestValue 查指标值
|
222
271
|
* @returns
|
223
272
|
*/
|
273
|
+
|
274
|
+
|
224
275
|
function _isOpenFlow() {
|
225
|
-
_isOpenFlow = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
226
|
-
return
|
276
|
+
_isOpenFlow = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(params) {
|
277
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
227
278
|
while (1) switch (_context6.prev = _context6.next) {
|
228
279
|
case 0:
|
229
280
|
return _context6.abrupt("return", _componentTopologyUtils.request.post('/flow/v1/api/link/isOpenFlowMonitorByName', params));
|
281
|
+
|
230
282
|
case 1:
|
231
283
|
case "end":
|
232
284
|
return _context6.stop();
|
@@ -235,15 +287,18 @@ function _isOpenFlow() {
|
|
235
287
|
}));
|
236
288
|
return _isOpenFlow.apply(this, arguments);
|
237
289
|
}
|
290
|
+
|
238
291
|
function queryLastestValue(_x7) {
|
239
292
|
return _queryLastestValue.apply(this, arguments);
|
240
293
|
}
|
294
|
+
|
241
295
|
function _queryLastestValue() {
|
242
|
-
_queryLastestValue = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
243
|
-
return
|
296
|
+
_queryLastestValue = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(params) {
|
297
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
244
298
|
while (1) switch (_context7.prev = _context7.next) {
|
245
299
|
case 0:
|
246
300
|
return _context7.abrupt("return", _componentTopologyUtils.request.post('/flow/v1/api/LinkAnalyse/queryLastestValue', params));
|
301
|
+
|
247
302
|
case 1:
|
248
303
|
case "end":
|
249
304
|
return _context7.stop();
|
@@ -252,26 +307,32 @@ function _queryLastestValue() {
|
|
252
307
|
}));
|
253
308
|
return _queryLastestValue.apply(this, arguments);
|
254
309
|
}
|
310
|
+
|
255
311
|
function queryRetansRatioNetDelayRatio(_x8, _x9) {
|
256
312
|
return _queryRetansRatioNetDelayRatio.apply(this, arguments);
|
257
313
|
}
|
314
|
+
|
258
315
|
function _queryRetansRatioNetDelayRatio() {
|
259
|
-
_queryRetansRatioNetDelayRatio = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
316
|
+
_queryRetansRatioNetDelayRatio = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(params, retansRatioNetDelayRatioCodes) {
|
260
317
|
var result, linkOther;
|
261
|
-
return
|
318
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
262
319
|
while (1) switch (_context8.prev = _context8.next) {
|
263
320
|
case 0:
|
264
321
|
if (retansRatioNetDelayRatioCodes.length) {
|
265
322
|
_context8.next = 2;
|
266
323
|
break;
|
267
324
|
}
|
325
|
+
|
268
326
|
return _context8.abrupt("return", []);
|
327
|
+
|
269
328
|
case 2:
|
270
329
|
_context8.next = 4;
|
271
330
|
return queryLastestValue(params);
|
331
|
+
|
272
332
|
case 4:
|
273
333
|
result = _context8.sent;
|
274
334
|
linkOther = [];
|
335
|
+
|
275
336
|
if (retansRatioNetDelayRatioCodes.includes('netDelayRatio')) {
|
276
337
|
linkOther.push({
|
277
338
|
'code': 'netDelayRatio',
|
@@ -280,6 +341,7 @@ function _queryRetansRatioNetDelayRatio() {
|
|
280
341
|
'value': (result.upNetDelayRatio * 1).toFixed(2) + ' ms' + '|' + (result.downNetDelayRatio * 1).toFixed(2) + ' ms'
|
281
342
|
});
|
282
343
|
}
|
344
|
+
|
283
345
|
if (retansRatioNetDelayRatioCodes.includes('retansRatio')) {
|
284
346
|
linkOther.push({
|
285
347
|
'code': 'retansRatio',
|
@@ -288,7 +350,9 @@ function _queryRetansRatioNetDelayRatio() {
|
|
288
350
|
'value': result.upRetransRatio + ' %' + '|' + result.downRetansRatio + ' %'
|
289
351
|
});
|
290
352
|
}
|
353
|
+
|
291
354
|
return _context8.abrupt("return", linkOther);
|
355
|
+
|
292
356
|
case 9:
|
293
357
|
case "end":
|
294
358
|
return _context8.stop();
|