Problem
The results page renders a curated view of NimbusExperiment.results_data, but there is no way to get the underlying JSON out of the UI. Anyone who wants the raw analysis payload (to diff against Jetstream's GCS output, to script over, or to hand to DS) has to go through the Django admin or query the DB.
results_data is a plain JSONField on the model, so exporting it is a straight serialization of one field.
Proposed change
- New
nimbus_ui view at <slug>/results/export/ returning experiment.results_data as application/json with a Content-Disposition: attachment header so the browser downloads it as <slug>-results.json.
- A download button in the results page Overview header, next to "Results last calculated".
No changes to how results_data is computed, stored, or rendered.
Acceptance criteria
- The results page has a visible export button that downloads the experiment's
results_data as a .json file.
- An experiment with no results yet exports an empty JSON object rather than erroring.
- The endpoint is covered by a view test.
┆Issue is synchronized with this Jira Task
Problem
The results page renders a curated view of
NimbusExperiment.results_data, but there is no way to get the underlying JSON out of the UI. Anyone who wants the raw analysis payload (to diff against Jetstream's GCS output, to script over, or to hand to DS) has to go through the Django admin or query the DB.results_datais a plainJSONFieldon the model, so exporting it is a straight serialization of one field.Proposed change
nimbus_uiview at<slug>/results/export/returningexperiment.results_dataasapplication/jsonwith aContent-Disposition: attachmentheader so the browser downloads it as<slug>-results.json.No changes to how
results_datais computed, stored, or rendered.Acceptance criteria
results_dataas a.jsonfile.┆Issue is synchronized with this Jira Task