about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHao Chen2019-06-01 10:28:18 -0500
committerHao Chen2019-06-01 10:28:18 -0500
commitbe674bf79b029ac7f54a4eab1ba5ba59faca02dc (patch)
tree884c05075c79e424d84c2f0b7a2da82eebf48e20
parent1b52830c3b1a683340bbd7551cc480cdabdeeb8b (diff)
downloadgenecup-be674bf79b029ac7f54a4eab1ba5ba59faca02dc.tar.gz
from penguin
-rwxr-xr-xserver.py2
-rw-r--r--templates/progress.html17
2 files changed, 7 insertions, 12 deletions
diff --git a/server.py b/server.py
index 79ab2ca..7efdd5f 100755
--- a/server.py
+++ b/server.py
@@ -230,4 +230,4 @@ def top150genes():
     return render_template("topAddictionGene.html")
 
 if __name__ == '__main__':
-    app.run(debug=True)
+    app.run(debug=True, port=4200)
diff --git a/templates/progress.html b/templates/progress.html
index 7eb86ba..bd0224e 100644
--- a/templates/progress.html
+++ b/templates/progress.html
@@ -1,32 +1,28 @@
 {% extends "layout.html" %}
 {% block content %}
 
-<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
+<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
 
 <script>
-
-
 var r =  Math.floor(Math.random() * Math.floor(200));
-var g =  Math.floor(Math.random() * Math.floor(200));
+var g =  150;
 var b =  Math.floor(Math.random() * Math.floor(200));
 document.body.style.backgroundColor = 'rgba('+r+','+g+','+b+',0.1)'
-
-var source = new EventSource("/{{url_in}}");
+var source = new EventSource("/{{ url_in |safe }}");
 source.onmessage = function(event) {
 	$('.progress-bar').css('width', event.data+'%').attr('aria-valuenow', event.data);
 	var alpha = 1-event.data/150
 	document.body.style.backgroundColor = 'rgba('+r+','+g+','+b+',0.3)'.replace(/[^,]+(?=\))/, alpha)
-
 	if(event.data == 100){
-		window.location.replace("/{{url_out}}")
+		window.location.replace("/{{ url_out | safe}}")
 		source.close()
 	}
 }
 </script>
 <br>
-<b> Rest assured I am working diligently on your request ... </b>
+<b> The results are coming ... </b>
 <div id="progs" class="progress" style="width: 50%; margin: 50px;">
-	<div class="progress-bar progress-bar-striped active mx-auto" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
+	<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"></span>
 	</div>
 </div>
@@ -35,4 +31,3 @@ source.onmessage = function(event) {
 {% endblock %}
 
 
-