Skip to content

Commit

Permalink
Merge b172c90 into 048d2a1
Browse files Browse the repository at this point in the history
  • Loading branch information
northwestwitch committed May 6, 2020
2 parents 048d2a1 + b172c90 commit 02ff1c4
Show file tree
Hide file tree
Showing 7 changed files with 426 additions and 97 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
- Fixed code for range queries and without end position, with tests
- Added test for negative response and introduce error=None if response status code is 200 (success)
- Added simple query interface
- Run queries and display results on the web interface
10 changes: 9 additions & 1 deletion cgbeacon2/server/blueprints/api_v1/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@ def create_allele_query(resp_obj, req):
data = dict(req.args)
customer_query["datasetIds"] = req.args.getlist("datasetIds")
else: # POST method
data = dict(req.data)
data = dict(req.form)
customer_query["datasetIds"] = req.form.getlist("datasetIds")

# Remove null parameters from the query
remove_keys = []
for key, value in data.items():
if value == "":
remove_keys.append(key)
for key in remove_keys:
data.pop(key)

# loop over all available query params
for param in QUERY_PARAMS_API_V1:
if data.get(param):
Expand Down
108 changes: 108 additions & 0 deletions cgbeacon2/server/blueprints/api_v1/static/beacon-network-logo-dark.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,37 @@
</ul>
</div>
</nav>

</header>

<body>
{% block body %}{% endblock %}
<br>
{% for category, message in get_flashed_messages(with_categories=True) %}
<div class="alert alert-{{category}}">{{ message }}</div>
{% endfor %}

<footer class="footer">
<div class="container">
<div class="row d-flex justify-content-around">
<div>
<a href="https://www.scilifelab.se" target=_blank><img src="{{url_for('api_v1.static', filename='scilifelab-logo.svg')}}" alt="SciLifeLab" height="50"></a>
</div>
<div>
<a href="https://elixir-europe.org/" target=_blank><img src="{{url_for('api_v1.static', filename='elixir_logo.png')}}" alt="Elixir" height="50"></a>
</div>
<div>
<a href="http://ki.se" target=_blank><img src="{{url_for('api_v1.static', filename='KI2.jpeg')}}" alt="Karolinska University Hospital" height="50"></a>
</div>
<div>
<a href="https://www.ga4gh.org/" target=_blank><img src="{{url_for('api_v1.static', filename='ga4gh.png')}}" alt="Global Alliance for Genomics and Health" height="50"></a>
</div>
<div class="row d-flex justify-content-around">
<div>
<a href="https://www.scilifelab.se" target=_blank><img src="{{url_for('api_v1.static', filename='scilifelab-logo.svg')}}" alt="SciLifeLab" height="50"></a>
</div>
<div>
<a href="https://elixir-europe.org/" target=_blank><img src="{{url_for('api_v1.static', filename='elixir_logo.png')}}" alt="Elixir" height="50"></a>
</div>
<div>
<a href="http://ki.se" target=_blank><img src="{{url_for('api_v1.static', filename='KI2.jpeg')}}" alt="Karolinska University Hospital" height="50"></a>
</div>
<div>
<a href="https://www.ga4gh.org/" target=_blank><img src="{{url_for('api_v1.static', filename='ga4gh.png')}}" alt="Global Alliance for Genomics and Health" height="50"></a>
</div>
<div>
<a href="https://beacon-network.org/#/" target=_blank><img src="{{url_for('api_v1.static', filename='beacon-network-logo-dark.svg')}}" alt="The Beacon Network" height="50"></a>
</div>
</div>
</footer>

{% block scripts %}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
Expand Down

0 comments on commit 02ff1c4

Please sign in to comment.