@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,18 +1,18 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
3
|
-
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
4
4
|
import { request } from '@riil-frontend/component-topology-utils';
|
5
5
|
import { isNull } from '@riil-frontend/utils';
|
6
6
|
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
7
7
|
import { DICT } from "../utils/storage";
|
8
8
|
import { modelDictList } from "./mdc";
|
9
|
-
|
10
9
|
/**
|
11
10
|
* 查询 CI 组件信息(又实例的)
|
12
11
|
*/
|
12
|
+
|
13
13
|
export var getCommonCount = /*#__PURE__*/function () {
|
14
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
15
|
-
return _regeneratorRuntime
|
14
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
|
15
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
16
16
|
while (1) switch (_context.prev = _context.next) {
|
17
17
|
case 0:
|
18
18
|
_context.next = 2;
|
@@ -20,14 +20,17 @@ export var getCommonCount = /*#__PURE__*/function () {
|
|
20
20
|
condition: "\"principal(type('" + code + "'))\"",
|
21
21
|
groupKeys: ['ci_type']
|
22
22
|
});
|
23
|
+
|
23
24
|
case 2:
|
24
25
|
return _context.abrupt("return", _context.sent);
|
26
|
+
|
25
27
|
case 3:
|
26
28
|
case "end":
|
27
29
|
return _context.stop();
|
28
30
|
}
|
29
31
|
}, _callee);
|
30
32
|
}));
|
33
|
+
|
31
34
|
return function getCommonCount(_x) {
|
32
35
|
return _ref.apply(this, arguments);
|
33
36
|
};
|
@@ -35,23 +38,27 @@ export var getCommonCount = /*#__PURE__*/function () {
|
|
35
38
|
/**
|
36
39
|
* 查询 CI 组件信息
|
37
40
|
*/
|
41
|
+
|
38
42
|
export var getComponents = /*#__PURE__*/function () {
|
39
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
40
|
-
return _regeneratorRuntime
|
43
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(code) {
|
44
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
41
45
|
while (1) switch (_context2.prev = _context2.next) {
|
42
46
|
case 0:
|
43
47
|
_context2.next = 2;
|
44
48
|
return request.post('/model/v1/api/getComponents', {
|
45
49
|
code: code
|
46
50
|
});
|
51
|
+
|
47
52
|
case 2:
|
48
53
|
return _context2.abrupt("return", _context2.sent);
|
54
|
+
|
49
55
|
case 3:
|
50
56
|
case "end":
|
51
57
|
return _context2.stop();
|
52
58
|
}
|
53
59
|
}, _callee2);
|
54
60
|
}));
|
61
|
+
|
55
62
|
return function getComponents(_x2) {
|
56
63
|
return _ref2.apply(this, arguments);
|
57
64
|
};
|
@@ -59,98 +66,110 @@ export var getComponents = /*#__PURE__*/function () {
|
|
59
66
|
/**
|
60
67
|
* 查询关系类型定义
|
61
68
|
*/
|
69
|
+
|
62
70
|
export var getAllRelationType = /*#__PURE__*/function () {
|
63
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
64
|
-
return _regeneratorRuntime
|
71
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
72
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
65
73
|
while (1) switch (_context3.prev = _context3.next) {
|
66
74
|
case 0:
|
67
75
|
_context3.next = 2;
|
68
76
|
return request.post('/model/v1/api/getAllRelationType');
|
77
|
+
|
69
78
|
case 2:
|
70
79
|
return _context3.abrupt("return", _context3.sent);
|
80
|
+
|
71
81
|
case 3:
|
72
82
|
case "end":
|
73
83
|
return _context3.stop();
|
74
84
|
}
|
75
85
|
}, _callee3);
|
76
86
|
}));
|
87
|
+
|
77
88
|
return function getAllRelationType() {
|
78
89
|
return _ref3.apply(this, arguments);
|
79
90
|
};
|
80
91
|
}();
|
81
|
-
|
82
92
|
/**
|
83
93
|
* ci类型树(包含组件)
|
84
94
|
* @param {string} moduleName 标识模块名
|
85
95
|
*/
|
96
|
+
|
86
97
|
export var getCiTypes = /*#__PURE__*/function () {
|
87
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
88
|
-
return _regeneratorRuntime
|
98
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(moduleName) {
|
99
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
89
100
|
while (1) switch (_context4.prev = _context4.next) {
|
90
101
|
case 0:
|
91
102
|
_context4.next = 2;
|
92
103
|
return request.post('/model/v1/api/getCiTypes', {
|
93
104
|
moduleName: moduleName
|
94
105
|
});
|
106
|
+
|
95
107
|
case 2:
|
96
108
|
return _context4.abrupt("return", _context4.sent);
|
109
|
+
|
97
110
|
case 3:
|
98
111
|
case "end":
|
99
112
|
return _context4.stop();
|
100
113
|
}
|
101
114
|
}, _callee4);
|
102
115
|
}));
|
116
|
+
|
103
117
|
return function getCiTypes(_x3) {
|
104
118
|
return _ref4.apply(this, arguments);
|
105
119
|
};
|
106
120
|
}();
|
107
|
-
|
108
121
|
/**
|
109
122
|
* 模型树拖动接口,用于节点拖拽
|
110
123
|
*/
|
124
|
+
|
111
125
|
export var dragTree = /*#__PURE__*/function () {
|
112
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
113
|
-
return _regeneratorRuntime
|
126
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(param) {
|
127
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
114
128
|
while (1) switch (_context5.prev = _context5.next) {
|
115
129
|
case 0:
|
116
130
|
_context5.next = 2;
|
117
131
|
return request.post('/model/v1/api/dragTree', param);
|
132
|
+
|
118
133
|
case 2:
|
119
134
|
return _context5.abrupt("return", _context5.sent);
|
135
|
+
|
120
136
|
case 3:
|
121
137
|
case "end":
|
122
138
|
return _context5.stop();
|
123
139
|
}
|
124
140
|
}, _callee5);
|
125
141
|
}));
|
142
|
+
|
126
143
|
return function dragTree(_x4) {
|
127
144
|
return _ref5.apply(this, arguments);
|
128
145
|
};
|
129
146
|
}();
|
130
|
-
|
131
147
|
/**
|
132
148
|
* 模型改造树
|
133
149
|
*/
|
150
|
+
|
134
151
|
export var getModelTree = /*#__PURE__*/function () {
|
135
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
136
|
-
return _regeneratorRuntime
|
152
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
153
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
137
154
|
while (1) switch (_context6.prev = _context6.next) {
|
138
155
|
case 0:
|
139
156
|
_context6.next = 2;
|
140
157
|
return request.post('/mdc/v1/api/model-asset/tree');
|
158
|
+
|
141
159
|
case 2:
|
142
160
|
return _context6.abrupt("return", _context6.sent);
|
161
|
+
|
143
162
|
case 3:
|
144
163
|
case "end":
|
145
164
|
return _context6.stop();
|
146
165
|
}
|
147
166
|
}, _callee6);
|
148
167
|
}));
|
168
|
+
|
149
169
|
return function getModelTree() {
|
150
170
|
return _ref6.apply(this, arguments);
|
151
171
|
};
|
152
172
|
}();
|
153
|
-
|
154
173
|
/**
|
155
174
|
* 验证CI名称
|
156
175
|
* @param {Object} param - 验证值对象.
|
@@ -162,21 +181,25 @@ export var getModelTree = /*#__PURE__*/function () {
|
|
162
181
|
5. 验证关系类型: flag=relationType
|
163
182
|
* @param {string} employee.data - 被验证的值. eg:{"name":"未命名类型-1"}
|
164
183
|
*/
|
184
|
+
|
165
185
|
export var verify = /*#__PURE__*/function () {
|
166
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
167
|
-
return _regeneratorRuntime
|
186
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(param) {
|
187
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
168
188
|
while (1) switch (_context7.prev = _context7.next) {
|
169
189
|
case 0:
|
170
190
|
_context7.next = 2;
|
171
191
|
return request.post('/model/v1/api/verify', param);
|
192
|
+
|
172
193
|
case 2:
|
173
194
|
return _context7.abrupt("return", _context7.sent);
|
195
|
+
|
174
196
|
case 3:
|
175
197
|
case "end":
|
176
198
|
return _context7.stop();
|
177
199
|
}
|
178
200
|
}, _callee7);
|
179
201
|
}));
|
202
|
+
|
180
203
|
return function verify(_x5) {
|
181
204
|
return _ref7.apply(this, arguments);
|
182
205
|
};
|
@@ -186,51 +209,56 @@ export var verify = /*#__PURE__*/function () {
|
|
186
209
|
*/
|
187
210
|
|
188
211
|
export var getCiMetric = /*#__PURE__*/function () {
|
189
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
190
|
-
return _regeneratorRuntime
|
212
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(ciCode) {
|
213
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
191
214
|
while (1) switch (_context8.prev = _context8.next) {
|
192
215
|
case 0:
|
193
216
|
_context8.next = 2;
|
194
217
|
return request.post('/model/v1/api/getCiMetric', {
|
195
218
|
ciCode: ciCode
|
196
219
|
});
|
220
|
+
|
197
221
|
case 2:
|
198
222
|
return _context8.abrupt("return", _context8.sent);
|
223
|
+
|
199
224
|
case 3:
|
200
225
|
case "end":
|
201
226
|
return _context8.stop();
|
202
227
|
}
|
203
228
|
}, _callee8);
|
204
229
|
}));
|
230
|
+
|
205
231
|
return function getCiMetric(_x6) {
|
206
232
|
return _ref8.apply(this, arguments);
|
207
233
|
};
|
208
234
|
}();
|
209
|
-
|
210
235
|
/**
|
211
236
|
* 所有领域
|
212
237
|
* @returns {array} 对象数组
|
213
238
|
*/
|
239
|
+
|
214
240
|
export var getDomains = /*#__PURE__*/function () {
|
215
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
216
|
-
return _regeneratorRuntime
|
241
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
242
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
217
243
|
while (1) switch (_context9.prev = _context9.next) {
|
218
244
|
case 0:
|
219
245
|
_context9.next = 2;
|
220
246
|
return request.post('/model/v1/api/getDomains');
|
247
|
+
|
221
248
|
case 2:
|
222
249
|
return _context9.abrupt("return", _context9.sent);
|
250
|
+
|
223
251
|
case 3:
|
224
252
|
case "end":
|
225
253
|
return _context9.stop();
|
226
254
|
}
|
227
255
|
}, _callee9);
|
228
256
|
}));
|
257
|
+
|
229
258
|
return function getDomains() {
|
230
259
|
return _ref9.apply(this, arguments);
|
231
260
|
};
|
232
261
|
}();
|
233
|
-
|
234
262
|
/** ************************************** 关系定义 start ************************************ */
|
235
263
|
|
236
264
|
/**
|
@@ -238,21 +266,25 @@ export var getDomains = /*#__PURE__*/function () {
|
|
238
266
|
* @param {object} params
|
239
267
|
* @returns {object}
|
240
268
|
*/
|
269
|
+
|
241
270
|
export var getRelation = /*#__PURE__*/function () {
|
242
|
-
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
243
|
-
return _regeneratorRuntime
|
271
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(params) {
|
272
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
244
273
|
while (1) switch (_context10.prev = _context10.next) {
|
245
274
|
case 0:
|
246
275
|
_context10.next = 2;
|
247
276
|
return request.post('/model/v1/api/getRelation', params);
|
277
|
+
|
248
278
|
case 2:
|
249
279
|
return _context10.abrupt("return", _context10.sent);
|
280
|
+
|
250
281
|
case 3:
|
251
282
|
case "end":
|
252
283
|
return _context10.stop();
|
253
284
|
}
|
254
285
|
}, _callee10);
|
255
286
|
}));
|
287
|
+
|
256
288
|
return function getRelation(_x7) {
|
257
289
|
return _ref10.apply(this, arguments);
|
258
290
|
};
|
@@ -261,21 +293,25 @@ export var getRelation = /*#__PURE__*/function () {
|
|
261
293
|
* 创建关系
|
262
294
|
* @param {object} params
|
263
295
|
*/
|
296
|
+
|
264
297
|
export var createRelation = /*#__PURE__*/function () {
|
265
|
-
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
266
|
-
return _regeneratorRuntime
|
298
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(params) {
|
299
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
267
300
|
while (1) switch (_context11.prev = _context11.next) {
|
268
301
|
case 0:
|
269
302
|
_context11.next = 2;
|
270
303
|
return request.post('/model/v1/api/createRelation', params);
|
304
|
+
|
271
305
|
case 2:
|
272
306
|
return _context11.abrupt("return", _context11.sent);
|
307
|
+
|
273
308
|
case 3:
|
274
309
|
case "end":
|
275
310
|
return _context11.stop();
|
276
311
|
}
|
277
312
|
}, _callee11);
|
278
313
|
}));
|
314
|
+
|
279
315
|
return function createRelation(_x8) {
|
280
316
|
return _ref11.apply(this, arguments);
|
281
317
|
};
|
@@ -284,21 +320,25 @@ export var createRelation = /*#__PURE__*/function () {
|
|
284
320
|
* 编辑关系
|
285
321
|
* @param {object} params
|
286
322
|
*/
|
323
|
+
|
287
324
|
export var updateRelation = /*#__PURE__*/function () {
|
288
|
-
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
289
|
-
return _regeneratorRuntime
|
325
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
|
326
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
290
327
|
while (1) switch (_context12.prev = _context12.next) {
|
291
328
|
case 0:
|
292
329
|
_context12.next = 2;
|
293
330
|
return request.post('/model/v1/api/updateRelation', params);
|
331
|
+
|
294
332
|
case 2:
|
295
333
|
return _context12.abrupt("return", _context12.sent);
|
334
|
+
|
296
335
|
case 3:
|
297
336
|
case "end":
|
298
337
|
return _context12.stop();
|
299
338
|
}
|
300
339
|
}, _callee12);
|
301
340
|
}));
|
341
|
+
|
302
342
|
return function updateRelation(_x9) {
|
303
343
|
return _ref12.apply(this, arguments);
|
304
344
|
};
|
@@ -321,26 +361,29 @@ export var updateRelation = /*#__PURE__*/function () {
|
|
321
361
|
]
|
322
362
|
}
|
323
363
|
*/
|
364
|
+
|
324
365
|
export var deleteRelation = /*#__PURE__*/function () {
|
325
|
-
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
326
|
-
return _regeneratorRuntime
|
366
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(params) {
|
367
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
327
368
|
while (1) switch (_context13.prev = _context13.next) {
|
328
369
|
case 0:
|
329
370
|
_context13.next = 2;
|
330
371
|
return request.post('/model/v1/api/deleteRelation', params);
|
372
|
+
|
331
373
|
case 2:
|
332
374
|
return _context13.abrupt("return", _context13.sent);
|
375
|
+
|
333
376
|
case 3:
|
334
377
|
case "end":
|
335
378
|
return _context13.stop();
|
336
379
|
}
|
337
380
|
}, _callee13);
|
338
381
|
}));
|
382
|
+
|
339
383
|
return function deleteRelation(_x10) {
|
340
384
|
return _ref13.apply(this, arguments);
|
341
385
|
};
|
342
386
|
}();
|
343
|
-
|
344
387
|
/** ************************************** 关系定义 end************************************ */
|
345
388
|
|
346
389
|
/** ************************************** 数据字典 start ********************************** */
|
@@ -380,31 +423,35 @@ export var deleteRelation = /*#__PURE__*/function () {
|
|
380
423
|
},
|
381
424
|
...]
|
382
425
|
*/
|
426
|
+
|
383
427
|
export var getCiAttributeDict = /*#__PURE__*/function () {
|
384
|
-
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
385
|
-
return _regeneratorRuntime
|
428
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(param) {
|
429
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
386
430
|
while (1) switch (_context14.prev = _context14.next) {
|
387
431
|
case 0:
|
388
432
|
_context14.next = 2;
|
389
433
|
return request.post('/model/v1/api/getCiAttributeDict', param);
|
434
|
+
|
390
435
|
case 2:
|
391
436
|
return _context14.abrupt("return", _context14.sent);
|
437
|
+
|
392
438
|
case 3:
|
393
439
|
case "end":
|
394
440
|
return _context14.stop();
|
395
441
|
}
|
396
442
|
}, _callee14);
|
397
443
|
}));
|
444
|
+
|
398
445
|
return function getCiAttributeDict(_x11) {
|
399
446
|
return _ref14.apply(this, arguments);
|
400
447
|
};
|
401
448
|
}();
|
402
|
-
|
403
449
|
/**
|
404
450
|
* 获取用户自建的属性(数据字典)
|
405
451
|
* @param {Array} codes ci类型code集合
|
406
452
|
* @returns {Object} {key:{xx:xxx,...}}
|
407
453
|
*/
|
454
|
+
|
408
455
|
export function getUserDicts(_x12) {
|
409
456
|
return _getUserDicts.apply(this, arguments);
|
410
457
|
}
|
@@ -431,16 +478,18 @@ export function getUserDicts(_x12) {
|
|
431
478
|
* }
|
432
479
|
* }
|
433
480
|
*/
|
481
|
+
|
434
482
|
function _getUserDicts() {
|
435
|
-
_getUserDicts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
483
|
+
_getUserDicts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(codes) {
|
436
484
|
var dicts, userDict;
|
437
|
-
return _regeneratorRuntime
|
485
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
438
486
|
while (1) switch (_context29.prev = _context29.next) {
|
439
487
|
case 0:
|
440
488
|
_context29.next = 2;
|
441
489
|
return getCiAttributeDict({
|
442
490
|
ciCode: codes
|
443
491
|
});
|
492
|
+
|
444
493
|
case 2:
|
445
494
|
dicts = _context29.sent;
|
446
495
|
userDict = dicts.reduce(function (map, obj) {
|
@@ -448,6 +497,7 @@ function _getUserDicts() {
|
|
448
497
|
return map;
|
449
498
|
}, {});
|
450
499
|
return _context29.abrupt("return", userDict);
|
500
|
+
|
451
501
|
case 5:
|
452
502
|
case "end":
|
453
503
|
return _context29.stop();
|
@@ -456,28 +506,31 @@ function _getUserDicts() {
|
|
456
506
|
}));
|
457
507
|
return _getUserDicts.apply(this, arguments);
|
458
508
|
}
|
509
|
+
|
459
510
|
export var queryDict = /*#__PURE__*/function () {
|
460
|
-
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
461
|
-
return _regeneratorRuntime
|
511
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(code) {
|
512
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
462
513
|
while (1) switch (_context15.prev = _context15.next) {
|
463
514
|
case 0:
|
464
515
|
_context15.next = 2;
|
465
516
|
return request.post('/model/v1/api/getDict', {
|
466
517
|
code: code
|
467
518
|
});
|
519
|
+
|
468
520
|
case 2:
|
469
521
|
return _context15.abrupt("return", _context15.sent);
|
522
|
+
|
470
523
|
case 3:
|
471
524
|
case "end":
|
472
525
|
return _context15.stop();
|
473
526
|
}
|
474
527
|
}, _callee15);
|
475
528
|
}));
|
529
|
+
|
476
530
|
return function queryDict(_x13) {
|
477
531
|
return _ref15.apply(this, arguments);
|
478
532
|
};
|
479
533
|
}();
|
480
|
-
|
481
534
|
/**
|
482
535
|
* 查询厂商
|
483
536
|
* TODO:由于当前后端只有一个单查厂商的接口,暂使用promise.all形式查询多个
|
@@ -485,9 +538,10 @@ export var queryDict = /*#__PURE__*/function () {
|
|
485
538
|
*
|
486
539
|
* @param {*} vendorKeys 厂商key数组,如['ruijie']
|
487
540
|
*/
|
541
|
+
|
488
542
|
export var queryVendors = /*#__PURE__*/function () {
|
489
|
-
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
490
|
-
return _regeneratorRuntime
|
543
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(vendorKeys) {
|
544
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
491
545
|
while (1) switch (_context16.prev = _context16.next) {
|
492
546
|
case 0:
|
493
547
|
_context16.next = 2;
|
@@ -496,19 +550,21 @@ export var queryVendors = /*#__PURE__*/function () {
|
|
496
550
|
vendor: vendor
|
497
551
|
});
|
498
552
|
}));
|
553
|
+
|
499
554
|
case 2:
|
500
555
|
return _context16.abrupt("return", _context16.sent);
|
556
|
+
|
501
557
|
case 3:
|
502
558
|
case "end":
|
503
559
|
return _context16.stop();
|
504
560
|
}
|
505
561
|
}, _callee16);
|
506
562
|
}));
|
563
|
+
|
507
564
|
return function queryVendors(_x14) {
|
508
565
|
return _ref16.apply(this, arguments);
|
509
566
|
};
|
510
567
|
}();
|
511
|
-
|
512
568
|
/**
|
513
569
|
* 查询全部数据字典
|
514
570
|
* @param {string} source 查询全量:source=null,查询内建:source=system,查询自建: source=custom
|
@@ -537,29 +593,33 @@ export var queryVendors = /*#__PURE__*/function () {
|
|
537
593
|
* ...
|
538
594
|
* ]
|
539
595
|
*/
|
596
|
+
|
540
597
|
export var queryDicts = /*#__PURE__*/function () {
|
541
|
-
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
542
|
-
return _regeneratorRuntime
|
598
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(source) {
|
599
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
543
600
|
while (1) switch (_context17.prev = _context17.next) {
|
544
601
|
case 0:
|
545
602
|
if (source === void 0) {
|
546
603
|
source = null;
|
547
604
|
}
|
605
|
+
|
548
606
|
_context17.next = 3;
|
549
607
|
return modelDictList();
|
608
|
+
|
550
609
|
case 3:
|
551
610
|
return _context17.abrupt("return", _context17.sent);
|
611
|
+
|
552
612
|
case 4:
|
553
613
|
case "end":
|
554
614
|
return _context17.stop();
|
555
615
|
}
|
556
616
|
}, _callee17);
|
557
617
|
}));
|
618
|
+
|
558
619
|
return function queryDicts(_x15) {
|
559
620
|
return _ref17.apply(this, arguments);
|
560
621
|
};
|
561
622
|
}();
|
562
|
-
|
563
623
|
/**
|
564
624
|
* 新建数据字典
|
565
625
|
* @param {object} param
|
@@ -591,26 +651,29 @@ export var queryDicts = /*#__PURE__*/function () {
|
|
591
651
|
* }
|
592
652
|
* }
|
593
653
|
*/
|
654
|
+
|
594
655
|
export var createDict = /*#__PURE__*/function () {
|
595
|
-
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
596
|
-
return _regeneratorRuntime
|
656
|
+
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(param) {
|
657
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
597
658
|
while (1) switch (_context18.prev = _context18.next) {
|
598
659
|
case 0:
|
599
660
|
_context18.next = 2;
|
600
661
|
return request.post('/model/v1/api/createDict', param);
|
662
|
+
|
601
663
|
case 2:
|
602
664
|
return _context18.abrupt("return", _context18.sent);
|
665
|
+
|
603
666
|
case 3:
|
604
667
|
case "end":
|
605
668
|
return _context18.stop();
|
606
669
|
}
|
607
670
|
}, _callee18);
|
608
671
|
}));
|
672
|
+
|
609
673
|
return function createDict(_x16) {
|
610
674
|
return _ref18.apply(this, arguments);
|
611
675
|
};
|
612
676
|
}();
|
613
|
-
|
614
677
|
/**
|
615
678
|
* 编辑数据字典
|
616
679
|
* @param {object} param
|
@@ -635,26 +698,29 @@ export var createDict = /*#__PURE__*/function () {
|
|
635
698
|
*
|
636
699
|
* "dict/000000000051dd09"
|
637
700
|
*/
|
701
|
+
|
638
702
|
export var updateDict = /*#__PURE__*/function () {
|
639
|
-
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
640
|
-
return _regeneratorRuntime
|
703
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(param) {
|
704
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
641
705
|
while (1) switch (_context19.prev = _context19.next) {
|
642
706
|
case 0:
|
643
707
|
_context19.next = 2;
|
644
708
|
return request.post('/model/v1/api/updateDict', param);
|
709
|
+
|
645
710
|
case 2:
|
646
711
|
return _context19.abrupt("return", _context19.sent);
|
712
|
+
|
647
713
|
case 3:
|
648
714
|
case "end":
|
649
715
|
return _context19.stop();
|
650
716
|
}
|
651
717
|
}, _callee19);
|
652
718
|
}));
|
719
|
+
|
653
720
|
return function updateDict(_x17) {
|
654
721
|
return _ref19.apply(this, arguments);
|
655
722
|
};
|
656
723
|
}();
|
657
|
-
|
658
724
|
/**
|
659
725
|
* 删除数据字典
|
660
726
|
* @param {string} id
|
@@ -670,28 +736,31 @@ export var updateDict = /*#__PURE__*/function () {
|
|
670
736
|
*
|
671
737
|
* "000000000051dc4d"
|
672
738
|
*/
|
739
|
+
|
673
740
|
export var deleteDict = /*#__PURE__*/function () {
|
674
|
-
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
675
|
-
return _regeneratorRuntime
|
741
|
+
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(id) {
|
742
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
676
743
|
while (1) switch (_context20.prev = _context20.next) {
|
677
744
|
case 0:
|
678
745
|
_context20.next = 2;
|
679
746
|
return request.post('/model/v1/api/deleteDict', {
|
680
747
|
id: id
|
681
748
|
});
|
749
|
+
|
682
750
|
case 2:
|
683
751
|
return _context20.abrupt("return", _context20.sent);
|
752
|
+
|
684
753
|
case 3:
|
685
754
|
case "end":
|
686
755
|
return _context20.stop();
|
687
756
|
}
|
688
757
|
}, _callee20);
|
689
758
|
}));
|
759
|
+
|
690
760
|
return function deleteDict(_x18) {
|
691
761
|
return _ref20.apply(this, arguments);
|
692
762
|
};
|
693
763
|
}();
|
694
|
-
|
695
764
|
/** ************************************** 数据字典 end ************************************ */
|
696
765
|
|
697
766
|
/** ************************************** ci类型 start ************************************ */
|
@@ -704,26 +773,29 @@ export var deleteDict = /*#__PURE__*/function () {
|
|
704
773
|
}
|
705
774
|
* @returns
|
706
775
|
*/
|
776
|
+
|
707
777
|
export var getCiExtends = /*#__PURE__*/function () {
|
708
|
-
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
709
|
-
return _regeneratorRuntime
|
778
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(param) {
|
779
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
710
780
|
while (1) switch (_context21.prev = _context21.next) {
|
711
781
|
case 0:
|
712
782
|
_context21.next = 2;
|
713
783
|
return request.post('/model/v1/api/getCiExtends', param);
|
784
|
+
|
714
785
|
case 2:
|
715
786
|
return _context21.abrupt("return", _context21.sent);
|
787
|
+
|
716
788
|
case 3:
|
717
789
|
case "end":
|
718
790
|
return _context21.stop();
|
719
791
|
}
|
720
792
|
}, _callee21);
|
721
793
|
}));
|
794
|
+
|
722
795
|
return function getCiExtends(_x19) {
|
723
796
|
return _ref21.apply(this, arguments);
|
724
797
|
};
|
725
798
|
}();
|
726
|
-
|
727
799
|
/**
|
728
800
|
*
|
729
801
|
* 模型接口-ci元数据
|
@@ -731,70 +803,82 @@ export var getCiExtends = /*#__PURE__*/function () {
|
|
731
803
|
* @param {boolean} userVisibleFilter 是否按照模型的userVisible过滤,发现页面不过滤
|
732
804
|
* @param {boolean} dict 是否需要绑定数据字典
|
733
805
|
*/
|
806
|
+
|
734
807
|
export var getCi = /*#__PURE__*/function () {
|
735
|
-
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
808
|
+
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(code, userVisibleFilter, dict) {
|
736
809
|
var meta;
|
737
|
-
return _regeneratorRuntime
|
810
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
738
811
|
while (1) switch (_context22.prev = _context22.next) {
|
739
812
|
case 0:
|
740
813
|
if (userVisibleFilter === void 0) {
|
741
814
|
userVisibleFilter = true;
|
742
815
|
}
|
816
|
+
|
743
817
|
if (dict === void 0) {
|
744
818
|
dict = true;
|
745
819
|
}
|
820
|
+
|
746
821
|
_context22.next = 4;
|
747
822
|
return formatCiAttributes(code, userVisibleFilter);
|
823
|
+
|
748
824
|
case 4:
|
749
825
|
meta = _context22.sent;
|
826
|
+
|
750
827
|
if (!dict) {
|
751
828
|
_context22.next = 14;
|
752
829
|
break;
|
753
830
|
}
|
831
|
+
|
754
832
|
_context22.prev = 6;
|
755
833
|
return _context22.abrupt("return", bindDict(meta));
|
834
|
+
|
756
835
|
case 10:
|
757
836
|
_context22.prev = 10;
|
758
837
|
_context22.t0 = _context22["catch"](6);
|
759
838
|
console.error(_context22.t0);
|
760
839
|
return _context22.abrupt("return", meta);
|
840
|
+
|
761
841
|
case 14:
|
762
842
|
return _context22.abrupt("return", meta);
|
843
|
+
|
763
844
|
case 15:
|
764
845
|
case "end":
|
765
846
|
return _context22.stop();
|
766
847
|
}
|
767
848
|
}, _callee22, null, [[6, 10]]);
|
768
849
|
}));
|
850
|
+
|
769
851
|
return function getCi(_x20, _x21, _x22) {
|
770
852
|
return _ref22.apply(this, arguments);
|
771
853
|
};
|
772
854
|
}();
|
773
|
-
|
774
855
|
/**
|
775
856
|
* 编辑ci类型
|
776
857
|
* @param {string} code
|
777
858
|
*/
|
859
|
+
|
778
860
|
export var updateCi = /*#__PURE__*/function () {
|
779
|
-
var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
780
|
-
return _regeneratorRuntime
|
861
|
+
var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(data) {
|
862
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
781
863
|
while (1) switch (_context23.prev = _context23.next) {
|
782
864
|
case 0:
|
783
865
|
_context23.next = 2;
|
784
866
|
return request.post('/model/v1/api/updateCi', data);
|
867
|
+
|
785
868
|
case 2:
|
786
869
|
return _context23.abrupt("return", _context23.sent);
|
870
|
+
|
787
871
|
case 3:
|
788
872
|
case "end":
|
789
873
|
return _context23.stop();
|
790
874
|
}
|
791
875
|
}, _callee23);
|
792
876
|
}));
|
877
|
+
|
793
878
|
return function updateCi(_x23) {
|
794
879
|
return _ref23.apply(this, arguments);
|
795
880
|
};
|
796
881
|
}();
|
797
|
-
|
798
882
|
/**
|
799
883
|
* 创建ci类型
|
800
884
|
* @param {object} data
|
@@ -824,45 +908,52 @@ export var updateCi = /*#__PURE__*/function () {
|
|
824
908
|
*
|
825
909
|
* "513b7713-4854-496f-9e4a-a4bf85cb0f63"
|
826
910
|
*/
|
911
|
+
|
827
912
|
export var createCi = /*#__PURE__*/function () {
|
828
|
-
var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
829
|
-
return _regeneratorRuntime
|
913
|
+
var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(data) {
|
914
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
830
915
|
while (1) switch (_context24.prev = _context24.next) {
|
831
916
|
case 0:
|
832
917
|
_context24.next = 2;
|
833
918
|
return request.post('/model/v1/api/createCi', data);
|
919
|
+
|
834
920
|
case 2:
|
835
921
|
return _context24.abrupt("return", _context24.sent);
|
922
|
+
|
836
923
|
case 3:
|
837
924
|
case "end":
|
838
925
|
return _context24.stop();
|
839
926
|
}
|
840
927
|
}, _callee24);
|
841
928
|
}));
|
929
|
+
|
842
930
|
return function createCi(_x24) {
|
843
931
|
return _ref24.apply(this, arguments);
|
844
932
|
};
|
845
933
|
}();
|
846
|
-
|
847
934
|
/**
|
848
935
|
* 删除ci类型
|
849
936
|
* @param {Object} param
|
850
937
|
*/
|
938
|
+
|
851
939
|
export var deleteCi = /*#__PURE__*/function () {
|
852
|
-
var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
853
|
-
return _regeneratorRuntime
|
940
|
+
var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(param) {
|
941
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
854
942
|
while (1) switch (_context25.prev = _context25.next) {
|
855
943
|
case 0:
|
856
944
|
_context25.next = 2;
|
857
945
|
return request.post('/model/v1/api/deleteCi', param);
|
946
|
+
|
858
947
|
case 2:
|
859
948
|
return _context25.abrupt("return", _context25.sent);
|
949
|
+
|
860
950
|
case 3:
|
861
951
|
case "end":
|
862
952
|
return _context25.stop();
|
863
953
|
}
|
864
954
|
}, _callee25);
|
865
955
|
}));
|
956
|
+
|
866
957
|
return function deleteCi(_x25) {
|
867
958
|
return _ref25.apply(this, arguments);
|
868
959
|
};
|
@@ -871,21 +962,25 @@ export var deleteCi = /*#__PURE__*/function () {
|
|
871
962
|
* 查询所有 CI 类型
|
872
963
|
* @param {object} params
|
873
964
|
*/
|
965
|
+
|
874
966
|
export var getAllCi = /*#__PURE__*/function () {
|
875
|
-
var _ref26 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
876
|
-
return _regeneratorRuntime
|
967
|
+
var _ref26 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(params) {
|
968
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
877
969
|
while (1) switch (_context26.prev = _context26.next) {
|
878
970
|
case 0:
|
879
971
|
_context26.next = 2;
|
880
972
|
return request.post('/model/v1/api/getAllCi', params);
|
973
|
+
|
881
974
|
case 2:
|
882
975
|
return _context26.abrupt("return", _context26.sent);
|
976
|
+
|
883
977
|
case 3:
|
884
978
|
case "end":
|
885
979
|
return _context26.stop();
|
886
980
|
}
|
887
981
|
}, _callee26);
|
888
982
|
}));
|
983
|
+
|
889
984
|
return function getAllCi(_x26) {
|
890
985
|
return _ref26.apply(this, arguments);
|
891
986
|
};
|
@@ -894,24 +989,27 @@ export var getAllCi = /*#__PURE__*/function () {
|
|
894
989
|
* 获取类型元数据
|
895
990
|
* @param {string} code
|
896
991
|
*/
|
992
|
+
|
897
993
|
export function getCiMeta(_x27) {
|
898
994
|
return _getCiMeta.apply(this, arguments);
|
899
995
|
}
|
900
|
-
|
901
996
|
/**
|
902
997
|
* 格式化ci类型元数据
|
903
998
|
* @param {string} code
|
904
999
|
* @param {boolean} userVisibleFilter
|
905
1000
|
*/
|
1001
|
+
|
906
1002
|
function _getCiMeta() {
|
907
|
-
_getCiMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
908
|
-
return _regeneratorRuntime
|
1003
|
+
_getCiMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(code) {
|
1004
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
909
1005
|
while (1) switch (_context30.prev = _context30.next) {
|
910
1006
|
case 0:
|
911
1007
|
_context30.next = 2;
|
912
1008
|
return request.get("/mdc/v1/api/model-asset/" + code);
|
1009
|
+
|
913
1010
|
case 2:
|
914
1011
|
return _context30.abrupt("return", _context30.sent);
|
1012
|
+
|
915
1013
|
case 3:
|
916
1014
|
case "end":
|
917
1015
|
return _context30.stop();
|
@@ -920,36 +1018,45 @@ function _getCiMeta() {
|
|
920
1018
|
}));
|
921
1019
|
return _getCiMeta.apply(this, arguments);
|
922
1020
|
}
|
1021
|
+
|
923
1022
|
function formatCiAttributes(_x28, _x29) {
|
924
1023
|
return _formatCiAttributes.apply(this, arguments);
|
925
1024
|
} // 属性为用户字典
|
1025
|
+
|
1026
|
+
|
926
1027
|
function _formatCiAttributes() {
|
927
|
-
_formatCiAttributes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
1028
|
+
_formatCiAttributes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(code, userVisibleFilter) {
|
928
1029
|
var meta, attributes;
|
929
|
-
return _regeneratorRuntime
|
1030
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
930
1031
|
while (1) switch (_context31.prev = _context31.next) {
|
931
1032
|
case 0:
|
932
1033
|
_context31.next = 2;
|
933
1034
|
return request.post('/model/v1/api/getCi', {
|
934
1035
|
code: code
|
935
1036
|
});
|
1037
|
+
|
936
1038
|
case 2:
|
937
1039
|
meta = _context31.sent;
|
1040
|
+
|
938
1041
|
if (!meta) {
|
939
1042
|
_context31.next = 9;
|
940
1043
|
break;
|
941
1044
|
}
|
1045
|
+
|
942
1046
|
attributes = meta.attributes;
|
1047
|
+
|
943
1048
|
if (attributes) {
|
944
1049
|
_context31.next = 7;
|
945
1050
|
break;
|
946
1051
|
}
|
1052
|
+
|
947
1053
|
return _context31.abrupt("return", meta);
|
1054
|
+
|
948
1055
|
case 7:
|
949
1056
|
try {
|
950
1057
|
// 适配后端,使属性正序
|
951
|
-
attributes = attributes.reverse();
|
952
|
-
|
1058
|
+
attributes = attributes.reverse(); // 获取过滤userVisible=true的属性(用户可见)
|
1059
|
+
|
953
1060
|
if (userVisibleFilter) {
|
954
1061
|
meta.attributes = attributes.filter(function (item) {
|
955
1062
|
return item.userVisible === 'true';
|
@@ -958,9 +1065,12 @@ function _formatCiAttributes() {
|
|
958
1065
|
} catch (error) {
|
959
1066
|
rlog.error('services=>model=>:', error);
|
960
1067
|
}
|
1068
|
+
|
961
1069
|
return _context31.abrupt("return", meta);
|
1070
|
+
|
962
1071
|
case 9:
|
963
1072
|
return _context31.abrupt("return", meta);
|
1073
|
+
|
964
1074
|
case 10:
|
965
1075
|
case "end":
|
966
1076
|
return _context31.stop();
|
@@ -969,35 +1079,41 @@ function _formatCiAttributes() {
|
|
969
1079
|
}));
|
970
1080
|
return _formatCiAttributes.apply(this, arguments);
|
971
1081
|
}
|
1082
|
+
|
972
1083
|
var ATTRIBUTE_USER_DICT = 'userDict';
|
973
1084
|
/**
|
974
1085
|
* 为属性绑定“数据字典”数据
|
975
1086
|
* @param {object} data
|
976
1087
|
*/
|
1088
|
+
|
977
1089
|
function bindDict(data) {
|
978
1090
|
var meta = _extends({}, data);
|
1091
|
+
|
979
1092
|
var visibleAttributes = meta.attributes;
|
980
1093
|
meta.attributes = visibleAttributes.map(function (item) {
|
981
1094
|
var attr = _extends({}, item);
|
1095
|
+
|
982
1096
|
var dataSource = attr.dataSource,
|
983
|
-
|
984
|
-
|
985
|
-
if (isNull(attr.changeValue)) return attr;
|
986
|
-
|
1097
|
+
dictCode = attr.dictCode,
|
1098
|
+
code = attr.code;
|
1099
|
+
if (isNull(attr.changeValue)) return attr; // 用户自定义数据字典key为dictCode
|
1100
|
+
|
987
1101
|
var key = ATTRIBUTE_USER_DICT === dataSource ? dictCode : code;
|
1102
|
+
|
988
1103
|
if (DICT.get(key)) {
|
989
1104
|
attr.dict = DICT.get(key).items;
|
990
1105
|
return attr;
|
991
1106
|
}
|
1107
|
+
|
992
1108
|
console.error("\u627E\u4E0D\u5230 " + attr.name + " \u5BF9\u5E94\u7684\u6570\u636E\u5B57\u5178");
|
993
1109
|
return attr;
|
994
1110
|
});
|
995
1111
|
return meta;
|
996
1112
|
}
|
1113
|
+
|
997
1114
|
export function queryAllModel(_x30) {
|
998
1115
|
return _queryAllModel.apply(this, arguments);
|
999
1116
|
}
|
1000
|
-
|
1001
1117
|
/**
|
1002
1118
|
* 查询知识库分类列表
|
1003
1119
|
*/
|
@@ -1011,27 +1127,34 @@ export function queryAllModel(_x30) {
|
|
1011
1127
|
/** *
|
1012
1128
|
* 批量查询ci属性
|
1013
1129
|
*/
|
1130
|
+
|
1014
1131
|
function _queryAllModel() {
|
1015
|
-
_queryAllModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
1016
|
-
return _regeneratorRuntime
|
1132
|
+
_queryAllModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(isAuth) {
|
1133
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
1017
1134
|
while (1) switch (_context32.prev = _context32.next) {
|
1018
1135
|
case 0:
|
1019
1136
|
if (isAuth === void 0) {
|
1020
1137
|
isAuth = false;
|
1021
1138
|
}
|
1139
|
+
|
1022
1140
|
if (!isAuth) {
|
1023
1141
|
_context32.next = 5;
|
1024
1142
|
break;
|
1025
1143
|
}
|
1144
|
+
|
1026
1145
|
_context32.next = 4;
|
1027
1146
|
return request.post('/model/v1/api/authority/modelTree');
|
1147
|
+
|
1028
1148
|
case 4:
|
1029
1149
|
return _context32.abrupt("return", _context32.sent);
|
1150
|
+
|
1030
1151
|
case 5:
|
1031
1152
|
_context32.next = 7;
|
1032
1153
|
return request.get('/mdc/v1/api/model-asset/tree');
|
1154
|
+
|
1033
1155
|
case 7:
|
1034
1156
|
return _context32.abrupt("return", _context32.sent);
|
1157
|
+
|
1035
1158
|
case 8:
|
1036
1159
|
case "end":
|
1037
1160
|
return _context32.stop();
|
@@ -1040,23 +1163,27 @@ function _queryAllModel() {
|
|
1040
1163
|
}));
|
1041
1164
|
return _queryAllModel.apply(this, arguments);
|
1042
1165
|
}
|
1166
|
+
|
1043
1167
|
export var getBatchCi = /*#__PURE__*/function () {
|
1044
|
-
var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
1045
|
-
return _regeneratorRuntime
|
1168
|
+
var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(typeCodes) {
|
1169
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
1046
1170
|
while (1) switch (_context27.prev = _context27.next) {
|
1047
1171
|
case 0:
|
1048
1172
|
_context27.next = 2;
|
1049
1173
|
return request.post('/model/v1/api/getBatchCi', {
|
1050
1174
|
typeCodes: typeCodes
|
1051
1175
|
});
|
1176
|
+
|
1052
1177
|
case 2:
|
1053
1178
|
return _context27.abrupt("return", _context27.sent);
|
1179
|
+
|
1054
1180
|
case 3:
|
1055
1181
|
case "end":
|
1056
1182
|
return _context27.stop();
|
1057
1183
|
}
|
1058
1184
|
}, _callee27);
|
1059
1185
|
}));
|
1186
|
+
|
1060
1187
|
return function getBatchCi(_x31) {
|
1061
1188
|
return _ref27.apply(this, arguments);
|
1062
1189
|
};
|
@@ -1064,23 +1191,27 @@ export var getBatchCi = /*#__PURE__*/function () {
|
|
1064
1191
|
/** *
|
1065
1192
|
* 批量查询ci属性
|
1066
1193
|
*/
|
1194
|
+
|
1067
1195
|
export var getBatchCiMetric = /*#__PURE__*/function () {
|
1068
|
-
var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime
|
1069
|
-
return _regeneratorRuntime
|
1196
|
+
var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(typeCodes) {
|
1197
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
1070
1198
|
while (1) switch (_context28.prev = _context28.next) {
|
1071
1199
|
case 0:
|
1072
1200
|
_context28.next = 2;
|
1073
1201
|
return request.post('/model/v1/api/getBatchCiMetric', {
|
1074
1202
|
typeCodes: typeCodes
|
1075
1203
|
});
|
1204
|
+
|
1076
1205
|
case 2:
|
1077
1206
|
return _context28.abrupt("return", _context28.sent);
|
1207
|
+
|
1078
1208
|
case 3:
|
1079
1209
|
case "end":
|
1080
1210
|
return _context28.stop();
|
1081
1211
|
}
|
1082
1212
|
}, _callee28);
|
1083
1213
|
}));
|
1214
|
+
|
1084
1215
|
return function getBatchCiMetric(_x32) {
|
1085
1216
|
return _ref28.apply(this, arguments);
|
1086
1217
|
};
|