Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
67d68dc5
Commit
67d68dc5
authored
Feb 13, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
actualizacion del progress bar
parent
a15927ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
5 deletions
+55
-5
scripts.js
reports/static/reports/js/scripts.js
+3
-2
Reports.html
reports/templates/Reports.html
+52
-3
No files found.
reports/static/reports/js/scripts.js
View file @
67d68dc5
...
...
@@ -27,7 +27,7 @@ function refresh() {
$
(
'#progress_bar'
+
val
.
purchase_id
+
''
).
attr
(
'style'
,
'width:'
+
val
.
progress
+
'%'
);
document
.
getElementById
(
'progess_value'
+
val
.
purchase_id
).
innerHTML
=
val
.
progress
+
' %'
;
$
(
'#view_report'
+
val
.
purchase_id
+
''
).
removeAttr
(
"disabled"
);
$
(
'#view_report'
+
val
.
purchase_id
+
''
).
attr
(
"href"
,
"
{{ BASE_URL }}
/reports/T15QZD_sclData/"
+
val
.
purchase_id
);
$
(
'#view_report'
+
val
.
purchase_id
+
''
).
attr
(
"href"
,
"
..
/reports/T15QZD_sclData/"
+
val
.
purchase_id
);
$
(
'#main_progess'
+
val
.
purchase_id
+
''
).
attr
(
"class"
,
"hidden"
);
$
(
'#action_buttons'
+
val
.
purchase_id
+
''
).
removeClass
(
"hidden"
);
}
...
...
@@ -37,8 +37,9 @@ function refresh() {
};
$
(
function
()
{
var
int
;
refresh
();
var
int
=
setInterval
(
"refresh()"
,
1000
);
int
=
setInterval
(
"refresh()"
,
1000
);
});
$
(
function
()
{
...
...
reports/templates/Reports.html
View file @
67d68dc5
...
...
@@ -106,7 +106,7 @@
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</a>
</li>
</ul>
</div>
...
...
@@ -172,7 +172,7 @@
class=
"hidden"
{%
endif
%}
>
<a
id=
"view_report{{ product.purchase_id }}"
title=
"View Report"
{%
if
product
.
progress =
=
100
%}
href=
"
{{ BASE_URL }}/reports/T15QZD_sclData/{{ product.purchase_id }}
"
href=
"
#
"
{%
else
%}
href=
"#"
disabled
...
...
@@ -265,5 +265,54 @@
{% endblock %}
{% block scripts %}
<script
src=
"{% static 'reports/js/scripts.js' %}"
></script>
<!--script src="{% static 'reports/js/scripts.js' %}"></script-->
<script>
function
openmodal
(
info
)
{
info2
=
info
.
split
(
";"
);
$
(
"#myModal"
).
modal
();
$
(
"#log_info"
).
append
(
info2
);
}
function
refresh
()
{
$
.
ajax
({
dataType
:
"json"
,
url
:
'Reload'
,
success
:
function
(
data
)
{
$
.
each
(
data
,
function
(
key
,
val
)
{
console
.
log
(
key
+
" = "
+
val
.
purchase_id
+
""
+
val
.
progress
)
if
(
val
.
progress
!=
100
)
{
$
(
'#progress_bar'
+
val
.
purchase_id
).
attr
(
"aria-valuenow"
,
val
.
progress
);
$
(
'#progress_bar'
+
val
.
purchase_id
).
attr
(
'style'
,
'width:'
+
val
.
progress
+
'%'
);
document
.
getElementById
(
'progess_value'
+
val
.
purchase_id
).
innerHTML
=
val
.
progress
+
' %'
;
$
(
'#progress_bar'
+
val
.
purchase_id
).
attr
(
"class"
,
"progress-bar progress-bar-warning progress-bar-striped active"
);
$
(
'#view_report'
+
val
.
purchase_id
).
attr
(
'disabled'
,
'false'
);
$
(
'#action_buttons'
+
val
.
purchase_id
).
attr
(
"class"
,
"hidden"
);
$
(
'#main_progess'
+
val
.
purchase_id
).
removeClass
(
"hidden"
);
$
(
'#main_progess'
+
val
.
purchase_id
).
attr
(
"class"
,
"progress"
);
}
else
{
$
(
'#progress_bar'
+
val
.
purchase_id
).
attr
(
"class"
,
"progress-bar progress-bar-success progress-bar-striped"
);
$
(
'#progress_bar'
+
val
.
purchase_id
).
attr
(
"aria-valuenow"
,
val
.
progress
);
$
(
'#progress_bar'
+
val
.
purchase_id
).
attr
(
'style'
,
'width:'
+
val
.
progress
+
'%'
);
document
.
getElementById
(
'progess_value'
+
val
.
purchase_id
).
innerHTML
=
val
.
progress
+
' %'
;
$
(
'#view_report'
+
val
.
purchase_id
).
removeAttr
(
"disabled"
);
$
(
'#view_report'
+
val
.
purchase_id
).
attr
(
"href"
,
"../reports/T15QZD_sclData/"
+
val
.
purchase_id
);
$
(
'#main_progess'
+
val
.
purchase_id
).
attr
(
"class"
,
"hidden"
);
$
(
'#action_buttons'
+
val
.
purchase_id
).
removeClass
(
"hidden"
);
}
});
}
});
};
$
(
function
()
{
var
int
;
refresh
();
int
=
setInterval
(
"refresh()"
,
1000
);
});
$
(
function
()
{
$
(
'#reportPage'
).
show
();
});
</script>
{% endblock %}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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