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

Bokeh apps should share the same default values

    Details

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

      Description

      The state of a bokeh app is controlled by a set of url parameters, different apps may share the same parameters like the ci_id and ci_dataset. We propose an API endpoint to provide the default values for those parameters to the apps.

      Right now the superset of parameters use to control the apps are:

      ci_id - the latest ci job id, otherwise None.
      ci_dataset - default to the first dataset registered e.g. 'cfht', otherwise None.
      ci_metric - default to the first metric registered e.g. 'AF1', otherwise None.
      snr_cut - default to 100

        Attachments

          Issue Links

            Activity

            Hide
            afausti Angelo Fausti added a comment -

            So, there is now an API endpoint called defaults

            {
                "ci_id": "841",
                "metric": "PF1",
                "ci_dataset": "cfht",
                "snr_cut": "100"
            }
            

            Inside a bokeh app it is still possible to overwrite those defaults, for instance:

            args = get_url_args(curdoc, defaults={'metric': 'AM1'})
            

            that would use AM1 as default for this app instead of PF1 returned by the API. Note that the parameters passed through the URL always have precedence and will be used instead, for example:

            http://localhost:8000/dashboard/AMx/?metric=AM2&job__ci_dataset=cfht&ci_id=498
            

            will use AM2 for the AMx bokeh app.

            Show
            afausti Angelo Fausti added a comment - So, there is now an API endpoint called defaults { "ci_id" : "841" , "metric" : "PF1" , "ci_dataset" : "cfht" , "snr_cut" : "100" } Inside a bokeh app it is still possible to overwrite those defaults, for instance: args = get_url_args(curdoc, defaults={ 'metric' : 'AM1' }) that would use AM1 as default for this app instead of PF1 returned by the API. Note that the parameters passed through the URL always have precedence and will be used instead, for example: http: //localhost:8000/dashboard/AMx/?metric=AM2&job__ci_dataset=cfht&ci_id=498 will use AM2 for the AMx bokeh app.
            Show
            afausti Angelo Fausti added a comment - https://github.com/lsst-sqre/qa-dashboard/pull/39

              People

              • Assignee:
                afausti Angelo Fausti
                Reporter:
                afausti Angelo Fausti
                Watchers:
                Angelo Fausti, Frossie Economou
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel