@riil-frontend/component-topology 11.0.29 → 11.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +4 -2
- package/build/index.js +50 -35
- package/es/common/components/ColorPicker/ColorPicker.js +18 -9
- package/es/common/components/ResourceTable/ResourceTable.js +9 -6
- package/es/common/plugins/useSelectionPlugin.js +23 -14
- package/es/components/BatchAttrMetric/constant.js +2 -2
- package/es/components/BatchAttrMetric/index.js +17 -10
- package/es/components/BatchAttrMetric/setting.js +52 -30
- package/es/components/BatchAttrMetric/utils.js +4 -2
- package/es/components/BooleanRadio.js +7 -5
- package/es/components/ColorPanel/components/ColorBlock/index.js +4 -3
- package/es/components/ColorPanel/components/FontColorRange/index.js +13 -9
- package/es/components/ColorPanel/index.js +40 -18
- package/es/components/Drawer/Drawer.js +18 -14
- package/es/components/FormTable/index.js +18 -13
- package/es/components/FullheightTab/FullheightTab.js +2 -0
- package/es/components/LayoutDirectionSelect/LayoutDirectionSelect.js +3 -6
- package/es/components/LayoutSelect/LayoutSelect.js +3 -6
- package/es/components/ModelAttrSelectDrawer/components/ModelAttrSelectDrawer.js +4 -4
- package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +20 -15
- package/es/components/MultiResourceDrawer/Content.js +22 -12
- package/es/components/MultiResourceDrawer/Dynamic.js +4 -2
- package/es/components/MultiResourceDrawer/ResourceCard/index.js +6 -4
- package/es/components/MultiResourceDrawer/ResourceSelect.js +4 -2
- package/es/components/MultiResourceDrawer/Static.js +4 -2
- package/es/components/MultiResourceDrawer/index.js +16 -8
- package/es/components/ResourceList/ResourceSelect.js +44 -27
- package/es/components/ResourceList/ResourceSelectConnect.js +7 -3
- package/es/components/ResourceSelect/ResourceSelectDrawer.js +11 -7
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +27 -14
- package/es/components/ResourceSelectDrawer/ResourceSelectList.js +8 -4
- package/es/components/SingleResourceDrawer/SelectDrawer.js +15 -6
- package/es/components/SingleResourceDrawer/SingleResourceDrawer.js +14 -7
- package/es/components/TagImageSelect/index.js +11 -8
- package/es/components/TagSelect/index.js +12 -8
- package/es/components/TemplateButton/Icon.js +7 -5
- package/es/components/TemplateButton/index.js +9 -6
- package/es/components/VerticalIconTab/VerticalIconTab.js +11 -7
- package/es/components/collapse/Collapse.js +8 -4
- package/es/components/collapse/Panel.js +17 -7
- package/es/constants/ResourceInfoDisplay.js +6 -6
- package/es/constants/ResourceTypeLimit.js +11 -20
- package/es/contextmenu/createMenuCommands.js +8 -7
- package/es/core/common/contextmenu/mergeContextmenu.js +2 -2
- package/es/core/common/hooks/ht/useDataModelDataPropertyChange.js +2 -0
- package/es/core/common/hooks/useHtElement.js +2 -1
- package/es/core/common/hooks/useHtElements.js +6 -5
- package/es/core/common/icons/icon.js +18 -17
- package/es/core/common/icons/useIcons.js +4 -1
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +13 -4
- package/es/core/components/AlarmListPanel/hooks/useAlarmList.js +7 -2
- package/es/core/components/AlarmListPanel/index.js +4 -2
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +17 -11
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +23 -13
- package/es/core/components/DisplaySettingDrawer/EdgeFlow.js +3 -1
- package/es/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +3 -1
- package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +25 -14
- package/es/core/components/DisplaySettingDrawer/LinkTag.js +3 -3
- package/es/core/components/DisplaySettingDrawer/NodeTag.js +1 -1
- package/es/core/components/DisplaySettingDrawer/NodeTip.js +1 -1
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +32 -25
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/CommonCheckboxGroup.js +7 -3
- package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +9 -6
- package/es/core/components/DisplaySettingDrawer/demo/Demo.js +3 -4
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +33 -10
- package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +5 -3
- package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +2 -0
- package/es/core/components/ResourceViewAttributeSetting/Setting.js +12 -7
- package/es/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +25 -7
- package/es/core/components/TopoView/GraphViewPanel.js +15 -10
- package/es/core/components/TopoView/topoView.js +62 -38
- package/es/core/components/titlebar/TitleBar.js +12 -4
- package/es/core/components/titlebar/widgets/TitleWidget.js +4 -2
- package/es/core/createTopoApp.js +1 -1
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +53 -21
- package/es/core/editor/components/BackgroundView/index.js +65 -24
- package/es/core/editor/components/BottomFloatTool/HelpIcon.js +15 -8
- package/es/core/editor/components/CustomIconPlugin/CustomIconPlugin.js +2 -5
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +19 -7
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +67 -24
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialogWrapper.js +5 -3
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +8 -3
- package/es/core/editor/components/EditorPlugin.js +8 -4
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +12 -6
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/index.js +6 -6
- package/es/core/editor/components/Sidebar/Sidebar.js +17 -8
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +7 -5
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +30 -14
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +7 -7
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +2 -2
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +2 -2
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +10 -7
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +10 -7
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +7 -7
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +12 -4
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +8 -7
- package/es/core/editor/components/Toolbar/EditorToolbar.js +7 -2
- package/es/core/editor/components/Toolbar/Toolbar.js +2 -0
- package/es/core/editor/components/Toolbar/buttons.js +15 -30
- package/es/core/editor/components/Toolbar/components/Tooltip.js +3 -2
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +11 -8
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +13 -7
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +42 -19
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundUtil.js +29 -9
- package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +7 -3
- package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +7 -3
- package/es/core/editor/components/Toolbar/widgets/Divider.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +8 -6
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +27 -13
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +17 -10
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +6 -5
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +3 -2
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +27 -14
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +44 -24
- package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +7 -4
- package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +10 -8
- package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +27 -16
- package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +6 -2
- package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +8 -4
- package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +23 -9
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +23 -9
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +6 -2
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +14 -10
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +12 -9
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +16 -12
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +7 -5
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +9 -6
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +46 -27
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +33 -20
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +18 -12
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +25 -16
- package/es/core/editor/components/Toolbar/widgets/SearchWidget.js +5 -1
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +11 -6
- package/es/core/editor/components/Toolbar/widgets/components/ArrowButton.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +9 -5
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +18 -9
- package/es/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +10 -5
- package/es/core/editor/components/Toolbar/widgets/components/MenuSelect.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +11 -5
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +9 -4
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +6 -3
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +15 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +10 -5
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +13 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +17 -7
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +6 -2
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +22 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +7 -3
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +32 -13
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +2 -0
- package/es/core/editor/components/plugins/AddElementThemePlugin.js +2 -0
- package/es/core/editor/components/plugins/CorePlugin.js +5 -3
- package/es/core/editor/components/plugins/SaveLoading.js +4 -2
- package/es/core/editor/components/settings/CloseablePanel.js +5 -3
- package/es/core/editor/components/settings/PropertyView.js +17 -7
- package/es/core/editor/components/settings/Settings.js +13 -7
- package/es/core/editor/components/settings/common/AddResourceButton.js +2 -0
- package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +14 -11
- package/es/core/editor/components/settings/common/AlignSetting/index.js +11 -5
- package/es/core/editor/components/settings/common/GroupNodeList/ResourceList.js +10 -2
- package/es/core/editor/components/settings/common/LayoutSettings.js +15 -12
- package/es/core/editor/components/settings/common/LineType/index.js +2 -0
- package/es/core/editor/components/settings/common/NameInput.js +3 -1
- package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +28 -9
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +20 -12
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +21 -10
- package/es/core/editor/components/settings/common/tab/TabView.js +2 -0
- package/es/core/editor/components/settings/common/text/FontStyleCheckbox.js +5 -1
- package/es/core/editor/components/settings/common/text/TextStyle.js +7 -2
- package/es/core/editor/components/settings/common/text/fontStyleUtil.js +6 -2
- package/es/core/editor/components/settings/core/PropertyViewManager.js +19 -0
- package/es/core/editor/components/settings/core/edgePropertyViewAdapter.js +2 -0
- package/es/core/editor/components/settings/core/getPropertyViewType.js +4 -0
- package/es/core/editor/components/settings/core/updateElementProperty.js +1 -0
- package/es/core/editor/components/settings/propertyViews/PropertyViewFactory.js +1 -0
- package/es/core/editor/components/settings/propertyViews/box/BoxPropertyView.js +9 -3
- package/es/core/editor/components/settings/propertyViews/box/BoxPropertyViewV1.js +8 -2
- package/es/core/editor/components/settings/propertyViews/box/NameInput.js +11 -3
- package/es/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +13 -5
- package/es/core/editor/components/settings/propertyViews/edge/EdgeGroupPropertyView.js +2 -0
- package/es/core/editor/components/settings/propertyViews/edge/EdgePropertyView.js +10 -4
- package/es/core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting.js +9 -3
- package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupAddResourceButton.js +4 -2
- package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +8 -7
- package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupRelateData/GroupRelateData.js +10 -4
- package/es/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +4 -4
- package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +12 -11
- package/es/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +3 -3
- package/es/core/editor/components/settings/propertyViews/group/GroupPropertyViewV1.js +3 -3
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupBasicSetting.js +11 -7
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +19 -17
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandStatus.js +5 -3
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupIconSelect.js +4 -2
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +15 -6
- package/es/core/editor/components/settings/propertyViews/group/cluster/ClusterGroupRelateData.js +6 -4
- package/es/core/editor/components/settings/propertyViews/index.js +2 -0
- package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +7 -3
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -7
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +6 -4
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +4 -2
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +2 -2
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +6 -4
- package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyView.js +6 -6
- package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyViewV1.js +6 -6
- package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +16 -9
- package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting_bak.js +18 -16
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +2 -2
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +35 -13
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +2 -0
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +11 -7
- package/es/core/editor/components/settings/propertyViews/node/NodeIconSelect.js +6 -4
- package/es/core/editor/components/settings/propertyViews/node/NodeIconSelectTest.js +2 -2
- package/es/core/editor/components/settings/propertyViews/node/NodePropertyView.js +9 -7
- package/es/core/editor/components/settings/propertyViews/node/NodePropertyViewV1.js +12 -7
- package/es/core/editor/components/settings/propertyViews/node/Setting/BasicSetting.js +11 -6
- package/es/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +11 -3
- package/es/core/editor/components/settings/propertyViews/node/Setting/Setting.js +14 -6
- package/es/core/editor/components/settings/propertyViews/node/data/BindIpInput.js +23 -18
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +17 -8
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +29 -19
- package/es/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +10 -7
- package/es/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +5 -1
- package/es/core/editor/components/settings/propertyViews/text/TextPropertyView.js +17 -5
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +10 -5
- package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +3 -5
- package/es/core/editor/components/settings/propertyViews/view/GlobalEdgeToggle.js +11 -5
- package/es/core/editor/components/settings/propertyViews/view/GlobalLayout.js +7 -6
- package/es/core/editor/components/settings/propertyViews/view/GlobalNodeLabelStyle.js +7 -2
- package/es/core/editor/components/settings/propertyViews/view/ViewLineTypeSetting.js +3 -0
- package/es/core/editor/components/settings/propertyViews/view/ViewPropertyView.js +3 -3
- package/es/core/editor/components/settings/propertyViews/view/ViewPropertyViewV2.js +3 -3
- package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundConfig.js +4 -3
- package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +12 -4
- package/es/core/editor/components/settings/useSettingRuntimeState.js +6 -2
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +26 -12
- package/es/core/editor/components/titlebar/widgets/DebugTools.js +4 -1
- package/es/core/editor/config/themes.js +7 -8
- package/es/core/editor/contextmenu/buildContextmenu.js +1 -2
- package/es/core/editor/hooks/useKeyboardShortcut.js +10 -7
- package/es/core/editor/hooks/useLayerAddResource.js +6 -4
- package/es/core/editor/hooks/useNewElementTheme.js +14 -7
- package/es/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +3 -2
- package/es/core/editor/store/background.js +8 -4
- package/es/core/editor/store/historyManager.js +1 -0
- package/es/core/editor/store/topoEdit.js +4 -3
- package/es/core/editor/utils/edgeTypeStyleUtil.js +15 -9
- package/es/core/editor/utils/themeUtil.js +3 -0
- package/es/core/event/topoEventListener.js +2 -0
- package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +7 -3
- package/es/core/hooks/useAlarm.js +24 -12
- package/es/core/hooks/useCanvasTheme.js +10 -9
- package/es/core/hooks/useCanvasThemeConfig.js +4 -2
- package/es/core/hooks/useCiAttributeChange.js +10 -3
- package/es/core/hooks/useEventData.js +4 -2
- package/es/core/hooks/useGraphAlarmDisplay.js +27 -11
- package/es/core/hooks/useGroupAddResource.js +5 -2
- package/es/core/hooks/useManageStatus.js +1 -1
- package/es/core/hooks/usePolling.js +61 -33
- package/es/core/hooks/useResourceConfig.js +57 -22
- package/es/core/hooks/useRouterAdapter.js +4 -2
- package/es/core/hooks/useSelection.js +4 -1
- package/es/core/hooks/useTopoEdit.js +261 -112
- package/es/core/hooks/useTopoEventListener.js +1 -1
- package/es/core/hooks/useTopoFullscreen.js +8 -7
- package/es/core/models/Alarm.js +139 -50
- package/es/core/models/AttributeMetricDisplay.js +166 -89
- package/es/core/models/DataModel.js +37 -4
- package/es/core/models/EdgeGroup.js +7 -2
- package/es/core/models/GraphDataModel.js +7 -0
- package/es/core/models/HistoryManager.js +52 -21
- package/es/core/models/PluginManager.js +9 -0
- package/es/core/models/SelectionModel.js +36 -11
- package/es/core/models/TopoApp.js +178 -74
- package/es/core/models/TopoGraphView.js +30 -8
- package/es/core/models/TopoViewer.js +5 -1
- package/es/core/models/attributeFormatter/formatter/ciTypeAttrTransform.js +3 -2
- package/es/core/models/attributeFormatter/formatter/commonTransform.js +8 -6
- package/es/core/models/attributeFormatter/formatter/graphTransform.js +5 -2
- package/es/core/models/attributeFormatter/index.js +8 -1
- package/es/core/models/cache/CiCache.js +17 -4
- package/es/core/models/cache/CiTypeCache.js +35 -8
- package/es/core/models/cache/DictCache.js +19 -4
- package/es/core/models/common/ContextMenu.js +9 -0
- package/es/core/models/graph/Background.js +16 -3
- package/es/core/models/plugins/index.js +1 -3
- package/es/core/models/plugins/resourceWebControllUrl.js +39 -9
- package/es/core/models/tagstips/ElementTagTipConfig.js +55 -16
- package/es/core/models/tagstips/utils.js +4 -4
- package/es/core/models/topoData.js +24 -8
- package/es/core/models/topoFactory.js +6 -0
- package/es/core/models/utils/linkUtils.js +35 -24
- package/es/core/models/utils/nodeNameVisibleUtil.js +25 -16
- package/es/core/services/alarm.js +5 -3
- package/es/core/services/background.js +24 -9
- package/es/core/services/cmdb/metric.js +5 -3
- package/es/core/services/cmdb.js +6 -3
- package/es/core/services/index.js +18 -7
- package/es/core/services/overview.js +58 -25
- package/es/core/services/topo/basic.js +5 -3
- package/es/core/services/topo/tagtip.js +6 -3
- package/es/core/store/coreModels.js +2 -4
- package/es/core/store/createStore.js +3 -0
- package/es/core/store/models/ciModel.js +16 -5
- package/es/core/store/models/customIcon.js +55 -19
- package/es/core/store/models/displayConfig.js +11 -5
- package/es/core/store/models/selection.js +5 -4
- package/es/core/store/models/topoAlarm.js +42 -10
- package/es/core/store/models/topoBaseInfoOverview.js +5 -4
- package/es/core/store/models/topoBizMod.js +14 -5
- package/es/core/store/models/topoConfig.js +85 -39
- package/es/core/store/models/topoGraphView.js +7 -5
- package/es/core/store/models/topoMod.js +111 -38
- package/es/core/store/models/viewer/lock.js +1 -0
- package/es/core/store/models/viewer/resourceDetail.js +5 -2
- package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -0
- package/es/core/test/Test.js +13 -10
- package/es/core/upgrade/v140UpgradeSerializeNodeImageSize.js +5 -0
- package/es/core/utils/backgroundUtil.js +7 -5
- package/es/core/utils/edgeUtil.js +11 -4
- package/es/core/utils/graphLinkUtil.js +8 -5
- package/es/core/utils/imageUtil.js +9 -3
- package/es/core/utils/metricUtil.js +1 -1
- package/es/core/utils/resourceUtil.js +3 -3
- package/es/core/utils/saveSerialize.js +6 -3
- package/es/core/utils/showGraphManageStatusUtil.js +18 -14
- package/es/core/utils/showMessage.js +2 -0
- package/es/core/viewer/components/plugins/ElementDetailDrawer/components/DetailDrawer.js +2 -0
- package/es/core/viewer/components/plugins/ElementDetailDrawer/hooks/useElementDetailManager.js +59 -32
- package/es/core/viewer/components/plugins/ResourceDetail/DefaultDetailContent.js +14 -8
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +11 -6
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +12 -9
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailPlugin.js +7 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +22 -10
- package/es/core/viewer/components/plugins/ResourceDetail/components/DrawerTitle.js +16 -7
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +23 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +10 -10
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BlockBox.js +2 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -10
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/NetworkBaseInfo.js +27 -19
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +200 -90
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +29 -25
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/SingleResourceStrategyLink.js +6 -6
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +70 -33
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +27 -13
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/constants.js +4 -8
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +18 -14
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +62 -23
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +37 -24
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +43 -22
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/useCiAttrAndMetricData.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleContainer.js +4 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +15 -8
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +24 -10
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +12 -5
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +16 -7
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +18 -6
- package/es/core/viewer/components/plugins/ViewerPlugin.js +1 -1
- package/es/core/viewer/components/titlebar/BasicTools.js +3 -3
- package/es/core/viewer/components/titlebar/TopoViewerTitleBar.js +4 -4
- package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +6 -2
- package/es/core/viewer/components/titlebar/widgets/AlarmListShowButton.js +16 -14
- package/es/core/viewer/components/titlebar/widgets/EditButton.js +8 -4
- package/es/core/viewer/components/titlebar/widgets/MoreButtonMenu.js +1 -1
- package/es/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +18 -14
- package/es/core/viewer/components/titlebar/widgets/NodesDragSwitchWrapper.js +5 -1
- package/es/core/viewer/components/titlebar/widgets/SearchWidget.js +17 -9
- package/es/core/viewer/components/titlebar/widgets/SettingButton.js +10 -7
- package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +5 -5
- package/es/core/viewer/contextmenu/buildLinkContextmenu.js +1 -2
- package/es/core/viewer/contextmenu/buildNodeContextmenu.js +2 -8
- package/es/createTopo.js +1 -2
- package/es/mock/mock.js +4 -6
- package/es/networkTopo/components/Link/form.js +41 -25
- package/es/networkTopo/components/Link/hook.js +86 -48
- package/es/networkTopo/components/Link/index.js +63 -33
- package/es/networkTopo/components/Link/setting.js +65 -45
- package/es/networkTopo/components/TopoView.js +20 -14
- package/es/networkTopo/getTopoData.js +37 -21
- package/es/networkTopo/hooks/useEdgeExpand.js +3 -2
- package/es/networkTopo/hooks/useGroupResources.js +4 -2
- package/es/networkTopo/hooks/useLinkDynamicStyle.js +4 -2
- package/es/networkTopo/hooks/viewer/useEdgeFlow.js +7 -6
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +23 -8
- package/es/networkTopo/models/EdgeGroupTagTipBuilder.js +10 -2
- package/es/networkTopo/models/ExtElementTagTipBuilder.js +5 -0
- package/es/networkTopo/models/IpNodeTagsTipsBuilder.js +11 -2
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +49 -28
- package/es/networkTopo/models/LinkTagsTipsBuilder.js +51 -41
- package/es/networkTopo/models/TopoCenter.js +26 -8
- package/es/networkTopo/services/alert.js +10 -5
- package/es/networkTopo/services/authorization.js +25 -11
- package/es/networkTopo/services/cmdb.js +165 -80
- package/es/networkTopo/services/funcAuth.js +5 -3
- package/es/networkTopo/services/link.js +34 -11
- package/es/networkTopo/services/mdc.js +17 -10
- package/es/networkTopo/services/metric.js +12 -6
- package/es/networkTopo/services/model.js +223 -92
- package/es/networkTopo/services/risk.js +5 -3
- package/es/networkTopo/services/topo/auth.js +13 -7
- package/es/networkTopo/services/topo/basic.js +137 -57
- package/es/networkTopo/services/topo/blacklist.js +11 -5
- package/es/networkTopo/services/topo/ciInfo.js +13 -5
- package/es/networkTopo/services/topo/icon.js +24 -11
- package/es/networkTopo/services/topo/networkLink.js +11 -5
- package/es/networkTopo/services/topo/relation.js +5 -3
- package/es/networkTopo/services/topo/resourceWebUrl.js +17 -7
- package/es/networkTopo/store/functionAuth.js +16 -7
- package/es/networkTopo/store/topoCenter.js +53 -18
- package/es/networkTopo/store/topoLinkMod.js +4 -3
- package/es/networkTopo/store/topoTreeMod.js +71 -19
- package/es/networkTopo/utils/SortResourcesUtil.js +3 -1
- package/es/networkTopo/utils/__tests__/resourcePermissionUtil.test.js +7 -4
- package/es/networkTopo/utils/edgeGroupTagUtil.js +15 -8
- package/es/networkTopo/utils/exitLinkUtil.js +54 -38
- package/es/networkTopo/utils/exportData.js +16 -10
- package/es/networkTopo/utils/linPermissionUtil.js +2 -4
- package/es/networkTopo/utils/resourcePermissionUtil.js +6 -4
- package/es/networkTopo/utils/storage.js +3 -2
- package/es/networkTopo/viewer/components/TopologyViewer.js +4 -3
- package/es/networkTopo/viewer/index.js +1 -2
- package/es/utils/ResourceConfigUtil.js +23 -18
- package/es/utils/SpecialCharacterValidateUtil.js +1 -0
- package/es/utils/ciType.js +5 -1
- package/es/utils/clusterUtil.js +20 -15
- package/es/utils/format.js +26 -12
- package/es/utils/htElementUtils.js +51 -25
- package/es/utils/template.js +7 -6
- package/es/utils/topoData.js +64 -52
- package/es/utils/topoMocks.js +4 -3
- package/es/utils/tree.js +33 -14
- package/es/utils/treeUtil.js +1 -0
- package/lib/common/components/ColorPicker/ColorPicker.js +30 -9
- package/lib/common/components/ColorPicker/index.js +3 -0
- package/lib/common/components/ResourceTable/ResourceTable.js +18 -6
- package/lib/common/plugins/useSelectionPlugin.js +24 -13
- package/lib/components/BatchAttrMetric/SelectTable.js +3 -0
- package/lib/components/BatchAttrMetric/constant.js +2 -2
- package/lib/components/BatchAttrMetric/index.js +27 -9
- package/lib/components/BatchAttrMetric/setting.js +72 -30
- package/lib/components/BatchAttrMetric/utils.js +9 -1
- package/lib/components/BooleanRadio.js +15 -5
- package/lib/components/ColorPanel/components/ColorBlock/index.js +8 -2
- package/lib/components/ColorPanel/components/FontColorRange/index.js +19 -9
- package/lib/components/ColorPanel/index.js +50 -17
- package/lib/components/Drawer/Drawer.js +25 -14
- package/lib/components/Drawer/index.js +3 -0
- package/lib/components/FormTable/index.js +32 -13
- package/lib/components/FullheightTab/FullheightTab.js +7 -0
- package/lib/components/FullheightTab/index.js +3 -0
- package/lib/components/LayoutDirectionSelect/Item.js +9 -0
- package/lib/components/LayoutDirectionSelect/LayoutDirectionSelect.js +13 -5
- package/lib/components/LayoutDirectionSelect/index.js +3 -0
- package/lib/components/LayoutSelect/LayoutSelect.js +12 -5
- package/lib/components/LayoutSelect/index.js +3 -0
- package/lib/components/Link.js +7 -0
- package/lib/components/ModelAttrSelectDrawer/components/ModelAttrSelectDrawer.js +11 -4
- package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +27 -15
- package/lib/components/ModelAttrSelectDrawer/index.js +3 -0
- package/lib/components/MultiResourceDrawer/Content.js +31 -11
- package/lib/components/MultiResourceDrawer/Dynamic.js +10 -2
- package/lib/components/MultiResourceDrawer/ResourceCard/index.js +11 -4
- package/lib/components/MultiResourceDrawer/ResourceSelect.js +10 -2
- package/lib/components/MultiResourceDrawer/Static.js +10 -2
- package/lib/components/MultiResourceDrawer/index.js +23 -8
- package/lib/components/NetworkTopoResourceSelectDrawer/NetworkTopoResourceSelectDrawer.js +6 -0
- package/lib/components/NetworkTopoResourceSelectDrawer/index.js +3 -0
- package/lib/components/ResourceList/ResourceSelect.js +64 -27
- package/lib/components/ResourceList/ResourceSelectConnect.js +17 -3
- package/lib/components/ResourceList/index.js +3 -0
- package/lib/components/ResourceSelect/ResourceSelectDrawer.js +21 -6
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +39 -13
- package/lib/components/ResourceSelectDrawer/ResourceSelectList.js +15 -4
- package/lib/components/ResourceSelectDrawer/index.js +3 -0
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +23 -6
- package/lib/components/SingleResourceDrawer/SingleResourceDrawer.js +22 -6
- package/lib/components/SingleResourceDrawer/index.js +3 -0
- package/lib/components/TagImageSelect/index.js +18 -8
- package/lib/components/TagSelect/index.js +22 -8
- package/lib/components/TemplateButton/Icon.js +10 -5
- package/lib/components/TemplateButton/assets/index.js +5 -0
- package/lib/components/TemplateButton/index.js +16 -6
- package/lib/components/VerticalIconTab/VerticalIconTab.js +23 -6
- package/lib/components/VerticalIconTab/index.js +3 -0
- package/lib/components/collapse/Collapse.js +16 -4
- package/lib/components/collapse/Panel.js +33 -7
- package/lib/components/collapse/index.js +3 -0
- package/lib/constants/ResourceInfoDisplay.js +6 -6
- package/lib/constants/ResourceTypeLimit.js +20 -20
- package/lib/contextmenu/createMenuCommands.js +11 -6
- package/lib/core/common/contextmenu/mergeContextmenu.js +6 -2
- package/lib/core/common/hooks/ht/useDataModelDataPropertyChange.js +5 -0
- package/lib/core/common/hooks/useHtElement.js +4 -1
- package/lib/core/common/hooks/useHtElements.js +8 -5
- package/lib/core/common/icons/icon.js +36 -16
- package/lib/core/common/icons/useIcons.js +10 -1
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +22 -4
- package/lib/core/components/AlarmListPanel/constants/uicbb.js +1 -0
- package/lib/core/components/AlarmListPanel/hooks/useAlarmList.js +9 -2
- package/lib/core/components/AlarmListPanel/index.js +18 -2
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +34 -10
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +38 -13
- package/lib/core/components/DisplaySettingDrawer/EdgeFlow.js +8 -1
- package/lib/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +8 -1
- package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +38 -14
- package/lib/core/components/DisplaySettingDrawer/LinkTag.js +10 -1
- package/lib/core/components/DisplaySettingDrawer/NodeTag.js +10 -1
- package/lib/core/components/DisplaySettingDrawer/NodeTip.js +10 -1
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +46 -24
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/CommonCheckboxGroup.js +14 -3
- package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +21 -5
- package/lib/core/components/DisplaySettingDrawer/demo/Demo.js +6 -4
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +39 -10
- package/lib/core/components/DisplaySettingDrawer/index.js +3 -0
- package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +11 -3
- package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +5 -0
- package/lib/core/components/ResourceViewAttributeSetting/Setting.js +22 -6
- package/lib/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +27 -6
- package/lib/core/components/TopoAppProvider.js +5 -0
- package/lib/core/components/TopoView/GraphViewPanel.js +24 -10
- package/lib/core/components/TopoView/index.js +3 -0
- package/lib/core/components/TopoView/topoView.js +97 -35
- package/lib/core/components/buildProvider.js +5 -0
- package/lib/core/components/titlebar/TitleBar.js +21 -4
- package/lib/core/components/titlebar/index.js +17 -0
- package/lib/core/components/titlebar/widgets/TitleWidget.js +9 -2
- package/lib/core/createTopoApp.js +5 -0
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +69 -21
- package/lib/core/editor/components/BackgroundView/index.js +87 -24
- package/lib/core/editor/components/BottomFloatTool/HelpIcon.js +25 -8
- package/lib/core/editor/components/CustomIconPlugin/CustomIconPlugin.js +10 -5
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +35 -7
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +87 -24
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialogWrapper.js +11 -3
- package/lib/core/editor/components/CustomIconPlugin/index.js +3 -0
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +13 -3
- package/lib/core/editor/components/EditorPlugin.js +23 -4
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +19 -6
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/index.js +11 -5
- package/lib/core/editor/components/Sidebar/Sidebar.js +26 -8
- package/lib/core/editor/components/Sidebar/panes.js +7 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +4 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/index.js +3 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +15 -5
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +38 -14
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +3 -0
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +12 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +8 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +9 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +17 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +17 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +12 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +29 -4
- package/lib/core/editor/components/Sidebar/views/ImagePanel/index.js +3 -0
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +13 -6
- package/lib/core/editor/components/Toolbar/EditorToolbar.js +17 -2
- package/lib/core/editor/components/Toolbar/Toolbar.js +5 -0
- package/lib/core/editor/components/Toolbar/buttons.js +35 -30
- package/lib/core/editor/components/Toolbar/components/Tooltip.js +8 -2
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +21 -8
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +21 -7
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +52 -19
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundUtil.js +37 -9
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/index.js +3 -0
- package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -3
- package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -3
- package/lib/core/editor/components/Toolbar/widgets/Divider.js +5 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +12 -6
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +36 -12
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/index.js +3 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +28 -10
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +16 -4
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +3 -2
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +37 -13
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +57 -24
- package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +15 -4
- package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +18 -8
- package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +39 -16
- package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +10 -2
- package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +10 -3
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +32 -9
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +31 -9
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +12 -2
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +23 -10
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +19 -9
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +26 -13
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +10 -5
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +6 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +16 -6
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +55 -28
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +44 -20
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +10 -2
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +26 -12
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/index.js +3 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +4 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +33 -13
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/index.js +3 -0
- package/lib/core/editor/components/Toolbar/widgets/SearchWidget.js +12 -1
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +20 -6
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowButton.js +11 -2
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +11 -1
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +17 -5
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +27 -9
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +16 -5
- package/lib/core/editor/components/Toolbar/widgets/components/MenuSelect.js +8 -2
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +17 -5
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +14 -2
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +14 -3
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +24 -6
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +24 -5
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/index.js +8 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +21 -6
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +26 -7
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +14 -2
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +30 -6
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +14 -3
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +36 -13
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +7 -0
- package/lib/core/editor/components/plugins/AddElementThemePlugin.js +5 -0
- package/lib/core/editor/components/plugins/CorePlugin.js +9 -3
- package/lib/core/editor/components/plugins/SaveLoading.js +11 -2
- package/lib/core/editor/components/settings/CloseablePanel.js +12 -3
- package/lib/core/editor/components/settings/PropertyView.js +27 -7
- package/lib/core/editor/components/settings/Settings.js +20 -7
- package/lib/core/editor/components/settings/common/AddResourceButton.js +7 -0
- package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +25 -11
- package/lib/core/editor/components/settings/common/AlignSetting/index.js +18 -5
- package/lib/core/editor/components/settings/common/GroupNodeList/ResourceList.js +18 -2
- package/lib/core/editor/components/settings/common/LayoutSettings.js +24 -12
- package/lib/core/editor/components/settings/common/LineType/index.js +7 -0
- package/lib/core/editor/components/settings/common/NameInput.js +11 -1
- package/lib/core/editor/components/settings/common/NodeAlignType.js +8 -0
- package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +42 -9
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +32 -12
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +29 -10
- package/lib/core/editor/components/settings/common/SizeInput/index.js +3 -0
- package/lib/core/editor/components/settings/common/tab/TabView.js +6 -0
- package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.js +18 -1
- package/lib/core/editor/components/settings/common/text/TextStyle.js +19 -2
- package/lib/core/editor/components/settings/common/text/fontStyleUtil.js +8 -2
- package/lib/core/editor/components/settings/core/PropertyViewManager.js +23 -0
- package/lib/core/editor/components/settings/core/edgePropertyViewAdapter.js +5 -0
- package/lib/core/editor/components/settings/core/getPropertyViewType.js +5 -0
- package/lib/core/editor/components/settings/core/updateElementProperty.js +3 -0
- package/lib/core/editor/components/settings/propertyViews/PropertyViewFactory.js +2 -0
- package/lib/core/editor/components/settings/propertyViews/box/BoxPropertyView.js +20 -3
- package/lib/core/editor/components/settings/propertyViews/box/BoxPropertyViewV1.js +19 -2
- package/lib/core/editor/components/settings/propertyViews/box/NameInput.js +19 -3
- package/lib/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +29 -5
- package/lib/core/editor/components/settings/propertyViews/edge/EdgeGroupPropertyView.js +7 -0
- package/lib/core/editor/components/settings/propertyViews/edge/EdgePropertyView.js +16 -4
- package/lib/core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting.js +19 -3
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupAddResourceButton.js +9 -2
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +14 -7
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupRelateData/GroupRelateData.js +20 -4
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +10 -4
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +17 -11
- package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +11 -3
- package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyViewV1.js +13 -3
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupBasicSetting.js +27 -7
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +29 -15
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandStatus.js +10 -3
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupIconSelect.js +11 -2
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +31 -6
- package/lib/core/editor/components/settings/propertyViews/group/cluster/ClusterGroupRelateData.js +19 -4
- package/lib/core/editor/components/settings/propertyViews/group/hooks/useGroup.js +4 -0
- package/lib/core/editor/components/settings/propertyViews/index.js +10 -0
- package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +18 -3
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +20 -7
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +13 -4
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +8 -2
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +9 -1
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +14 -4
- package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyView.js +13 -6
- package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyViewV1.js +14 -6
- package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +31 -7
- package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting_bak.js +35 -16
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +7 -2
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +44 -13
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +7 -0
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +25 -7
- package/lib/core/editor/components/settings/propertyViews/node/NodeIconSelect.js +11 -3
- package/lib/core/editor/components/settings/propertyViews/node/NodeIconSelectTest.js +9 -2
- package/lib/core/editor/components/settings/propertyViews/node/NodePropertyView.js +17 -8
- package/lib/core/editor/components/settings/propertyViews/node/NodePropertyViewV1.js +22 -7
- package/lib/core/editor/components/settings/propertyViews/node/Setting/BasicSetting.js +19 -6
- package/lib/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +19 -3
- package/lib/core/editor/components/settings/propertyViews/node/Setting/Setting.js +26 -6
- package/lib/core/editor/components/settings/propertyViews/node/Setting/index.js +3 -0
- package/lib/core/editor/components/settings/propertyViews/node/TopoTreeSelect.js +8 -0
- package/lib/core/editor/components/settings/propertyViews/node/data/BindIpInput.js +32 -18
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +25 -7
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +47 -19
- package/lib/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +19 -6
- package/lib/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +7 -1
- package/lib/core/editor/components/settings/propertyViews/text/TextPropertyView.js +29 -5
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -5
- package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -3
- package/lib/core/editor/components/settings/propertyViews/view/GlobalEdgeToggle.js +15 -4
- package/lib/core/editor/components/settings/propertyViews/view/GlobalLayout.js +12 -5
- package/lib/core/editor/components/settings/propertyViews/view/GlobalNodeLabelStyle.js +17 -2
- package/lib/core/editor/components/settings/propertyViews/view/ViewLineTypeSetting.js +8 -0
- package/lib/core/editor/components/settings/propertyViews/view/ViewPropertyView.js +19 -3
- package/lib/core/editor/components/settings/propertyViews/view/ViewPropertyViewV2.js +11 -3
- package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundConfig.js +6 -3
- package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +19 -4
- package/lib/core/editor/components/settings/useSettingRuntimeState.js +10 -2
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +42 -12
- package/lib/core/editor/components/titlebar/widgets/DebugTools.js +8 -1
- package/lib/core/editor/components/titlebar/widgets/SaveButton.js +5 -0
- package/lib/core/editor/config/themes.js +10 -8
- package/lib/core/editor/contextmenu/buildContextmenu.js +2 -2
- package/lib/core/editor/hooks/useKeyboardShortcut.js +14 -7
- package/lib/core/editor/hooks/useLayerAddResource.js +8 -4
- package/lib/core/editor/hooks/useNewElementTheme.js +20 -7
- package/lib/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +6 -1
- package/lib/core/editor/store/background.js +16 -6
- package/lib/core/editor/store/historyManager.js +6 -1
- package/lib/core/editor/store/topoEdit.js +13 -5
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +22 -9
- package/lib/core/editor/utils/themeUtil.js +6 -0
- package/lib/core/event/topoEventListener.js +3 -0
- package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +11 -3
- package/lib/core/hooks/useAlarm.js +33 -11
- package/lib/core/hooks/useCanvasTheme.js +16 -9
- package/lib/core/hooks/useCanvasThemeConfig.js +8 -2
- package/lib/core/hooks/useCiAttributeChange.js +14 -3
- package/lib/core/hooks/useEventData.js +7 -2
- package/lib/core/hooks/useGraphAlarmDisplay.js +34 -11
- package/lib/core/hooks/useGroupAddResource.js +7 -2
- package/lib/core/hooks/useManageStatus.js +6 -1
- package/lib/core/hooks/usePolling.js +74 -32
- package/lib/core/hooks/useResourceConfig.js +66 -22
- package/lib/core/hooks/useRouterAdapter.js +6 -1
- package/lib/core/hooks/useSelection.js +5 -1
- package/lib/core/hooks/useTopoEdit.js +301 -112
- package/lib/core/hooks/useTopoEventListener.js +4 -1
- package/lib/core/hooks/useTopoFullscreen.js +12 -7
- package/lib/core/index.js +2 -0
- package/lib/core/models/Alarm.js +159 -49
- package/lib/core/models/AttributeMetricDisplay.js +173 -89
- package/lib/core/models/DataModel.js +39 -4
- package/lib/core/models/EdgeGroup.js +8 -2
- package/lib/core/models/GraphDataModel.js +8 -0
- package/lib/core/models/HistoryManager.js +64 -21
- package/lib/core/models/PluginManager.js +11 -0
- package/lib/core/models/SelectionModel.js +44 -11
- package/lib/core/models/TopoApp.js +204 -72
- package/lib/core/models/TopoGraphView.js +35 -7
- package/lib/core/models/TopoViewer.js +7 -0
- package/lib/core/models/attributeFormatter/formatter/attributeTransform.js +3 -0
- package/lib/core/models/attributeFormatter/formatter/ciTypeAttrTransform.js +4 -2
- package/lib/core/models/attributeFormatter/formatter/commonTransform.js +10 -6
- package/lib/core/models/attributeFormatter/formatter/graphTransform.js +8 -2
- package/lib/core/models/attributeFormatter/formatter/metricTransform.js +3 -0
- package/lib/core/models/attributeFormatter/index.js +14 -0
- package/lib/core/models/cache/CiCache.js +22 -3
- package/lib/core/models/cache/CiTypeCache.js +43 -7
- package/lib/core/models/cache/DictCache.js +29 -3
- package/lib/core/models/common/ContextMenu.js +10 -0
- package/lib/core/models/graph/Background.js +19 -3
- package/lib/core/models/plugins/index.js +1 -2
- package/lib/core/models/plugins/resourceWebControllUrl.js +47 -9
- package/lib/core/models/tagstips/ElementTagTipConfig.js +64 -15
- package/lib/core/models/tagstips/utils.js +9 -3
- package/lib/core/models/topoData.js +36 -8
- package/lib/core/models/topoFactory.js +6 -0
- package/lib/core/models/utils/getRelationDetailByIds.js +1 -0
- package/lib/core/models/utils/linkUtils.js +48 -19
- package/lib/core/models/utils/nodeNameVisibleUtil.js +30 -15
- package/lib/core/services/alarm.js +14 -3
- package/lib/core/services/background.js +29 -9
- package/lib/core/services/cmdb/metric.js +10 -3
- package/lib/core/services/cmdb.js +12 -3
- package/lib/core/services/index.js +24 -7
- package/lib/core/services/overview.js +63 -23
- package/lib/core/services/topo/basic.js +11 -3
- package/lib/core/services/topo/index.js +6 -0
- package/lib/core/services/topo/tagtip.js +11 -3
- package/lib/core/store/coreModels.js +16 -0
- package/lib/core/store/createStore.js +7 -0
- package/lib/core/store/models/ciModel.js +23 -5
- package/lib/core/store/models/customIcon.js +72 -21
- package/lib/core/store/models/displayConfig.js +21 -7
- package/lib/core/store/models/selection.js +13 -6
- package/lib/core/store/models/topoAlarm.js +52 -12
- package/lib/core/store/models/topoBaseInfoOverview.js +14 -6
- package/lib/core/store/models/topoBizMod.js +22 -5
- package/lib/core/store/models/topoConfig.js +109 -41
- package/lib/core/store/models/topoGraphView.js +16 -7
- package/lib/core/store/models/topoMod.js +131 -36
- package/lib/core/store/models/viewer/lock.js +4 -0
- package/lib/core/store/models/viewer/resourceDetail.js +8 -2
- package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +5 -0
- package/lib/core/test/Test.js +14 -10
- package/lib/core/upgrade/v140UpgradeSerializeNodeImageSize.js +6 -0
- package/lib/core/utils/backgroundUtil.js +9 -5
- package/lib/core/utils/edgeUtil.js +17 -3
- package/lib/core/utils/graphLinkUtil.js +9 -4
- package/lib/core/utils/imageUtil.js +12 -3
- package/lib/core/utils/linkUtil.js +1 -0
- package/lib/core/utils/manageStatusUtil.js +1 -0
- package/lib/core/utils/metricUtil.js +4 -0
- package/lib/core/utils/resourceUtil.js +4 -2
- package/lib/core/utils/saveSerialize.js +9 -3
- package/lib/core/utils/showGraphManageStatusUtil.js +23 -14
- package/lib/core/utils/showMessage.js +9 -0
- package/lib/core/viewer/components/plugins/ElementDetailDrawer/components/DetailDrawer.js +7 -0
- package/lib/core/viewer/components/plugins/ElementDetailDrawer/hooks/useElementDetailManager.js +64 -32
- package/lib/core/viewer/components/plugins/MetricPollingPlugin.js +4 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/DefaultDetailContent.js +23 -8
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +20 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +21 -9
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailPlugin.js +11 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +36 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/components/DrawerTitle.js +24 -7
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +24 -15
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +17 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BlockBox.js +7 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +29 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/NetworkBaseInfo.js +36 -17
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +229 -88
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +40 -25
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/SingleResourceStrategyLink.js +8 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +87 -32
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +12 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +38 -13
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/constants.js +4 -8
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +31 -12
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +83 -19
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +44 -23
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +49 -21
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.js +3 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/useCiAttrAndMetricData.js +5 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleContainer.js +8 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +27 -8
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -10
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +17 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +23 -7
- package/lib/core/viewer/components/plugins/ResourceDetail/index.js +3 -0
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +33 -6
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +9 -1
- package/lib/core/viewer/components/titlebar/BasicTools.js +12 -3
- package/lib/core/viewer/components/titlebar/TopoViewerTitleBar.js +14 -4
- package/lib/core/viewer/components/titlebar/ViewerTools.js +5 -0
- package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +11 -2
- package/lib/core/viewer/components/titlebar/widgets/AlarmListShowButton.js +28 -15
- package/lib/core/viewer/components/titlebar/widgets/EditButton.js +14 -3
- package/lib/core/viewer/components/titlebar/widgets/MoreButtonMenu.js +10 -1
- package/lib/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +26 -13
- package/lib/core/viewer/components/titlebar/widgets/NodesDragSwitchWrapper.js +10 -1
- package/lib/core/viewer/components/titlebar/widgets/SearchWidget.js +25 -9
- package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +18 -6
- package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +9 -4
- package/lib/core/viewer/contextmenu/buildContextmenu.js +5 -0
- package/lib/core/viewer/contextmenu/buildLinkContextmenu.js +2 -2
- package/lib/core/viewer/contextmenu/buildNodeContextmenu.js +3 -8
- package/lib/core/viewer/contextmenu/buildViewContextmenu.js +1 -0
- package/lib/createTopo.js +8 -2
- package/lib/index.js +19 -0
- package/lib/mock/mock.js +4 -5
- package/lib/networkTopo/components/Link/form.js +57 -25
- package/lib/networkTopo/components/Link/hook.js +100 -48
- package/lib/networkTopo/components/Link/index.js +77 -32
- package/lib/networkTopo/components/Link/setting.js +86 -45
- package/lib/networkTopo/components/Topo404.js +9 -0
- package/lib/networkTopo/components/TopoNoPermission.js +9 -0
- package/lib/networkTopo/components/TopoView.js +37 -13
- package/lib/networkTopo/createTopo.js +6 -0
- package/lib/networkTopo/getTopoData.js +43 -16
- package/lib/networkTopo/hooks/useEdgeExpand.js +6 -1
- package/lib/networkTopo/hooks/useGroupResources.js +5 -2
- package/lib/networkTopo/hooks/useLinkDynamicStyle.js +7 -1
- package/lib/networkTopo/hooks/viewer/useEdgeFlow.js +8 -5
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +31 -7
- package/lib/networkTopo/index.js +7 -0
- package/lib/networkTopo/models/EdgeGroupTagTipBuilder.js +12 -2
- package/lib/networkTopo/models/ExtElementTagTipBuilder.js +8 -0
- package/lib/networkTopo/models/IpNodeTagsTipsBuilder.js +15 -2
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +54 -26
- package/lib/networkTopo/models/LinkTagsTipsBuilder.js +55 -40
- package/lib/networkTopo/models/TopoCenter.js +39 -8
- package/lib/networkTopo/services/alert.js +15 -5
- package/lib/networkTopo/services/authorization.js +35 -16
- package/lib/networkTopo/services/cmdb.js +211 -72
- package/lib/networkTopo/services/funcAuth.js +10 -3
- package/lib/networkTopo/services/index.js +7 -0
- package/lib/networkTopo/services/link.js +47 -11
- package/lib/networkTopo/services/mdc.js +26 -9
- package/lib/networkTopo/services/metric.js +20 -6
- package/lib/networkTopo/services/model.js +291 -89
- package/lib/networkTopo/services/risk.js +10 -3
- package/lib/networkTopo/services/topo/auth.js +19 -7
- package/lib/networkTopo/services/topo/basic.js +154 -57
- package/lib/networkTopo/services/topo/blacklist.js +17 -5
- package/lib/networkTopo/services/topo/ciInfo.js +20 -5
- package/lib/networkTopo/services/topo/icon.js +30 -11
- package/lib/networkTopo/services/topo/index.js +15 -0
- package/lib/networkTopo/services/topo/networkLink.js +17 -5
- package/lib/networkTopo/services/topo/relation.js +11 -3
- package/lib/networkTopo/services/topo/resourceWebUrl.js +25 -9
- package/lib/networkTopo/store/functionAuth.js +24 -9
- package/lib/networkTopo/store/index.js +6 -0
- package/lib/networkTopo/store/topoCenter.js +63 -22
- package/lib/networkTopo/store/topoLinkMod.js +12 -5
- package/lib/networkTopo/store/topoTreeMod.js +83 -19
- package/lib/networkTopo/utils/SortResourcesUtil.js +4 -1
- package/lib/networkTopo/utils/__tests__/resourcePermissionUtil.test.js +7 -4
- package/lib/networkTopo/utils/edgeGroupTagUtil.js +19 -7
- package/lib/networkTopo/utils/exitLinkUtil.js +58 -38
- package/lib/networkTopo/utils/exportData.js +25 -10
- package/lib/networkTopo/utils/linPermissionUtil.js +3 -3
- package/lib/networkTopo/utils/linkUtil.js +2 -0
- package/lib/networkTopo/utils/resourcePermissionUtil.js +14 -4
- package/lib/networkTopo/utils/storage.js +5 -3
- package/lib/networkTopo/viewer/components/TitleBar.js +6 -0
- package/lib/networkTopo/viewer/components/TopologyViewer.js +12 -3
- package/lib/networkTopo/viewer/createTopoViewer.js +5 -0
- package/lib/networkTopo/viewer/index.js +9 -0
- package/lib/utils/ResourceConfigUtil.js +31 -17
- package/lib/utils/SpecialCharacterValidateUtil.js +2 -0
- package/lib/utils/ciType.js +7 -1
- package/lib/utils/clusterUtil.js +35 -15
- package/lib/utils/copyUtil.js +2 -0
- package/lib/utils/format.js +38 -12
- package/lib/utils/htElementDataUtil.js +12 -0
- package/lib/utils/htElementUtils.js +87 -26
- package/lib/utils/listToTree.js +3 -0
- package/lib/utils/resourceElementUtil.js +2 -0
- package/lib/utils/template.js +7 -6
- package/lib/utils/topoData.js +97 -51
- package/lib/utils/topoMocks.js +4 -3
- package/lib/utils/topoPermissionUtil.js +1 -0
- package/lib/utils/tree.js +46 -14
- package/lib/utils/treeUtil.js +3 -0
- package/package.json +3 -3
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
4
5
|
exports.__esModule = true;
|
5
6
|
exports.getCiExtends = exports.getCiAttributeDict = exports.getCi = exports.getBatchCiMetric = exports.getBatchCi = exports.getAllRelationType = exports.getAllCi = exports.dragTree = exports.deleteRelation = exports.deleteDict = exports.deleteCi = exports.createRelation = exports.createDict = exports.createCi = void 0;
|
6
7
|
exports.getCiMeta = getCiMeta;
|
@@ -8,20 +9,29 @@ exports.getRelation = exports.getModelTree = exports.getDomains = exports.getCom
|
|
8
9
|
exports.getUserDicts = getUserDicts;
|
9
10
|
exports.queryAllModel = queryAllModel;
|
10
11
|
exports.verify = exports.updateRelation = exports.updateDict = exports.updateCi = exports.queryVendors = exports.queryDicts = exports.queryDict = void 0;
|
12
|
+
|
13
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
14
|
+
|
11
15
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
16
|
+
|
12
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
18
|
+
|
13
19
|
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
20
|
+
|
14
21
|
var _utils = require("@riil-frontend/utils");
|
22
|
+
|
15
23
|
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
24
|
+
|
16
25
|
var _storage = require("../utils/storage");
|
26
|
+
|
17
27
|
var _mdc = require("./mdc");
|
18
|
-
|
28
|
+
|
19
29
|
/**
|
20
30
|
* 查询 CI 组件信息(又实例的)
|
21
31
|
*/
|
22
32
|
var getCommonCount = /*#__PURE__*/function () {
|
23
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
24
|
-
return
|
33
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(code) {
|
34
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
25
35
|
while (1) switch (_context.prev = _context.next) {
|
26
36
|
case 0:
|
27
37
|
_context.next = 2;
|
@@ -29,14 +39,17 @@ var getCommonCount = /*#__PURE__*/function () {
|
|
29
39
|
condition: "\"principal(type('" + code + "'))\"",
|
30
40
|
groupKeys: ['ci_type']
|
31
41
|
});
|
42
|
+
|
32
43
|
case 2:
|
33
44
|
return _context.abrupt("return", _context.sent);
|
45
|
+
|
34
46
|
case 3:
|
35
47
|
case "end":
|
36
48
|
return _context.stop();
|
37
49
|
}
|
38
50
|
}, _callee);
|
39
51
|
}));
|
52
|
+
|
40
53
|
return function getCommonCount(_x) {
|
41
54
|
return _ref.apply(this, arguments);
|
42
55
|
};
|
@@ -44,24 +57,30 @@ var getCommonCount = /*#__PURE__*/function () {
|
|
44
57
|
/**
|
45
58
|
* 查询 CI 组件信息
|
46
59
|
*/
|
60
|
+
|
61
|
+
|
47
62
|
exports.getCommonCount = getCommonCount;
|
63
|
+
|
48
64
|
var getComponents = /*#__PURE__*/function () {
|
49
|
-
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
50
|
-
return
|
65
|
+
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(code) {
|
66
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
51
67
|
while (1) switch (_context2.prev = _context2.next) {
|
52
68
|
case 0:
|
53
69
|
_context2.next = 2;
|
54
70
|
return _componentTopologyUtils.request.post('/model/v1/api/getComponents', {
|
55
71
|
code: code
|
56
72
|
});
|
73
|
+
|
57
74
|
case 2:
|
58
75
|
return _context2.abrupt("return", _context2.sent);
|
76
|
+
|
59
77
|
case 3:
|
60
78
|
case "end":
|
61
79
|
return _context2.stop();
|
62
80
|
}
|
63
81
|
}, _callee2);
|
64
82
|
}));
|
83
|
+
|
65
84
|
return function getComponents(_x2) {
|
66
85
|
return _ref2.apply(this, arguments);
|
67
86
|
};
|
@@ -69,102 +88,122 @@ var getComponents = /*#__PURE__*/function () {
|
|
69
88
|
/**
|
70
89
|
* 查询关系类型定义
|
71
90
|
*/
|
91
|
+
|
92
|
+
|
72
93
|
exports.getComponents = getComponents;
|
94
|
+
|
73
95
|
var getAllRelationType = /*#__PURE__*/function () {
|
74
|
-
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
75
|
-
return
|
96
|
+
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
97
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
76
98
|
while (1) switch (_context3.prev = _context3.next) {
|
77
99
|
case 0:
|
78
100
|
_context3.next = 2;
|
79
101
|
return _componentTopologyUtils.request.post('/model/v1/api/getAllRelationType');
|
102
|
+
|
80
103
|
case 2:
|
81
104
|
return _context3.abrupt("return", _context3.sent);
|
105
|
+
|
82
106
|
case 3:
|
83
107
|
case "end":
|
84
108
|
return _context3.stop();
|
85
109
|
}
|
86
110
|
}, _callee3);
|
87
111
|
}));
|
112
|
+
|
88
113
|
return function getAllRelationType() {
|
89
114
|
return _ref3.apply(this, arguments);
|
90
115
|
};
|
91
116
|
}();
|
92
|
-
|
93
117
|
/**
|
94
118
|
* ci类型树(包含组件)
|
95
119
|
* @param {string} moduleName 标识模块名
|
96
120
|
*/
|
121
|
+
|
122
|
+
|
97
123
|
exports.getAllRelationType = getAllRelationType;
|
124
|
+
|
98
125
|
var getCiTypes = /*#__PURE__*/function () {
|
99
|
-
var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
100
|
-
return
|
126
|
+
var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(moduleName) {
|
127
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
101
128
|
while (1) switch (_context4.prev = _context4.next) {
|
102
129
|
case 0:
|
103
130
|
_context4.next = 2;
|
104
131
|
return _componentTopologyUtils.request.post('/model/v1/api/getCiTypes', {
|
105
132
|
moduleName: moduleName
|
106
133
|
});
|
134
|
+
|
107
135
|
case 2:
|
108
136
|
return _context4.abrupt("return", _context4.sent);
|
137
|
+
|
109
138
|
case 3:
|
110
139
|
case "end":
|
111
140
|
return _context4.stop();
|
112
141
|
}
|
113
142
|
}, _callee4);
|
114
143
|
}));
|
144
|
+
|
115
145
|
return function getCiTypes(_x3) {
|
116
146
|
return _ref4.apply(this, arguments);
|
117
147
|
};
|
118
148
|
}();
|
119
|
-
|
120
149
|
/**
|
121
150
|
* 模型树拖动接口,用于节点拖拽
|
122
151
|
*/
|
152
|
+
|
153
|
+
|
123
154
|
exports.getCiTypes = getCiTypes;
|
155
|
+
|
124
156
|
var dragTree = /*#__PURE__*/function () {
|
125
|
-
var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
126
|
-
return
|
157
|
+
var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(param) {
|
158
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
127
159
|
while (1) switch (_context5.prev = _context5.next) {
|
128
160
|
case 0:
|
129
161
|
_context5.next = 2;
|
130
162
|
return _componentTopologyUtils.request.post('/model/v1/api/dragTree', param);
|
163
|
+
|
131
164
|
case 2:
|
132
165
|
return _context5.abrupt("return", _context5.sent);
|
166
|
+
|
133
167
|
case 3:
|
134
168
|
case "end":
|
135
169
|
return _context5.stop();
|
136
170
|
}
|
137
171
|
}, _callee5);
|
138
172
|
}));
|
173
|
+
|
139
174
|
return function dragTree(_x4) {
|
140
175
|
return _ref5.apply(this, arguments);
|
141
176
|
};
|
142
177
|
}();
|
143
|
-
|
144
178
|
/**
|
145
179
|
* 模型改造树
|
146
180
|
*/
|
181
|
+
|
182
|
+
|
147
183
|
exports.dragTree = dragTree;
|
184
|
+
|
148
185
|
var getModelTree = /*#__PURE__*/function () {
|
149
|
-
var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
150
|
-
return
|
186
|
+
var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
187
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
151
188
|
while (1) switch (_context6.prev = _context6.next) {
|
152
189
|
case 0:
|
153
190
|
_context6.next = 2;
|
154
191
|
return _componentTopologyUtils.request.post('/mdc/v1/api/model-asset/tree');
|
192
|
+
|
155
193
|
case 2:
|
156
194
|
return _context6.abrupt("return", _context6.sent);
|
195
|
+
|
157
196
|
case 3:
|
158
197
|
case "end":
|
159
198
|
return _context6.stop();
|
160
199
|
}
|
161
200
|
}, _callee6);
|
162
201
|
}));
|
202
|
+
|
163
203
|
return function getModelTree() {
|
164
204
|
return _ref6.apply(this, arguments);
|
165
205
|
};
|
166
206
|
}();
|
167
|
-
|
168
207
|
/**
|
169
208
|
* 验证CI名称
|
170
209
|
* @param {Object} param - 验证值对象.
|
@@ -176,22 +215,28 @@ var getModelTree = /*#__PURE__*/function () {
|
|
176
215
|
5. 验证关系类型: flag=relationType
|
177
216
|
* @param {string} employee.data - 被验证的值. eg:{"name":"未命名类型-1"}
|
178
217
|
*/
|
218
|
+
|
219
|
+
|
179
220
|
exports.getModelTree = getModelTree;
|
221
|
+
|
180
222
|
var verify = /*#__PURE__*/function () {
|
181
|
-
var _ref7 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
182
|
-
return
|
223
|
+
var _ref7 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(param) {
|
224
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
183
225
|
while (1) switch (_context7.prev = _context7.next) {
|
184
226
|
case 0:
|
185
227
|
_context7.next = 2;
|
186
228
|
return _componentTopologyUtils.request.post('/model/v1/api/verify', param);
|
229
|
+
|
187
230
|
case 2:
|
188
231
|
return _context7.abrupt("return", _context7.sent);
|
232
|
+
|
189
233
|
case 3:
|
190
234
|
case "end":
|
191
235
|
return _context7.stop();
|
192
236
|
}
|
193
237
|
}, _callee7);
|
194
238
|
}));
|
239
|
+
|
195
240
|
return function verify(_x5) {
|
196
241
|
return _ref7.apply(this, arguments);
|
197
242
|
};
|
@@ -199,54 +244,64 @@ var verify = /*#__PURE__*/function () {
|
|
199
244
|
/**
|
200
245
|
* 获得CI指标
|
201
246
|
*/
|
247
|
+
|
248
|
+
|
202
249
|
exports.verify = verify;
|
250
|
+
|
203
251
|
var getCiMetric = /*#__PURE__*/function () {
|
204
|
-
var _ref8 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
205
|
-
return
|
252
|
+
var _ref8 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(ciCode) {
|
253
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
206
254
|
while (1) switch (_context8.prev = _context8.next) {
|
207
255
|
case 0:
|
208
256
|
_context8.next = 2;
|
209
257
|
return _componentTopologyUtils.request.post('/model/v1/api/getCiMetric', {
|
210
258
|
ciCode: ciCode
|
211
259
|
});
|
260
|
+
|
212
261
|
case 2:
|
213
262
|
return _context8.abrupt("return", _context8.sent);
|
263
|
+
|
214
264
|
case 3:
|
215
265
|
case "end":
|
216
266
|
return _context8.stop();
|
217
267
|
}
|
218
268
|
}, _callee8);
|
219
269
|
}));
|
270
|
+
|
220
271
|
return function getCiMetric(_x6) {
|
221
272
|
return _ref8.apply(this, arguments);
|
222
273
|
};
|
223
274
|
}();
|
224
|
-
|
225
275
|
/**
|
226
276
|
* 所有领域
|
227
277
|
* @returns {array} 对象数组
|
228
278
|
*/
|
279
|
+
|
280
|
+
|
229
281
|
exports.getCiMetric = getCiMetric;
|
282
|
+
|
230
283
|
var getDomains = /*#__PURE__*/function () {
|
231
|
-
var _ref9 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
232
|
-
return
|
284
|
+
var _ref9 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
285
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
233
286
|
while (1) switch (_context9.prev = _context9.next) {
|
234
287
|
case 0:
|
235
288
|
_context9.next = 2;
|
236
289
|
return _componentTopologyUtils.request.post('/model/v1/api/getDomains');
|
290
|
+
|
237
291
|
case 2:
|
238
292
|
return _context9.abrupt("return", _context9.sent);
|
293
|
+
|
239
294
|
case 3:
|
240
295
|
case "end":
|
241
296
|
return _context9.stop();
|
242
297
|
}
|
243
298
|
}, _callee9);
|
244
299
|
}));
|
300
|
+
|
245
301
|
return function getDomains() {
|
246
302
|
return _ref9.apply(this, arguments);
|
247
303
|
};
|
248
304
|
}();
|
249
|
-
|
250
305
|
/** ************************************** 关系定义 start ************************************ */
|
251
306
|
|
252
307
|
/**
|
@@ -254,22 +309,28 @@ var getDomains = /*#__PURE__*/function () {
|
|
254
309
|
* @param {object} params
|
255
310
|
* @returns {object}
|
256
311
|
*/
|
312
|
+
|
313
|
+
|
257
314
|
exports.getDomains = getDomains;
|
315
|
+
|
258
316
|
var getRelation = /*#__PURE__*/function () {
|
259
|
-
var _ref10 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
260
|
-
return
|
317
|
+
var _ref10 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(params) {
|
318
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
261
319
|
while (1) switch (_context10.prev = _context10.next) {
|
262
320
|
case 0:
|
263
321
|
_context10.next = 2;
|
264
322
|
return _componentTopologyUtils.request.post('/model/v1/api/getRelation', params);
|
323
|
+
|
265
324
|
case 2:
|
266
325
|
return _context10.abrupt("return", _context10.sent);
|
326
|
+
|
267
327
|
case 3:
|
268
328
|
case "end":
|
269
329
|
return _context10.stop();
|
270
330
|
}
|
271
331
|
}, _callee10);
|
272
332
|
}));
|
333
|
+
|
273
334
|
return function getRelation(_x7) {
|
274
335
|
return _ref10.apply(this, arguments);
|
275
336
|
};
|
@@ -278,22 +339,28 @@ var getRelation = /*#__PURE__*/function () {
|
|
278
339
|
* 创建关系
|
279
340
|
* @param {object} params
|
280
341
|
*/
|
342
|
+
|
343
|
+
|
281
344
|
exports.getRelation = getRelation;
|
345
|
+
|
282
346
|
var createRelation = /*#__PURE__*/function () {
|
283
|
-
var _ref11 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
284
|
-
return
|
347
|
+
var _ref11 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(params) {
|
348
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
285
349
|
while (1) switch (_context11.prev = _context11.next) {
|
286
350
|
case 0:
|
287
351
|
_context11.next = 2;
|
288
352
|
return _componentTopologyUtils.request.post('/model/v1/api/createRelation', params);
|
353
|
+
|
289
354
|
case 2:
|
290
355
|
return _context11.abrupt("return", _context11.sent);
|
356
|
+
|
291
357
|
case 3:
|
292
358
|
case "end":
|
293
359
|
return _context11.stop();
|
294
360
|
}
|
295
361
|
}, _callee11);
|
296
362
|
}));
|
363
|
+
|
297
364
|
return function createRelation(_x8) {
|
298
365
|
return _ref11.apply(this, arguments);
|
299
366
|
};
|
@@ -302,22 +369,28 @@ var createRelation = /*#__PURE__*/function () {
|
|
302
369
|
* 编辑关系
|
303
370
|
* @param {object} params
|
304
371
|
*/
|
372
|
+
|
373
|
+
|
305
374
|
exports.createRelation = createRelation;
|
375
|
+
|
306
376
|
var updateRelation = /*#__PURE__*/function () {
|
307
|
-
var _ref12 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
308
|
-
return
|
377
|
+
var _ref12 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(params) {
|
378
|
+
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
309
379
|
while (1) switch (_context12.prev = _context12.next) {
|
310
380
|
case 0:
|
311
381
|
_context12.next = 2;
|
312
382
|
return _componentTopologyUtils.request.post('/model/v1/api/updateRelation', params);
|
383
|
+
|
313
384
|
case 2:
|
314
385
|
return _context12.abrupt("return", _context12.sent);
|
386
|
+
|
315
387
|
case 3:
|
316
388
|
case "end":
|
317
389
|
return _context12.stop();
|
318
390
|
}
|
319
391
|
}, _callee12);
|
320
392
|
}));
|
393
|
+
|
321
394
|
return function updateRelation(_x9) {
|
322
395
|
return _ref12.apply(this, arguments);
|
323
396
|
};
|
@@ -340,27 +413,32 @@ var updateRelation = /*#__PURE__*/function () {
|
|
340
413
|
]
|
341
414
|
}
|
342
415
|
*/
|
416
|
+
|
417
|
+
|
343
418
|
exports.updateRelation = updateRelation;
|
419
|
+
|
344
420
|
var deleteRelation = /*#__PURE__*/function () {
|
345
|
-
var _ref13 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
346
|
-
return
|
421
|
+
var _ref13 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(params) {
|
422
|
+
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
347
423
|
while (1) switch (_context13.prev = _context13.next) {
|
348
424
|
case 0:
|
349
425
|
_context13.next = 2;
|
350
426
|
return _componentTopologyUtils.request.post('/model/v1/api/deleteRelation', params);
|
427
|
+
|
351
428
|
case 2:
|
352
429
|
return _context13.abrupt("return", _context13.sent);
|
430
|
+
|
353
431
|
case 3:
|
354
432
|
case "end":
|
355
433
|
return _context13.stop();
|
356
434
|
}
|
357
435
|
}, _callee13);
|
358
436
|
}));
|
437
|
+
|
359
438
|
return function deleteRelation(_x10) {
|
360
439
|
return _ref13.apply(this, arguments);
|
361
440
|
};
|
362
441
|
}();
|
363
|
-
|
364
442
|
/** ************************************** 关系定义 end************************************ */
|
365
443
|
|
366
444
|
/** ************************************** 数据字典 start ********************************** */
|
@@ -400,33 +478,41 @@ var deleteRelation = /*#__PURE__*/function () {
|
|
400
478
|
},
|
401
479
|
...]
|
402
480
|
*/
|
481
|
+
|
482
|
+
|
403
483
|
exports.deleteRelation = deleteRelation;
|
484
|
+
|
404
485
|
var getCiAttributeDict = /*#__PURE__*/function () {
|
405
|
-
var _ref14 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
406
|
-
return
|
486
|
+
var _ref14 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14(param) {
|
487
|
+
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
407
488
|
while (1) switch (_context14.prev = _context14.next) {
|
408
489
|
case 0:
|
409
490
|
_context14.next = 2;
|
410
491
|
return _componentTopologyUtils.request.post('/model/v1/api/getCiAttributeDict', param);
|
492
|
+
|
411
493
|
case 2:
|
412
494
|
return _context14.abrupt("return", _context14.sent);
|
495
|
+
|
413
496
|
case 3:
|
414
497
|
case "end":
|
415
498
|
return _context14.stop();
|
416
499
|
}
|
417
500
|
}, _callee14);
|
418
501
|
}));
|
502
|
+
|
419
503
|
return function getCiAttributeDict(_x11) {
|
420
504
|
return _ref14.apply(this, arguments);
|
421
505
|
};
|
422
506
|
}();
|
423
|
-
|
424
507
|
/**
|
425
508
|
* 获取用户自建的属性(数据字典)
|
426
509
|
* @param {Array} codes ci类型code集合
|
427
510
|
* @returns {Object} {key:{xx:xxx,...}}
|
428
511
|
*/
|
512
|
+
|
513
|
+
|
429
514
|
exports.getCiAttributeDict = getCiAttributeDict;
|
515
|
+
|
430
516
|
function getUserDicts(_x12) {
|
431
517
|
return _getUserDicts.apply(this, arguments);
|
432
518
|
}
|
@@ -453,16 +539,19 @@ function getUserDicts(_x12) {
|
|
453
539
|
* }
|
454
540
|
* }
|
455
541
|
*/
|
542
|
+
|
543
|
+
|
456
544
|
function _getUserDicts() {
|
457
|
-
_getUserDicts = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
545
|
+
_getUserDicts = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee29(codes) {
|
458
546
|
var dicts, userDict;
|
459
|
-
return
|
547
|
+
return _regenerator["default"].wrap(function _callee29$(_context29) {
|
460
548
|
while (1) switch (_context29.prev = _context29.next) {
|
461
549
|
case 0:
|
462
550
|
_context29.next = 2;
|
463
551
|
return getCiAttributeDict({
|
464
552
|
ciCode: codes
|
465
553
|
});
|
554
|
+
|
466
555
|
case 2:
|
467
556
|
dicts = _context29.sent;
|
468
557
|
userDict = dicts.reduce(function (map, obj) {
|
@@ -470,6 +559,7 @@ function _getUserDicts() {
|
|
470
559
|
return map;
|
471
560
|
}, {});
|
472
561
|
return _context29.abrupt("return", userDict);
|
562
|
+
|
473
563
|
case 5:
|
474
564
|
case "end":
|
475
565
|
return _context29.stop();
|
@@ -478,28 +568,31 @@ function _getUserDicts() {
|
|
478
568
|
}));
|
479
569
|
return _getUserDicts.apply(this, arguments);
|
480
570
|
}
|
571
|
+
|
481
572
|
var queryDict = /*#__PURE__*/function () {
|
482
|
-
var _ref15 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
483
|
-
return
|
573
|
+
var _ref15 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(code) {
|
574
|
+
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
484
575
|
while (1) switch (_context15.prev = _context15.next) {
|
485
576
|
case 0:
|
486
577
|
_context15.next = 2;
|
487
578
|
return _componentTopologyUtils.request.post('/model/v1/api/getDict', {
|
488
579
|
code: code
|
489
580
|
});
|
581
|
+
|
490
582
|
case 2:
|
491
583
|
return _context15.abrupt("return", _context15.sent);
|
584
|
+
|
492
585
|
case 3:
|
493
586
|
case "end":
|
494
587
|
return _context15.stop();
|
495
588
|
}
|
496
589
|
}, _callee15);
|
497
590
|
}));
|
591
|
+
|
498
592
|
return function queryDict(_x13) {
|
499
593
|
return _ref15.apply(this, arguments);
|
500
594
|
};
|
501
595
|
}();
|
502
|
-
|
503
596
|
/**
|
504
597
|
* 查询厂商
|
505
598
|
* TODO:由于当前后端只有一个单查厂商的接口,暂使用promise.all形式查询多个
|
@@ -507,10 +600,13 @@ var queryDict = /*#__PURE__*/function () {
|
|
507
600
|
*
|
508
601
|
* @param {*} vendorKeys 厂商key数组,如['ruijie']
|
509
602
|
*/
|
603
|
+
|
604
|
+
|
510
605
|
exports.queryDict = queryDict;
|
606
|
+
|
511
607
|
var queryVendors = /*#__PURE__*/function () {
|
512
|
-
var _ref16 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
513
|
-
return
|
608
|
+
var _ref16 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(vendorKeys) {
|
609
|
+
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
514
610
|
while (1) switch (_context16.prev = _context16.next) {
|
515
611
|
case 0:
|
516
612
|
_context16.next = 2;
|
@@ -519,19 +615,21 @@ var queryVendors = /*#__PURE__*/function () {
|
|
519
615
|
vendor: vendor
|
520
616
|
});
|
521
617
|
}));
|
618
|
+
|
522
619
|
case 2:
|
523
620
|
return _context16.abrupt("return", _context16.sent);
|
621
|
+
|
524
622
|
case 3:
|
525
623
|
case "end":
|
526
624
|
return _context16.stop();
|
527
625
|
}
|
528
626
|
}, _callee16);
|
529
627
|
}));
|
628
|
+
|
530
629
|
return function queryVendors(_x14) {
|
531
630
|
return _ref16.apply(this, arguments);
|
532
631
|
};
|
533
632
|
}();
|
534
|
-
|
535
633
|
/**
|
536
634
|
* 查询全部数据字典
|
537
635
|
* @param {string} source 查询全量:source=null,查询内建:source=system,查询自建: source=custom
|
@@ -560,30 +658,36 @@ var queryVendors = /*#__PURE__*/function () {
|
|
560
658
|
* ...
|
561
659
|
* ]
|
562
660
|
*/
|
661
|
+
|
662
|
+
|
563
663
|
exports.queryVendors = queryVendors;
|
664
|
+
|
564
665
|
var queryDicts = /*#__PURE__*/function () {
|
565
|
-
var _ref17 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
566
|
-
return
|
666
|
+
var _ref17 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17(source) {
|
667
|
+
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
567
668
|
while (1) switch (_context17.prev = _context17.next) {
|
568
669
|
case 0:
|
569
670
|
if (source === void 0) {
|
570
671
|
source = null;
|
571
672
|
}
|
673
|
+
|
572
674
|
_context17.next = 3;
|
573
675
|
return (0, _mdc.modelDictList)();
|
676
|
+
|
574
677
|
case 3:
|
575
678
|
return _context17.abrupt("return", _context17.sent);
|
679
|
+
|
576
680
|
case 4:
|
577
681
|
case "end":
|
578
682
|
return _context17.stop();
|
579
683
|
}
|
580
684
|
}, _callee17);
|
581
685
|
}));
|
686
|
+
|
582
687
|
return function queryDicts(_x15) {
|
583
688
|
return _ref17.apply(this, arguments);
|
584
689
|
};
|
585
690
|
}();
|
586
|
-
|
587
691
|
/**
|
588
692
|
* 新建数据字典
|
589
693
|
* @param {object} param
|
@@ -615,27 +719,32 @@ var queryDicts = /*#__PURE__*/function () {
|
|
615
719
|
* }
|
616
720
|
* }
|
617
721
|
*/
|
722
|
+
|
723
|
+
|
618
724
|
exports.queryDicts = queryDicts;
|
725
|
+
|
619
726
|
var createDict = /*#__PURE__*/function () {
|
620
|
-
var _ref18 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
621
|
-
return
|
727
|
+
var _ref18 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18(param) {
|
728
|
+
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
622
729
|
while (1) switch (_context18.prev = _context18.next) {
|
623
730
|
case 0:
|
624
731
|
_context18.next = 2;
|
625
732
|
return _componentTopologyUtils.request.post('/model/v1/api/createDict', param);
|
733
|
+
|
626
734
|
case 2:
|
627
735
|
return _context18.abrupt("return", _context18.sent);
|
736
|
+
|
628
737
|
case 3:
|
629
738
|
case "end":
|
630
739
|
return _context18.stop();
|
631
740
|
}
|
632
741
|
}, _callee18);
|
633
742
|
}));
|
743
|
+
|
634
744
|
return function createDict(_x16) {
|
635
745
|
return _ref18.apply(this, arguments);
|
636
746
|
};
|
637
747
|
}();
|
638
|
-
|
639
748
|
/**
|
640
749
|
* 编辑数据字典
|
641
750
|
* @param {object} param
|
@@ -660,27 +769,32 @@ var createDict = /*#__PURE__*/function () {
|
|
660
769
|
*
|
661
770
|
* "dict/000000000051dd09"
|
662
771
|
*/
|
772
|
+
|
773
|
+
|
663
774
|
exports.createDict = createDict;
|
775
|
+
|
664
776
|
var updateDict = /*#__PURE__*/function () {
|
665
|
-
var _ref19 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
666
|
-
return
|
777
|
+
var _ref19 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19(param) {
|
778
|
+
return _regenerator["default"].wrap(function _callee19$(_context19) {
|
667
779
|
while (1) switch (_context19.prev = _context19.next) {
|
668
780
|
case 0:
|
669
781
|
_context19.next = 2;
|
670
782
|
return _componentTopologyUtils.request.post('/model/v1/api/updateDict', param);
|
783
|
+
|
671
784
|
case 2:
|
672
785
|
return _context19.abrupt("return", _context19.sent);
|
786
|
+
|
673
787
|
case 3:
|
674
788
|
case "end":
|
675
789
|
return _context19.stop();
|
676
790
|
}
|
677
791
|
}, _callee19);
|
678
792
|
}));
|
793
|
+
|
679
794
|
return function updateDict(_x17) {
|
680
795
|
return _ref19.apply(this, arguments);
|
681
796
|
};
|
682
797
|
}();
|
683
|
-
|
684
798
|
/**
|
685
799
|
* 删除数据字典
|
686
800
|
* @param {string} id
|
@@ -696,29 +810,34 @@ var updateDict = /*#__PURE__*/function () {
|
|
696
810
|
*
|
697
811
|
* "000000000051dc4d"
|
698
812
|
*/
|
813
|
+
|
814
|
+
|
699
815
|
exports.updateDict = updateDict;
|
816
|
+
|
700
817
|
var deleteDict = /*#__PURE__*/function () {
|
701
|
-
var _ref20 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
702
|
-
return
|
818
|
+
var _ref20 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee20(id) {
|
819
|
+
return _regenerator["default"].wrap(function _callee20$(_context20) {
|
703
820
|
while (1) switch (_context20.prev = _context20.next) {
|
704
821
|
case 0:
|
705
822
|
_context20.next = 2;
|
706
823
|
return _componentTopologyUtils.request.post('/model/v1/api/deleteDict', {
|
707
824
|
id: id
|
708
825
|
});
|
826
|
+
|
709
827
|
case 2:
|
710
828
|
return _context20.abrupt("return", _context20.sent);
|
829
|
+
|
711
830
|
case 3:
|
712
831
|
case "end":
|
713
832
|
return _context20.stop();
|
714
833
|
}
|
715
834
|
}, _callee20);
|
716
835
|
}));
|
836
|
+
|
717
837
|
return function deleteDict(_x18) {
|
718
838
|
return _ref20.apply(this, arguments);
|
719
839
|
};
|
720
840
|
}();
|
721
|
-
|
722
841
|
/** ************************************** 数据字典 end ************************************ */
|
723
842
|
|
724
843
|
/** ************************************** ci类型 start ************************************ */
|
@@ -731,27 +850,32 @@ var deleteDict = /*#__PURE__*/function () {
|
|
731
850
|
}
|
732
851
|
* @returns
|
733
852
|
*/
|
853
|
+
|
854
|
+
|
734
855
|
exports.deleteDict = deleteDict;
|
856
|
+
|
735
857
|
var getCiExtends = /*#__PURE__*/function () {
|
736
|
-
var _ref21 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
737
|
-
return
|
858
|
+
var _ref21 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee21(param) {
|
859
|
+
return _regenerator["default"].wrap(function _callee21$(_context21) {
|
738
860
|
while (1) switch (_context21.prev = _context21.next) {
|
739
861
|
case 0:
|
740
862
|
_context21.next = 2;
|
741
863
|
return _componentTopologyUtils.request.post('/model/v1/api/getCiExtends', param);
|
864
|
+
|
742
865
|
case 2:
|
743
866
|
return _context21.abrupt("return", _context21.sent);
|
867
|
+
|
744
868
|
case 3:
|
745
869
|
case "end":
|
746
870
|
return _context21.stop();
|
747
871
|
}
|
748
872
|
}, _callee21);
|
749
873
|
}));
|
874
|
+
|
750
875
|
return function getCiExtends(_x19) {
|
751
876
|
return _ref21.apply(this, arguments);
|
752
877
|
};
|
753
878
|
}();
|
754
|
-
|
755
879
|
/**
|
756
880
|
*
|
757
881
|
* 模型接口-ci元数据
|
@@ -759,72 +883,88 @@ var getCiExtends = /*#__PURE__*/function () {
|
|
759
883
|
* @param {boolean} userVisibleFilter 是否按照模型的userVisible过滤,发现页面不过滤
|
760
884
|
* @param {boolean} dict 是否需要绑定数据字典
|
761
885
|
*/
|
886
|
+
|
887
|
+
|
762
888
|
exports.getCiExtends = getCiExtends;
|
889
|
+
|
763
890
|
var getCi = /*#__PURE__*/function () {
|
764
|
-
var _ref22 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
891
|
+
var _ref22 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee22(code, userVisibleFilter, dict) {
|
765
892
|
var meta;
|
766
|
-
return
|
893
|
+
return _regenerator["default"].wrap(function _callee22$(_context22) {
|
767
894
|
while (1) switch (_context22.prev = _context22.next) {
|
768
895
|
case 0:
|
769
896
|
if (userVisibleFilter === void 0) {
|
770
897
|
userVisibleFilter = true;
|
771
898
|
}
|
899
|
+
|
772
900
|
if (dict === void 0) {
|
773
901
|
dict = true;
|
774
902
|
}
|
903
|
+
|
775
904
|
_context22.next = 4;
|
776
905
|
return formatCiAttributes(code, userVisibleFilter);
|
906
|
+
|
777
907
|
case 4:
|
778
908
|
meta = _context22.sent;
|
909
|
+
|
779
910
|
if (!dict) {
|
780
911
|
_context22.next = 14;
|
781
912
|
break;
|
782
913
|
}
|
914
|
+
|
783
915
|
_context22.prev = 6;
|
784
916
|
return _context22.abrupt("return", bindDict(meta));
|
917
|
+
|
785
918
|
case 10:
|
786
919
|
_context22.prev = 10;
|
787
920
|
_context22.t0 = _context22["catch"](6);
|
788
921
|
console.error(_context22.t0);
|
789
922
|
return _context22.abrupt("return", meta);
|
923
|
+
|
790
924
|
case 14:
|
791
925
|
return _context22.abrupt("return", meta);
|
926
|
+
|
792
927
|
case 15:
|
793
928
|
case "end":
|
794
929
|
return _context22.stop();
|
795
930
|
}
|
796
931
|
}, _callee22, null, [[6, 10]]);
|
797
932
|
}));
|
933
|
+
|
798
934
|
return function getCi(_x20, _x21, _x22) {
|
799
935
|
return _ref22.apply(this, arguments);
|
800
936
|
};
|
801
937
|
}();
|
802
|
-
|
803
938
|
/**
|
804
939
|
* 编辑ci类型
|
805
940
|
* @param {string} code
|
806
941
|
*/
|
942
|
+
|
943
|
+
|
807
944
|
exports.getCi = getCi;
|
945
|
+
|
808
946
|
var updateCi = /*#__PURE__*/function () {
|
809
|
-
var _ref23 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
810
|
-
return
|
947
|
+
var _ref23 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee23(data) {
|
948
|
+
return _regenerator["default"].wrap(function _callee23$(_context23) {
|
811
949
|
while (1) switch (_context23.prev = _context23.next) {
|
812
950
|
case 0:
|
813
951
|
_context23.next = 2;
|
814
952
|
return _componentTopologyUtils.request.post('/model/v1/api/updateCi', data);
|
953
|
+
|
815
954
|
case 2:
|
816
955
|
return _context23.abrupt("return", _context23.sent);
|
956
|
+
|
817
957
|
case 3:
|
818
958
|
case "end":
|
819
959
|
return _context23.stop();
|
820
960
|
}
|
821
961
|
}, _callee23);
|
822
962
|
}));
|
963
|
+
|
823
964
|
return function updateCi(_x23) {
|
824
965
|
return _ref23.apply(this, arguments);
|
825
966
|
};
|
826
967
|
}();
|
827
|
-
|
828
968
|
/**
|
829
969
|
* 创建ci类型
|
830
970
|
* @param {object} data
|
@@ -854,47 +994,58 @@ var updateCi = /*#__PURE__*/function () {
|
|
854
994
|
*
|
855
995
|
* "513b7713-4854-496f-9e4a-a4bf85cb0f63"
|
856
996
|
*/
|
997
|
+
|
998
|
+
|
857
999
|
exports.updateCi = updateCi;
|
1000
|
+
|
858
1001
|
var createCi = /*#__PURE__*/function () {
|
859
|
-
var _ref24 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
860
|
-
return
|
1002
|
+
var _ref24 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee24(data) {
|
1003
|
+
return _regenerator["default"].wrap(function _callee24$(_context24) {
|
861
1004
|
while (1) switch (_context24.prev = _context24.next) {
|
862
1005
|
case 0:
|
863
1006
|
_context24.next = 2;
|
864
1007
|
return _componentTopologyUtils.request.post('/model/v1/api/createCi', data);
|
1008
|
+
|
865
1009
|
case 2:
|
866
1010
|
return _context24.abrupt("return", _context24.sent);
|
1011
|
+
|
867
1012
|
case 3:
|
868
1013
|
case "end":
|
869
1014
|
return _context24.stop();
|
870
1015
|
}
|
871
1016
|
}, _callee24);
|
872
1017
|
}));
|
1018
|
+
|
873
1019
|
return function createCi(_x24) {
|
874
1020
|
return _ref24.apply(this, arguments);
|
875
1021
|
};
|
876
1022
|
}();
|
877
|
-
|
878
1023
|
/**
|
879
1024
|
* 删除ci类型
|
880
1025
|
* @param {Object} param
|
881
1026
|
*/
|
1027
|
+
|
1028
|
+
|
882
1029
|
exports.createCi = createCi;
|
1030
|
+
|
883
1031
|
var deleteCi = /*#__PURE__*/function () {
|
884
|
-
var _ref25 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
885
|
-
return
|
1032
|
+
var _ref25 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee25(param) {
|
1033
|
+
return _regenerator["default"].wrap(function _callee25$(_context25) {
|
886
1034
|
while (1) switch (_context25.prev = _context25.next) {
|
887
1035
|
case 0:
|
888
1036
|
_context25.next = 2;
|
889
1037
|
return _componentTopologyUtils.request.post('/model/v1/api/deleteCi', param);
|
1038
|
+
|
890
1039
|
case 2:
|
891
1040
|
return _context25.abrupt("return", _context25.sent);
|
1041
|
+
|
892
1042
|
case 3:
|
893
1043
|
case "end":
|
894
1044
|
return _context25.stop();
|
895
1045
|
}
|
896
1046
|
}, _callee25);
|
897
1047
|
}));
|
1048
|
+
|
898
1049
|
return function deleteCi(_x25) {
|
899
1050
|
return _ref25.apply(this, arguments);
|
900
1051
|
};
|
@@ -903,22 +1054,28 @@ var deleteCi = /*#__PURE__*/function () {
|
|
903
1054
|
* 查询所有 CI 类型
|
904
1055
|
* @param {object} params
|
905
1056
|
*/
|
1057
|
+
|
1058
|
+
|
906
1059
|
exports.deleteCi = deleteCi;
|
1060
|
+
|
907
1061
|
var getAllCi = /*#__PURE__*/function () {
|
908
|
-
var _ref26 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
909
|
-
return
|
1062
|
+
var _ref26 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee26(params) {
|
1063
|
+
return _regenerator["default"].wrap(function _callee26$(_context26) {
|
910
1064
|
while (1) switch (_context26.prev = _context26.next) {
|
911
1065
|
case 0:
|
912
1066
|
_context26.next = 2;
|
913
1067
|
return _componentTopologyUtils.request.post('/model/v1/api/getAllCi', params);
|
1068
|
+
|
914
1069
|
case 2:
|
915
1070
|
return _context26.abrupt("return", _context26.sent);
|
1071
|
+
|
916
1072
|
case 3:
|
917
1073
|
case "end":
|
918
1074
|
return _context26.stop();
|
919
1075
|
}
|
920
1076
|
}, _callee26);
|
921
1077
|
}));
|
1078
|
+
|
922
1079
|
return function getAllCi(_x26) {
|
923
1080
|
return _ref26.apply(this, arguments);
|
924
1081
|
};
|
@@ -927,7 +1084,10 @@ var getAllCi = /*#__PURE__*/function () {
|
|
927
1084
|
* 获取类型元数据
|
928
1085
|
* @param {string} code
|
929
1086
|
*/
|
1087
|
+
|
1088
|
+
|
930
1089
|
exports.getAllCi = getAllCi;
|
1090
|
+
|
931
1091
|
function getCiMeta(_x27) {
|
932
1092
|
return _getCiMeta.apply(this, arguments);
|
933
1093
|
}
|
@@ -936,15 +1096,19 @@ function getCiMeta(_x27) {
|
|
936
1096
|
* @param {string} code
|
937
1097
|
* @param {boolean} userVisibleFilter
|
938
1098
|
*/
|
1099
|
+
|
1100
|
+
|
939
1101
|
function _getCiMeta() {
|
940
|
-
_getCiMeta = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
941
|
-
return
|
1102
|
+
_getCiMeta = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee30(code) {
|
1103
|
+
return _regenerator["default"].wrap(function _callee30$(_context30) {
|
942
1104
|
while (1) switch (_context30.prev = _context30.next) {
|
943
1105
|
case 0:
|
944
1106
|
_context30.next = 2;
|
945
1107
|
return _componentTopologyUtils.request.get("/mdc/v1/api/model-asset/" + code);
|
1108
|
+
|
946
1109
|
case 2:
|
947
1110
|
return _context30.abrupt("return", _context30.sent);
|
1111
|
+
|
948
1112
|
case 3:
|
949
1113
|
case "end":
|
950
1114
|
return _context30.stop();
|
@@ -953,36 +1117,45 @@ function _getCiMeta() {
|
|
953
1117
|
}));
|
954
1118
|
return _getCiMeta.apply(this, arguments);
|
955
1119
|
}
|
1120
|
+
|
956
1121
|
function formatCiAttributes(_x28, _x29) {
|
957
1122
|
return _formatCiAttributes.apply(this, arguments);
|
958
1123
|
} // 属性为用户字典
|
1124
|
+
|
1125
|
+
|
959
1126
|
function _formatCiAttributes() {
|
960
|
-
_formatCiAttributes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
1127
|
+
_formatCiAttributes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee31(code, userVisibleFilter) {
|
961
1128
|
var meta, attributes;
|
962
|
-
return
|
1129
|
+
return _regenerator["default"].wrap(function _callee31$(_context31) {
|
963
1130
|
while (1) switch (_context31.prev = _context31.next) {
|
964
1131
|
case 0:
|
965
1132
|
_context31.next = 2;
|
966
1133
|
return _componentTopologyUtils.request.post('/model/v1/api/getCi', {
|
967
1134
|
code: code
|
968
1135
|
});
|
1136
|
+
|
969
1137
|
case 2:
|
970
1138
|
meta = _context31.sent;
|
1139
|
+
|
971
1140
|
if (!meta) {
|
972
1141
|
_context31.next = 9;
|
973
1142
|
break;
|
974
1143
|
}
|
1144
|
+
|
975
1145
|
attributes = meta.attributes;
|
1146
|
+
|
976
1147
|
if (attributes) {
|
977
1148
|
_context31.next = 7;
|
978
1149
|
break;
|
979
1150
|
}
|
1151
|
+
|
980
1152
|
return _context31.abrupt("return", meta);
|
1153
|
+
|
981
1154
|
case 7:
|
982
1155
|
try {
|
983
1156
|
// 适配后端,使属性正序
|
984
|
-
attributes = attributes.reverse();
|
985
|
-
|
1157
|
+
attributes = attributes.reverse(); // 获取过滤userVisible=true的属性(用户可见)
|
1158
|
+
|
986
1159
|
if (userVisibleFilter) {
|
987
1160
|
meta.attributes = attributes.filter(function (item) {
|
988
1161
|
return item.userVisible === 'true';
|
@@ -991,9 +1164,12 @@ function _formatCiAttributes() {
|
|
991
1164
|
} catch (error) {
|
992
1165
|
_rlog["default"].error('services=>model=>:', error);
|
993
1166
|
}
|
1167
|
+
|
994
1168
|
return _context31.abrupt("return", meta);
|
1169
|
+
|
995
1170
|
case 9:
|
996
1171
|
return _context31.abrupt("return", meta);
|
1172
|
+
|
997
1173
|
case 10:
|
998
1174
|
case "end":
|
999
1175
|
return _context31.stop();
|
@@ -1002,31 +1178,36 @@ function _formatCiAttributes() {
|
|
1002
1178
|
}));
|
1003
1179
|
return _formatCiAttributes.apply(this, arguments);
|
1004
1180
|
}
|
1181
|
+
|
1005
1182
|
var ATTRIBUTE_USER_DICT = 'userDict';
|
1006
1183
|
/**
|
1007
1184
|
* 为属性绑定“数据字典”数据
|
1008
1185
|
* @param {object} data
|
1009
1186
|
*/
|
1187
|
+
|
1010
1188
|
function bindDict(data) {
|
1011
1189
|
var meta = (0, _extends2["default"])({}, data);
|
1012
1190
|
var visibleAttributes = meta.attributes;
|
1013
1191
|
meta.attributes = visibleAttributes.map(function (item) {
|
1014
1192
|
var attr = (0, _extends2["default"])({}, item);
|
1015
1193
|
var dataSource = attr.dataSource,
|
1016
|
-
|
1017
|
-
|
1018
|
-
if ((0, _utils.isNull)(attr.changeValue)) return attr;
|
1019
|
-
|
1194
|
+
dictCode = attr.dictCode,
|
1195
|
+
code = attr.code;
|
1196
|
+
if ((0, _utils.isNull)(attr.changeValue)) return attr; // 用户自定义数据字典key为dictCode
|
1197
|
+
|
1020
1198
|
var key = ATTRIBUTE_USER_DICT === dataSource ? dictCode : code;
|
1199
|
+
|
1021
1200
|
if (_storage.DICT.get(key)) {
|
1022
1201
|
attr.dict = _storage.DICT.get(key).items;
|
1023
1202
|
return attr;
|
1024
1203
|
}
|
1204
|
+
|
1025
1205
|
console.error("\u627E\u4E0D\u5230 " + attr.name + " \u5BF9\u5E94\u7684\u6570\u636E\u5B57\u5178");
|
1026
1206
|
return attr;
|
1027
1207
|
});
|
1028
1208
|
return meta;
|
1029
1209
|
}
|
1210
|
+
|
1030
1211
|
function queryAllModel(_x30) {
|
1031
1212
|
return _queryAllModel.apply(this, arguments);
|
1032
1213
|
}
|
@@ -1039,30 +1220,39 @@ function queryAllModel(_x30) {
|
|
1039
1220
|
// }
|
1040
1221
|
// return await request.post('/type/list');
|
1041
1222
|
// }
|
1223
|
+
|
1042
1224
|
/** *
|
1043
1225
|
* 批量查询ci属性
|
1044
1226
|
*/
|
1227
|
+
|
1228
|
+
|
1045
1229
|
function _queryAllModel() {
|
1046
|
-
_queryAllModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
1047
|
-
return
|
1230
|
+
_queryAllModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee32(isAuth) {
|
1231
|
+
return _regenerator["default"].wrap(function _callee32$(_context32) {
|
1048
1232
|
while (1) switch (_context32.prev = _context32.next) {
|
1049
1233
|
case 0:
|
1050
1234
|
if (isAuth === void 0) {
|
1051
1235
|
isAuth = false;
|
1052
1236
|
}
|
1237
|
+
|
1053
1238
|
if (!isAuth) {
|
1054
1239
|
_context32.next = 5;
|
1055
1240
|
break;
|
1056
1241
|
}
|
1242
|
+
|
1057
1243
|
_context32.next = 4;
|
1058
1244
|
return _componentTopologyUtils.request.post('/model/v1/api/authority/modelTree');
|
1245
|
+
|
1059
1246
|
case 4:
|
1060
1247
|
return _context32.abrupt("return", _context32.sent);
|
1248
|
+
|
1061
1249
|
case 5:
|
1062
1250
|
_context32.next = 7;
|
1063
1251
|
return _componentTopologyUtils.request.get('/mdc/v1/api/model-asset/tree');
|
1252
|
+
|
1064
1253
|
case 7:
|
1065
1254
|
return _context32.abrupt("return", _context32.sent);
|
1255
|
+
|
1066
1256
|
case 8:
|
1067
1257
|
case "end":
|
1068
1258
|
return _context32.stop();
|
@@ -1071,23 +1261,27 @@ function _queryAllModel() {
|
|
1071
1261
|
}));
|
1072
1262
|
return _queryAllModel.apply(this, arguments);
|
1073
1263
|
}
|
1264
|
+
|
1074
1265
|
var getBatchCi = /*#__PURE__*/function () {
|
1075
|
-
var _ref27 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
1076
|
-
return
|
1266
|
+
var _ref27 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee27(typeCodes) {
|
1267
|
+
return _regenerator["default"].wrap(function _callee27$(_context27) {
|
1077
1268
|
while (1) switch (_context27.prev = _context27.next) {
|
1078
1269
|
case 0:
|
1079
1270
|
_context27.next = 2;
|
1080
1271
|
return _componentTopologyUtils.request.post('/model/v1/api/getBatchCi', {
|
1081
1272
|
typeCodes: typeCodes
|
1082
1273
|
});
|
1274
|
+
|
1083
1275
|
case 2:
|
1084
1276
|
return _context27.abrupt("return", _context27.sent);
|
1277
|
+
|
1085
1278
|
case 3:
|
1086
1279
|
case "end":
|
1087
1280
|
return _context27.stop();
|
1088
1281
|
}
|
1089
1282
|
}, _callee27);
|
1090
1283
|
}));
|
1284
|
+
|
1091
1285
|
return function getBatchCi(_x31) {
|
1092
1286
|
return _ref27.apply(this, arguments);
|
1093
1287
|
};
|
@@ -1095,27 +1289,35 @@ var getBatchCi = /*#__PURE__*/function () {
|
|
1095
1289
|
/** *
|
1096
1290
|
* 批量查询ci属性
|
1097
1291
|
*/
|
1292
|
+
|
1293
|
+
|
1098
1294
|
exports.getBatchCi = getBatchCi;
|
1295
|
+
|
1099
1296
|
var getBatchCiMetric = /*#__PURE__*/function () {
|
1100
|
-
var _ref28 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
1101
|
-
return
|
1297
|
+
var _ref28 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee28(typeCodes) {
|
1298
|
+
return _regenerator["default"].wrap(function _callee28$(_context28) {
|
1102
1299
|
while (1) switch (_context28.prev = _context28.next) {
|
1103
1300
|
case 0:
|
1104
1301
|
_context28.next = 2;
|
1105
1302
|
return _componentTopologyUtils.request.post('/model/v1/api/getBatchCiMetric', {
|
1106
1303
|
typeCodes: typeCodes
|
1107
1304
|
});
|
1305
|
+
|
1108
1306
|
case 2:
|
1109
1307
|
return _context28.abrupt("return", _context28.sent);
|
1308
|
+
|
1110
1309
|
case 3:
|
1111
1310
|
case "end":
|
1112
1311
|
return _context28.stop();
|
1113
1312
|
}
|
1114
1313
|
}, _callee28);
|
1115
1314
|
}));
|
1315
|
+
|
1116
1316
|
return function getBatchCiMetric(_x32) {
|
1117
1317
|
return _ref28.apply(this, arguments);
|
1118
1318
|
};
|
1119
1319
|
}();
|
1120
1320
|
/** ************************************** ci类型 end ************************************ */
|
1321
|
+
|
1322
|
+
|
1121
1323
|
exports.getBatchCiMetric = getBatchCiMetric;
|