Files
enviPy-bayer/templates/admin.html
Tobias O 21d30a923f [Refactor] Large scale formatting/linting (#193)
All html files now prettier formatted and fixes for incompatible blocks applied

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#193
Co-authored-by: Tobias O <tobias.olenyi@envipath.com>
Co-committed-by: Tobias O <tobias.olenyi@envipath.com>
2025-11-12 22:47:10 +13:00

49 lines
1.3 KiB
HTML

{% extends "framework.html" %}
{% load static %}
{% block content %}
<div id="searchContent">
<form id="admin-form" action="{{ SERVER_BASE }}/admin" method="post">
<div class="form-group">
<label for="textarea">Query</label>
<textarea
id="textarea"
class="form-control"
rows="10"
placeholder="Paste query here"
required
>
PREFIX pps: <http://localhost:8080/vocabulary#>
SELECT ?name (count(?objId) as ?xcnt)
WHERE {
?packageId pps:objectId 'package' .
?packageId pps:name ?name .
?packageId pps:reviewStatus 'reviewed' .
?packageId pps:pathway ?objId .
} GROUP BY ?name
</textarea
>
</div>
<button id="submit" type="button" class="btn btn-primary">Submit</button>
</form>
<p></p>
</div>
<div id="results"></div>
<div id="loading"></div>
<script>
$(function () {
$("#submit").on("click", function () {
makeLoadingGif("#loading", "{% static '/images/wait.gif' %}");
data = {
query: $("#textarea").val(),
};
$.post("{{ SERVER_BASE }}/expire", data, function (result) {
$("#loading").empty();
queryResultToTable("results", result);
});
});
});
</script>
{% endblock content %}