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
f0fad7e9
Commit
f0fad7e9
authored
Apr 16, 2019
by
Sergio Adrian Gongora Euan
Browse files
Options
Browse Files
Download
Plain Diff
merged with dev update
parents
8ec19c3c
a62942d0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
286 deletions
+44
-286
dashboard.html
administration/templates/dashboard.html
+2
-2
forms.py
catalog/forms.py
+1
-1
L2ASCL_data (copy).html
catalog/templates/L2ASCL_data (copy).html
+0
-197
show_cart.html
catalog/templates/show_cart.html
+8
-8
views.py
catalog/views.py
+4
-71
Reports.html
reports/templates/Reports.html
+9
-2
aside.html
reports/templates/aside.html
+12
-1
views.py
reports/views.py
+8
-4
No files found.
administration/templates/dashboard.html
View file @
f0fad7e9
...
@@ -241,12 +241,12 @@
...
@@ -241,12 +241,12 @@
<!-- /.box-header -->
<!-- /.box-header -->
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<div
class=
"col-md-8
col-xs-12 col-sm-12
"
>
<p
class=
"text-center"
>
<p
class=
"text-center"
>
<strong>
Today {% now "jS F Y" %}
</strong>
<strong>
Today {% now "jS F Y" %}
</strong>
</p>
</p>
<div
class=
"chart"
>
<div
class=
"chart
"
>
<!-- Sales Chart Canvas -->
<!-- Sales Chart Canvas -->
<!-- <canvas id="salesChart" style="height: 142px; width: 814px;" width="814"
<!-- <canvas id="salesChart" style="height: 142px; width: 814px;" width="814"
height="142"></canvas> -->
height="142"></canvas> -->
...
...
catalog/forms.py
View file @
f0fad7e9
...
@@ -9,7 +9,7 @@ from catalog.models import Process
...
@@ -9,7 +9,7 @@ from catalog.models import Process
#from django.contrib.auth.models import User
#from django.contrib.auth.models import User
#from buscador.models import Investigador, Reto
#from buscador.models import Investigador, Reto
all_process
=
Process
.
objects
.
all
(
)
all_process
=
Process
.
objects
.
filter
(
status
=
True
)
platforms
=
[
]
platforms
=
[
]
...
...
catalog/templates/L2ASCL_data (copy).html
deleted
100644 → 0
View file @
8ec19c3c
{% extends "data_top.html" %}
{% load static %}
{% block content %}
<div
class=
"wrapper"
>
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<!-- AREA CHART -->
<div
class=
"box box-primary"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Area Km²
</h3>
<div
class=
"box-tools pull-right"
>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"collapse"
><i
class=
"fa fa-minus"
></i>
</button>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"remove"
><i
class=
"fa fa-times"
></i></button>
</div>
</div>
<div
class=
"box-body"
>
<div
class=
"chart"
>
<canvas
id=
"areaChart"
style=
"height:250px"
></canvas>
</div>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
<!-- DONUT CHART -->
<div
class=
"box box-danger"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Donut Chart
</h3>
<div
class=
"box-tools pull-right"
>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"collapse"
><i
class=
"fa fa-minus"
></i>
</button>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"remove"
><i
class=
"fa fa-times"
></i></button>
</div>
</div>
<div
class=
"box-body"
>
<canvas
id=
"pieChart"
style=
"height:250px"
></canvas>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col (LEFT) -->
<div
class=
"col-md-6"
>
<!-- LINE CHART -->
<!-- BAR CHART -->
<div
class=
"box box-success"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Bar Chart
</h3>
<div
class=
"box-tools pull-right"
>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"collapse"
><i
class=
"fa fa-minus"
></i>
</button>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"remove"
><i
class=
"fa fa-times"
></i></button>
</div>
</div>
<div
class=
"box-body"
>
<div
class=
"chart"
>
<canvas
id=
"barChart"
style=
"height:230px"
></canvas>
</div>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
<div
class=
"box box-info"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
MAP
</h3>
<div
class=
"box-tools pull-right"
>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"collapsexite"
><i
class=
"fa fa-minus"
></i>
</button>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"remove"
><i
class=
"fa fa-times"
></i></button>
</div>
</div>
<div
class=
"box-body"
>
<div
class=
"chart"
>
<img
id=
"satImage"
src=
"{% static 'tmpImages/20180219_TCI_60m.jpg' %}"
height=
"512px"
/>
</div>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col (RIGHT) -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<footer
class=
"main-footer"
>
<div
class=
"pull-right hidden-xs"
>
<b>
Version
</b>
2.4.0
</div>
<strong>
Copyright
©
2014-2016
<a
href=
"https://adminlte.io"
>
Almsaeed Studio
</a>
.
</strong>
All rights
reserved.
</footer>
{% endblock %}
{% block scripts %}
<!-- page script -->
<script>
var
ctx
=
document
.
getElementById
(
"areaChart"
).
getContext
(
'2d'
);
var
myChart
=
new
Chart
(
ctx
,
{
type
:
'Line'
,
data
:
{
labels
:
[{{
labels
}}],
datasets
:
[{
label
:
'Vegetacion (4)'
,
data
:
{{
vegetation
}},
backgroundColor
:
[
'rgba(0, 250, 132, 0.5)'
,
'rgba(54, 162, 235, 0.2)'
,
'rgba(255, 206, 86, 0.2)'
,
'rgba(75, 192, 192, 0.2)'
,
'rgba(153, 102, 255, 0.2)'
,
'rgba(255, 159, 64, 0.2)'
],
borderColor
:
[
'rgba(255,99,132,1)'
,
'rgba(54, 162, 235, 1)'
,
'rgba(255, 206, 86, 1)'
,
'rgba(75, 192, 192, 1)'
,
'rgba(153, 102, 255, 1)'
,
'rgba(255, 159, 64, 1)'
],
borderWidth
:
1
},
{
label
:
'No Vegetacion (5)'
,
data
:
{{
novegetation
}},
backgroundColor
:
[
'rgba(155, 250, 0, 0.5)'
,
'rgba(54, 162, 235, 0.2)'
,
'rgba(255, 206, 86, 0.2)'
,
'rgba(75, 192, 192, 0.2)'
,
'rgba(153, 102, 255, 0.2)'
,
'rgba(255, 159, 64, 0.2)'
],
borderColor
:
[
'rgba(255,99,132,1)'
,
'rgba(54, 162, 235, 1)'
,
'rgba(255, 206, 86, 1)'
,
'rgba(75, 192, 192, 1)'
,
'rgba(153, 102, 255, 1)'
,
'rgba(255, 159, 64, 1)'
],
borderWidth
:
1
}]
},
options
:
{
events
:
[
'click'
],
onClick
:
areaChartonClick
,
scales
:
{
yAxes
:
[{
ticks
:
{
beginAtZero
:
true
}
}]
}
}
});
function
areaChartonClick
(
e
,
element
)
{
console
.
log
(
e
);
console
.
log
(
element
);
console
.
log
(
element
[
0
].
_index
);
console
.
log
(
myChart
);
console
.
log
(
myChart
.
config
.
data
.
labels
[
element
[
0
].
_index
]);
document
.
getElementById
(
"satImage"
).
src
=
"../../static/tmpImages/"
+
myChart
.
config
.
data
.
labels
[
element
[
0
].
_index
]
+
"_TCI_60m.jpg"
};
</script>
{% endblock %}
catalog/templates/show_cart.html
View file @
f0fad7e9
...
@@ -223,18 +223,18 @@
...
@@ -223,18 +223,18 @@
</tfoot>
</tfoot>
</table>
</table>
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<a
href=
"../pay"
>
<a
href=
"../pay"
class=
"btn btn-danger"
>
PAY
<input
type=
"image"
<
!--
input type="image"
src="https://www.sandbox.paypal.com/es_XC/MX/i/btn/btn_buynowCC_LG.gif"
src="https://www.sandbox.paypal.com/es_XC/MX/i/btn/btn_buynowCC_LG.gif"
border="0" name="submit"
border="0" name="submit"
alt="PayPal, la forma más segura y rápida de pagar en línea.">
alt="PayPal, la forma más segura y rápida de pagar en línea.">
<img alt="" border="0"
<img alt="" border="0"
src="https://www.sandbox.paypal.com/es_XC/i/scr/pixel.gif" width="1"
src="https://www.sandbox.paypal.com/es_XC/i/scr/pixel.gif" width="1"
height=
"1"
>
height="1"
--
>
</a>
</a>
<
!--
form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<form
action=
"https://www.sandbox.paypal.com/cgi-bin/webscr"
method=
"post"
>
<input
type=
"hidden"
name=
"cmd"
value=
"_cart"
>
<input
type=
"hidden"
name=
"cmd"
value=
"_cart"
>
<input
type=
"hidden"
name=
"upload"
value=
"1"
>
<input
type=
"hidden"
name=
"upload"
value=
"1"
>
<input
type=
"hidden"
name=
"business"
<input
type=
"hidden"
name=
"business"
...
@@ -251,9 +251,9 @@
...
@@ -251,9 +251,9 @@
{% endfor %}
{% endfor %}
<input
type=
'hidden'
name=
'cancel_return'
<input
type=
'hidden'
name=
'cancel_return'
value='
../reports
'>
value=
'
http://repsat.geoint.mx/catalog/cart/
'
>
<input
type=
'hidden'
name=
'return'
<input
type=
'hidden'
name=
'return'
value='
../catalog/cart
'>
value=
'
http://repsat.geoint.mx/catalog/cart/
'
>
<input
type=
"hidden"
name=
"notify_url"
value=
"http://repsat.geoint.mx/catalog/ipn/"
>
<input
type=
"hidden"
name=
"notify_url"
value=
"http://repsat.geoint.mx/catalog/ipn/"
>
<input
type=
"image"
<input
type=
"image"
src=
"https://www.sandbox.paypal.com/es_XC/MX/i/btn/btn_buynowCC_LG.gif"
src=
"https://www.sandbox.paypal.com/es_XC/MX/i/btn/btn_buynowCC_LG.gif"
...
@@ -264,7 +264,7 @@
...
@@ -264,7 +264,7 @@
height=
"1"
>
height=
"1"
>
</form>
</form>
<
!--
form method="post" action="http://repsat.geoint.mx/catalog/ipn/">
<form
method=
"post"
action=
"http://repsat.geoint.mx/catalog/ipn/"
>
<input
type=
"text"
name=
"nombre"
value=
""
>
<input
type=
"text"
name=
"nombre"
value=
""
>
<input
type=
"submit"
>
<input
type=
"submit"
>
</form>
</form>
...
@@ -272,7 +272,7 @@
...
@@ -272,7 +272,7 @@
<form
method=
"post"
action=
"../ipn/"
>
<form
method=
"post"
action=
"../ipn/"
>
<input
type=
"text"
name=
"nombre"
value=
""
>
<input
type=
"text"
name=
"nombre"
value=
""
>
<input
type=
"submit"
>
<input
type=
"submit"
>
</form
--
>
</form>
</div>
</div>
...
...
catalog/views.py
View file @
f0fad7e9
...
@@ -293,40 +293,6 @@ def delFromCart(request):
...
@@ -293,40 +293,6 @@ def delFromCart(request):
product_list
=
Purchase
.
objects
.
filter
(
user
=
user
,
id
=
request
.
POST
[
'id'
])
.
delete
()
product_list
=
Purchase
.
objects
.
filter
(
user
=
user
,
id
=
request
.
POST
[
'id'
])
.
delete
()
return
HttpResponse
(
status
=
204
)
return
HttpResponse
(
status
=
204
)
##-------------------------------------------------------------------------------
# def L2ASCL_data(request):
# with open("/home/mario/NAS_MarioCh/mario_repsat_test/T15QZD_sclData.json") as f:
# json_data = OrderedDict(json.load(f))
# graphData = dict()
# graphData['type']="line"
# data=dict()
# data['labels'] = [ k for k,v in sorted(json_data.items()) ]
# data['datasets'] = list()
# labels = set()
# for d in json_data:
# labels |= set(json_data[d].keys())
# labels.remove('date')
# labelNames = ["No Data", "Saturated", "Shadows", "Cloud Shadows", "Vegetation",
# "Not-Vegetated", "Whater", "Unclassified", "Cloud Medium Probablilty", "Cloud Hight Probablilty", "Thin Cirrus", "Snow"]
# colors = ["Black", "Red", "DarkGray", "Brown", "Green", "Yellow", "Blue", "Grey", "LightGray", "White", "Aqua", "Pink"]
# for l in labels:
# item = dict()
# item['label'] = labelNames[int(l)]
# if l == "0":
# item['hidden'] = "true"
# item['data'] = [ v[l] * 60*60/1000000. for k,v in sorted(json_data.items()) if l in v]
# item['backgroundColor']=colors[int(l)]
# data['datasets'].append(item)
# graphData['data']=data
## graphData['options']['responsive']=True
## graphData['options']['maintainAspectRatio']=False
# print( json.dumps(graphData).encode("utf-8"))
# return render(request, 'L2ASCL_data.html', {"graphData":json.dumps(graphData).encode("utf-8")})
# -------------------------------------------------------------------------------
# -------------------------------------------------------------------------------
def
wsReportImages
(
request
):
def
wsReportImages
(
request
):
print
(
request
.
GET
)
print
(
request
.
GET
)
...
@@ -618,10 +584,12 @@ def IPN(request):
...
@@ -618,10 +584,12 @@ def IPN(request):
PATH_USERS
=
config
[
'PATHS'
][
'PATH_USERS'
]
PATH_USERS
=
config
[
'PATHS'
][
'PATH_USERS'
]
f
=
open
(
PATH_USERS
+
"myfile.txt"
,
"w"
)
f
=
open
(
PATH_USERS
+
"myfile.txt"
,
"w"
)
x
=
request
.
POST
.
dict
()
x
=
request
.
POST
.
dict
()
f
.
write
(
'variables'
)
f
.
write
(
'variables
\n
'
)
#f.write(request.META['HTTP_REFERER']+'\n')
for
key
,
value
in
x
.
items
():
for
key
,
value
in
x
.
items
():
f
.
write
(
key
+
": "
+
value
+
'
\n
'
)
f
.
write
(
key
+
": "
+
value
+
'
\n
'
)
return
redirect
(
'../../'
)
#return redirect('../../')
return
HttpResponseRedirect
(
reverse
(
'map'
))
#print("content-type: text/html\r\n\r\n")
#print("content-type: text/html\r\n\r\n")
#if request.POST.get['payment_status'] == 'Completed':
#if request.POST.get['payment_status'] == 'Completed':
...
@@ -657,41 +625,6 @@ def IPN(request):
...
@@ -657,41 +625,6 @@ def IPN(request):
# f.write("\n")
# f.write("\n")
# f.close()
# f.close()
# -----------------------------------------------------------------------
# def Pay3(request):
# VERIFY_URL_PROD = 'https://ipnpb.paypal.com/cgi-bin/webscr'
# VERIFY_URL_TEST = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'
#
# # Switch as appropriate
# VERIFY_URL = VERIFY_URL_TEST
#
# # CGI preamble
# print('content-type: text/plain')
# print()
#
# # Read and parse query string
# param_str = sys.stdin.readline().strip()
# params = urllib.parse.parse_qsl(param_str)
#
# # Add '_notify-validate' parameter
# params.append(('cmd', '_notify-validate'))
#
# # Post back to PayPal for validation
#
# headers = {'content-type': 'application/x-www-form-urlencoded',
# 'user-agent': 'Python-IPN-Verification-Script'}
# r = requests.post(VERIFY_URL, params=params, headers=headers, verify=True)
# r.raise_for_status()
#
# # Check return message and take action as needed
# if r.text == 'VERIFIED':
# pass
# elif r.text == 'INVALID':
# pass
# else:
# pass
# return redirect("https://google.com.mx")
# ------------------------------------------------------
# ------------------------------------------------------
def
Registration
(
request
):
def
Registration
(
request
):
#user = User.objects.filter(email=request.POST['email'])
#user = User.objects.filter(email=request.POST['email'])
...
...
reports/templates/Reports.html
View file @
f0fad7e9
...
@@ -226,15 +226,22 @@
...
@@ -226,15 +226,22 @@
{%
if
product
.
initial_folder
%}
{%
if
product
.
initial_folder
%}
href=
"../reports/{{ product.purchase_id }}"
href=
"../reports/{{ product.purchase_id }}"
{%
endif
%}
{%
endif
%}
class=
"btn btn-success btn-sm col-md-
6 col-xs-6 col-sm-6 col-lg-6 col-xl-6
"
>
class=
"btn btn-success btn-sm col-md-
4 col-xs-4 col-sm-4 col-lg-4 col-xl-4
"
>
<i
class=
"fa fa-eye"
></i>
<i
class=
"fa fa-eye"
></i>
</a>
</a>
<a
title=
"Download zip"
{%
if
product
.
progress =
=
100
%}
<a
title=
"Download zip"
{%
if
product
.
progress =
=
100
%}
href=
"../../static/reports/tmpImages/repsat_test_dev/{{ request.user.email }}/{{ product.purchase_id }}/myzip.zip"
href=
"../../static/reports/tmpImages/repsat_test_dev/{{ request.user.email }}/{{ product.purchase_id }}/myzip.zip"
{%
else
%}
{%
else
%}
href=
"#"
href=
"#"
{%
endif
%}
class=
"btn btn-warning btn-sm col-md-
6 col-xs-6 col-sm-6 col-lg-6 col-xl-6
"
>
{%
endif
%}
class=
"btn btn-warning btn-sm col-md-
4 col-xs-4 col-sm-4 col-lg-4 col-xl-4
"
>
<i
class=
"fa fa-file-zip-o"
></i>
<i
class=
"fa fa-file-zip-o"
></i>
</a>
<a
title=
"Download PDF"
{%
if
product
.
progress =
=
100
%}
href=
"{% url 'PDF' product.purchase_id %}"
{%
else
%}
href=
"#"
{%
endif
%}
class=
"btn btn-info btn-sm col-md-4 col-xs-4 col-sm-4 col-lg-4 col-xl-4"
target=
"_blank"
download=
"{{ product.search_name }} ({{ product.purchase_date }}).pdf"
>
<i
class=
"fa fa-file-pdf-o"
></i>
</a>
</a>
<!--a title="View Log" href="#" class="btn btn-info"
<!--a title="View Log" href="#" class="btn btn-info"
onclick="openmodal('{{ product.log_info }}')">
onclick="openmodal('{{ product.log_info }}')">
...
...
reports/templates/aside.html
View file @
f0fad7e9
...
@@ -159,17 +159,28 @@
...
@@ -159,17 +159,28 @@
</span>
</span>
</a>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
<ul
class=
"treeview-menu sidebar-form"
>
<li>
<a
class=
"treeview submenu"
href=
"../../static/reports/tmpImages/repsat_test_dev/{{ email }}/{{ purchaseID }}/myzip.zip"
>
<i
class=
"fa fa-file-zip-o"
></i>
<span>
Export to Zip
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<li>
<a
class=
"treeview submenu"
href=
"#"
>
<a
class=
"treeview submenu"
href=
"#"
>
<i
class=
"fa fa-file-code-o"
></i>
<i
class=
"fa fa-file-code-o"
></i>
<span>
Export to JSON
</span>
<span>
Export to JSON
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
<span
class=
"label label-primary pull-right"
></span>
</span>
</span>
</a>
</a>
</li>
</li>
<li>
<li>
<a
class=
"treeview submenu"
href=
"{% url 'PDF' purchaseID %}"
target=
"_blank"
download=
"
Report
"
>
<a
class=
"treeview submenu"
href=
"{% url 'PDF' purchaseID %}"
target=
"_blank"
download=
"
{{ searchInfo.title }} ({{ searchInfo.purchase_date }}).pdf
"
>
<i
class=
"fa fa-file-pdf-o"
></i>
<i
class=
"fa fa-file-pdf-o"
></i>
<span>
Export to PDF
</span>
<span>
Export to PDF
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
...
reports/views.py
View file @
f0fad7e9
...
@@ -9,7 +9,7 @@ import xml.etree.ElementTree as ET
...
@@ -9,7 +9,7 @@ import xml.etree.ElementTree as ET
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
datetime
import
datetime
from
datetime
import
datetime
from
django.http
import
HttpResponse
,
Http404
,
JsonResponse
,
FileResponse
from
django.http
import
HttpResponse
,
Http404
,
JsonResponse
,
FileResponse
,
HttpRequest
from
django.shortcuts
import
render
,
redirect
from
django.shortcuts
import
render
,
redirect
from
reportlab.lib.pagesizes
import
letter
from
reportlab.lib.pagesizes
import
letter
from
reportlab.pdfgen
import
canvas
from
reportlab.pdfgen
import
canvas
...
@@ -48,7 +48,7 @@ def report_L2ASCL(request, purchase_id):
...
@@ -48,7 +48,7 @@ def report_L2ASCL(request, purchase_id):
reporteDir
=
'mask'
reporteDir
=
'mask'
folders
=
""
folders
=
""
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'
)
.
get
(
pk
=
purchase_id
)
'search__process_id__name'
,
'description'
,
'aggreg_date'
)
.
get
(
pk
=
purchase_id
)
email
=
purchase
[
'user__email'
]
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"
...
@@ -71,6 +71,7 @@ def report_L2ASCL(request, purchase_id):
...
@@ -71,6 +71,7 @@ def report_L2ASCL(request, purchase_id):
"title"
:
purchase
[
'name'
],
"title"
:
purchase
[
'name'
],
#"title": purchase['search__search_name'],
#"title": purchase['search__search_name'],
"process"
:
purchase
[
'search__process_id__name'
],
"process"
:
purchase
[
'search__process_id__name'
],
"purchase_date"
:
purchase
[
'aggreg_date'
],
"startDate"
:
startDate
,
"startDate"
:
startDate
,
"endDate"
:
endDate
,
"endDate"
:
endDate
,
"clouds"
:
dataProduct
[
'clouds'
],
"clouds"
:
dataProduct
[
'clouds'
],
...
@@ -107,6 +108,9 @@ def Reports(request):
...
@@ -107,6 +108,9 @@ def Reports(request):
size
=
0
size
=
0
folders
=
[]
folders
=
[]
zip
=
""
zip
=
""
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
'search__endDate'
,
'search__process_id__name'
,
'search__search_name'
,
'search__endDate'
,
'search__process_id__name'
,
'search__search_name'
,
'is_public'
,
'name'
,
'description'
)
.
filter
(
'is_public'
,
'name'
,
'description'
)
.
filter
(
...
@@ -563,7 +567,7 @@ def PDFGenerator(request,purchase_id):
...
@@ -563,7 +567,7 @@ def PDFGenerator(request,purchase_id):
else
:
else
:
maxi
=
data
[
'data'
][
index
]
maxi
=
data
[
'data'
][
index
]
# print (maxi)
# print (maxi)
values
.
append
([
data
[
'data'
][
index
]])
values
.
append
([
data
[
'data'
][
index
]])
labels
.
append
(
data
[
'label'
])
labels
.
append
(
data
[
'label'
])
path1
=
thumbs
+
file
path1
=
thumbs
+
file
...
@@ -592,7 +596,7 @@ def PDFGenerator(request,purchase_id):
...
@@ -592,7 +596,7 @@ def PDFGenerator(request,purchase_id):
story
.
append
(
PageBreak
())
story
.
append
(
PageBreak
())
# build our document with the list of flowables we put together
# build our document with the list of flowables we put together
doc
=
SimpleDocTemplate
(
ruta
+
reporteDir
+
".pdf"
,
pagesize
=
letter
,
topMargin
=
0
)
doc
=
SimpleDocTemplate
(
ruta
+
reporteDir
+
".pdf"
,
pagesize
=
letter
,
topMargin
=
5
,
title
=
searchInfo
[
'report_name'
]
+
" "
+
searchInfo
[
'title'
],
)
doc
.
build
(
story
)
doc
.
build
(
story
)
#return HttpResponse (request.POST.get('ruta'))
#return HttpResponse (request.POST.get('ruta'))
...
...
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