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
cf3484d5
Commit
cf3484d5
authored
Mar 28, 2019
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab.geoint.mx:mario.chirinos/GeoInt_SIDT into dev
parents
7698b12d
cef9547d
Changes
3
Show 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 @
cf3484d5
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
<table
data-toggle=
"table"
id=
"example"
class=
"table table-striped table-bordered"
<table
data-toggle=
"table"
id=
"example"
class=
"table table-striped table-bordered"
style=
"width:100%"
>
style=
"width:100%"
>
<thead>
<thead>
<th>
Zon
e
</th>
<th>
Titl
e
</th>
<th>
Process
</th>
<th>
Process
</th>
<th>
Purchase date
</th>
<th>
Purchase date
</th>
<th>
Start Date
</th>
<th>
Start Date
</th>
...
...
reports/templates/sclData.html
View file @
cf3484d5
...
@@ -139,26 +139,24 @@
...
@@ -139,26 +139,24 @@
<div
class=
"row col-lg-11 title"
>
<div
class=
"row col-lg-11 title"
>
<div
class=
"box box-success box-solid info"
>
<div
class=
"box box-success box-solid info"
>
<div
class=
"box-header with-border"
>
<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 -->
<!-- /.box-tools -->
</div>
</div>
<!-- /.box-header -->
<!-- /.box-header -->
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-
2 text-center col-lg-offset-1
"
>
<div
class=
"col-lg-
3 text-center
"
>
<h4>
Platform: {{ platform }}
</h4>
<h4>
Platform: {{
searchInfo.
platform }}
</h4>
</div>
</div>
<div
class=
"col-lg-
2
text-center"
>
<div
class=
"col-lg-
3
text-center"
>
<h4>
Product level: {{ productLevel }}
</h4>
<h4>
Product level: {{
searchInfo.
productLevel }}
</h4>
</div>
</div>
<div
class=
"col-lg-
2
text-center"
>
<div
class=
"col-lg-
3
text-center"
>
<h4>
Start date: {{ startDate
}}
</h4>
<h4>
Process: {{ searchInfo.process
}}
</h4>
</div>
</div>
<div
class=
"col-lg-2 text-center"
>
<div
class=
"col-lg-3 text-center"
>
<h4>
End date: {{ endDate }}
</h4>
<h4>
Clouds: {{ searchInfo.clouds }} %
</h4>
</div>
<div
class=
"col-lg-2 text-center"
>
<h4>
Clouds: {{ clouds }} %
</h4>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -359,15 +357,15 @@
...
@@ -359,15 +357,15 @@
let
scl_path
=
"{{SCL_PATH}}"
;
let
scl_path
=
"{{SCL_PATH}}"
;
let
zone
=
"{{ zone }}"
let
zone
=
"{{ zone }}"
let
purchase_id
=
"{{ purchaseID }}"
let
purchase_id
=
"{{ purchaseID }}"
let
platform
=
"{{ platform }}"
;
let
platform
=
"{{
searchInfo.
platform }}"
;
let
productLevel
=
"{{ productLevel }}"
;
let
productLevel
=
"{{
searchInfo.
productLevel }}"
;
let
startDate
=
"{{ startDate }}"
;
let
startDate
=
"{{ s
earchInfo.s
tartDate }}"
;
let
endDate
=
"{{ endDate }}"
;
let
endDate
=
"{{
searchInfo.
endDate }}"
;
let
clouds
=
"{{ clouds }}"
;
let
clouds
=
"{{
searchInfo.
clouds }}"
;
let
oldLabel
=
"{{defaultDataSet}}"
;
let
oldLabel
=
"{{defaultDataSet}}"
;
let
labels
=
{{
labels
}};
let
labels
=
{{
labels
}};
var
config
=
{{
graphData
}};
var
config
=
{{
graphData
}};
let
polygon
=
"{{polygon}}"
let
polygon
=
"{{
searchInfo.
polygon}}"
config
.
options
=
{
config
.
options
=
{
responsive
:
true
,
responsive
:
true
,
...
...
reports/views.py
View file @
cf3484d5
...
@@ -46,8 +46,9 @@ def report_L2ASCL(request, purchase_id):
...
@@ -46,8 +46,9 @@ def report_L2ASCL(request, purchase_id):
template
=
"sclData.html"
template
=
"sclData.html"
reporteDir
=
'mask'
reporteDir
=
'mask'
folders
=
""
folders
=
""
purchase
=
Purchase
.
objects
.
values
(
'user__email'
,
'is_public'
)
.
filter
(
pk
=
purchase_id
)
purchase
=
Purchase
.
objects
.
values
(
'user__email'
,
'is_public'
,
'search__search_name'
,
email
=
purchase
[
0
][
'user__email'
]
'search__process_id__name'
)
.
get
(
pk
=
purchase_id
)
email
=
purchase
[
'user__email'
]
path
=
USERS_PATH
+
email
+
'/'
+
purchase_id
+
'/'
path
=
USERS_PATH
+
email
+
'/'
+
purchase_id
+
'/'
scl_data_path
=
USERS_PATH
+
email
+
"/"
+
purchase_id
+
"/scl_data.json"
scl_data_path
=
USERS_PATH
+
email
+
"/"
+
purchase_id
+
"/scl_data.json"
...
@@ -68,16 +69,25 @@ def report_L2ASCL(request, purchase_id):
...
@@ -68,16 +69,25 @@ def report_L2ASCL(request, purchase_id):
else
:
else
:
PDFGenerator
(
request
,
path
,
reporteDir
,
datasets
)
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
),
return
render
(
request
,
template
,
{
"graphData"
:
json
.
dumps
(
graphData
),
"report_name"
:
"SCL Image Classification Data(Km²)"
,
"searchInfo"
:
searchInfo
,
"IMAGE_PATH"
:
image_path
,
"startDate"
:
startDate
,
"endDate"
:
endDate
,
"clouds"
:
dataProduct
[
'clouds'
],
"platform"
:
dataProduct
[
'platform'
],
"productLevel"
:
dataProduct
[
'productLevel'
],
"IMAGE_PATH"
:
image_path
,
"SCL_PATH"
:
SCL_path
,
'dafaultLabel'
:
defaultLabel
,
"SCL_PATH"
:
SCL_path
,
'dafaultLabel'
:
defaultLabel
,
'defaultDataSet'
:
defaultDataset
,
"folders"
:
folders
,
'defaultDataSet'
:
defaultDataset
,
"folders"
:
folders
,
"zone"
:
reporteDir
,
"purchaseID"
:
purchase_id
,
"zone"
:
reporteDir
,
"purchaseID"
:
purchase_id
,
"labels"
:
graphData
[
'data'
][
'labels'
],
"labels"
:
graphData
[
'data'
][
'labels'
],
"
polygon"
:
dataProduct
[
'wkt'
],
"
email"
:
email
})
"email"
:
email
})
# -------------------------------------------------------------------------------def Reports(request):
# -------------------------------------------------------------------------------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