Trying to find: Export/Import data
Say, you have two environments. CERT and PROD. We have a blob of data representing a workflow that we develop in CERT. I want to export the data from CERT and import it into PROD.
I can't seem to find a good match to what I have in mind. I see it a lot in applications use saving and restoring - which is basically what I want to do - but my GoogleFu seems to be running into a wall for Angular. Two parts of Export/save to file/copy to clipboard... and load/import from file/paste from clipboard on two separate servers.
What's a good screen/module/tutorial for doing something like that?
Posted Jun 23, 2022, 12:46 PM UTC
13
What exactly is this data used for and where is it stored? If you are developing this workflow and it gets pushed to a database. What I would do is extract the data from the database and insert into prod database manually.
There are a couple cons to this. First you would need access to the underlying database. Second you have to make sure the data is in the exact structure you need because it would bypass any transform happening in the API layer.
You should try to keep your environments has separate as completely independent of each other as possible. Sharing resources across environments is asking for trouble
"as separate as possible" which is exactly what we are doing. 100% behind this.
Which is why the transition is happening on the front-end - as the configuration passes from CERT to PROD - one team does a lot of the setup and verification in lower environment ... then passes the account to the business when it's at a certain point. Different environments will have different settings: account information, certain settings and links and such.
The goal is pull a JSON/Base64 data blob from one environment and paste/upload it to another. Or a file saved/loaded. So not db-db but App-App. the front end prod app would load a screen, save what's there then give a GUI/UX for filling out the updated information.
I'm good on the API/backend part. It's the front end where I don't have a lot of experience and I'm trying to find a good library or setup for export/import in angular.
You will have to build some sort of service in angular that can talk to your Cert and Your prod environment. I would write those as angular services inject that into a component. Maybe the cert service has a call to get data. Once you get the data fill out the form with it and then the prod environment service is what is used to save the data.
It doesn't sound that complex or I am just not understanding exactly what you are trying to accomplish.