Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-10201

Reduce code duplication in SQUASH views

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Watching a video about mastering Django from O'reilly Safari there's an interesting solution to reduce code duplication when you have views acting on the same set of data but returning slightly different results. The technique is called "switchboard view"

      https://www.safaribooksonline.com/library/view/mastering-django-web/9781783989805/video1_5.html

      this ticket will solve the code duplication we have in the squash views by replacing the endpoints api/AMx, api/PAx, used to retrieve data for the bokeh apps, by a single endpoint api/apps.

        Attachments

          Issue Links

            Activity

            Hide
            afausti Angelo Fausti added a comment - - edited

            This issue is related to DM-9982 if we don't have a drill down plot associated to a metric we wont have the corresponding endpoint in the SQUASH API

            Show
            afausti Angelo Fausti added a comment - - edited This issue is related to DM-9982 if we don't have a drill down plot associated to a metric we wont have the corresponding endpoint in the SQUASH API
            Hide
            afausti Angelo Fausti added a comment - - edited

            This ticket also relates to DM-9695, if there's no data blobs associated with the measurement the new `BokehAppViewSet` view should return an empty data dictionary and the corresponding app should handle that, e.g if there's no data to display show a message instead of the plot.

            Show
            afausti Angelo Fausti added a comment - - edited This ticket also relates to DM-9695 , if there's no data blobs associated with the measurement the new `BokehAppViewSet` view should return an empty data dictionary and the corresponding app should handle that, e.g if there's no data to display show a message instead of the plot.
            Hide
            afausti Angelo Fausti added a comment -
            Show
            afausti Angelo Fausti added a comment - See changes in this PR: https://github.com/lsst-sqre/qa-dashboard/pull/46
            Hide
            jmatt J Matt Peterson [X] (Inactive) added a comment -

            Reviewed in person at the end of coworking. Looks good.

            Show
            jmatt J Matt Peterson [X] (Inactive) added a comment - Reviewed in person at the end of coworking. Looks good.

              People

              • Assignee:
                afausti Angelo Fausti
                Reporter:
                afausti Angelo Fausti
                Reviewers:
                J Matt Peterson [X] (Inactive)
                Watchers:
                Angelo Fausti, J Matt Peterson [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel