summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2019-07-12 12:07:51 +0000
committergebele <gebele@in-silico.ch>2019-07-12 12:07:51 +0000
commit0908895b1ebc9d85a96b0d848dc357ba25e0e763 (patch)
tree64e0f12f3f79ab30c137a232a21d2382bd545bd4
parenta446fb2ecc8e7ab5f179d910a1f332c469dee35e (diff)
use wait animation instead approx prediction time
-rw-r--r--public/javascripts/lazar-gui.js3
-rw-r--r--views/batch.haml11
2 files changed, 10 insertions, 4 deletions
diff --git a/public/javascripts/lazar-gui.js b/public/javascripts/lazar-gui.js
index 585f2ac..f9d8255 100644
--- a/public/javascripts/lazar-gui.js
+++ b/public/javascripts/lazar-gui.js
@@ -209,7 +209,7 @@ renderTask = function(task_uri,id) {
var aClient = new HttpClient();
aClient.get(uri, function(res) {
var response = JSON.parse(res);
- progress(response['percent'],id);
+ //progress(response['percent'],id);
if (response['percent'] == 100){
window.clearInterval(markers[id]);
$("a#downbutton_"+id).removeClass("disabled");
@@ -218,6 +218,7 @@ renderTask = function(task_uri,id) {
$("a#detailsbutton_"+id).removeClass("btn-outline-info");
$("a#downbutton_"+id).addClass("btn-info");
$("a#detailsbutton_"+id).addClass("btn-info");
+ $("#circle_"+id).hide();
};
});
};
diff --git a/views/batch.haml b/views/batch.haml
index 4f82312..f161125 100644
--- a/views/batch.haml
+++ b/views/batch.haml
@@ -42,10 +42,11 @@
%a.btn.btn-outline-info.btn-sm.disabled{:id => "downbutton_#{idx}", :href=>"#{to("/predict/batch/download?tid=#{task}")}", :title=>"download"}
%span.fa.fa-download
CSV
- %div{:id=>"progress_#{idx}", :style=>"width:100%;height:3px;position:relative;background-color:#ccc;"}
+ -#%div{:id=>"progress_#{idx}", :style=>"width:100%;height:3px;position:relative;background-color:#ccc;"}
%div{:id=>"bar_#{idx}", :style=>"background-color: #4CAF50;width:10px;height:3px;position:absolute;"}
%p{:id=>"est_#{idx}"}
waiting ...
+ %img.h2{:src=>"/images/wait30trans.gif", :id=>"circle_#{idx}", :class=>"circle", :alt=>"wait", :style=>"display:none;"}
:javascript
$(document).ready(function() {
taskProgress('#{idx}','#{ctimer}','#{approx[idx]}','#{to("/prediction/task/?turi=#{task}")}');
@@ -59,13 +60,17 @@
var button = document.getElementById("detailsbutton_"+(idx-1));
if(!button.classList.contains('disabled')){
renderTask(task_uri,idx);
- remaining(idx,approximate);
+ //remaining(idx,approximate);
+ $("#est_"+idx).hide();
+ $("#circle_"+idx).show();
}
}, timer );
}else{
markers[idx] = setInterval(function(){
renderTask(task_uri,idx);
- remaining(idx,approximate);
+ //remaining(idx,approximate);
+ $("#est_"+idx).hide();
+ $("#circle_"+idx).show();
}, timer );
};
};