Commit f34bf856 authored by Janez K's avatar Janez K

more reliable progress bars

parent 29589fb8
......@@ -505,11 +505,11 @@ function resetWorkflow() {
}
function updateProgressBar(widgetId) {
$.get(url['widget-progress'], { 'widget_id':widgetId }, function(data) {
$.post(url['widget-progress'], { 'widget_id':widgetId }, function(data) {
if (data!="-1") {
$(".widget"+widgetId+"progressbar").css('width',data+'%');
if (data!="100") {
setTimeout("updateProgressBar("+widgetId+")",1000);
setTimeout("updateProgressBar("+widgetId+")",2000);
} else {
unfinishDescendants(widgetId);
$(".statusimage"+widgetId).hide()
......
......@@ -36,7 +36,7 @@
<!-- <script type="text/javascript" src="{{ STATIC_URL }}js/graphics.js"></script>-->
<script type="text/javascript" src="{{ STATIC_URL }}js/fileuploader.js"></script>
<script src="{{ STATIC_URL }}js/jquery.contextmenu.js" type="text/javascript"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/new-script.js?v=3"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/new-script.js?v=4"></script>
<script src="{{STATIC_URL}}js/highcharts-2.2.5-tooltip-id.js"></script>
<script src="{{STATIC_URL}}js/highcharts-exporting.js"></script>
<script type="text/javascript" src="{{STATIC_URL}}js/jquery.tipsy.js"></script>
......
......@@ -81,7 +81,7 @@ def open_workflow(request,workflow_id):
@login_required
def widget_progress(request):
w = get_object_or_404(Widget, pk=request.GET['widget_id'])
w = get_object_or_404(Widget, pk=request.POST['widget_id'])
if w.running:
return HttpResponse(w.progress)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment