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
7a37815c
Commit
7a37815c
authored
Apr 02, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
e0272d7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
13 deletions
+29
-13
Reports.css
reports/static/reports/css/Reports.css
+1
-1
views.py
reports/views.py
+28
-12
No files found.
reports/static/reports/css/Reports.css
View file @
7a37815c
...
...
@@ -54,7 +54,7 @@ input:checked + .slider:before {
transform
:
translateX
(
26px
);
}
/* Rounded sliders */
/* Rounded sliders */
.slider.round
{
border-radius
:
34px
;
}
...
...
reports/views.py
View file @
7a37815c
...
...
@@ -64,10 +64,7 @@ def report_L2ASCL(request, purchase_id):
image_path
=
email
+
"/"
+
purchase_id
+
"/"
+
"out/"
+
reporteDir
+
"/TCI/thumbnails/"
SCL_path
=
email
+
"/"
+
purchase_id
+
"/"
+
"out/"
+
reporteDir
+
"/SCL/"
if
os
.
path
.
exists
(
path
+
reporteDir
+
".pdf"
):
print
(
"si existe"
)
else
:
PDFGenerator
(
request
,
path
,
reporteDir
,
datasets
)
searchInfo
=
{
"title"
:
purchase
[
'name'
],
...
...
@@ -82,6 +79,11 @@ def report_L2ASCL(request, purchase_id):
"report_name"
:
"SCL Image Classification Data(Km²)"
}
if
os
.
path
.
exists
(
path
+
reporteDir
+
".pdf"
):
print
(
"si existe"
)
else
:
PDFGenerator
(
request
,
path
,
reporteDir
,
datasets
,
searchInfo
)
return
render
(
request
,
template
,
{
"graphData"
:
json
.
dumps
(
graphData
),
"searchInfo"
:
searchInfo
,
"IMAGE_PATH"
:
image_path
,
"SCL_PATH"
:
SCL_path
,
'dafaultLabel'
:
defaultLabel
,
...
...
@@ -448,8 +450,7 @@ def myBarLegend(drawing, labels):
return
d
def
PDFGenerator
(
request
,
ruta
,
reporteDir
,
datasets
):
def
PDFGenerator
(
request
,
ruta
,
reporteDir
,
datasets
,
searchInfo
):
thumbs
=
ruta
+
'out/'
+
reporteDir
+
'/TCI/thumbnails/'
SCL
=
ruta
+
'out/'
+
reporteDir
+
'/SCL/split/'
...
...
@@ -458,21 +459,36 @@ def PDFGenerator(request, ruta, reporteDir, datasets):
# define the style for our paragraph text
styles
=
getSampleStyleSheet
()
styleN
=
styles
[
'Normal'
]
styleN
.
alignment
=
1
styleN
.
fontSize
=
25
# Header
im
=
Image
(
USERS_PATH
+
'header.png'
,
width
=
300
,
height
=
70
)
im
.
hAlign
=
'CENTER'
story
.
append
(
im
)
story
.
append
(
Spacer
(
1
,
1.5
*
inch
))
# add the title
# story.append(Paragraph("<strong>Results for Vizard Experiment</strong>", styleN))
# story.append(Spacer(1, .25 * inch))
story
.
append
(
Paragraph
(
"<strong>"
+
searchInfo
[
'report_name'
]
+
"</strong>"
,
styleN
,))
story
.
append
(
Spacer
(
1
,
.60
*
inch
))
story
.
append
(
Paragraph
(
"<strong>"
+
searchInfo
[
'title'
]
+
"</strong>"
,
styleN
,))
story
.
append
(
Spacer
(
1
,
.40
*
inch
))
story
.
append
(
Paragraph
(
"<strong>"
+
searchInfo
[
'startDate'
]
+
" to "
+
searchInfo
[
'endDate'
]
+
"</strong>"
,
styleN
,))
story
.
append
(
Spacer
(
1
,
.40
*
inch
))
story
.
append
(
Paragraph
(
"<strong>Platform: "
+
searchInfo
[
'platform'
]
+
"</strong>"
,
styleN
,))
story
.
append
(
Spacer
(
1
,
.40
*
inch
))
story
.
append
(
Paragraph
(
"<strong>Product level: "
+
searchInfo
[
'productLevel'
]
+
"</strong>"
,
styleN
,))
story
.
append
(
Spacer
(
1
,
.40
*
inch
))
story
.
append
(
Paragraph
(
"<strong>Process:"
+
searchInfo
[
'process'
]
+
"</strong>"
,
styleN
,))
story
.
append
(
Spacer
(
1
,
.40
*
inch
))
story
.
append
(
Paragraph
(
"<strong>Clouds: "
+
str
(
searchInfo
[
'clouds'
])
+
"
%
</strong>"
,
styleN
,))
story
.
append
(
Spacer
(
1
,
.40
*
inch
))
# convert data to paragraph form and then add paragraphs
#
story.append(Paragraph(dataToParagraph(subject1, results1), styleN))
#
story.append(Spacer(1, .25 * inch))
#
story.append(Paragraph(dataToParagraph(subject2, results2), styleN))
#
story.append(Spacer(1, .5 * inch))
#story.append(Paragraph(dataToParagraph(subject1, results1), styleN))
#story.append(Spacer(1, .25 * inch))
#story.append(Paragraph(dataToParagraph(subject2, results2), styleN))
#story.append(Spacer(1, .5 * inch))
story
.
append
(
PageBreak
())
...
...
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