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
3333df0e
Commit
3333df0e
authored
Feb 21, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parchado de errores
parent
415d4503
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
15 deletions
+8
-15
config.json
config/config.json
+3
-3
L2ASCL_data.html
reports/templates/L2ASCL_data.html
+2
-2
views.py
reports/views.py
+3
-10
No files found.
config/config.json
View file @
3333df0e
{
"PATHS"
:
{
"PATH_GEOSENTINEL"
:
"/home/
emmanuelhp
/Documentos/GeoSentinel"
,
"PATH_NAS"
:
"/home/
emmanuelhp
/NAS/"
,
"PATH_USERS"
:
"/home/
emmanuelhp
/NAS/repsat_test_dev/"
"PATH_GEOSENTINEL"
:
"/home/
ulises
/Documentos/GeoSentinel"
,
"PATH_NAS"
:
"/home/
ulises
/NAS/"
,
"PATH_USERS"
:
"/home/
ulises
/NAS/repsat_test_dev/"
},
"API_SENTINEL"
:
{
"SENTINEL_USER"
:
"emmhp"
,
...
...
reports/templates/L2ASCL_data.html
View file @
3333df0e
...
...
@@ -267,7 +267,7 @@
<div
class=
"box-body with-border"
>
<div
class=
"row"
>
<div
class=
"col-lg-2 text-center"
>
<h4>
Zone: {{
report
}}
</h4>
<h4>
Zone: {{
zone
}}
</h4>
</div>
<div
class=
"col-lg-2 text-center"
>
<h4>
Platform: {{platform}}
</h4>
...
...
@@ -575,7 +575,7 @@
pdf
.
addImage
(
$
(
pdfCanvas
)[
0
],
'PNG'
,
0
,
0
);
// download the pdf
pdf
.
save
(
'
filename
.pdf'
);
pdf
.
save
(
'
{{ zone }}
.pdf'
);
});
</script>
...
...
reports/views.py
View file @
3333df0e
...
...
@@ -31,23 +31,16 @@ USERS_PATH = config['PATHS']['PATH_USERS']
def
report_L2ASCL
(
request
,
report
,
purchase_id
):
# image_path =USERS_PATH + request.user.email+"/"+purchase_id+"/"+"out/T15QZD/TCI/"
reporteDir
=
report
.
replace
(
'_sclData'
,
''
)
image_path
=
request
.
user
.
email
+
"/"
+
purchase_id
+
"/"
+
"out/"
+
reporteDir
+
"/TCI/thumbnails/"
#image_path = request.user.email + "/" + purchase_id + "/" + "out/T15QZD/TCI/"
absolute_path
=
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/out"
folders
=
os
.
listdir
(
path
=
absolute_path
)
print
(
folders
)
#print("lee findproducts")
#print(request)
#print(report)
#reporteDir = str('holaaa') # report.replace('_sclData','')
#print(reporte)
#reporte.replace("_sclData","")
with
open
(
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/findProducts.json"
)
as
p
:
dataProduct
=
json
.
load
(
p
)
print
(
dataProduct
[
'startDate'
])
startDate
=
str
(
dataProduct
[
'startDate'
])[:
4
]
+
'-'
+
str
(
dataProduct
[
'startDate'
])[
4
:
6
]
+
'-'
+
str
(
dataProduct
[
'startDate'
])[
6
:
8
]
endDate
=
str
(
dataProduct
[
'endDate'
])[:
4
]
+
'-'
+
str
(
dataProduct
[
'endDate'
])[
4
:
6
]
+
'-'
+
str
(
dataProduct
[
'endDate'
])[
6
:
8
]
...
...
@@ -100,7 +93,7 @@ def report_L2ASCL(request, report, purchase_id):
# graphData['options']['maintainAspectRatio']=False
# print(json.dumps(graphData).encode("utf-8"))
return
render
(
request
,
'L2ASCL_data.html'
,
{
"graphData"
:
json
.
dumps
(
graphData
),
"name"
:
"foo"
,
"report_name"
:
"SCL Image Classification Data(Km²)"
,
"startDate"
:
startDate
,
"endDate"
:
endDate
,
"clouds"
:
dataProduct
[
'clouds'
],
"platform"
:
dataProduct
[
'platform'
],
"productLevel"
:
dataProduct
[
'productLevel'
]
,
"IMAGE_PATH"
:
image_path
,
'dafaultLabel'
:
defaultLabel
,
'defaultDataSet'
:
defaultDataset
,
"folders"
:
folders
,
"
report
"
:
reporteDir
})
return
render
(
request
,
'L2ASCL_data.html'
,
{
"graphData"
:
json
.
dumps
(
graphData
),
"name"
:
"foo"
,
"report_name"
:
"SCL Image Classification Data(Km²)"
,
"startDate"
:
startDate
,
"endDate"
:
endDate
,
"clouds"
:
dataProduct
[
'clouds'
],
"platform"
:
dataProduct
[
'platform'
],
"productLevel"
:
dataProduct
[
'productLevel'
]
,
"IMAGE_PATH"
:
image_path
,
'dafaultLabel'
:
defaultLabel
,
'defaultDataSet'
:
defaultDataset
,
"folders"
:
folders
,
"
zone
"
:
reporteDir
})
# -------------------------------------------------------------------------------def Reports(request):
...
...
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