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
a6b2cc0f
Commit
a6b2cc0f
authored
Apr 15, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
92fb36e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
268 deletions
+9
-268
L2ASCL_data (copy).html
catalog/templates/L2ASCL_data (copy).html
+0
-197
views.py
catalog/views.py
+0
-69
Reports.html
reports/templates/Reports.html
+9
-2
No files found.
catalog/templates/L2ASCL_data (copy).html
deleted
100644 → 0
View file @
92fb36e9
{% 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/views.py
View file @
a6b2cc0f
...
@@ -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
)
...
@@ -659,41 +625,6 @@ def IPN(request):
...
@@ -659,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 @
a6b2cc0f
...
@@ -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"
>
<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 }}')">
...
...
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