Skip to content

Reports overhaul

Jaden DIEFENBAUGH requested to merge (removed):master into master

Overview

Groups

These changes represent an overhaul to the reports app, moving reports' functionality closer to the "document skeleton" goal. The main feature added is the concept of "groups" of experiments in a single report, where each group is much like a mini-report itself. As such, reports may have any combination of experiments, and are no longer limited to only having experiments of the same analyzer. Groups have the following characteristics:

  1. Have a unique name in the report
  2. Experiments in the group must have the same analyzer
  3. May have any number/combination of experiments (that satisfy # 2)
  4. Have aliases scoped to the group
  5. Have report items (tables, charts/plots, text blocks) scoped to the group
  6. Are ordered (and order-able) within the report
  7. Their report items are ordered (and order-able) within the group
  8. In the frontend, are represented as a state object/tree in the GroupsService AngularJS service
  9. In the backend, are stored within the content JSON field inside the report model
Text Blocks

Another feature is the new text block item that may be added to reports. These text blocks compliment the existing data table items & charting/plotting items, and are meant as glue between tables/plots. These text blocks are almost exactly like the editable text fields found throughout the platform. They have the following characteristics:

  1. Uses the CodeMirror code editor
  2. Processes updated input asynchronously
  3. Displays the compiled RST received from the server
Privledge clarification

EDIT: since the initial merge request, I've updated the permissions scheme for reports according to discussion with @andre.anjos , to the following:

  • 'E' indicates permissions to view the editable version of the report (usually accessed by author and report name)
  • 'V' indicates permissions to view the view-only version of the report (usually accessed by report number)
  • 'R' indicates that the user will be redirected from the editable version to the view-only version (but not given a 404)
Report State X User Type Editable Locked Published
Report Author E, V R, V R, V
BEAT User V V V
Anonymous V V
Public (Published) Reports List Reader V
Misc

Miscellaneous but notable changes:

  1. Many more End-to-End tests for the reports app, and a simplified configuration for the testing tool, Protractor.
  2. Much of the report functionality is now done in the frontend, without having the reload the page.
  3. Reports now have a "last edited" date in the header.
  4. Tables can be viewed as CSV, text blocks can be viewed as raw RST.
  5. Added a button to visit the relevant report when user successfully adds experiments to a report.
  6. Saving a report no longer pops up a modal upon success, but animates the report header with a light green color upon success.
  7. The reports frontend (especially the Javascript) has been mostly rewritten into a more idiomatic Angular format, using scope-isolated Directives with numerous Services. The reports app JS is decoupled from the rest of the frontend.
  8. Plot images may now be downloaded directly from the browser, without a request to the server.
  9. The reports modals are rewritten to use Angular & Bootstrap.
  10. Various fixes to the plot widgets, as well a change to the plotterparameter code.

TODO before merging

  • Write more E2E tests for the reports app, fully covering the functionality
  • Fix bugs found via E2E tests
  • Change/remove Django tests concerning the now-unused analyzer field in the Reports model
  • Fetch & integrate newest changes to various beat packages with this merge request
  • Add issue tracking Chrome headless status for running E2E tests on
  • Receive feedback
  • Act on feedback
  • Setup final demo with @andre.anjos @philip.abbet
  • Act on final demo feedback
  • Resolve all blockers
Edited by Philip ABBET

Merge request reports