diff options
author | Hao Chen | 2019-05-21 16:25:17 -0500 |
---|---|---|
committer | Hao Chen | 2019-05-21 16:25:17 -0500 |
commit | e87aa54962f20d93e3cea18f425bb3f820768e63 (patch) | |
tree | 68d8143ede14baad5a21ec446a70318121700c70 /templates/progress.html | |
parent | 3dba78248d81fc97d5347fa167828ba3a8f95cd8 (diff) | |
download | genecup-e87aa54962f20d93e3cea18f425bb3f820768e63.tar.gz |
progress bar for gene_topGene search
Diffstat (limited to 'templates/progress.html')
-rw-r--r-- | templates/progress.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/progress.html b/templates/progress.html index e881a90..ff9a65f 100644 --- a/templates/progress.html +++ b/templates/progress.html @@ -6,12 +6,12 @@ <script> -var r = Math.floor(Math.random() * Math.floor(100)); -var g = Math.floor(Math.random() * Math.floor(100)); -var b = Math.floor(Math.random() * Math.floor(100)); +var r = Math.floor(Math.random() * Math.floor(200)); +var g = Math.floor(Math.random() * Math.floor(200)); +var b = Math.floor(Math.random() * Math.floor(200)); document.body.style.backgroundColor = 'rgba('+r+','+g+','+b+',0.1)' -var source = new EventSource("/search"); +var source = new EventSource("/{{url_in}}"); source.onmessage = function(event) { $('.progress-bar').css('width', event.data+'%').attr('aria-valuenow', event.data); $('.progress-bar-label').text(event.data+'%'); @@ -19,13 +19,13 @@ source.onmessage = function(event) { document.body.style.backgroundColor = 'rgba('+r+','+g+','+b+',0.3)'.replace(/[^,]+(?=\))/, alpha) if(event.data == 100){ - window.location.replace("/cytoscape") + window.location.replace("/{{url_out}}") source.close() } } </script> <br> -<b> We hope this won't take too long ... </b> +<b> I am handling all your work while you are watching this progress bar ... </b> <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> |