mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-17 23:18:20 +00:00
feat: upload metadata 、ui size settings 276 320 530 、import flow (#1965)
# Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. # How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration # Snapshots: Include snapshots for easier review. # Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have already rebased the commits and make the commit message conform to the project standard. - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] Any dependent changes have been merged and published in downstream modules
This commit is contained in:
@@ -26,8 +26,8 @@ import 'reactflow/dist/style.css';
|
||||
|
||||
const nodeTypes = { customNode: CanvasNode };
|
||||
const edgeTypes = { buttonedge: ButtonEdge };
|
||||
|
||||
const Canvas: React.FC = () => {
|
||||
|
||||
const { t } = useTranslation();
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
|
||||
@@ -43,7 +43,17 @@ const Canvas: React.FC = () => {
|
||||
const [isSaveFlowModalOpen, setIsSaveFlowModalOpen] = useState(false);
|
||||
const [isExportFlowModalOpen, setIsExportFlowModalOpen] = useState(false);
|
||||
const [isImportModalOpen, setIsImportFlowModalOpen] = useState(false);
|
||||
|
||||
|
||||
if (localStorage.getItem('importFlowData') ) {
|
||||
const importFlowData = JSON.parse(localStorage.getItem('importFlowData') );
|
||||
localStorage.removeItem('importFlowData')
|
||||
setLoading(true);
|
||||
const flowData = mapUnderlineToHump(importFlowData.flow_data);
|
||||
setFlowInfo(importFlowData);
|
||||
setNodes(flowData.nodes);
|
||||
setEdges(flowData.edges);
|
||||
setLoading(false);
|
||||
}
|
||||
async function getFlowData() {
|
||||
setLoading(true);
|
||||
const [_, data] = await apiInterceptors(getFlowById(id));
|
||||
|
Reference in New Issue
Block a user