aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/templates/form.html
diff options
context:
space:
mode:
authorPjotr Prins2020-05-16 10:14:13 -0500
committerPjotr Prins2020-05-16 10:14:13 -0500
commit2d201e156d530e5e912252c4300245da382b846e (patch)
treea2cb50022c93b5f508d47b6ece99a0063c92687e /bh20simplewebuploader/templates/form.html
parent6dc16e60eb16cddb3ca1528561734e44507bf1cc (diff)
downloadbh20-seq-resource-2d201e156d530e5e912252c4300245da382b846e.tar.gz
bh20-seq-resource-2d201e156d530e5e912252c4300245da382b846e.tar.lz
bh20-seq-resource-2d201e156d530e5e912252c4300245da382b846e.zip
Counting number of sequences
Diffstat (limited to 'bh20simplewebuploader/templates/form.html')
-rw-r--r--bh20simplewebuploader/templates/form.html21
1 files changed, 17 insertions, 4 deletions
diff --git a/bh20simplewebuploader/templates/form.html b/bh20simplewebuploader/templates/form.html
index 7d7cef8..2cbaf62 100644
--- a/bh20simplewebuploader/templates/form.html
+++ b/bh20simplewebuploader/templates/form.html
@@ -6,13 +6,14 @@
<link href="/static/main.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Web uploader for Public SARS-CoV-2 Sequence Resource</title>
+ <script type="text/javascript" src="/static/main.js"></script>
</head>
<body>
<section class="header">
<div class="logo"><a href="http://covid-19.genenetwork.org/"><img src="static/image/coronasmallcomp.gif" width="150" title="COVID-19 image by Tyler Morgan-Wall"></a></div>
<h1>Web uploader for Public SARS-CoV-2 Sequence Resource</h1>
-<small>Disabled until we got everything wired up</small>
+ <p>Database contains <span id="Counter"></span> public sequences!</p>
</section>
@@ -209,9 +210,21 @@
</div>
<script type="text/javascript">
- let scriptRoot = {{ request.script_root|tojson|safe }};
+ let scriptRoot = {{ request.script_root|tojson|safe }};
+
+ document.addEventListener("DOMContentLoaded", function(){
+ var count = fetch("/api/getCount")
+ .then((resp) => resp.json())
+ .then(function (data) {
+ count = data["sequences"];
+ console.log(count);
+ span = document.getElementById("Counter");
+ txt = document.createTextNode(count);
+ span.appendChild(txt);
+ });
+});
+
</script>
-<script type="text/javascript" src="/static/main.js"></script>
- </body>
+ </body>
</html>