Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lidia Contreras Ochando
clowdflows
Commits
f34bf856
Commit
f34bf856
authored
May 21, 2015
by
Janez K
Browse files
more reliable progress bars
parent
29589fb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
workflows/static/js/new-script.js
View file @
f34bf856
...
...
@@ -505,11 +505,11 @@ function resetWorkflow() {
}
function
updateProgressBar
(
widgetId
)
{
$
.
ge
t
(
url
[
'
widget-progress
'
],
{
'
widget_id
'
:
widgetId
},
function
(
data
)
{
$
.
pos
t
(
url
[
'
widget-progress
'
],
{
'
widget_id
'
:
widgetId
},
function
(
data
)
{
if
(
data
!=
"
-1
"
)
{
$
(
"
.widget
"
+
widgetId
+
"
progressbar
"
).
css
(
'
width
'
,
data
+
'
%
'
);
if
(
data
!=
"
100
"
)
{
setTimeout
(
"
updateProgressBar(
"
+
widgetId
+
"
)
"
,
1
000
);
setTimeout
(
"
updateProgressBar(
"
+
widgetId
+
"
)
"
,
2
000
);
}
else
{
unfinishDescendants
(
widgetId
);
$
(
"
.statusimage
"
+
widgetId
).
hide
()
...
...
workflows/templates/index.html
View file @
f34bf856
...
...
@@ -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>
...
...
workflows/views.py
View file @
f34bf856
...
...
@@ -81,7 +81,7 @@ def open_workflow(request,workflow_id):
@
login_required
def
widget_progress
(
request
):
w
=
get_object_or_404
(
Widget
,
pk
=
request
.
GE
T
[
'widget_id'
])
w
=
get_object_or_404
(
Widget
,
pk
=
request
.
POS
T
[
'widget_id'
])
if
w
.
running
:
return
HttpResponse
(
w
.
progress
)
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment