From b349cb51c4e46e1ae1bb309e9c589f1cff89e5af Mon Sep 17 00:00:00 2001 From: gebele Date: Fri, 2 Aug 2019 10:57:06 +0000 Subject: optimize upload task with wait for dataset id --- public/javascripts/lazar-gui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public') diff --git a/public/javascripts/lazar-gui.js b/public/javascripts/lazar-gui.js index dcbc4c5..a672de4 100644 --- a/public/javascripts/lazar-gui.js +++ b/public/javascripts/lazar-gui.js @@ -210,7 +210,7 @@ uploadDataset = function(task_uri) { aClient.get(uri, function(res) { var response = JSON.parse(res); if (response['percent'] == 100){ - window.clearInterval(uploadInterval); + clearInterval(uploadInterval); var element = document.getElementById("uploadDataset"); element.parentNode.removeChild(element); }; @@ -224,7 +224,7 @@ renderTask = function(task_uri,id) { var response = JSON.parse(res); //progress(response['percent'],id); if (response['percent'] == 100){ - window.clearInterval(markers[id]); + clearInterval(markers[id]); $("a#downbutton_"+id).removeClass("disabled"); $("a#detailsbutton_"+id).removeClass("disabled"); $("a#downbutton_"+id).removeClass("btn-outline-info"); -- cgit v1.2.3