@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
@@ -2,37 +2,39 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
4
4
|
var _excluded = ["checkAuth"],
|
5
|
-
|
6
|
-
|
5
|
+
_excluded2 = ["totalPage", "pageIndex", "data"];
|
6
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
7
7
|
import { request } from '@riil-frontend/component-topology-utils';
|
8
|
-
|
9
8
|
/**
|
10
9
|
* 根据id获取实例数据
|
11
10
|
* TODO params参数名称可语义化
|
12
11
|
* @param {string} id 实例id
|
13
12
|
*/
|
13
|
+
|
14
14
|
export var queryById = /*#__PURE__*/function () {
|
15
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
16
|
-
return _regeneratorRuntime
|
15
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(id) {
|
16
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
17
17
|
while (1) switch (_context.prev = _context.next) {
|
18
18
|
case 0:
|
19
19
|
_context.next = 2;
|
20
20
|
return request.post('/mdc/v1/api/cmdb/queryCiById', {
|
21
21
|
id: id
|
22
22
|
});
|
23
|
+
|
23
24
|
case 2:
|
24
25
|
return _context.abrupt("return", _context.sent);
|
26
|
+
|
25
27
|
case 3:
|
26
28
|
case "end":
|
27
29
|
return _context.stop();
|
28
30
|
}
|
29
31
|
}, _callee);
|
30
32
|
}));
|
33
|
+
|
31
34
|
return function queryById(_x) {
|
32
35
|
return _ref.apply(this, arguments);
|
33
36
|
};
|
34
37
|
}();
|
35
|
-
|
36
38
|
/**
|
37
39
|
* ci删除
|
38
40
|
* @param {string} id 实例id
|
@@ -42,28 +44,31 @@ export var queryById = /*#__PURE__*/function () {
|
|
42
44
|
"data": 0 //0:成功 -1:失败
|
43
45
|
}
|
44
46
|
*/
|
47
|
+
|
45
48
|
export var deleteById = /*#__PURE__*/function () {
|
46
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
47
|
-
return _regeneratorRuntime
|
49
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id) {
|
50
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
48
51
|
while (1) switch (_context2.prev = _context2.next) {
|
49
52
|
case 0:
|
50
53
|
_context2.next = 2;
|
51
54
|
return request.post('/cmdb/v1/api/ci/deleteById', {
|
52
55
|
id: id
|
53
56
|
});
|
57
|
+
|
54
58
|
case 2:
|
55
59
|
return _context2.abrupt("return", _context2.sent);
|
60
|
+
|
56
61
|
case 3:
|
57
62
|
case "end":
|
58
63
|
return _context2.stop();
|
59
64
|
}
|
60
65
|
}, _callee2);
|
61
66
|
}));
|
67
|
+
|
62
68
|
return function deleteById(_x2) {
|
63
69
|
return _ref2.apply(this, arguments);
|
64
70
|
};
|
65
71
|
}();
|
66
|
-
|
67
72
|
/**
|
68
73
|
* ci删除(批量)
|
69
74
|
* @param {array} keys [ "1513569" ,...]
|
@@ -73,15 +78,17 @@ export var deleteById = /*#__PURE__*/function () {
|
|
73
78
|
"data": 0 //0:成功 -1:失败
|
74
79
|
}
|
75
80
|
*/
|
81
|
+
|
76
82
|
export var batchDeleteById = /*#__PURE__*/function () {
|
77
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
83
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(keys) {
|
78
84
|
var ids;
|
79
|
-
return _regeneratorRuntime
|
85
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
80
86
|
while (1) switch (_context3.prev = _context3.next) {
|
81
87
|
case 0:
|
82
88
|
if (keys === void 0) {
|
83
89
|
keys = [];
|
84
90
|
}
|
91
|
+
|
85
92
|
// TODO 替换为map
|
86
93
|
ids = keys.map(function (key) {
|
87
94
|
return {
|
@@ -90,19 +97,21 @@ export var batchDeleteById = /*#__PURE__*/function () {
|
|
90
97
|
});
|
91
98
|
_context3.next = 4;
|
92
99
|
return request.post('/cmdb/v1/api/ci/batchDeleteById', ids);
|
100
|
+
|
93
101
|
case 4:
|
94
102
|
return _context3.abrupt("return", _context3.sent);
|
103
|
+
|
95
104
|
case 5:
|
96
105
|
case "end":
|
97
106
|
return _context3.stop();
|
98
107
|
}
|
99
108
|
}, _callee3);
|
100
109
|
}));
|
110
|
+
|
101
111
|
return function batchDeleteById(_x3) {
|
102
112
|
return _ref3.apply(this, arguments);
|
103
113
|
};
|
104
114
|
}();
|
105
|
-
|
106
115
|
/**
|
107
116
|
* cmdm 通用查询接口
|
108
117
|
* @param {Object | string } condition 查询条件对象 或 接口原生查询字符串
|
@@ -119,13 +128,16 @@ export var batchDeleteById = /*#__PURE__*/function () {
|
|
119
128
|
* @param {Object} authOption 权限参数包装,透传给带权限的commonQuery接口
|
120
129
|
* @param {boolean} authOption.checkAuth 默认为true,是否只查看有权限的资源
|
121
130
|
*/
|
131
|
+
|
122
132
|
export var fetchCommonQuery = /*#__PURE__*/function () {
|
123
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
133
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(condition, sortIndex, sortMethod, currentPage, pageSize, sort, authOption) {
|
124
134
|
var newCondition, _ref5, _ref5$checkAuth, checkAuth, otherOption, url, sorts, params, response, _ref6, totalPage, pageIndex, data, result;
|
125
|
-
|
135
|
+
|
136
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
126
137
|
while (1) switch (_context4.prev = _context4.next) {
|
127
138
|
case 0:
|
128
139
|
newCondition = condition;
|
140
|
+
|
129
141
|
if (typeof newCondition !== 'string') {
|
130
142
|
newCondition = Object.keys(newCondition).reduce(function (param, current) {
|
131
143
|
if (current === 'ciType') {
|
@@ -142,9 +154,11 @@ export var fetchCommonQuery = /*#__PURE__*/function () {
|
|
142
154
|
}).join(' && ');
|
143
155
|
param.push("alert(" + alert + ")");
|
144
156
|
}
|
157
|
+
|
145
158
|
return param;
|
146
159
|
}, []).join(' && ');
|
147
160
|
}
|
161
|
+
|
148
162
|
_ref5 = authOption || {}, _ref5$checkAuth = _ref5.checkAuth, checkAuth = _ref5$checkAuth === void 0 ? true : _ref5$checkAuth, otherOption = _objectWithoutPropertiesLoose(_ref5, _excluded); // const url = checkAuth
|
149
163
|
// ? '/appserver/api/v1/cmdb/ci/commonQuery'
|
150
164
|
// : '/api/v1/cmdb/ci/commonQuery';
|
@@ -160,12 +174,12 @@ export var fetchCommonQuery = /*#__PURE__*/function () {
|
|
160
174
|
// APPBIR MVP
|
161
175
|
// ------------------------------------------------
|
162
176
|
// TODO important 带确认权限接口是否可通 ---
|
177
|
+
|
163
178
|
url = checkAuth ? '/mdc/v1/api/cmdb/authority/commonQueryCiData' : '/mdc/v1/api/cmdb/commonQueryCiData';
|
164
179
|
sorts = sort ? sort.split(" ") : [sortIndex, sortMethod];
|
165
180
|
params = {
|
166
181
|
condition: condition.conditions ? newCondition + " && " + condition.conditions : newCondition,
|
167
182
|
// APPBIR MVP 临时去掉排序 等接口OK
|
168
|
-
|
169
183
|
// orders: [{
|
170
184
|
// name: sorts[0],
|
171
185
|
// type: sorts[1]
|
@@ -173,12 +187,15 @@ export var fetchCommonQuery = /*#__PURE__*/function () {
|
|
173
187
|
pageIndex: currentPage,
|
174
188
|
pageSize: pageSize
|
175
189
|
};
|
190
|
+
|
176
191
|
if (checkAuth && otherOption) {
|
177
192
|
params = _extends({}, params, otherOption);
|
178
|
-
}
|
179
|
-
|
193
|
+
} // 处理 返回结果
|
194
|
+
|
195
|
+
|
180
196
|
_context4.next = 9;
|
181
197
|
return request.post(url, params);
|
198
|
+
|
182
199
|
case 9:
|
183
200
|
response = _context4.sent;
|
184
201
|
// TODO ---
|
@@ -188,35 +205,39 @@ export var fetchCommonQuery = /*#__PURE__*/function () {
|
|
188
205
|
page: pageIndex,
|
189
206
|
content: data
|
190
207
|
}));
|
208
|
+
|
191
209
|
case 12:
|
192
210
|
case "end":
|
193
211
|
return _context4.stop();
|
194
212
|
}
|
195
213
|
}, _callee4);
|
196
214
|
}));
|
215
|
+
|
197
216
|
return function fetchCommonQuery(_x4, _x5, _x6, _x7, _x8, _x9, _x10) {
|
198
217
|
return _ref4.apply(this, arguments);
|
199
218
|
};
|
200
219
|
}();
|
201
|
-
|
202
220
|
/**
|
203
221
|
* cmdb实例查询接口(不涉及权限)
|
204
222
|
* @param {Object} param
|
205
223
|
* @returns
|
206
224
|
*/
|
225
|
+
|
207
226
|
export function commonQuery(_x11) {
|
208
227
|
return _commonQuery.apply(this, arguments);
|
209
|
-
}
|
210
|
-
|
228
|
+
} // 批量属性更新
|
229
|
+
|
211
230
|
function _commonQuery() {
|
212
|
-
_commonQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
213
|
-
return _regeneratorRuntime
|
231
|
+
_commonQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(param) {
|
232
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
214
233
|
while (1) switch (_context18.prev = _context18.next) {
|
215
234
|
case 0:
|
216
235
|
_context18.next = 2;
|
217
236
|
return request.post('/cmdb/v1/api/ci/commonQuery', param);
|
237
|
+
|
218
238
|
case 2:
|
219
239
|
return _context18.abrupt("return", _context18.sent);
|
240
|
+
|
220
241
|
case 3:
|
221
242
|
case "end":
|
222
243
|
return _context18.stop();
|
@@ -225,16 +246,19 @@ function _commonQuery() {
|
|
225
246
|
}));
|
226
247
|
return _commonQuery.apply(this, arguments);
|
227
248
|
}
|
249
|
+
|
228
250
|
export var batchUpdateAttributes = /*#__PURE__*/function () {
|
229
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
251
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(values, fieldName) {
|
230
252
|
var aa, _aa;
|
231
|
-
|
253
|
+
|
254
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
232
255
|
while (1) switch (_context5.prev = _context5.next) {
|
233
256
|
case 0:
|
234
257
|
if (!fieldName) {
|
235
258
|
_context5.next = 8;
|
236
259
|
break;
|
237
260
|
}
|
261
|
+
|
238
262
|
// 传了要更新的属性名,更新某一个属性
|
239
263
|
aa = {};
|
240
264
|
aa[fieldName] = values[fieldName];
|
@@ -243,17 +267,22 @@ export var batchUpdateAttributes = /*#__PURE__*/function () {
|
|
243
267
|
id: values.id,
|
244
268
|
attributes: aa
|
245
269
|
}]);
|
270
|
+
|
246
271
|
case 5:
|
247
272
|
return _context5.abrupt("return", _context5.sent);
|
273
|
+
|
248
274
|
case 8:
|
249
275
|
if (!Array.isArray(values)) {
|
250
276
|
_context5.next = 12;
|
251
277
|
break;
|
252
278
|
}
|
279
|
+
|
253
280
|
_context5.next = 11;
|
254
281
|
return request.post('/cmdb/v1/api/ci/batchUpdateAttributes', values);
|
282
|
+
|
255
283
|
case 11:
|
256
284
|
return _context5.abrupt("return", _context5.sent);
|
285
|
+
|
257
286
|
case 12:
|
258
287
|
_aa = values.id;
|
259
288
|
delete values.id;
|
@@ -262,63 +291,70 @@ export var batchUpdateAttributes = /*#__PURE__*/function () {
|
|
262
291
|
id: _aa,
|
263
292
|
attributes: values
|
264
293
|
}]);
|
294
|
+
|
265
295
|
case 16:
|
266
296
|
return _context5.abrupt("return", _context5.sent);
|
297
|
+
|
267
298
|
case 17:
|
268
299
|
case "end":
|
269
300
|
return _context5.stop();
|
270
301
|
}
|
271
302
|
}, _callee5);
|
272
303
|
}));
|
304
|
+
|
273
305
|
return function batchUpdateAttributes(_x12, _x13) {
|
274
306
|
return _ref7.apply(this, arguments);
|
275
307
|
};
|
276
|
-
}();
|
308
|
+
}(); // 创建单个ci实例
|
277
309
|
|
278
|
-
// 创建单个ci实例
|
279
310
|
export var createInstance = /*#__PURE__*/function () {
|
280
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
281
|
-
return _regeneratorRuntime
|
311
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(values) {
|
312
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
282
313
|
while (1) switch (_context6.prev = _context6.next) {
|
283
314
|
case 0:
|
284
315
|
_context6.next = 2;
|
285
316
|
return request.post('/cmdb/v1/api/ci/create', values);
|
317
|
+
|
286
318
|
case 2:
|
287
319
|
return _context6.abrupt("return", _context6.sent);
|
320
|
+
|
288
321
|
case 3:
|
289
322
|
case "end":
|
290
323
|
return _context6.stop();
|
291
324
|
}
|
292
325
|
}, _callee6);
|
293
326
|
}));
|
327
|
+
|
294
328
|
return function createInstance(_x14) {
|
295
329
|
return _ref8.apply(this, arguments);
|
296
330
|
};
|
297
331
|
}();
|
298
|
-
|
299
332
|
/**
|
300
333
|
* 改变监控状态
|
301
334
|
* @param {object} param 查询传参{"id":"xxxx","manageStatus": 3,//已监控:3,加入监控中:2,取消监控中:1,未监控:0}
|
302
335
|
* @returns {object}
|
303
336
|
*/
|
337
|
+
|
304
338
|
export function changeManageStatus(_x15) {
|
305
339
|
return _changeManageStatus.apply(this, arguments);
|
306
340
|
}
|
307
|
-
|
308
341
|
/**
|
309
342
|
* 批量改变监控状态
|
310
343
|
* @param {Array} param 查询传参[{"id":"xxxx","manageStatus": 3,//已监控:3,加入监控中:2,取消监控中:1,未监控:0}]
|
311
344
|
* @returns {object}
|
312
345
|
*/
|
346
|
+
|
313
347
|
function _changeManageStatus() {
|
314
|
-
_changeManageStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
315
|
-
return _regeneratorRuntime
|
348
|
+
_changeManageStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(param) {
|
349
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
316
350
|
while (1) switch (_context19.prev = _context19.next) {
|
317
351
|
case 0:
|
318
352
|
_context19.next = 2;
|
319
353
|
return request.post('/cmdb/v1/api/ci/changeManageStatus', param);
|
354
|
+
|
320
355
|
case 2:
|
321
356
|
return _context19.abrupt("return", _context19.sent);
|
357
|
+
|
322
358
|
case 3:
|
323
359
|
case "end":
|
324
360
|
return _context19.stop();
|
@@ -327,6 +363,7 @@ function _changeManageStatus() {
|
|
327
363
|
}));
|
328
364
|
return _changeManageStatus.apply(this, arguments);
|
329
365
|
}
|
366
|
+
|
330
367
|
export function batchChangeManageStatus(_x16) {
|
331
368
|
return _batchChangeManageStatus.apply(this, arguments);
|
332
369
|
}
|
@@ -339,15 +376,18 @@ export function batchChangeManageStatus(_x16) {
|
|
339
376
|
}
|
340
377
|
]
|
341
378
|
*/
|
379
|
+
|
342
380
|
function _batchChangeManageStatus() {
|
343
|
-
_batchChangeManageStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
344
|
-
return _regeneratorRuntime
|
381
|
+
_batchChangeManageStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(param) {
|
382
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
345
383
|
while (1) switch (_context20.prev = _context20.next) {
|
346
384
|
case 0:
|
347
385
|
_context20.next = 2;
|
348
386
|
return request.post('/cmdb/v1/api/ci/batchChangeManageStatus', param);
|
387
|
+
|
349
388
|
case 2:
|
350
389
|
return _context20.abrupt("return", _context20.sent);
|
390
|
+
|
351
391
|
case 3:
|
352
392
|
case "end":
|
353
393
|
return _context20.stop();
|
@@ -356,6 +396,7 @@ function _batchChangeManageStatus() {
|
|
356
396
|
}));
|
357
397
|
return _batchChangeManageStatus.apply(this, arguments);
|
358
398
|
}
|
399
|
+
|
359
400
|
export function commonCount(_x17) {
|
360
401
|
return _commonCount.apply(this, arguments);
|
361
402
|
}
|
@@ -364,15 +405,18 @@ export function commonCount(_x17) {
|
|
364
405
|
* @param {Array} param 传参['xx']
|
365
406
|
* @returns {object}
|
366
407
|
*/
|
408
|
+
|
367
409
|
function _commonCount() {
|
368
|
-
_commonCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
369
|
-
return _regeneratorRuntime
|
410
|
+
_commonCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(param) {
|
411
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
370
412
|
while (1) switch (_context21.prev = _context21.next) {
|
371
413
|
case 0:
|
372
414
|
_context21.next = 2;
|
373
415
|
return request.post('/cmdb/v1/api/ci/commonCount', param);
|
416
|
+
|
374
417
|
case 2:
|
375
418
|
return _context21.abrupt("return", _context21.sent);
|
419
|
+
|
376
420
|
case 3:
|
377
421
|
case "end":
|
378
422
|
return _context21.stop();
|
@@ -381,10 +425,10 @@ function _commonCount() {
|
|
381
425
|
}));
|
382
426
|
return _commonCount.apply(this, arguments);
|
383
427
|
}
|
428
|
+
|
384
429
|
export function queryCiWithComponents(_x18) {
|
385
430
|
return _queryCiWithComponents.apply(this, arguments);
|
386
431
|
}
|
387
|
-
|
388
432
|
/**
|
389
433
|
* 连接关系忽略列表查询
|
390
434
|
* @param {*} relationType 关系类型编码,为空不做限制
|
@@ -393,15 +437,18 @@ export function queryCiWithComponents(_x18) {
|
|
393
437
|
* @param {*} condition 检索条件,可为空,每个检索项的语法类似common query接口
|
394
438
|
* @param {*} sort 排序对象
|
395
439
|
*/
|
440
|
+
|
396
441
|
function _queryCiWithComponents() {
|
397
|
-
_queryCiWithComponents = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
398
|
-
return _regeneratorRuntime
|
442
|
+
_queryCiWithComponents = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(mainCiIds) {
|
443
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
399
444
|
while (1) switch (_context22.prev = _context22.next) {
|
400
445
|
case 0:
|
401
446
|
_context22.next = 2;
|
402
447
|
return request.post('/cmdb/v1/api/ci/queryCiWithComponents', mainCiIds);
|
448
|
+
|
403
449
|
case 2:
|
404
450
|
return _context22.abrupt("return", _context22.sent);
|
451
|
+
|
405
452
|
case 3:
|
406
453
|
case "end":
|
407
454
|
return _context22.stop();
|
@@ -410,6 +457,7 @@ function _queryCiWithComponents() {
|
|
410
457
|
}));
|
411
458
|
return _queryCiWithComponents.apply(this, arguments);
|
412
459
|
}
|
460
|
+
|
413
461
|
export function queryPageIgnoreRelations(_x19, _x20, _x21, _x22, _x23) {
|
414
462
|
return _queryPageIgnoreRelations.apply(this, arguments);
|
415
463
|
}
|
@@ -417,9 +465,10 @@ export function queryPageIgnoreRelations(_x19, _x20, _x21, _x22, _x23) {
|
|
417
465
|
* 忽略的连接关系批量删除
|
418
466
|
* @param {*} ids id集合
|
419
467
|
*/
|
468
|
+
|
420
469
|
function _queryPageIgnoreRelations() {
|
421
|
-
_queryPageIgnoreRelations = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
422
|
-
return _regeneratorRuntime
|
470
|
+
_queryPageIgnoreRelations = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(relationType, currentPage, pageSize, condition, sort) {
|
471
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
423
472
|
while (1) switch (_context23.prev = _context23.next) {
|
424
473
|
case 0:
|
425
474
|
_context23.next = 2;
|
@@ -432,8 +481,10 @@ function _queryPageIgnoreRelations() {
|
|
432
481
|
} : {}, sort ? {
|
433
482
|
sort: sort
|
434
483
|
} : {}));
|
484
|
+
|
435
485
|
case 2:
|
436
486
|
return _context23.abrupt("return", _context23.sent);
|
487
|
+
|
437
488
|
case 3:
|
438
489
|
case "end":
|
439
490
|
return _context23.stop();
|
@@ -442,14 +493,14 @@ function _queryPageIgnoreRelations() {
|
|
442
493
|
}));
|
443
494
|
return _queryPageIgnoreRelations.apply(this, arguments);
|
444
495
|
}
|
496
|
+
|
445
497
|
export function deleteIgnoreRelations(_x24) {
|
446
498
|
return _deleteIgnoreRelations.apply(this, arguments);
|
447
|
-
}
|
499
|
+
} // 上传文件
|
448
500
|
|
449
|
-
// 上传文件
|
450
501
|
function _deleteIgnoreRelations() {
|
451
|
-
_deleteIgnoreRelations = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
452
|
-
return _regeneratorRuntime
|
502
|
+
_deleteIgnoreRelations = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(ids) {
|
503
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
453
504
|
while (1) switch (_context24.prev = _context24.next) {
|
454
505
|
case 0:
|
455
506
|
_context24.next = 2;
|
@@ -458,8 +509,10 @@ function _deleteIgnoreRelations() {
|
|
458
509
|
id: id
|
459
510
|
};
|
460
511
|
}));
|
512
|
+
|
461
513
|
case 2:
|
462
514
|
return _context24.abrupt("return", _context24.sent);
|
515
|
+
|
463
516
|
case 3:
|
464
517
|
case "end":
|
465
518
|
return _context24.stop();
|
@@ -468,20 +521,22 @@ function _deleteIgnoreRelations() {
|
|
468
521
|
}));
|
469
522
|
return _deleteIgnoreRelations.apply(this, arguments);
|
470
523
|
}
|
524
|
+
|
471
525
|
export var uploadFile = /*#__PURE__*/function () {
|
472
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
526
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(files, userId, modelType) {
|
473
527
|
var formData, names, originFiles, config, result;
|
474
|
-
return _regeneratorRuntime
|
528
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
475
529
|
while (1) switch (_context7.prev = _context7.next) {
|
476
530
|
case 0:
|
477
531
|
formData = new FormData(); // 用户id
|
532
|
+
|
478
533
|
formData.append('userId', userId);
|
479
534
|
modelType && formData.append('modelType', modelType);
|
480
535
|
names = [];
|
481
536
|
originFiles = [];
|
482
537
|
files.forEach(function (_ref10) {
|
483
538
|
var name = _ref10.name,
|
484
|
-
|
539
|
+
originFileObj = _ref10.originFileObj;
|
485
540
|
names.push(name);
|
486
541
|
originFiles.push(originFileObj);
|
487
542
|
formData.append('files', originFileObj, name);
|
@@ -493,25 +548,27 @@ export var uploadFile = /*#__PURE__*/function () {
|
|
493
548
|
};
|
494
549
|
_context7.next = 9;
|
495
550
|
return request.post('/cmdb/v1/api/import', formData, config);
|
551
|
+
|
496
552
|
case 9:
|
497
553
|
result = _context7.sent;
|
498
554
|
return _context7.abrupt("return", result);
|
555
|
+
|
499
556
|
case 11:
|
500
557
|
case "end":
|
501
558
|
return _context7.stop();
|
502
559
|
}
|
503
560
|
}, _callee7);
|
504
561
|
}));
|
562
|
+
|
505
563
|
return function uploadFile(_x25, _x26, _x27) {
|
506
564
|
return _ref9.apply(this, arguments);
|
507
565
|
};
|
508
|
-
}();
|
566
|
+
}(); // 关闭提示
|
509
567
|
|
510
|
-
// 关闭提示
|
511
568
|
export var closeRecord = /*#__PURE__*/function () {
|
512
|
-
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
569
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(userId, modelType) {
|
513
570
|
var result;
|
514
|
-
return _regeneratorRuntime
|
571
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
515
572
|
while (1) switch (_context8.prev = _context8.next) {
|
516
573
|
case 0:
|
517
574
|
_context8.next = 2;
|
@@ -519,25 +576,26 @@ export var closeRecord = /*#__PURE__*/function () {
|
|
519
576
|
userId: userId,
|
520
577
|
modelType: modelType
|
521
578
|
});
|
579
|
+
|
522
580
|
case 2:
|
523
581
|
result = _context8.sent;
|
524
582
|
return _context8.abrupt("return", result);
|
583
|
+
|
525
584
|
case 4:
|
526
585
|
case "end":
|
527
586
|
return _context8.stop();
|
528
587
|
}
|
529
588
|
}, _callee8);
|
530
589
|
}));
|
590
|
+
|
531
591
|
return function closeRecord(_x28, _x29) {
|
532
592
|
return _ref11.apply(this, arguments);
|
533
593
|
};
|
534
|
-
}();
|
535
|
-
|
536
|
-
// 获取提示信息
|
594
|
+
}(); // 获取提示信息
|
537
595
|
|
538
596
|
export var getRecord = /*#__PURE__*/function () {
|
539
|
-
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
540
|
-
return _regeneratorRuntime
|
597
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(userId, modelType) {
|
598
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
541
599
|
while (1) switch (_context9.prev = _context9.next) {
|
542
600
|
case 0:
|
543
601
|
_context9.next = 2;
|
@@ -545,150 +603,168 @@ export var getRecord = /*#__PURE__*/function () {
|
|
545
603
|
userId: userId,
|
546
604
|
modelType: modelType
|
547
605
|
});
|
606
|
+
|
548
607
|
case 2:
|
549
608
|
return _context9.abrupt("return", _context9.sent);
|
609
|
+
|
550
610
|
case 3:
|
551
611
|
case "end":
|
552
612
|
return _context9.stop();
|
553
613
|
}
|
554
614
|
}, _callee9);
|
555
615
|
}));
|
616
|
+
|
556
617
|
return function getRecord(_x30, _x31) {
|
557
618
|
return _ref12.apply(this, arguments);
|
558
619
|
};
|
559
620
|
}();
|
560
|
-
|
561
621
|
/**
|
562
622
|
* 批量创建关系
|
563
623
|
* @param {*} params
|
564
624
|
* @returns
|
565
625
|
*/
|
626
|
+
|
566
627
|
export var batchCreateRelation = /*#__PURE__*/function () {
|
567
|
-
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
568
|
-
return _regeneratorRuntime
|
628
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(params) {
|
629
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
569
630
|
while (1) switch (_context10.prev = _context10.next) {
|
570
631
|
case 0:
|
571
632
|
_context10.next = 2;
|
572
633
|
return request.post('/cmdb/v1/api/relation/batchCreate', params);
|
634
|
+
|
573
635
|
case 2:
|
574
636
|
return _context10.abrupt("return", _context10.sent);
|
637
|
+
|
575
638
|
case 3:
|
576
639
|
case "end":
|
577
640
|
return _context10.stop();
|
578
641
|
}
|
579
642
|
}, _callee10);
|
580
643
|
}));
|
644
|
+
|
581
645
|
return function batchCreateRelation(_x32) {
|
582
646
|
return _ref13.apply(this, arguments);
|
583
647
|
};
|
584
648
|
}();
|
585
649
|
export var queryRelationByEndpoint = /*#__PURE__*/function () {
|
586
|
-
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
587
|
-
return _regeneratorRuntime
|
650
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(id) {
|
651
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
588
652
|
while (1) switch (_context11.prev = _context11.next) {
|
589
653
|
case 0:
|
590
654
|
_context11.next = 2;
|
591
655
|
return request.post('/cmdb/v1/api/relation/queryByEndpoint', {
|
592
656
|
id: id
|
593
657
|
});
|
658
|
+
|
594
659
|
case 2:
|
595
660
|
return _context11.abrupt("return", _context11.sent);
|
661
|
+
|
596
662
|
case 3:
|
597
663
|
case "end":
|
598
664
|
return _context11.stop();
|
599
665
|
}
|
600
666
|
}, _callee11);
|
601
667
|
}));
|
668
|
+
|
602
669
|
return function queryRelationByEndpoint(_x33) {
|
603
670
|
return _ref14.apply(this, arguments);
|
604
671
|
};
|
605
672
|
}();
|
606
|
-
|
607
673
|
/**
|
608
674
|
* 批量更新关系
|
609
675
|
* @param {*} params
|
610
676
|
* @returns
|
611
677
|
*/
|
678
|
+
|
612
679
|
export var batchUpdateRelation = /*#__PURE__*/function () {
|
613
|
-
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
614
|
-
return _regeneratorRuntime
|
680
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
|
681
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
615
682
|
while (1) switch (_context12.prev = _context12.next) {
|
616
683
|
case 0:
|
617
684
|
_context12.next = 2;
|
618
685
|
return request.post('/cmdb/v1/api/relation/batchUpdateAttributes', params);
|
686
|
+
|
619
687
|
case 2:
|
620
688
|
return _context12.abrupt("return", _context12.sent);
|
689
|
+
|
621
690
|
case 3:
|
622
691
|
case "end":
|
623
692
|
return _context12.stop();
|
624
693
|
}
|
625
694
|
}, _callee12);
|
626
695
|
}));
|
696
|
+
|
627
697
|
return function batchUpdateRelation(_x34) {
|
628
698
|
return _ref15.apply(this, arguments);
|
629
699
|
};
|
630
700
|
}();
|
631
|
-
|
632
701
|
/**
|
633
702
|
* 删除关系,添加到忽略
|
634
703
|
* @param {*} id 关系id
|
635
704
|
* @returns
|
636
705
|
*/
|
706
|
+
|
637
707
|
export var deleteRelation = /*#__PURE__*/function () {
|
638
|
-
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
639
|
-
return _regeneratorRuntime
|
708
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(id) {
|
709
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
640
710
|
while (1) switch (_context13.prev = _context13.next) {
|
641
711
|
case 0:
|
642
712
|
_context13.next = 2;
|
643
713
|
return request.post('/cmdb/v1/api/relation/delete', {
|
644
714
|
id: id
|
645
715
|
});
|
716
|
+
|
646
717
|
case 2:
|
647
718
|
return _context13.abrupt("return", _context13.sent);
|
719
|
+
|
648
720
|
case 3:
|
649
721
|
case "end":
|
650
722
|
return _context13.stop();
|
651
723
|
}
|
652
724
|
}, _callee13);
|
653
725
|
}));
|
726
|
+
|
654
727
|
return function deleteRelation(_x35) {
|
655
728
|
return _ref16.apply(this, arguments);
|
656
729
|
};
|
657
730
|
}();
|
658
|
-
|
659
731
|
/**
|
660
732
|
* 批量删除关系
|
661
733
|
* @param {[{id: string}]} params
|
662
734
|
* @returns
|
663
735
|
*/
|
736
|
+
|
664
737
|
export var batchDeleteRelation = /*#__PURE__*/function () {
|
665
|
-
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
666
|
-
return _regeneratorRuntime
|
738
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(params) {
|
739
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
667
740
|
while (1) switch (_context14.prev = _context14.next) {
|
668
741
|
case 0:
|
669
742
|
_context14.next = 2;
|
670
743
|
return request.post('/cmdb/v1/api/relation/batchDelete', params);
|
744
|
+
|
671
745
|
case 2:
|
672
746
|
return _context14.abrupt("return", _context14.sent);
|
747
|
+
|
673
748
|
case 3:
|
674
749
|
case "end":
|
675
750
|
return _context14.stop();
|
676
751
|
}
|
677
752
|
}, _callee14);
|
678
753
|
}));
|
754
|
+
|
679
755
|
return function batchDeleteRelation(_x36) {
|
680
756
|
return _ref17.apply(this, arguments);
|
681
757
|
};
|
682
758
|
}();
|
683
|
-
|
684
759
|
/**
|
685
760
|
* 强制删除关系
|
686
761
|
* @param {*} id 关系id
|
687
762
|
* @returns
|
688
763
|
*/
|
764
|
+
|
689
765
|
export var forceDeleteRelation = /*#__PURE__*/function () {
|
690
|
-
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
691
|
-
return _regeneratorRuntime
|
766
|
+
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(id) {
|
767
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
692
768
|
while (1) switch (_context15.prev = _context15.next) {
|
693
769
|
case 0:
|
694
770
|
_context15.next = 2;
|
@@ -696,52 +772,58 @@ export var forceDeleteRelation = /*#__PURE__*/function () {
|
|
696
772
|
id: id,
|
697
773
|
force: true
|
698
774
|
}]);
|
775
|
+
|
699
776
|
case 2:
|
700
777
|
return _context15.abrupt("return", _context15.sent);
|
778
|
+
|
701
779
|
case 3:
|
702
780
|
case "end":
|
703
781
|
return _context15.stop();
|
704
782
|
}
|
705
783
|
}, _callee15);
|
706
784
|
}));
|
785
|
+
|
707
786
|
return function forceDeleteRelation(_x37) {
|
708
787
|
return _ref18.apply(this, arguments);
|
709
788
|
};
|
710
789
|
}();
|
711
|
-
|
712
790
|
/**
|
713
791
|
* 查询关系
|
714
792
|
* @param {[{id: string}]} params
|
715
793
|
* @returns
|
716
794
|
*/
|
795
|
+
|
717
796
|
export var batchQueryRelationById = /*#__PURE__*/function () {
|
718
|
-
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
719
|
-
return _regeneratorRuntime
|
797
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(params) {
|
798
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
720
799
|
while (1) switch (_context16.prev = _context16.next) {
|
721
800
|
case 0:
|
722
801
|
_context16.next = 2;
|
723
802
|
return request.post('/cmdb/v1/api/relation/batchQueryById', params);
|
803
|
+
|
724
804
|
case 2:
|
725
805
|
return _context16.abrupt("return", _context16.sent);
|
806
|
+
|
726
807
|
case 3:
|
727
808
|
case "end":
|
728
809
|
return _context16.stop();
|
729
810
|
}
|
730
811
|
}, _callee16);
|
731
812
|
}));
|
813
|
+
|
732
814
|
return function batchQueryRelationById(_x38) {
|
733
815
|
return _ref19.apply(this, arguments);
|
734
816
|
};
|
735
817
|
}();
|
736
|
-
|
737
818
|
/**
|
738
819
|
* 查询关系
|
739
820
|
* @param {*} ids 关系ids
|
740
821
|
* @returns
|
741
822
|
*/
|
823
|
+
|
742
824
|
export var queryRelationByIds = /*#__PURE__*/function () {
|
743
|
-
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
744
|
-
return _regeneratorRuntime
|
825
|
+
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(ids) {
|
826
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
745
827
|
while (1) switch (_context17.prev = _context17.next) {
|
746
828
|
case 0:
|
747
829
|
_context17.next = 2;
|
@@ -750,14 +832,17 @@ export var queryRelationByIds = /*#__PURE__*/function () {
|
|
750
832
|
id: id
|
751
833
|
};
|
752
834
|
}));
|
835
|
+
|
753
836
|
case 2:
|
754
837
|
return _context17.abrupt("return", _context17.sent);
|
838
|
+
|
755
839
|
case 3:
|
756
840
|
case "end":
|
757
841
|
return _context17.stop();
|
758
842
|
}
|
759
843
|
}, _callee17);
|
760
844
|
}));
|
845
|
+
|
761
846
|
return function queryRelationByIds(_x39) {
|
762
847
|
return _ref20.apply(this, arguments);
|
763
848
|
};
|