parchado de errores

parent 415d4503
{ {
"PATHS": { "PATHS": {
"PATH_GEOSENTINEL": "/home/emmanuelhp/Documentos/GeoSentinel", "PATH_GEOSENTINEL": "/home/ulises/Documentos/GeoSentinel",
"PATH_NAS": "/home/emmanuelhp/NAS/", "PATH_NAS": "/home/ulises/NAS/",
"PATH_USERS" : "/home/emmanuelhp/NAS/repsat_test_dev/" "PATH_USERS" : "/home/ulises/NAS/repsat_test_dev/"
}, },
"API_SENTINEL": { "API_SENTINEL": {
"SENTINEL_USER" : "emmhp", "SENTINEL_USER" : "emmhp",
......
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
<div class="box-body with-border"> <div class="box-body with-border">
<div class="row"> <div class="row">
<div class="col-lg-2 text-center"> <div class="col-lg-2 text-center">
<h4>Zone: {{report}}</h4> <h4>Zone: {{zone}}</h4>
</div> </div>
<div class="col-lg-2 text-center"> <div class="col-lg-2 text-center">
<h4>Platform: {{platform}}</h4> <h4>Platform: {{platform}}</h4>
...@@ -575,7 +575,7 @@ ...@@ -575,7 +575,7 @@
pdf.addImage($(pdfCanvas)[0], 'PNG', 0, 0); pdf.addImage($(pdfCanvas)[0], 'PNG', 0, 0);
// download the pdf // download the pdf
pdf.save('filename.pdf'); pdf.save('{{ zone }}.pdf');
}); });
</script> </script>
......
...@@ -31,23 +31,16 @@ USERS_PATH = config['PATHS']['PATH_USERS'] ...@@ -31,23 +31,16 @@ USERS_PATH = config['PATHS']['PATH_USERS']
def report_L2ASCL(request, report, purchase_id): def report_L2ASCL(request, report, purchase_id):
# image_path =USERS_PATH + request.user.email+"/"+purchase_id+"/"+"out/T15QZD/TCI/"
reporteDir = report.replace('_sclData','') reporteDir = report.replace('_sclData','')
image_path = request.user.email + "/" + purchase_id + "/" + "out/"+reporteDir+"/TCI/thumbnails/" 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" absolute_path = USERS_PATH + request.user.email + "/" + purchase_id + "/out"
folders = os.listdir(path=absolute_path) 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: with open(USERS_PATH + request.user.email + "/" + purchase_id + "/findProducts.json") as p:
dataProduct = json.load(p) dataProduct = json.load(p)
print(dataProduct['startDate'])
startDate = str(dataProduct['startDate'])[:4] +'-'+ str(dataProduct['startDate'])[4:6]+'-'+ str(dataProduct['startDate'])[6:8] 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] 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): ...@@ -100,7 +93,7 @@ def report_L2ASCL(request, report, purchase_id):
# graphData['options']['maintainAspectRatio']=False # graphData['options']['maintainAspectRatio']=False
# print(json.dumps(graphData).encode("utf-8")) # 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): # -------------------------------------------------------------------------------def Reports(request):
......
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