slider de reportes

parent 9ae0f876
...@@ -318,4 +318,34 @@ select::-ms-expand { ...@@ -318,4 +318,34 @@ select::-ms-expand {
border-top-color: #ffa74f; border-top-color: #ffa74f;
border-width: 11px; border-width: 11px;
margin-left: -11px; margin-left: -11px;
} }
\ No newline at end of file
/*progress bar effect*/
/*left and right arrows for slider with font-awesome*/
.fas.fa-chevron-left {
position: absolute;
left: 0;
top: 40%;
margin-left: 5px;
color: rgba(11, 15, 192, 0.5);
font-size: 60px;
z-index: 100;
}
.fas.fa-chevron-right {
position: absolute;
right: 0;
top: 40%;
margin-right: 5px;
color: rgba(11, 15, 192, 0.5);
font-size: 60px;
z-index: 100;
}
\ No newline at end of file
This diff is collapsed.
...@@ -47,6 +47,7 @@ def report_L2ASCL(request, purchase_id): ...@@ -47,6 +47,7 @@ def report_L2ASCL(request, purchase_id):
template = "sclData.html" template = "sclData.html"
reporteDir = 'mask' reporteDir = 'mask'
folders = "" folders = ""
productList = []
purchase = Purchase.objects.values('user__email', 'is_public', 'name', 'search__search_name', purchase = Purchase.objects.values('user__email', 'is_public', 'name', 'search__search_name',
'search__process_id__name','description','aggreg_date').get(pk=purchase_id) 'search__process_id__name','description','aggreg_date').get(pk=purchase_id)
email = purchase['user__email'] email = purchase['user__email']
...@@ -90,13 +91,34 @@ def report_L2ASCL(request, purchase_id): ...@@ -90,13 +91,34 @@ def report_L2ASCL(request, purchase_id):
#PDFGenerator(request, path, reporteDir, datasets,searchInfo) #PDFGenerator(request, path, reporteDir, datasets,searchInfo)
pass pass
if request.user.is_authenticated:
product_list = Purchase.objects.values('id').filter(
user_id__in=[request.user.id],
purchased=1,
is_public = True,
progress=100
)
else:
product_list = Purchase.objects.values('id').filter(
is_public=True,
progress=100,
user__email= email
)
for producto in product_list:
productList.append(
producto['id'],
)
print (product_list)
return render(request, template, {"graphData": json.dumps(graphData), return render(request, template, {"graphData": json.dumps(graphData),
"searchInfo": searchInfo, "IMAGE_PATH": image_path, "searchInfo": searchInfo, "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'],
"email": email}) "email": email,"lista":productList})
# -------------------------------------------------------------------------------def Reports(request): # -------------------------------------------------------------------------------def Reports(request):
...@@ -145,10 +167,11 @@ def Reports(request): ...@@ -145,10 +167,11 @@ def Reports(request):
progress = 60 progress = 60
if 'Finalizing...' in open(log_info).read(): if 'Finalizing...' in open(log_info).read():
progress = 100 progress = 100
# item = Purchase.objects.filter(pk=producto['id'])
# item = Purchase.objects.get(pk=producto['id']) #item = Purchase.objects.filter(pk=producto['id'])
# item.progress = progress item = Purchase.objects.get(pk=producto['id'])
# item.save() item.progress = progress
item.save()
with open(log_info, 'r') as myfile: with open(log_info, 'r') as myfile:
log = myfile.read().replace('\n', '') log = myfile.read().replace('\n', '')
......
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