descripcion reportes

parent e0272d7b
......@@ -54,7 +54,7 @@ input:checked + .slider:before {
transform: translateX(26px);
}
/* Rounded sliders */
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
......
......@@ -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())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment