feat(ui/client): add ability to save metamodels init#1643
Conversation
|
@CodiumAI-Agent /describe |
|
@neelneelneel Here are the initial changes. This should not be considered complete. |
Titlefeat(ui/client): add ability to save metamodels init User descriptionDescriptionUpdate refresh data logic so that the metamodel saves. Changes MadeUpdate calls and create functions related to saving metamodel changes -> adding FE UI button element for running function How to TestNavigate to database > metamodel > refresh data > choose tables > click save NotesInit change for @neelneelneel to check PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A["Refresh Data"] -- "open sync modal" --> B["SyncChangesModal"]
B -- "apply selections" --> C["Update customNodes & relationships"]
C -- "enable Save button" --> D["Click Save"]
D -- "onSubmit builds payload" --> E["RdbmsExternalUpload API call"]
E -- "success response" --> F["Navigate to metamodel page"]
|
| Relevant files | |||
|---|---|---|---|
| Enhancement |
|
|
@CodiumAI-Agent /review |
|
@CodiumAI-Agent /improve |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 18e39c4
Previous suggestionsSuggestions up to commit 18e39c4
|
|
@RNubla and/or @memisrose do either of you mind testing this with the client databases |
|
|
||
| // build dataTypeMap for each table | ||
| for (const node of customNodes) { | ||
| console.log("node: ", node); |
There was a problem hiding this comment.
comment out or remove the console log
| payloadObj.metamodel.nodeProp[node.data.name] = []; | ||
| } | ||
|
|
||
| console.log("PAYLOAD OBJ", payloadObj); |
| monolithStore.runQuery(pixel).then((response) => { | ||
| const output = response.pixelReturn[0]?.output; | ||
|
|
||
| console.log("THIS IS OUTPUT", output); |
There was a problem hiding this comment.
comment out or remove the console log
| const cols = node.data.properties; | ||
| const firstCol = cols[0].name.replace(/ /g, "_"); | ||
|
|
||
| if (!tables[tableInfo.name + "." + firstCol]) { |
There was a problem hiding this comment.
This is not on you @tzylks, as we asked you to mimic how we do this in legacy. We do this in the legacy ui as well.
This is more a question for the backend. Why do we send tables this way TABLE_NAME._FIRST_COL for RDBMSExternalUpload.
@roxyramos, @EJV20, @ericgonzal8 , @ppatel9703
I feel like we should be sending tables as such
{
TABLE_NAME: ["COL_ONE", COL_TWO"]
}
But it currently does this:
{
TABLE_NAME.COL_ONE: ["COL_ONE", COL_TWO"]
}
|
@tzylks Also will likely merge this in as i care about fixing the bug, We need to visit why we do something a certain way with the above reactor. |
|
This PR passes with my testing of syncing client DB |
|
@CodiumAI-Agent /update_changelog |
|
Changelog updates: 🔄 2025-08-07 *Added
Changed
|
Description
Update refresh data logic so that the metamodel saves.
Changes Made
Update calls and create functions related to saving metamodel changes -> adding FE UI button element for running function
How to Test
Navigate to database > metamodel > refresh data > choose tables > click save
Notes
Init change for @neelneelneel to check