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
a58682bc
Commit
a58682bc
authored
Nov 15, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
213f5e9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
Reports_scripts.js
reports/static/reports/js/Reports_scripts.js
+1
-1
views.py
reports/views.py
+7
-6
No files found.
reports/static/reports/js/Reports_scripts.js
View file @
a58682bc
...
...
@@ -40,7 +40,7 @@ function refresh() {
$
(
'#textprogress'
+
val
.
purchase_id
).
empty
();
$
(
'#textprogress'
+
val
.
purchase_id
).
append
(
val
.
progress_text
);
}
else
{
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 + '%');
...
...
reports/views.py
View file @
a58682bc
...
...
@@ -132,7 +132,7 @@ def Reports(request):
size
=
0
folders
=
[]
zip
=
""
Data
=
False
;
Data
=
False
if
(
request
.
user
.
username
==
"demo"
):
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
...
...
@@ -245,7 +245,7 @@ def Reports(request):
progress
=
0
initial_folder
=
""
zip
=
""
wkt
=
""
Data
=
False
return
render
(
request
,
'Reports.html'
,
{
"productList"
:
productList
})
...
...
@@ -301,10 +301,10 @@ def wsProcessProgress(request):
# item = Purchase.objects.get(pk=producto['id'])
# item.progress = progress
# item.save()
if
os
.
path
.
getsize
(
USERS_PATH
+
producto
[
'user__email'
]
+
"/"
+
str
(
producto
[
'id'
])
+
"/scl_data.json"
)
>
3
:
print
(
'id: '
+
str
(
producto
[
'id'
])
+
'size: '
+
str
(
os
.
path
.
getsize
(
USERS_PATH
+
producto
[
'user__email'
]
+
"/"
+
str
(
producto
[
'id'
])
+
"/scl_data.json"
)))
if
os
.
path
.
getsize
(
USERS_PATH
+
producto
[
'user__email'
]
+
"/"
+
str
(
producto
[
'id'
])
+
"/scl_data.json"
)
>
4
:
Data
=
True
print
(
Data
)
productList2
.
append
({
...
...
@@ -317,6 +317,7 @@ def wsProcessProgress(request):
progress
=
0
progress_text
=
""
log_info
=
""
Data
=
False
# productList2 = []
# product_list = Purchase.objects.values('id', 'progress').filter(user_id=request.user.id, purchased=1)
...
...
@@ -326,7 +327,7 @@ def wsProcessProgress(request):
# "progress": producto['progress'],
# })
print
(
productList2
)
#
print (productList2)
return
HttpResponse
(
json
.
dumps
(
productList2
))
else
:
print
(
"Error Http404"
)
...
...
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