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
33097eed
Commit
33097eed
authored
Feb 21, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parchado de errores
parent
cb184636
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
46 deletions
+56
-46
Reports.html
reports/templates/Reports.html
+1
-1
views.py
reports/views.py
+55
-45
No files found.
reports/templates/Reports.html
View file @
33097eed
...
...
@@ -167,7 +167,7 @@
class=
"hidden"
{%
endif
%}
>
<a
title=
"View Report"
{%
if
product
.
initial_folder
%}
href=
"../reports/{{ product.purchase_id }}/{{ product.initial_folder }}
_sclData
"
href=
"../reports/{{ product.purchase_id }}/{{ product.initial_folder }}"
{%
endif
%}
class=
"btn btn-success"
>
<i
class=
"fa fa-eye"
></i>
...
...
reports/views.py
View file @
33097eed
...
...
@@ -47,6 +47,14 @@ def report_L2ASCL(request, report, purchase_id):
with
open
(
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/"
+
report
+
".json"
)
as
f
:
json_data
=
OrderedDict
(
json
.
load
(
f
))
if
len
(
json_data
)
==
0
:
graphData
=
""
defaultLabel
=
""
defaultDataset
=
""
folders
.
remove
(
reporteDir
)
else
:
print
(
"lleno"
)
graphData
=
dict
()
graphData
[
'type'
]
=
"line"
...
...
@@ -97,12 +105,11 @@ def report_L2ASCL(request, report, purchase_id):
# -------------------------------------------------------------------------------def Reports(request):
def
Reports
(
request
):
progress
=
0
productList
=
[]
size
=
0
folders
=
[]
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
'search__endDate'
,
'search__process_id__name'
)
.
filter
(
user_id
=
request
.
user
.
id
,
purchased
=
1
)
...
...
@@ -143,8 +150,11 @@ def Reports(request):
print
(
"folder out noes not exists"
)
else
:
folders
=
os
.
listdir
(
path
=
absolute_path
)
for
folder
in
folders
:
initial_folder
=
folder
if
len
(
folders
)
==
0
:
initial_folder
=
"../#"
else
:
initial_folder
=
folders
.
pop
(
0
)
+
"_sclData"
productList
.
append
({
"process"
:
producto
[
'search__process_id__name'
],
...
...
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