diff options
author | Hao Chen | 2019-05-12 05:40:39 -0500 |
---|---|---|
committer | Hao Chen | 2019-05-12 05:40:39 -0500 |
commit | bc6a6e1d5974cb1c9f8a181728d93dafc531da01 (patch) | |
tree | d09256b29d323a95f44d2fa4aec6928522c665ba /templates | |
parent | 08503676ea318ade7a72fcd999a32bc6e5433e0c (diff) | |
download | genecup-bc6a6e1d5974cb1c9f8a181728d93dafc531da01.tar.gz |
prog bar showing
Diffstat (limited to 'templates')
-rw-r--r-- | templates/progress.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/templates/progress.html b/templates/progress.html new file mode 100644 index 0000000..322604d --- /dev/null +++ b/templates/progress.html @@ -0,0 +1,29 @@ +{% extends "layout.html" %} +{% block content %} + +<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> + + <script> + var source = new EventSource("/search"); + source.onmessage = function(event) { + $('.progress-bar').css('width', event.data+'%').attr('aria-valuenow', event.data); + $('.progress-bar-label').text(event.data+'%'); + + if(event.data == 100){ + window.location.replace("/cytoscape") + source.close() + } + } + </script> + + <div id="progs" class="progress" style="width: 50%; margin: 50px;"> + <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"> + <span class="progress-bar-label">0%</span> + </div> + </div> + + +{% endblock %} + + + |