Skip to content

Add simulation dataset upload button to SimulationPanel#1970

Draft
remy-rabideau wants to merge 1 commit into
NASA-AMMOS:developfrom
remy-rabideau:feature/upload-simulation-dataset
Draft

Add simulation dataset upload button to SimulationPanel#1970
remy-rabideau wants to merge 1 commit into
NASA-AMMOS:developfrom
remy-rabideau:feature/upload-simulation-dataset

Conversation

@remy-rabideau

Copy link
Copy Markdown
  • Review: By commit
  • Merge strategy: Merge (no squash)

REQUIRES_AERIE_PR="1852"
NASA-AMMOS/plandev#1852

REQUIRES_GATEWAY_PR="148"
NASA-AMMOS/plandev-gateway#148

Description

Dependencies: Requires the plandev backend PR and plandev-gateway PR for the uploadSimulationDataset endpoint to be merged and deployed first.

Adds a file upload button to the SimulationPanel that allows users to upload a simulation results JSON file (in SimulationResultsWriter format) and associate it with the current plan.

Changes:

  • src/components/simulation/SimulationPanel.svelte — adds a hidden file input bound to a PanelHeaderActionButton labelled "Upload Simulation Results"; on file selection calls effects.uploadSimulationDataset and clears the input
  • src/utilities/effects.ts — adds uploadSimulationDataset(plan, file, user) effect; POSTs the file as multipart form data to the gateway /uploadSimulationDataset endpoint; shows a success or failure toast

Verification

Manually tested against a running PlanDev instance. No automated tests added (consistent with existing UI test strategy for effects).

Documentation

No existing documentation covers this feature.

Future work

  • Add permission guard so the button is only shown to users with insert_ext_dataset permission
  • Refresh the simulation list after a successful upload

Add upload button to SimulationPanel header with hidden file input accepting JSON files. Implement uploadSimulationDataset effect to POST simulation results via FormData to /uploadSimulationDataset endpoint with plan_id and file. Show success/failure toasts and log uploaded dataset ID.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant