Commit 572cc3f8 authored by Nico Vermaas's avatar Nico Vermaas

Merge branch 'esap-gateway-query' into 'master'

integrating rucio

See merge request !58
parents 4a6e7ec2 499ad55b
Pipeline #12424 passed with stages
in 53 seconds
......@@ -31,11 +31,9 @@ docker-build-branch-query:
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
# except:
only:
- esap-gateway-query
- esap-gateway-query-xxx
# this deploys the 'esap-gateway-query' branch (a dev/test branch) as 'vermaas'
# by running /docker_compose/esap-api-gateway/docker-compose-query-cd.yml
docker-deploy-master:
docker-deploy-branch-query:
image: docker:latest
stage: deploy
before_script:
......@@ -47,13 +45,16 @@ docker-deploy-master:
- ssh-keyscan dop814.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker pull "$CI_REGISTRY_IMAGE""
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker-compose -p esap -f /docker_compose/esap-api-gateway/docker-compose-dev-cd.yml up -d"
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG""
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker-compose -p esap -f /docker_compose/esap-api-gateway/docker-compose-query-dev-cd.yml up -d"
when: manual
only:
- master
- esap-gateway-query
docker-deploy-branch-query:
# this deploys the 'esap-gateway-query' branch (a dev/test branch) as 'vermaas'
# by running /docker_compose/esap-api-gateway/docker-compose-query-cd.yml
docker-deploy-master:
image: docker:latest
stage: deploy
before_script:
......@@ -65,11 +66,11 @@ docker-deploy-branch-query:
- ssh-keyscan dop814.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG""
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker-compose -p esap -f /docker_compose/esap-api-gateway/docker-compose-query-dev-cd.yml up -d"
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker pull "$CI_REGISTRY_IMAGE""
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker-compose -p esap -f /docker_compose/esap-api-gateway/docker-compose-dev-cd.yml up -d"
when: manual
only:
- esap-gateway-query
- master
# deploy acceptance version on 'dop457.astron.nl'
......
......@@ -3,6 +3,6 @@ ESAP API Gateway is a 'backend' web application written in Django.
It provides a range of services that can be accessed through a REST API.
## Documentation
* backend (API): https://git.astron.nl/astron-sdc/esap-api-gateway/-/wikis/ESAP-API-gateway
* backend (API Gateway): https://git.astron.nl/astron-sdc/esap-api-gateway/-/wikis/ESAP-API-gateway-Overview
* frontend (GUI): https://git.astron.nl/astron-sdc/esap-gui/-/wikis/ESAP-GUI
esap/configuration_assets/esap_logo.png

6.12 KB | W: | H:

esap/configuration_assets/esap_logo.png

22.2 KB | W: | H:

