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
1266e31b
Commit
1266e31b
authored
Mar 28, 2019
by
Sergio Adrian Gongora Euan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
title in report page changed
parent
242d42f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
26 deletions
+34
-26
Reports.html
reports/templates/Reports.html
+1
-1
sclData.html
reports/templates/sclData.html
+16
-18
views.py
reports/views.py
+17
-7
No files found.
reports/templates/Reports.html
View file @
1266e31b
...
...
@@ -150,7 +150,7 @@
<table
data-toggle=
"table"
id=
"example"
class=
"table table-striped table-bordered"
style=
"width:100%"
>
<thead>
<th>
Zon
e
</th>
<th>
Titl
e
</th>
<th>
Process
</th>
<th>
Purchase date
</th>
<th>
Start Date
</th>
...
...
reports/templates/sclData.html
View file @
1266e31b
...
...
@@ -139,26 +139,24 @@
<div
class=
"row col-lg-11 title"
>
<div
class=
"box box-success box-solid info"
>
<div
class=
"box-header with-border"
>
<h3
sytle=
"font-size: 30px !important;"
>
{{ report_name }}
</h3>
<h3>
{{ searchInfo.title }} {{ searchInfo.startDate }} to {{ searchInfo.endDate}}
</h3>
<h6>
{{ searchInfo.report_name }}
</h6>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<div
class=
"row"
>
<div
class=
"col-lg-
2 text-center col-lg-offset-1
"
>
<h4>
Platform: {{ platform }}
</h4>
<div
class=
"col-lg-
3 text-center
"
>
<h4>
Platform: {{
searchInfo.
platform }}
</h4>
</div>
<div
class=
"col-lg-
2
text-center"
>
<h4>
Product level: {{ productLevel }}
</h4>
<div
class=
"col-lg-
3
text-center"
>
<h4>
Product level: {{
searchInfo.
productLevel }}
</h4>
</div>
<div
class=
"col-lg-
2
text-center"
>
<h4>
Start date: {{ startDate
}}
</h4>
<div
class=
"col-lg-
3
text-center"
>
<h4>
Process: {{ searchInfo.process
}}
</h4>
</div>
<div
class=
"col-lg-2 text-center"
>
<h4>
End date: {{ endDate }}
</h4>
</div>
<div
class=
"col-lg-2 text-center"
>
<h4>
Clouds: {{ clouds }} %
</h4>
<div
class=
"col-lg-3 text-center"
>
<h4>
Clouds: {{ searchInfo.clouds }} %
</h4>
</div>
</div>
</div>
...
...
@@ -386,15 +384,15 @@
let
scl_path
=
"{{SCL_PATH}}"
;
let
zone
=
"{{ zone }}"
let
purchase_id
=
"{{ purchaseID }}"
let
platform
=
"{{ platform }}"
;
let
productLevel
=
"{{ productLevel }}"
;
let
startDate
=
"{{ startDate }}"
;
let
endDate
=
"{{ endDate }}"
;
let
clouds
=
"{{ clouds }}"
;
let
platform
=
"{{
searchInfo.
platform }}"
;
let
productLevel
=
"{{
searchInfo.
productLevel }}"
;
let
startDate
=
"{{ s
earchInfo.s
tartDate }}"
;
let
endDate
=
"{{
searchInfo.
endDate }}"
;
let
clouds
=
"{{
searchInfo.
clouds }}"
;
let
oldLabel
=
"{{defaultDataSet}}"
;
let
labels
=
{{
labels
}};
var
config
=
{{
graphData
}};
let
polygon
=
"{{polygon}}"
let
polygon
=
"{{
searchInfo.
polygon}}"
config
.
options
=
{
responsive
:
true
,
...
...
reports/views.py
View file @
1266e31b
...
...
@@ -46,8 +46,9 @@ def report_L2ASCL(request, purchase_id):
template
=
"sclData.html"
reporteDir
=
'mask'
folders
=
""
purchase
=
Purchase
.
objects
.
values
(
'user__email'
,
'is_public'
)
.
filter
(
pk
=
purchase_id
)
email
=
purchase
[
0
][
'user__email'
]
purchase
=
Purchase
.
objects
.
values
(
'user__email'
,
'is_public'
,
'search__search_name'
,
'search__process_id__name'
)
.
get
(
pk
=
purchase_id
)
email
=
purchase
[
'user__email'
]
path
=
USERS_PATH
+
email
+
'/'
+
purchase_id
+
'/'
scl_data_path
=
USERS_PATH
+
email
+
"/"
+
purchase_id
+
"/scl_data.json"
...
...
@@ -68,16 +69,25 @@ def report_L2ASCL(request, purchase_id):
else
:
PDFGenerator
(
request
,
path
,
reporteDir
,
datasets
)
searchInfo
=
{
"title"
:
purchase
[
'search__search_name'
],
"process"
:
purchase
[
'search__process_id__name'
],
"startDate"
:
startDate
,
"endDate"
:
endDate
,
"clouds"
:
dataProduct
[
'clouds'
],
"platform"
:
dataProduct
[
'platform'
],
"productLevel"
:
dataProduct
[
'productLevel'
],
"polygon"
:
dataProduct
[
'wkt'
],
"report_name"
:
"SCL Image Classification Data(Km²)"
}
return
render
(
request
,
template
,
{
"graphData"
:
json
.
dumps
(
graphData
),
"report_name"
:
"SCL Image Classification Data(Km²)"
,
"startDate"
:
startDate
,
"endDate"
:
endDate
,
"clouds"
:
dataProduct
[
'clouds'
],
"platform"
:
dataProduct
[
'platform'
],
"productLevel"
:
dataProduct
[
'productLevel'
],
"IMAGE_PATH"
:
image_path
,
"searchInfo"
:
searchInfo
,
"IMAGE_PATH"
:
image_path
,
"SCL_PATH"
:
SCL_path
,
'dafaultLabel'
:
defaultLabel
,
'defaultDataSet'
:
defaultDataset
,
"folders"
:
folders
,
"zone"
:
reporteDir
,
"purchaseID"
:
purchase_id
,
"labels"
:
graphData
[
'data'
][
'labels'
],
"
polygon"
:
dataProduct
[
'wkt'
],
"
email"
:
email
})
"email"
:
email
})
# -------------------------------------------------------------------------------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