diff options
Diffstat (limited to 'templates/progress.html')
-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 %} + + + |