Open agy-why opened 3 years ago
ConeSearch can be submitted via two different ways (ignoring hand made SQL query).
The template of the conesearsch submiting form is: https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/query/templates/query/query_form_cone.html
We need to add a drop down menu with the list of possible conesearch targets.
Clicking on submit button is dealt with JS and calls the function: service.forms.cone.submit()
The latter function can be found in:
https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/query/static/query/js/forms/cone.js
It basically submits an SQL query as an ASYNC job.
Each app update the JS script to what they need. But we need to provide a variable for the table name, so far it is hardcoded, like: https://gitlab.aip.de/django-daiquiri/gaia-app/-/blob/master/gaia/static/query/js/forms/cone.js
For the ConeSearch API the sql query is formed here: https://github.com/django-daiquiri/daiquiri/blob/db50cae850b135b8f7981d05f62e34eae3a0d5cc/daiquiri/conesearch/adapter.py#L102
And uses: settings.CONESEARCH_SCHEMA
and settings.CONESEARCH_TABLE
to set the target table and target schema.
In order to provide a choice one would need to add a variable here for schema and table propagated the same way as DEC RA and Radius.
I suggest: These default implementation should go in daiquiri-app and be removed from daiquiri, replacing with NotImplementedError
This can obviously be overwritten by the app like for gaia: https://gitlab.aip.de/django-daiquiri/gaia-app/-/blob/master/gaia/adapter.py
Where the table and schema are hardcoded stored in the resources
dictionary, instead of using the settings.
A few resources are missing in the conesearch web interface of the query app: the choice of VERB with description and the list of tables than can be queried.
The resources are set in the query service: https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/query/static/query/js/services/query.js
The missing resources could be accessed via:
var resources = {
...
cone_tables: $resource(baseurl + 'conesearch/api/resources/user/'),
verbs: $resource(baseurl + 'conesearch/api/verbs/'),
};
We could build such an interface in the conesearch app:
Context
Until now only a unique table is accessible via the ConeSearch interface. Some catalogues have several tables hosting a
pos
column and are as such good candidate for a ConeSearch.Request
add a choice combobox to choose the table to aim at.