-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/export import stage 2 #3063
Conversation
Update 1:Check input param for export data
Fail Input
{
"tool": "true",
"multiagents": true
} Success Input{
"tool": true,
"chatflow": true,
"multiagent": true
} |
packages/ui/src/api/exportimport.js
Outdated
@@ -0,0 +1,10 @@ | |||
import client from './client' | |||
|
|||
const exportAll = () => client.get('/export-import/export/all') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to modify this part to
const exportData = (body) => client.post('/export-import/export', body)
Body example:
{
"tool": true,
"chatflow": true,
"multiagent": true
}
@@ -258,24 +259,24 @@ const ProfileSection = ({ username, handleLogout }) => { | |||
<ListItemButton | |||
sx={{ borderRadius: `${customization.borderRadius}px` }} | |||
onClick={() => { | |||
getAllChatflowsApi.request() | |||
exportAllApi.request() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to modify this to call out the dialogbox input you wanted instead of straight away making request.
if (newTool.id) id = newTool.id | ||
if (foundIds.includes(id)) { | ||
newTool.id = undefined | ||
newTool.name += ' with new id' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with new id
@@ -234,7 +236,6 @@ const importChatflows = async (newChatflows: Partial<ChatFlow>[]): Promise<any> | |||
newChatflow.id = undefined | |||
newChatflow.name += ' with new id' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with new id
Description
Allow to import and export below items:
Export All
This will generate: AllData.json
Import All
Import First Time
Import Second Time
If the UUID is not unique, name of chatflow/agentflow/tool will get added "with new id".
Tools
Chatflow and Agentflow will retain the data of tools that they are using.
Transaction Working in action
Test 1: Passing in AppServer
Test 2: No passing in AppServer