aboutsummaryrefslogtreecommitdiff
path: root/templates/progress.html
blob: 322604d98d0c4fc125c371f882287648ddb6e7f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 %}