You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should allow users to import and export the custom scenarios they have made. Let's do this by generating a (JSON) file in the backend that we download to the user's computer. A couple of new mutations will be needed:
ExportScenario takes as its argument a name for the custom scenario. It generates the JSON of the customized parameters and returns that as the data field along with filename that the UI uses when saving the file.
ImportScenario is given a string that the UI loads from the user-uploaded scenario file. It will create a new field (imported_scenario?) in request.session that will serve as the fourth available scenario in the scenarios endpoint. When a new scenario is imported, imported_scenario will be replaced by the new contents, so the user cannot have more than one imported scenario available to her.
The text was updated successfully, but these errors were encountered:
We should allow users to import and export the custom scenarios they have made. Let's do this by generating a (JSON) file in the backend that we download to the user's computer. A couple of new mutations will be needed:
ExportScenario
takes as its argument aname
for the custom scenario. It generates the JSON of the customized parameters and returns that as thedata
field along withfilename
that the UI uses when saving the file.ImportScenario
is given a string that the UI loads from the user-uploaded scenario file. It will create a new field (imported_scenario
?) inrequest.session
that will serve as the fourth available scenario in thescenarios
endpoint. When a new scenario is imported,imported_scenario
will be replaced by the new contents, so the user cannot have more than one imported scenario available to her.The text was updated successfully, but these errors were encountered: