@riil-frontend/component-topology 6.0.0-alpha.3 → 6.0.0-alpha.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 +1 -1
- package/build/index.js +35 -35
- package/es/components/ColorPanel/components/ColorBlock/index.js +37 -0
- package/es/components/ColorPanel/components/ColorBlock/index.module.scss +8 -0
- package/es/components/ColorPanel/components/FontColorRange/index.js +35 -0
- package/es/components/ColorPanel/components/FontColorRange/index.module.scss +23 -0
- package/es/components/ColorPanel/index.js +237 -0
- package/es/components/ColorPanel/index.module.scss +34 -0
- package/es/components/VerticalIconTab/VerticalIconTab.module.scss +5 -1
- package/es/components/collapse/Collapse.js +22 -3
- package/es/components/collapse/Collapse.module.scss +23 -0
- package/es/components/collapse/index.js +2 -0
- package/es/core/common/hooks/useHtElements.js +21 -0
- package/es/core/common/icons/icon.js +41 -0
- package/es/core/common/icons/useIcons.js +8 -16
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +14 -13
- package/es/core/components/AlarmListPanel/components/index.module.scss +5 -5
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +6 -2
- package/es/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +122 -0
- package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +0 -3
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +76 -19
- package/es/core/components/TopoView/GraphViewPanel.js +20 -0
- package/es/core/components/TopoView/editor.module.scss +1 -0
- package/es/core/components/TopoView/topoView.js +29 -49
- package/es/core/components/titlebar/TitleBar.module.scss +1 -1
- package/es/core/editor/components/Sidebar/Sidebar.js +40 -50
- package/es/core/editor/components/Sidebar/panes.js +32 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +96 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +74 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/index.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +3 -3
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -5
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -4
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +20 -7
- package/es/core/editor/components/Toolbar/EditorToolbar.js +23 -13
- package/es/core/editor/components/Toolbar/Toolbar.js +1 -1
- package/es/core/editor/components/Toolbar/Toolbar.module.scss +14 -3
- package/es/core/editor/components/Toolbar/buttons.js +20 -18
- package/es/core/editor/components/Toolbar/hooks/useFontStyleSetting.js +35 -0
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +8 -7
- package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -2
- package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -2
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +36 -2
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +76 -5
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +184 -3
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +44 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +53 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.module.scss +31 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +77 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +59 -6
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +36 -4
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +35 -0
- package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +12 -2
- package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +12 -2
- package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +3 -2
- package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +5 -4
- package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +109 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/constant.js +64 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +101 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +153 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +49 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +99 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +42 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +75 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +23 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +10 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +31 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +128 -15
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +115 -22
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +12 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +15 -5
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +41 -7
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +94 -13
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +15 -22
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
- package/es/core/editor/components/settings/CloseablePanel.js +28 -0
- package/es/core/editor/components/settings/OpenPropertyPanelListener.js +33 -0
- package/es/core/editor/components/settings/PropertyView.js +27 -8
- package/es/core/editor/components/settings/Settings.js +4 -44
- package/es/core/editor/components/settings/Settings.module.scss +8 -4
- package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +76 -0
- package/es/core/editor/components/settings/common/AlignSetting/index.js +20 -71
- package/es/core/editor/components/settings/common/LineType/index.js +12 -119
- package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +3 -3
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +31 -21
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +7 -6
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +8 -9
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -42
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
- package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -6
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +8 -4
- package/es/core/editor/hooks/useKeyboardShortcut.js +42 -0
- package/es/core/{store/models → editor/store}/background.js +0 -0
- package/es/core/{store/models → editor/store}/historyManager.js +0 -0
- package/es/core/editor/store/topoEdit.js +49 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +96 -0
- package/es/core/hooks/useCanvasTheme.js +35 -0
- package/es/core/hooks/useTopoEdit.js +38 -58
- package/es/core/models/Alarm.js +2 -2
- package/es/core/models/HistoryManager.js +10 -3
- package/es/core/models/SelectionManager.js +16 -1
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/TopoGraphView.js +8 -2
- package/es/core/models/utils/linkUtils.js +1 -1
- package/es/core/store/coreModels.js +6 -7
- package/es/core/store/models/selection.js +2 -1
- package/es/core/store/models/topoBizMod.js +0 -3
- package/es/core/store/models/topoMod.js +26 -28
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +13 -29
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +6 -5
- package/es/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
- package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
- package/es/networkTopo/createTopo.js +2 -0
- package/es/networkTopo/services/link.js +2 -2
- package/es/networkTopo/store/topoTreeMod.js +6 -7
- package/es/style.js +1 -0
- package/es/utils/topoData.js +1 -0
- package/lib/components/ColorPanel/components/ColorBlock/index.js +47 -0
- package/lib/components/ColorPanel/components/ColorBlock/index.module.scss +8 -0
- package/lib/components/ColorPanel/components/FontColorRange/index.js +49 -0
- package/lib/components/ColorPanel/components/FontColorRange/index.module.scss +23 -0
- package/lib/components/ColorPanel/index.js +255 -0
- package/lib/components/ColorPanel/index.module.scss +34 -0
- package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +5 -1
- package/lib/components/collapse/Collapse.js +28 -3
- package/lib/components/collapse/Collapse.module.scss +23 -0
- package/lib/components/collapse/index.js +11 -0
- package/lib/core/common/hooks/useHtElements.js +27 -0
- package/lib/core/common/icons/icon.js +48 -0
- package/lib/core/common/icons/useIcons.js +10 -15
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +14 -13
- package/lib/core/components/AlarmListPanel/components/index.module.scss +5 -5
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +7 -2
- package/lib/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +147 -0
- package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +0 -3
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +76 -19
- package/lib/core/components/TopoView/GraphViewPanel.js +30 -0
- package/lib/core/components/TopoView/editor.module.scss +1 -0
- package/lib/core/components/TopoView/topoView.js +32 -50
- package/lib/core/components/titlebar/TitleBar.module.scss +1 -1
- package/lib/core/editor/components/Sidebar/Sidebar.js +39 -53
- package/lib/core/editor/components/Sidebar/panes.js +45 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +109 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +74 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -5
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +3 -4
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +29 -11
- package/lib/core/editor/components/Toolbar/EditorToolbar.js +22 -11
- package/lib/core/editor/components/Toolbar/Toolbar.js +1 -1
- package/lib/core/editor/components/Toolbar/Toolbar.module.scss +14 -3
- package/lib/core/editor/components/Toolbar/buttons.js +21 -20
- package/lib/core/editor/components/Toolbar/hooks/useFontStyleSetting.js +50 -0
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +8 -7
- package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -2
- package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -2
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +38 -2
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +77 -5
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +194 -3
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +44 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +71 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.module.scss +31 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +83 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +61 -5
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +39 -4
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +35 -0
- package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +13 -2
- package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +13 -2
- package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +4 -2
- package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +5 -3
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +126 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/constant.js +69 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +117 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +153 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +61 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +116 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +55 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +93 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +32 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +22 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +44 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +133 -16
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +118 -22
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +12 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +21 -5
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +41 -6
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +96 -12
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +16 -22
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +4 -2
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
- package/lib/core/editor/components/settings/CloseablePanel.js +40 -0
- package/lib/core/editor/components/settings/OpenPropertyPanelListener.js +43 -0
- package/lib/core/editor/components/settings/PropertyView.js +30 -8
- package/lib/core/editor/components/settings/Settings.js +4 -44
- package/lib/core/editor/components/settings/Settings.module.scss +8 -4
- package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +93 -0
- package/lib/core/editor/components/settings/common/AlignSetting/index.js +21 -79
- package/lib/core/editor/components/settings/common/LineType/index.js +13 -126
- package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +2 -2
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +32 -23
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +6 -6
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +6 -8
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -42
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
- package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +7 -5
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -1
- package/lib/core/editor/hooks/useKeyboardShortcut.js +52 -0
- package/lib/core/{store/models → editor/store}/background.js +0 -0
- package/lib/core/{store/models → editor/store}/historyManager.js +0 -0
- package/lib/core/editor/store/topoEdit.js +59 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +109 -0
- package/lib/core/hooks/useCanvasTheme.js +49 -0
- package/lib/core/hooks/useTopoEdit.js +39 -60
- package/lib/core/models/Alarm.js +2 -2
- package/lib/core/models/HistoryManager.js +10 -3
- package/lib/core/models/SelectionManager.js +17 -1
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/TopoGraphView.js +8 -2
- package/lib/core/models/utils/linkUtils.js +1 -1
- package/lib/core/store/coreModels.js +5 -7
- package/lib/core/store/models/selection.js +2 -1
- package/lib/core/store/models/topoBizMod.js +0 -3
- package/lib/core/store/models/topoMod.js +27 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +13 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +6 -5
- package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
- package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
- package/lib/networkTopo/createTopo.js +3 -0
- package/lib/networkTopo/services/link.js +2 -2
- package/lib/networkTopo/store/topoTreeMod.js +6 -8
- package/lib/style.js +1 -0
- package/lib/utils/topoData.js +1 -0
- package/package.json +4 -4
- package/es/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -4
- package/es/core/store/models/topoEdit.js +0 -39
- package/es/core/store/models/topoView.js +0 -36
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -12
- package/lib/core/store/models/topoEdit.js +0 -51
- package/lib/core/store/models/topoView.js +0 -47
@@ -37,46 +37,30 @@ function WebConsoleForm(props) {
|
|
37
37
|
webConsoleUrl = _useWebConsole.webConsoleUrl,
|
38
38
|
save = _useWebConsole.save;
|
39
39
|
|
40
|
-
var _useState = (0, _react.useState)(
|
40
|
+
var _useState = (0, _react.useState)(false),
|
41
41
|
isEdit = _useState[0],
|
42
|
-
|
43
|
-
|
44
|
-
var _useState2 = (0, _react.useState)(false),
|
45
|
-
isSave = _useState2[0],
|
46
|
-
handleSaveBtn = _useState2[1];
|
47
|
-
|
48
|
-
var _useState3 = (0, _react.useState)(false),
|
49
|
-
isShow = _useState3[0],
|
50
|
-
handleEdit = _useState3[1];
|
42
|
+
setIsEdit = _useState[1];
|
51
43
|
|
52
44
|
var field = _field["default"].useField({
|
53
45
|
autoUnmount: true,
|
54
|
-
values: {
|
55
|
-
|
56
|
-
|
57
|
-
}
|
46
|
+
values: {
|
47
|
+
url: webConsoleUrl || ''
|
48
|
+
},
|
49
|
+
onChange: function onChange(name, value) {}
|
58
50
|
});
|
59
51
|
|
60
52
|
(0, _react.useEffect)(function () {
|
61
|
-
field.setValue('url', webConsoleUrl);
|
53
|
+
field.setValue('url', webConsoleUrl || '');
|
54
|
+
field.validate();
|
62
55
|
}, [webConsoleUrl]);
|
63
|
-
(0, _react.useEffect)(function () {
|
64
|
-
field.getError('url') == null ? handleSaveBtn(false) : handleSaveBtn(true);
|
65
|
-
}, [field.getError('url')]);
|
66
56
|
|
67
57
|
function handleEditLink() {
|
68
|
-
|
69
|
-
handleEdit(true);
|
58
|
+
setIsEdit(true);
|
70
59
|
}
|
71
60
|
|
72
61
|
function saveData() {
|
73
62
|
save(field.getValue('url'));
|
74
|
-
|
75
|
-
return !isShow;
|
76
|
-
});
|
77
|
-
handleInput(function (isEdit) {
|
78
|
-
return !isEdit;
|
79
|
-
});
|
63
|
+
setIsEdit(false);
|
80
64
|
}
|
81
65
|
|
82
66
|
return /*#__PURE__*/_react["default"].createElement(_loading["default"], {
|
@@ -104,10 +88,10 @@ function WebConsoleForm(props) {
|
|
104
88
|
name: "url",
|
105
89
|
placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740",
|
106
90
|
trim: true,
|
107
|
-
disabled: isEdit
|
108
|
-
})), /*#__PURE__*/_react["default"].createElement(FormItem, null,
|
91
|
+
disabled: !isEdit
|
92
|
+
})), /*#__PURE__*/_react["default"].createElement(FormItem, null, isEdit ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
109
93
|
type: "primary",
|
110
|
-
disabled:
|
94
|
+
disabled: !!field.getError('url'),
|
111
95
|
onClick: saveData,
|
112
96
|
name: "baocun"
|
113
97
|
}, "\u4FDD\u5B58")) : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
@@ -71,16 +71,17 @@ function useWebConsole(props) {
|
|
71
71
|
var requestWebConsoleUrl = (0, _ahooks.useRequest)(queryWebConsoleUrlById, {
|
72
72
|
manual: true,
|
73
73
|
onSuccess: function onSuccess(result) {
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
74
|
+
var url = result;
|
75
|
+
|
76
|
+
if (!url && ipv4Address) {
|
77
|
+
url = "http://" + ipv4Address;
|
78
78
|
}
|
79
79
|
|
80
|
-
setWebConsoleUrl(
|
80
|
+
setWebConsoleUrl(url);
|
81
81
|
}
|
82
82
|
});
|
83
83
|
(0, _react.useEffect)(function () {
|
84
|
+
setWebConsoleUrl(null);
|
84
85
|
requestWebConsoleUrl.run(ciId);
|
85
86
|
}, [ciId]); // 保存Web控制台url
|
86
87
|
|
@@ -25,7 +25,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
25
25
|
function SettingButton(props) {
|
26
26
|
var topo = props.topo,
|
27
27
|
displaySettingProps = props.displaySettingProps,
|
28
|
-
style = props.style
|
28
|
+
style = props.style,
|
29
|
+
isEditor = props.isEditor;
|
29
30
|
|
30
31
|
var _useState = (0, _react.useState)(false),
|
31
32
|
visible = _useState[0],
|
@@ -54,6 +55,7 @@ function SettingButton(props) {
|
|
54
55
|
})), /*#__PURE__*/_react["default"].createElement(_DisplaySettingDrawer["default"], {
|
55
56
|
visible: visible,
|
56
57
|
topo: topo,
|
58
|
+
isEditor: isEditor,
|
57
59
|
displaySettingProps: displaySettingProps,
|
58
60
|
onClose: function onClose() {
|
59
61
|
setVisible(false);
|
@@ -17,11 +17,13 @@ var _SettingButton = _interopRequireDefault(require("./SettingButton"));
|
|
17
17
|
function SettingButtonWidget(props) {
|
18
18
|
var topo = props.topo,
|
19
19
|
viewerProps = props.viewerProps,
|
20
|
-
style = props.style
|
20
|
+
style = props.style,
|
21
|
+
isEditor = props.isEditor;
|
21
22
|
return /*#__PURE__*/_react["default"].createElement(_SettingButton["default"], {
|
22
23
|
topo: topo,
|
23
24
|
displaySettingProps: viewerProps === null || viewerProps === void 0 ? void 0 : viewerProps.displaySettingProps,
|
24
|
-
style: style
|
25
|
+
style: style,
|
26
|
+
isEditor: isEditor
|
25
27
|
});
|
26
28
|
}
|
27
29
|
|
@@ -10,8 +10,11 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
10
10
|
|
11
11
|
var _TopoCenter = _interopRequireDefault(require("./models/TopoCenter"));
|
12
12
|
|
13
|
+
var _services = _interopRequireDefault(require("./services"));
|
14
|
+
|
13
15
|
function createTopo(options) {
|
14
16
|
var topoApp = new _TopoCenter["default"]((0, _extends2["default"])({}, options));
|
17
|
+
topoApp.serverApi = _services["default"];
|
15
18
|
return topoApp;
|
16
19
|
}
|
17
20
|
|
@@ -173,10 +173,10 @@ var _default = {
|
|
173
173
|
// const idtxt = `'${ids[0]}','${ids[1]}'`;
|
174
174
|
stag = ids[0];
|
175
175
|
ttag = ids[1];
|
176
|
-
condition = "type('network_link') && !
|
176
|
+
condition = "type('network_link') && !destination_id && network_link.source_device_id ='" + stag + "'";
|
177
177
|
|
178
178
|
if (ttag) {
|
179
|
-
condition = "type('network_link') && !
|
179
|
+
condition = "type('network_link') && !destination_id && network_link.source_device_id ='" + stag + "' && network_link.destination_device_id='" + ttag + "'";
|
180
180
|
}
|
181
181
|
|
182
182
|
parm = {
|
@@ -13,8 +13,6 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
13
13
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
15
15
|
|
16
|
-
var _services = _interopRequireDefault(require("../services"));
|
17
|
-
|
18
16
|
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
19
17
|
|
20
18
|
var _tree = require("../../utils/tree");
|
@@ -101,7 +99,7 @@ function _default(topoApp) {
|
|
101
99
|
}
|
102
100
|
|
103
101
|
_context2.next = 4;
|
104
|
-
return
|
102
|
+
return topoApp.serverApi.getTopoTree();
|
105
103
|
|
106
104
|
case 4:
|
107
105
|
resTreeData = _context2.sent;
|
@@ -110,7 +108,7 @@ function _default(topoApp) {
|
|
110
108
|
|
111
109
|
case 7:
|
112
110
|
_context2.next = 9;
|
113
|
-
return
|
111
|
+
return topoApp.serverApi.getTopoTreeByLoginUser();
|
114
112
|
|
115
113
|
case 9:
|
116
114
|
resTreeData = _context2.sent;
|
@@ -177,7 +175,7 @@ function _default(topoApp) {
|
|
177
175
|
_rlog["default"].debug('editTopoOnTree', conditions);
|
178
176
|
|
179
177
|
_context4.next = 4;
|
180
|
-
return
|
178
|
+
return topoApp.serverApi.editTopoonTree(parseInt(conditions.id, 10), conditions.name, conditions.type);
|
181
179
|
|
182
180
|
case 4:
|
183
181
|
resTreeData = _context4.sent;
|
@@ -263,7 +261,7 @@ function _default(topoApp) {
|
|
263
261
|
|
264
262
|
case 8:
|
265
263
|
_context5.next = 10;
|
266
|
-
return
|
264
|
+
return topoApp.serverApi.deleteTopoonTree(parseInt(conditions, 10));
|
267
265
|
|
268
266
|
case 10:
|
269
267
|
return _context5.abrupt("return", _context5.sent);
|
@@ -287,7 +285,7 @@ function _default(topoApp) {
|
|
287
285
|
|
288
286
|
case 18:
|
289
287
|
_context5.next = 20;
|
290
|
-
return
|
288
|
+
return topoApp.serverApi.deleteTopoonTree(parseInt(conditions, 10));
|
291
289
|
|
292
290
|
case 20:
|
293
291
|
return _context5.abrupt("return", _context5.sent);
|
@@ -316,7 +314,7 @@ function _default(topoApp) {
|
|
316
314
|
_rlog["default"].debug('setDefTopoOnTree', conditions);
|
317
315
|
|
318
316
|
_context6.next = 4;
|
319
|
-
return
|
317
|
+
return topoApp.serverApi.setDefTopo(parseInt(conditions, 10));
|
320
318
|
|
321
319
|
case 4:
|
322
320
|
resTreeData = _context6.sent;
|
package/lib/style.js
CHANGED
package/lib/utils/topoData.js
CHANGED
@@ -366,6 +366,7 @@ function buildGlobal(_ref2) {
|
|
366
366
|
showLinkName: false,
|
367
367
|
// 是否显示链路名称
|
368
368
|
nodeLabelStyle: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nodeLabelStyle,
|
369
|
+
defaultEdgeLabelStyle: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.defaultEdgeLabelStyle,
|
369
370
|
edgeFlow: edgeFlow
|
370
371
|
}, (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.topoDisplayConfig) || {}, (result === null || result === void 0 ? void 0 : (_result$customGlobal2 = result.customGlobal) === null || _result$customGlobal2 === void 0 ? void 0 : _result$customGlobal2.topoDisplayConfig) || {}),
|
371
372
|
linkTo: linkTo,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "6.0.0-alpha.
|
3
|
+
"version": "6.0.0-alpha.30",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -61,7 +61,7 @@
|
|
61
61
|
"@riil-frontend/component-action-tree": "^1.0.13",
|
62
62
|
"@riil-frontend/component-common-res-list": "^1.0.13",
|
63
63
|
"@riil-frontend/component-condition-res-list": "^1.0.18",
|
64
|
-
"@riil-frontend/component-crucial-link-topo": "0.
|
64
|
+
"@riil-frontend/component-crucial-link-topo": "0.1.0",
|
65
65
|
"@riil-frontend/component-extra-title": "^1.0.3",
|
66
66
|
"@riil-frontend/component-more-buttons-menu": "^2.0.1",
|
67
67
|
"@riil-frontend/component-no-data-page": "^3.0.4",
|
@@ -73,7 +73,7 @@
|
|
73
73
|
"@riil-frontend/component-table-filter-tags": "latest",
|
74
74
|
"@riil-frontend/component-table-layout": "^2.0.2",
|
75
75
|
"@riil-frontend/component-topology-common": "^1.1.2",
|
76
|
-
"@riil-frontend/component-topology-graph": "^2.
|
76
|
+
"@riil-frontend/component-topology-graph": "^2.8.0",
|
77
77
|
"@riil-frontend/css": "^2.0.2",
|
78
78
|
"@riil-frontend/hooks": "latest",
|
79
79
|
"@riil-frontend/next-collapse": "^1.0.1-a.0",
|
@@ -115,6 +115,6 @@
|
|
115
115
|
"access": "public"
|
116
116
|
},
|
117
117
|
"license": "MIT",
|
118
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.
|
118
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.30/build/index.html",
|
119
119
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
120
120
|
}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
3
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
4
|
-
|
5
|
-
/**
|
6
|
-
* 拓扑编辑 Model
|
7
|
-
*/
|
8
|
-
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
9
|
-
import topoService from '@riil-frontend/component-topology-common/es/services/topo';
|
10
|
-
export default {
|
11
|
-
// 定义 model 的初始 state
|
12
|
-
state: {
|
13
|
-
saving: false
|
14
|
-
},
|
15
|
-
// 定义改变该模型状态的纯函数
|
16
|
-
reducers: {
|
17
|
-
update: function update(prevState, payload) {
|
18
|
-
return _extends({}, prevState, payload);
|
19
|
-
}
|
20
|
-
},
|
21
|
-
// 定义处理该模型副作用的函数
|
22
|
-
effects: function effects(dispatch) {
|
23
|
-
return {
|
24
|
-
init: function init(payload, rootState) {
|
25
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
26
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
27
|
-
while (1) {
|
28
|
-
switch (_context.prev = _context.next) {
|
29
|
-
case 0:
|
30
|
-
case "end":
|
31
|
-
return _context.stop();
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}, _callee);
|
35
|
-
}))();
|
36
|
-
}
|
37
|
-
};
|
38
|
-
}
|
39
|
-
};
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
3
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
4
|
-
|
5
|
-
/**
|
6
|
-
* 拓扑图 Model
|
7
|
-
*/
|
8
|
-
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
9
|
-
export default {
|
10
|
-
// 定义 model 的初始 state
|
11
|
-
state: {},
|
12
|
-
// 定义改变该模型状态的纯函数
|
13
|
-
reducers: {
|
14
|
-
update: function update(prevState, payload) {
|
15
|
-
return _extends({}, prevState, payload);
|
16
|
-
}
|
17
|
-
},
|
18
|
-
// 定义处理该模型副作用的函数
|
19
|
-
effects: function effects(dispatch) {
|
20
|
-
return {
|
21
|
-
init: function init(payload, rootState) {
|
22
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
23
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
24
|
-
while (1) {
|
25
|
-
switch (_context.prev = _context.next) {
|
26
|
-
case 0:
|
27
|
-
case "end":
|
28
|
-
return _context.stop();
|
29
|
-
}
|
30
|
-
}
|
31
|
-
}, _callee);
|
32
|
-
}))();
|
33
|
-
}
|
34
|
-
};
|
35
|
-
}
|
36
|
-
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
exports.__esModule = true;
|
6
|
-
exports["default"] = ImagePanel;
|
7
|
-
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
9
|
-
|
10
|
-
function ImagePanel(props) {
|
11
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, "ImagePanel");
|
12
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
exports.__esModule = true;
|
6
|
-
exports["default"] = void 0;
|
7
|
-
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
9
|
-
|
10
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
11
|
-
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
|
-
|
14
|
-
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
15
|
-
|
16
|
-
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
17
|
-
|
18
|
-
/**
|
19
|
-
* 拓扑编辑 Model
|
20
|
-
*/
|
21
|
-
var _default = {
|
22
|
-
// 定义 model 的初始 state
|
23
|
-
state: {
|
24
|
-
saving: false
|
25
|
-
},
|
26
|
-
// 定义改变该模型状态的纯函数
|
27
|
-
reducers: {
|
28
|
-
update: function update(prevState, payload) {
|
29
|
-
return (0, _extends2["default"])({}, prevState, payload);
|
30
|
-
}
|
31
|
-
},
|
32
|
-
// 定义处理该模型副作用的函数
|
33
|
-
effects: function effects(dispatch) {
|
34
|
-
return {
|
35
|
-
init: function init(payload, rootState) {
|
36
|
-
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
37
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
38
|
-
while (1) {
|
39
|
-
switch (_context.prev = _context.next) {
|
40
|
-
case 0:
|
41
|
-
case "end":
|
42
|
-
return _context.stop();
|
43
|
-
}
|
44
|
-
}
|
45
|
-
}, _callee);
|
46
|
-
}))();
|
47
|
-
}
|
48
|
-
};
|
49
|
-
}
|
50
|
-
};
|
51
|
-
exports["default"] = _default;
|
@@ -1,47 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
exports.__esModule = true;
|
6
|
-
exports["default"] = void 0;
|
7
|
-
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
9
|
-
|
10
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
11
|
-
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
|
-
|
14
|
-
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
15
|
-
|
16
|
-
/**
|
17
|
-
* 拓扑图 Model
|
18
|
-
*/
|
19
|
-
var _default = {
|
20
|
-
// 定义 model 的初始 state
|
21
|
-
state: {},
|
22
|
-
// 定义改变该模型状态的纯函数
|
23
|
-
reducers: {
|
24
|
-
update: function update(prevState, payload) {
|
25
|
-
return (0, _extends2["default"])({}, prevState, payload);
|
26
|
-
}
|
27
|
-
},
|
28
|
-
// 定义处理该模型副作用的函数
|
29
|
-
effects: function effects(dispatch) {
|
30
|
-
return {
|
31
|
-
init: function init(payload, rootState) {
|
32
|
-
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
33
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
34
|
-
while (1) {
|
35
|
-
switch (_context.prev = _context.next) {
|
36
|
-
case 0:
|
37
|
-
case "end":
|
38
|
-
return _context.stop();
|
39
|
-
}
|
40
|
-
}
|
41
|
-
}, _callee);
|
42
|
-
}))();
|
43
|
-
}
|
44
|
-
};
|
45
|
-
}
|
46
|
-
};
|
47
|
-
exports["default"] = _default;
|