esap/configuration_assets/esap_logo.png
esap/configuration_assets/esap_logo.png
esap/configuration_assets/esap_logo.png
esap/configuration_assets/esap_logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,15 +7,16 @@ networks:
services:
esap_api:
container_name: esap_api_query
container_name: esap_api_acceptance
image: git.astron.nl:5000/astron-sdc/esap-api-gateway
ports:
- "5556:8000"
expose:
- 8000
networks:
- traefik_proxy
- esap_network
env_file:
- $HOME/shared/oidc.env
- /data/shared/oidc.env
restart: always
volumes:
- /data/shared/esap-gateway-query/:/shared
\ No newline at end of file
- /data/shared/:/shared
\ No newline at end of file
import requests
import urllib.parse
import json
from django.conf import settings
rucio_url = "https://escape-rucio.cern.ch"
ID_TOKEN_KEY = "oidc_id_token"
ACCESS_TOKEN_KEY = "oidc_access_token"
AUTH_PORT = 32301
STANDARD_PORT = 32300
RUCIO_AUTH_TOKEN = "<REDACTED>"
def validate():
url = urllib.parse.urljoin(f"{rucio_url}:{AUTH_PORT}", "auth/validate")
def validate(token):
url = urllib.parse.urljoin(f"{settings.RUCIO_HOST}:{settings.RUCIO_AUTH_PORT}", "auth/validate")
response = requests.get(
url, headers={"X-Rucio-Auth-Token": RUCIO_AUTH_TOKEN}, verify=False
url, headers={"X-Rucio-Auth-Token": token}, verify=False
)
if response.ok:
return True
......@@ -21,13 +17,15 @@ def validate():
return False
def get_scope_names():
# try:
validated = validate()
def get_scope_names(session):
token = session.get(ACCESS_TOKEN_KEY, None)
if token is None:
return [f"Not logged in {session}, {session.keys()}."]
validated = validate(token)
if validated:
url = urllib.parse.urljoin(f"{rucio_url}:{STANDARD_PORT}", "scopes")
url = urllib.parse.urljoin(f"{settings.RUCIO_HOST}:{settings.RUCIO_PORT}", "scopes")
response = requests.get(
url + "/", headers={"X-Rucio-Auth-Token": RUCIO_AUTH_TOKEN}, verify=False
url + "/", headers={"X-Rucio-Auth-Token": token}, verify=False
)
if response.ok:
return json.loads(response.content)
......@@ -36,41 +34,60 @@ def get_scope_names():
"validated but failed query"
] # , val_response.status_code, val_response.reason]
else:
# , val_response.status_code, val_response.reason]
return ["not validated"]
return [f"not validated, {len(token)}, {type(token)}, '{token}'."] # , val_response.status_code, val_response.reason]
# except Exception as e:
# return ["Failed", "Authentication", e]
title = "Rucio"
logo = "http://rucio.cern.ch/images/wide_logo2.png"
class Config:
title = "Rucio"
logo = "http://rucio.cern.ch/images/wide_logo2.png"
# the url location of the frontend application,
# this makes it possible to install multiple instances in different directories on the webserver
# that all have their own urls like 'http://esap.astron.nl/esap-gui-dev/queries'
frontend_basename = "esap-rucio"
# definition of the navigation bar
nav1 = {"title": "Archives", "route": "/archives"}
nav2 = {"title": "Query", "route": "/query"}
navbar = [nav1, nav2]
ui_schema = {"catalog": {"ui:widget": "hidden"}}
def __init__(self, session):
self.session=session
self.__query_schema = self.gen_query_schema()
# definition of the query
query_schema = {
"name": "rucio",
"title": "Rucio Query",
"type": "object",
"properties": {
"scope": {
"type": "string",
"title": "Scope",
"enum": get_scope_names(),
"enumNames": get_scope_names(),
},
"resource_category": {
"type": "string",
"title": "Category",
"enum": ["files", "dids", "replicas"],
"enumNames": ["Files", "DIDs", "Replicas"],
"default": "dids",
},
"catalog": {
"type": "string",
"enum": ["esap_rucio_entities"],
"enumNames": ["esap_rucio_entities"],
"default": "esap_rucio_entities",
},
},
}
@property
def query_schema(self):
return self.__query_schema
ui_schema = {"catalog": {"ui:widget": "hidden"}}
def gen_query_schema(self):
scope_names = get_scope_names(self.session)
return {
"name": "rucio",
"title": "Rucio Query",
"type": "object",
"properties": {
"scope": {
"type": "string",
"title": "Scope",
"enum": scope_names,
"enumNames": scope_names,
},
"resource_category": {
"type": "string",
"title": "Category",
"enum": ["files", "dids", "replicas"],
"enumNames": ["Files", "DIDs", "Replicas"],
"default": "dids",
},
"catalog": {
"type": "string",
"enum": ["esap_rucio_entities"],
"enumNames": ["esap_rucio_entities"],
"default": "esap_rucio_entities",
},
},
}
......@@ -216,6 +216,8 @@ AUTHENTICATION_BACKENDS = (
)
OIDC_DRF_AUTH_BACKEND = 'mozilla_django_oidc.auth.OIDCAuthenticationBackend'
# OIDC environment variables
OIDC_RP_CLIENT_ID = os.environ['OIDC_RP_CLIENT_ID']
OIDC_RP_CLIENT_SECRET = os.environ['OIDC_RP_CLIENT_SECRET']
OIDC_RP_SIGN_ALGO = "RS256"
......@@ -231,6 +233,13 @@ LOGIN_REDIRECT_URL = os.environ['LOGIN_REDIRECT_URL']
LOGOUT_REDIRECT_URL = os.environ['LOGOUT_REDIRECT_URL']
LOGIN_REDIRECT_URL_FAILURE = os.environ['LOGIN_REDIRECT_URL_FAILURE']
# Rucio environment variables
RUCIO_AUTH_TOKEN = os.environ['RUCIO_AUTH_TOKEN']
RUCIO_HOST = os.environ['RUCIO_HOST']
RUCIO_PORT = os.environ['RUCIO_PORT']
RUCIO_AUTH_PORT = os.environ['RUCIO_AUTH_PORT']
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/
......@@ -238,6 +247,6 @@ STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
# configuration settings that can be requested through the REST API
VERSION = "ESAP-API version 23 feb 2021"
VERSION = "ESAP-API version 29 april 2021"
CONFIGURATION_DIR = os.path.join(BASE_DIR, 'configuration')
CONFIGURATION_FILE = 'esap_default'
......@@ -21,7 +21,7 @@ ALLOWED_HOSTS = ['*']
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOWED_ORIGINS = [
"https://sdc-dev.astron.nl","https://sdc.astron.nl",
"https://sdc-dev.astron.nl","https://sdc.astron.nl","http://dop457.astron.nl",
]
CORS_ORIGIN_ALLOW_ALL = False
CORS_ALLOW_CREDENTIALS = True
......
......@@ -4596,3 +4596,77 @@
[23/Feb/2021 15:25:34,658] https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_release__release_id=APERTIF_DR1_Imaging_and_page=1_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Feb/2021 15:25:34,661] query_controller.run_query()
[23/Feb/2021 15:25:34,668] run-query: https://alta.astron.nl/altapi/dataproducts?collection=imaging&release__release_id=APERTIF_DR1_Imaging&page=1&dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube&page_size=50
[23/Mar/2021 15:28:53,752] query_controller.create_and_run_query()
[23/Mar/2021 15:28:53,764] query_controller.create_and_run_query()
[23/Mar/2021 15:28:53,801] query_controller.create_query()
[23/Mar/2021 15:28:53,801] query_controller.create_query()
[23/Mar/2021 15:28:53,849] https://vo.astron.nl/__system__/tap/run/tap/sync?lang=ADQL&REQUEST=doQuery&QUERY=SELECT TOP 1000 * from ivoa.obscore WHERE obs_collection='lotss-dr1'
[23/Mar/2021 15:28:53,850] https://vo.astron.nl/__system__/tap/run/tap/sync?lang=ADQL&REQUEST=doQuery&QUERY=SELECT TOP 1000 * from ivoa.obscore WHERE obs_collection='lotss-dr1'
[23/Mar/2021 15:28:53,853] query_controller.run_query()
[23/Mar/2021 15:28:53,853] query_controller.run_query()
[23/Mar/2021 15:28:59,964] query_controller.create_and_run_query()
[23/Mar/2021 15:28:59,965] query_controller.create_query()
[23/Mar/2021 15:28:59,968] https://vo.astron.nl/__system__/tap/run/tap/sync?lang=ADQL&REQUEST=doQuery&QUERY=SELECT TOP 1000 * from ivoa.obscore WHERE obs_collection='lotss-dr1'
[23/Mar/2021 15:28:59,970] query_controller.run_query()
[23/Mar/2021 15:29:36,238] query_controller.create_and_run_query()
[23/Mar/2021 15:29:36,239] query_controller.create_query()
[23/Mar/2021 15:29:36,243] ERROR: could not translating key collection 'collection', using it raw.
[23/Mar/2021 15:29:36,243] ERROR: could not translating key release__release_id 'release__release_id', using it raw.
[23/Mar/2021 15:29:36,243] query_controller.create_and_run_query()
[23/Mar/2021 15:29:36,244] construct_query: https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_dataProductType=image_and_release__release_id=APERTIF_DR1_Imaging_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Mar/2021 15:29:36,244] query_controller.create_query()
[23/Mar/2021 15:29:36,245] https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_dataProductType=image_and_release__release_id=APERTIF_DR1_Imaging_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Mar/2021 15:29:36,249] ERROR: could not translating key collection 'collection', using it raw.
[23/Mar/2021 15:29:36,250] query_controller.run_query()
[23/Mar/2021 15:29:36,250] ERROR: could not translating key release__release_id 'release__release_id', using it raw.
[23/Mar/2021 15:29:36,251] run-query: https://alta.astron.nl/altapi/dataproducts?collection=imaging&dataProductType=image&release__release_id=APERTIF_DR1_Imaging&dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube&page_size=50
[23/Mar/2021 15:29:36,251] ERROR: could not translating key page 'page', using it raw.
[23/Mar/2021 15:29:36,253] construct_query: https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_dataProductType=image_and_release__release_id=APERTIF_DR1_Imaging_and_page=1_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Mar/2021 15:29:36,254] https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_dataProductType=image_and_release__release_id=APERTIF_DR1_Imaging_and_page=1_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Mar/2021 15:29:36,256] query_controller.run_query()
[23/Mar/2021 15:29:36,256] run-query: https://alta.astron.nl/altapi/dataproducts?collection=imaging&dataProductType=image&release__release_id=APERTIF_DR1_Imaging&page=1&dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube&page_size=50
[23/Mar/2021 15:29:51,965] query_controller.create_and_run_query()
[23/Mar/2021 15:29:51,965] query_controller.create_query()
[23/Mar/2021 15:29:51,968] ERROR: could not translating key collection 'collection', using it raw.
[23/Mar/2021 15:29:51,969] ERROR: could not translating key release__release_id 'release__release_id', using it raw.
[23/Mar/2021 15:29:51,969] ERROR: could not translating key page 'page', using it raw.
[23/Mar/2021 15:29:51,970] construct_query: https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_dataProductType=image_and_release__release_id=APERTIF_DR1_Imaging_and_page=485_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Mar/2021 15:29:51,970] https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_dataProductType=image_and_release__release_id=APERTIF_DR1_Imaging_and_page=485_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Mar/2021 15:29:51,974] query_controller.run_query()
[23/Mar/2021 15:29:51,974] run-query: https://alta.astron.nl/altapi/dataproducts?collection=imaging&dataProductType=image&release__release_id=APERTIF_DR1_Imaging&page=485&dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube&page_size=50
[23/Mar/2021 15:29:55,636] query_controller.create_and_run_query()
[23/Mar/2021 15:29:55,636] query_controller.create_query()
[23/Mar/2021 15:29:55,638] ERROR: could not translating key collection 'collection', using it raw.
[23/Mar/2021 15:29:55,639] ERROR: could not translating key release__release_id 'release__release_id', using it raw.
[23/Mar/2021 15:29:55,639] ERROR: could not translating key page 'page', using it raw.
[23/Mar/2021 15:29:55,640] construct_query: https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_dataProductType=image_and_release__release_id=APERTIF_DR1_Imaging_and_page=485_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Mar/2021 15:29:55,641] https://alta.astron.nl/altapi/dataproducts?collection=imaging_and_dataProductType=image_and_release__release_id=APERTIF_DR1_Imaging_and_page=485_and_dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube_and_page_size=50
[23/Mar/2021 15:29:55,642] query_controller.run_query()
[23/Mar/2021 15:29:55,643] run-query: https://alta.astron.nl/altapi/dataproducts?collection=imaging&dataProductType=image&release__release_id=APERTIF_DR1_Imaging&page=485&dataProductSubType__in=calibratedVisibility,continuumMF,continuumChunk,imageCube,beamCube,polarisationImage,polarisationCube,continuumCube&page_size=50
[23/Mar/2021 15:30:22,509] query_controller.create_and_run_query()
[23/Mar/2021 15:30:22,509] query_controller.create_query()
[23/Mar/2021 15:30:22,512] ERROR: could not translating key target 'target', using it raw.
[23/Mar/2021 15:30:22,513] ERROR: could not translating key units 'units', using it raw.
[23/Mar/2021 15:30:22,513] ERROR: could not translating key ref_system 'ref_system', using it raw.
[23/Mar/2021 15:30:22,518] ERROR: could not translating key fov_units 'fov_units', using it raw.
[23/Mar/2021 15:30:22,518] ERROR: could not translating key antenna_type 'antenna_type', using it raw.
[23/Mar/2021 15:30:22,519] ERROR: could not translating key public 'public', using it raw.
[23/Mar/2021 15:30:22,520] ERROR: could not translating key dataproduct_type 'dataproduct_type', using it raw.
[23/Mar/2021 15:30:22,520] construct_query: https://lta.lofar.eu/?target=A2255_and_units=sexagesimal_and_ref_system=J2000_and_fov_units=deg_and_antenna_type=HBA_and_public=true_and_dataproduct_type=AveragingPipeline
[23/Mar/2021 15:30:22,521] query_controller.create_and_run_query()
[23/Mar/2021 15:30:22,521] https://lta.lofar.eu/?target=A2255_and_units=sexagesimal_and_ref_system=J2000_and_fov_units=deg_and_antenna_type=HBA_and_public=true_and_dataproduct_type=AveragingPipeline
[23/Mar/2021 15:30:22,521] query_controller.create_query()
[23/Mar/2021 15:30:22,526] query_controller.run_query()
[23/Mar/2021 15:30:22,526] ERROR: could not translating key target 'target', using it raw.
[23/Mar/2021 15:30:22,526] query:https://lta.lofar.eu/?target=A2255_and_units=sexagesimal_and_ref_system=J2000_and_fov_units=deg_and_antenna_type=HBA_and_public=true_and_dataproduct_type=AveragingPipeline
[23/Mar/2021 15:30:22,527] ERROR: could not translating key units 'units', using it raw.
[23/Mar/2021 15:30:22,532] ERROR: could not translating key ref_system 'ref_system', using it raw.
[23/Mar/2021 15:30:22,533] ERROR: could not translating key fov_units 'fov_units', using it raw.
[23/Mar/2021 15:30:22,534] ERROR: could not translating key antenna_type 'antenna_type', using it raw.
[23/Mar/2021 15:30:22,535] ERROR: could not translating key public 'public', using it raw.
[23/Mar/2021 15:30:22,535] ERROR: could not translating key dataproduct_type 'dataproduct_type', using it raw.
[23/Mar/2021 15:30:22,536] ERROR: could not translating key page 'page', using it raw.
[23/Mar/2021 15:30:22,536] construct_query: https://lta.lofar.eu/?target=A2255_and_units=sexagesimal_and_ref_system=J2000_and_fov_units=deg_and_antenna_type=HBA_and_public=true_and_dataproduct_type=AveragingPipeline_and_page=1
[23/Mar/2021 15:30:22,536] https://lta.lofar.eu/?target=A2255_and_units=sexagesimal_and_ref_system=J2000_and_fov_units=deg_and_antenna_type=HBA_and_public=true_and_dataproduct_type=AveragingPipeline_and_page=1
[23/Mar/2021 15:30:22,538] query_controller.run_query()
[23/Mar/2021 15:30:22,539] query:https://lta.lofar.eu/?target=A2255_and_units=sexagesimal_and_ref_system=J2000_and_fov_units=deg_and_antenna_type=HBA_and_public=true_and_dataproduct_type=AveragingPipeline_and_page=1
......@@ -20,7 +20,7 @@ def get_datasets_disabled():
return my_config.datasets_disabled
# return expanded configuration
def get_configuration(name=None):
def get_configuration(name=None, session=None):
result = {}
result['version'] = settings.VERSION
......@@ -34,6 +34,12 @@ def get_configuration(name=None):
else:
my_config = importlib.import_module(settings.CONFIGURATION_FILE)
# More sophisticated config files can embed the config in a class called Config
try:
my_config = my_config.Config(session)
except AttributeError as e:
pass
except Exception as error:
return {"configuration error in ": name+ ".py : " + str(error)}
......
......@@ -3,7 +3,7 @@
Date created: 2020-10-15
Description: Rucio Service Connector for ESAP.
"""
from django.conf import settings
from rest_framework import serializers
from .query_base import query_base
import requests
......@@ -15,11 +15,6 @@ logger = logging.getLogger(__name__)
AMP_REPLACEMENT = "_and_"
# The request header
RUCIO_HOST = "https://escape-rucio.cern.ch:32300"
RUCIO_PORT = 32300
RUCIO_AUTH_TOKEN = "<REDACTED>"
URLPATTERNS = dict(
scope="{host}/scopes/",
dids="{host}/dids/{scope}/",
......@@ -87,12 +82,12 @@ class rucio_connector(query_base):
""" use Rucio REST API to query the data lake """
query_info = query["query_info"]
url = query_info["url_pattern"].format(
host=f"{self.url}:{RUCIO_PORT}", **query_info["url_params"]
host=f"{self.url}:{settings.RUCIO_PORT}", **query_info["url_params"]
)
response = requests.get(
url,
query_info["where"],
headers={"X-Rucio-Auth-Token": RUCIO_AUTH_TOKEN},
headers={"X-Rucio-Auth-Token": settings.RUCIO_AUTH_TOKEN},
verify=False,
)
results = []
......
......@@ -264,9 +264,9 @@ def ConfigurationView(request):
pass
try:
config_from_settings = configuration.get_configuration(name)
config_from_settings = configuration.get_configuration(name, request.session)
except Exception as error:
config_from_settings = "ERROR in configuration: "+str(error)
config_from_settings = "ERROR in configuration: "+str(error) + " session => " + str(request.session)
return JsonResponse({'configuration': config_from_settings})
......
......@@ -361,7 +361,7 @@ class GetTablesFields(generics.ListAPIView):
class GetSkyCoordinates(generics.ListAPIView):
"""
Retrieve a list of fields from the access_url
examples: /esap-api/query/get-fields?dataset_uri=vo_reg&access_url=https://vo.astron.nl/tap
examples: /esap-api/query/get-sky-coordinates/?target_name=M31
"""
model = DataSet
......
......@@ -3,11 +3,4 @@ from django.apps import AppConfig
class MyAppConfig(AppConfig):
name = 'query'
# experiment to start a samp client on startup... (warning, blocking)
# def ready(self):
# try:
# print('importing samp')
# from .api.services import samp
# #samp()
# except:
# pass
\ No newline at end of file
esap/query/static/query/esap_logo.png

6.12 KB | W: | H:

esap/query/static/query/esap_logo.png

22.2 KB | W: | H:

esap/query/static/query/esap_logo.png
esap/query/static/query/esap_logo.png
esap/query/static/query/esap_logo.png
esap/query/static/query/esap_logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -33,10 +33,10 @@
<!-- Header -->
<div class="navbar-header">
<a class="navbar-brand mb-0 h1">
<h2>
<h1>
<img src="{% static 'query/esap_logo.png' %}" alt="">
ESAP API Gateway - Query
</h2>
ESAP API Gateway - Query App
</h1>
</a>
</div>
......
......@@ -70,7 +70,7 @@
</div>
<p class="footer" small>ASTRON - version 23 mar 2021 - 10:00</p>
<p class="footer" small>ASTRON - version 29 april 2021 - 15:00</p>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment