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
8ec19c3c
Commit
8ec19c3c
authored
Apr 11, 2019
by
Sergio Adrian Gongora Euan
Browse files
Options
Browse Files
Download
Plain Diff
update with dev
parents
afe2dc5b
cea0dbaf
Changes
26
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
28657 additions
and
362 deletions
+28657
-362
Platform.html
administration/templates/Platform.html
+276
-0
Process.html
administration/templates/Process.html
+218
-0
administration_aside.html
administration/templates/administration_aside.html
+22
-4
dashboard.html
administration/templates/dashboard.html
+67
-48
users_table.html
administration/templates/users_table.html
+1
-45
urls.py
administration/urls.py
+4
-2
views.py
administration/views.py
+30
-2
models.py
catalog/models.py
+2
-0
map.css
catalog/static/catalog/css/map.css
+4
-0
base_top.html
catalog/templates/base_top.html
+99
-80
user_button.html
catalog/templates/user_button.html
+3
-3
views.py
catalog/views.py
+0
-1
ol-ext.css
reports/static/reports/css/ol-ext.css
+4102
-0
scldata.css
reports/static/reports/css/scldata.css
+55
-0
Reports_scripts.js
reports/static/reports/js/Reports_scripts.js
+0
-1
minimap.js
reports/static/reports/js/minimap.js
+190
-76
ol-ext.js
reports/static/reports/js/ol-ext.js
+23337
-0
reportImg.js
reports/static/reports/js/reportImg.js
+6
-3
Reports.html
reports/templates/Reports.html
+1
-1
aside.html
reports/templates/aside.html
+39
-10
sclData.html
reports/templates/sclData.html
+92
-29
urls.py
reports/urls.py
+1
-0
views.py
reports/views.py
+85
-35
User_profile.html
users/templates/User_profile.html
+3
-2
users_aside.html
users/templates/users_aside.html
+1
-1
views.py
users/views.py
+19
-19
No files found.
administration/templates/Platform.html
0 → 100644
View file @
8ec19c3c
This diff is collapsed.
Click to expand it.
administration/templates/Process.html
0 → 100644
View file @
8ec19c3c
{% extends "base_top.html" %}
{% load staticfiles %}
{% block headMedia %}
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/body.css' %}"
type=
"text/css"
>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
/>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"
></script>
{% endblock %}
{% block messages %}
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-envelope-o"
></i>
<span
class=
"label label-success"
>
4
</span>
</a>
<ul
class=
"dropdown-menu"
>
<li
class=
"header"
>
You have 4 messages
</li>
<li>
<!-- inner menu: contains the actual data -->
<ul
class=
"menu"
>
<li>
<!-- start message -->
<a
href=
"#"
>
<div
class=
"pull-left"
>
<img
src=
"dist/img/user2-160x160.jpg"
class=
"img-circle"
alt=
"User Image"
>
</div>
<h4>
Support Team
<small><i
class=
"fa fa-clock-o"
></i>
5 mins
</small>
</h4>
<p>
Why not buy a new awesome theme?
</p>
</a>
</li>
<!-- end message -->
<li>
<a
href=
"#"
>
<div
class=
"pull-left"
>
<img
src=
"dist/img/user3-128x128.jpg"
class=
"img-circle"
alt=
"User Image"
>
</div>
<h4>
AdminLTE Design Team
<small><i
class=
"fa fa-clock-o"
></i>
2 hours
</small>
</h4>
<p>
Why not buy a new awesome theme?
</p>
</a>
</li>
</ul>
</li>
<li
class=
"footer"
><a
href=
"#"
>
See All Messages
</a></li>
</ul>
{% endblock %}
{% block notifications %}
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-bell-o"
></i>
<span
class=
"label label-warning"
>
10
</span>
</a>
<ul
class=
"dropdown-menu"
>
<li
class=
"header"
>
You have 10 notifications
</li>
<li>
<!-- inner menu: contains the actual data -->
<ul
class=
"menu"
>
<li>
<a
href=
"#"
>
<i
class=
"fa fa-users text-aqua"
></i>
5 new members joined today
</a>
</li>
</li>
</ul>
</li>
<li
class=
"footer"
><a
href=
"#"
>
View all
</a></li>
</ul>
{% endblock %}
{% block tasks %}
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-flag-o"
></i>
<span
class=
"label label-danger"
>
9
</span>
</a>
<ul
c
{%
load
static
%}
lass=
"dropdown-menu"
>
<li
class=
"header"
>
You have 9 tasks
</li>
<li>
<!-- inner menu: contains the actual data -->
<ul
class=
"menu"
>
<li>
<!-- Task item -->
<a
href=
"#"
>
<h3>
Design some buttons
<small
class=
"pull-right"
>
20%
</small>
</h3>
<div
class=
"progress xs"
>
<div
class=
"progress-bar progress-bar-aqua"
style=
"width: 20%"
role=
"progressbar"
aria-valuenow=
"20"
aria-valuemin=
"0"
aria-valuemax=
"100"
>
<span
class=
"sr-only"
>
20% Complete
</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
</ul>
</li>
<li
class=
"footer"
>
<a
href=
"#"
>
View all tasks
</a>
</li>
</ul>
{% endblock %}
{% block sidebar %}
{% include 'administration_aside.html' %}
{% endblock %}
{% block user %}
{% include "user_button.html" %}
{% endblock %}
{% block content %}
<div
class=
"wrapper"
style=
"background-color: #ecf0f5;"
>
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
{{ Viewname }}
</div>
<div
class=
"panel-body text-center"
>
<table
data-toggle=
"table"
id=
"example"
class=
"table table-striped table-bordered"
style=
"width:100%"
>
<thead>
<th>
ID
</th>
<th>
Name
</th>
<th>
Platform
</th>
<th>
Product Level
</th>
<th>
Status
</th>
<th>
Actions
</th>
</thead>
<tbody>
{% for process in process %}
<tr>
<td>
{{ process.id }}
</td>
<td>
{{ process.name }}
</td>
<td>
{{ process.platform_id }}
</td>
<td>
{{ process.product_level }}
</td>
<form
method=
"post"
action=
"{% url 'update' %}"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"request_path"
value=
"{{ request.path }}"
>
<input
type=
"hidden"
name=
"user_id"
value=
"{{ user.user_id }}"
>
<td>
<input
type=
"checkbox"
name=
"status"
value=
"1"
{%
if
not
request
.
user
.
is_superuser
%}
disabled
{%
endif
%}
{%
if
process
.
status =
=
True
%}
checked
{%
endif
%}
>
</td>
<td>
<button
{%
if
not
request
.
user
.
is_superuser
%}
disabled
{%
endif
%}
title=
"save"
type=
"submit"
class=
"btn btn-success"
><i
class=
"fa fa-save"
></i></button>
</td>
</form>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</section>
<!-- /.content -->
</div>
<footer
class=
" page-footer font-small special-color-dark pt-5"
style=
"bottom: 0; position: absolute"
>
<!-- Footer Elements -->
<div
class=
"container"
>
<!-- Social buttons
<ul class="list-unstyled list-inline text-center">
<li class="list-inline-item">
<a class="btn-floating btn-fb mx-1">
<i class="fa fa-faceboo"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-tw mx-1">
<i class="fa fa-twitter"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-gplus mx-1">
<i class="fa fa-google-plus"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-li mx-1">
<i class="fa fa-linkedin"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-dribbble mx-1">
<i class="fa fa-dribbble"> </i>
</a>
</li>
</ul>
<!-- Social buttons -->
</div>
<!-- Footer Elements -->
<!-- Copyright -->
<div
class=
"footer-copyright text-center py-3"
>
© 2019 Copyright:
<a
href=
"http://geoint.mx/"
>
Centro de Investigación en Ciencias de Información Geoespacial.
</a>
</div>
<!-- Copyright -->
</footer>
{% endblock %}
{% block templates %}{% include "templates.html" %}{% endblock %}
{% block scripts %}
<script>
$
(
document
).
ready
(
function
()
{
$
(
'#example'
).
DataTable
();
});
</script>
{% endblock %}
\ No newline at end of file
administration/templates/administration_aside.html
View file @
8ec19c3c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<br>
<br>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li>
<li>
<a
class=
"treeview "
href=
"{
{ BASE_URL }}/administration
"
>
<a
class=
"treeview "
href=
"{
% url 'Dashboard' %}
"
>
<i
class=
"fa fa-home"
></i>
<i
class=
"fa fa-home"
></i>
<span>
Dashboard
</span>
<span>
Dashboard
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</a>
</a>
</li>
</li>
<li>
<li>
<a
class=
"treeview "
href=
"
../../administration/request
"
>
<a
class=
"treeview "
href=
"
{% url 'request' %}
"
>
<i
class=
"fa fa-user-plus"
></i>
<i
class=
"fa fa-user-plus"
></i>
<span>
Request
</span>
<span>
Request
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</a>
</a>
</li>
</li>
<li>
<li>
<a
class=
"treeview "
href=
"
../../administration/users
"
>
<a
class=
"treeview "
href=
"
{% url 'active_users' %}
"
>
<i
class=
"fa fa-users"
></i>
<i
class=
"fa fa-users"
></i>
<span>
Active users
</span>
<span>
Active users
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
@@ -29,6 +29,24 @@
...
@@ -29,6 +29,24 @@
</a>
</a>
</li>
</li>
<li>
<li>
<a
class=
"treeview "
href=
"{% url 'all_process' %}"
>
<i
class=
"fa fa-sync-alt"
></i>
<span>
Catalog of Process
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview "
href=
"{% url 'all_platform' %}"
>
<i
class=
"fa fa-satellite"
></i>
<span>
Catalog of Platforms
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<!--li>
<a class="treeview " href="#" onclick="window.history.back();">
<a class="treeview " href="#" onclick="window.history.back();">
<i class="fa fa-backward"></i>
<i class="fa fa-backward"></i>
<span>Back</span>
<span>Back</span>
...
@@ -36,6 +54,6 @@
...
@@ -36,6 +54,6 @@
<span class="label label-primary pull-right"></span>
<span class="label label-primary pull-right"></span>
</span>
</span>
</a>
</a>
</li>
</li
--
>
</ul>
</ul>
</div>
</div>
\ No newline at end of file
administration/templates/dashboard.html
View file @
8ec19c3c
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
<script
src=
"{% static 'js/Chart.min.js' %}"
></script>
<script
src=
"{% static 'js/Chart.min.js' %}"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
/>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"
></script>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.7.2/css/all.css"
integrity=
"sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.7.2/css/all.css"
integrity=
"sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin=
"anonymous"
>
{% endblock %}
{% endblock %}
{% block messages %}
{% block messages %}
...
@@ -146,7 +147,7 @@
...
@@ -146,7 +147,7 @@
<span
class=
"info-box-text"
>
Active Users
</span>
<span
class=
"info-box-text"
>
Active Users
</span>
<span
class=
"info-box-number"
>
{{ Usuarios }}
</span>
<span
class=
"info-box-number"
>
{{ Usuarios }}
</span>
<span
class=
"info-box-more pull-right"
>
<span
class=
"info-box-more pull-right"
>
<a
href=
"
../../administration/users
"
class=
"small-box-footer"
>
<a
href=
"
{% url 'active_users' %}
"
class=
"small-box-footer"
>
More info
<i
class=
"fa fa-arrow-circle-right"
></i>
More info
<i
class=
"fa fa-arrow-circle-right"
></i>
</a>
</a>
</span>
</span>
...
@@ -168,7 +169,7 @@
...
@@ -168,7 +169,7 @@
<span
class=
"info-box-text"
>
User Registrations
</span>
<span
class=
"info-box-text"
>
User Registrations
</span>
<span
class=
"info-box-number"
>
{{ Solicitud }}
</span>
<span
class=
"info-box-number"
>
{{ Solicitud }}
</span>
<span
class=
"info-box-more pull-right"
>
<span
class=
"info-box-more pull-right"
>
<a
href=
"
../../administration/request
"
class=
"small-box-footer"
>
<a
href=
"
{% url 'request' %}
"
class=
"small-box-footer"
>
More info
<i
class=
"fa fa-arrow-circle-right"
></i>
More info
<i
class=
"fa fa-arrow-circle-right"
></i>
</a>
</a>
</span>
</span>
...
@@ -186,9 +187,7 @@
...
@@ -186,9 +187,7 @@
<span
class=
"info-box-text"
>
Processing
</span>
<span
class=
"info-box-text"
>
Processing
</span>
<span
class=
"info-box-number"
>
{{ Descargando }}
</span>
<span
class=
"info-box-number"
>
{{ Descargando }}
</span>
<span
class=
"info-box-more pull-right"
>
<span
class=
"info-box-more pull-right"
>
<a
href=
"#"
class=
"small-box-footer"
>
More info
<i
class=
"fa fa-arrow-circle-right"
></i>
</a>
</span>
</span>
</div>
</div>
<!-- /.info-box-content -->
<!-- /.info-box-content -->
...
@@ -204,9 +203,6 @@
...
@@ -204,9 +203,6 @@
<span
class=
"info-box-text"
>
Repsat Storage
</span>
<span
class=
"info-box-text"
>
Repsat Storage
</span>
<span
class=
"info-box-number"
>
{{ size_repsat }}
</span>
<span
class=
"info-box-number"
>
{{ size_repsat }}
</span>
<span
class=
"info-box-more pull-right"
>
<span
class=
"info-box-more pull-right"
>
<a
href=
"#"
class=
"small-box-footer"
>
More info
<i
class=
"fa fa-arrow-circle-right"
></i>
</a>
</span>
</span>
</div>
</div>
<!-- /.info-box-content -->
<!-- /.info-box-content -->
...
@@ -222,9 +218,6 @@
...
@@ -222,9 +218,6 @@
<span
class=
"info-box-text"
>
Sentinel Storage
</span>
<span
class=
"info-box-text"
>
Sentinel Storage
</span>
<span
class=
"info-box-number"
>
{{ size_sentinel }}
</span>
<span
class=
"info-box-number"
>
{{ size_sentinel }}
</span>
<span
class=
"info-box-more pull-right"
>
<span
class=
"info-box-more pull-right"
>
<a
href=
"#"
class=
"small-box-footer"
>
More info
<i
class=
"fa fa-arrow-circle-right"
></i>
</a>
</span>
</span>
</div>
</div>
<!-- /.info-box-content -->
<!-- /.info-box-content -->
...
@@ -368,19 +361,56 @@
...
@@ -368,19 +361,56 @@
<!-- /.content -->
<!-- /.content -->
</div>
</div>
</footer>
{% if messages %}
<div
class=
"container col-md-2 col-lg-2 col-xs-2 col-sm-2"
style=
"bottom: 0; right: 0;position: absolute"
>
{% for message in messages %}
<div
{%
if
message
.
tags
%}
class=
"fade in alert alert-dismissible alert-{{ message.tags }}"
{%
endif
%}
>
{% endblock %}
<a
href=
"#"
class=
"close"
data-dismiss=
"alert"
aria-label=
"close"
>
×
</a>
<strong>
{{ message.tags }}!
</strong>
{{ message }}.
{% block footer %}
<footer
class=
" page-footer font-small special-color-dark pt-5"
style=
"bottom: 0; position: absolute"
>
<!-- Footer Elements -->
<div
class=
"container"
>
<!-- Social buttons
<ul class="list-unstyled list-inline text-center">
<li class="list-inline-item">
<a class="btn-floating btn-fb mx-1">
<i class="fa fa-faceboo"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-tw mx-1">
<i class="fa fa-twitter"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-gplus mx-1">
<i class="fa fa-google-plus"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-li mx-1">
<i class="fa fa-linkedin"> </i>
</a>
</li>
<li class="list-inline-item">
<a class="btn-floating btn-dribbble mx-1">
<i class="fa fa-dribbble"> </i>
</a>
</li>
</ul>
<!-- Social buttons -->
</div>
</div>
{% endfor %}
<!-- Footer Elements -->
<!-- Copyright -->
<div
class=
"footer-copyright text-center py-3"
>
© 2019 Copyright:
<a
href=
"http://geoint.mx/"
>
Centro de Investigación en Ciencias de Información Geoespacial.
</a>
</div>
</div>
{% endif %}
<!-- Copyright -->
<div
id=
"ol"
></div>
</footer>
{% endblock %}
{% endblock %}
{% block templates %}
{% block templates %}
...
@@ -407,20 +437,11 @@
...
@@ -407,20 +437,11 @@
{
%
endfor
%
}
{
%
endfor
%
}
],
],
backgroundColor
:
[
backgroundColor
:
[
'rgba(255, 99, 132, 0.2)'
,
'rgba(222, 130, 50, 0.2)'
'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
:
[
borderColor
:
[
'rgba(255,99,132,1)'
,
'rgba(222, 130, 50,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
borderWidth
:
1
}]
}]
...
@@ -437,7 +458,6 @@
...
@@ -437,7 +458,6 @@
});
});
// mostrar imagen al dar click en los puntos
// mostrar imagen al dar click en los puntos
document
.
getElementById
(
"salesChart"
).
onclick
=
function
(
evt
)
{
document
.
getElementById
(
"salesChart"
).
onclick
=
function
(
evt
)
{
// activePoints = myChart.getElementsAtEvent(evt);
// activePoints = myChart.getElementsAtEvent(evt);
...
@@ -458,35 +478,34 @@
...
@@ -458,35 +478,34 @@
console
.
log
(
"hola"
);
console
.
log
(
"hola"
);
$
(
'#mostrar'
).
empty
();
$
(
'#mostrar'
).
empty
();
$
(
'#mostrar'
).
append
(
"<table class=
\"
table table-hover
\"
id=
\"
example
\"
>"
+
$
(
'#mostrar'
).
append
(
"<table class=
\"
table table-hover
\"
id=
\"
example
\"
>"
+
"<thead>"
+
"<thead>"
+
"<tr>"
+
"<tr>"
+
"<th class=
\"
text-center
\"
>User ID</th>"
+
"<th class=
\"
text-center
\"
>User ID</th>"
+
"<th class=
\"
text-center
\"
>User</th>"
+
"<th class=
\"
text-center
\"
>User</th>"
+
"<th class=
\"
text-center
\"
>E-Mail</th>"
+
"<th class=
\"
text-center
\"
>E-Mail</th>"
+
"<th class=
\"
text-center
\"
>Purchases</th>"
+
"<th class=
\"
text-center
\"
>Purchases</th>"
+
"<th class=
\"
text-center
\"
>Storage</th>"
+
//
"
<
th
class
=
\
"text-center
\"
>Storage</th>"
+
"<th class=
\"
text-center
\"
>Downloads in process</th>"
+
"<th class=
\"
text-center
\"
>Downloads in process</th>"
+
"</tr>"
+
"</tr>"
+
"</thead>"
+
"</thead>"
+
"<tbody id=
\"
tbody
\"
class=
\"
text-center
\"
>"
);
"<tbody id=
\"
tbody
\"
class=
\"
text-center
\"
>"
);
$
.
each
(
data
,
function
(
key
,
val
)
{
$
.
each
(
data
,
function
(
key
,
val
)
{
$
(
"#tbody"
).
append
(
"<tr>"
+
$
(
"#tbody"
).
append
(
"<tr>"
+
"<td>"
+
val
[
'user_id'
]
+
"</td>"
+
"<td>"
+
val
[
'user_id'
]
+
"</td>"
+
"<td>"
+
val
[
'username'
]
+
"</td>"
+
"<td>"
+
val
[
'username'
]
+
"</td>"
+
"<td>"
+
val
[
'email'
]
+
"</td>"
+
"<td>"
+
val
[
'email'
]
+
"</td>"
+
"<td>"
+
val
[
'purchases'
]
+
"</td>"
+
"<td>"
+
val
[
'purchases'
]
+
"</td>"
+
"<td>"
+
val
[
'storage'
]
+
"</td>"
+
//
"
<
td
>
"+val['storage']+"
<
/td>"
+
"<td>"
+
val
[
'in_process'
]
+
"</td>"
+
"<td>"
+
val
[
'in_process'
]
+
"</td>"
+
"</tr>"
"</tr>"
);
);
});
});
$
(
'#mostrar'
).
append
(
"</tbody>"
+
$
(
'#mostrar'
).
append
(
"</tbody>"
+
"</table>"
);
"</table>"
);
$
(
'#example'
).
DataTable
({
$
(
'#example'
).
DataTable
({});
});
}
}
});
});
...
...
administration/templates/users_table.html
View file @
8ec19c3c
...
@@ -195,51 +195,7 @@
...
@@ -195,51 +195,7 @@
{% block scripts %}
{% block scripts %}
<script>
<script>
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'#example'
).
DataTable
$
(
'#example'
).
DataTable
();
({
language
:
{
"sProcessing"
:
"Procesando..."
,
"sLengthMenu"
:
"Mostrar _MENU_ registros"
,
"sZeroRecords"
:
"No se encontraron resultados"
,
"sEmptyTable"
:
"Ningún dato disponible en esta tabla"
,
"sInfo"
:
"Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros"
,
"sInfoEmpty"
:
"Mostrando registros del 0 al 0 de un total de 0 registros"
,
"sInfoFiltered"
:
"(filtrado de un total de _MAX_ registros)"
,
"sInfoPostFix"
:
""
,
"sSearch"
:
"Buscar:"
,
"sUrl"
:
""
,
"sInfoThousands"
:
","
,
"sLoadingRecords"
:
"Cargando..."
,
"oPaginate"
:
{
"sFirst"
:
"Primero"
,
"sLast"
:
"Último"
,
"sNext"
:
"Siguiente"
,
"sPrevious"
:
"Anterior"
},
"oAria"
:
{
"sSortAscending"
:
": Activar para ordenar la columna de manera ascendente"
,
"sSortDescending"
:
": Activar para ordenar la columna de manera descendente"
}
},
responsive
:
{
details
:
{
type
:
'column'
,
target
:
'tr'
}
},
columnDefs
:
[{
className
:
'control'
,
orderable
:
false
,
targets
:
0
}],
order
:
[
1
,
'asc'
]
});
});
});
</script>
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
administration/urls.py
View file @
8ec19c3c
...
@@ -4,8 +4,10 @@ from . import views
...
@@ -4,8 +4,10 @@ from . import views
urlpatterns
=
[
urlpatterns
=
[
url
(
r'^$'
,
views
.
Dashboard
,
name
=
'Dashboard'
),
url
(
r'^$'
,
views
.
Dashboard
,
name
=
'Dashboard'
),
url
(
r'^request/$'
,
views
.
Request_users
,
name
=
'
R
equest'
),
url
(
r'^request/$'
,
views
.
Request_users
,
name
=
'
r
equest'
),
url
(
r'^update/$'
,
views
.
update_user
,
name
=
'update'
),
url
(
r'^update/$'
,
views
.
update_user
,
name
=
'update'
),
url
(
r'^users/$'
,
views
.
active_users
,
name
=
'users'
),
url
(
r'^users/$'
,
views
.
active_users
,
name
=
'active_users'
),
url
(
r'^platform/$'
,
views
.
all_Platform
,
name
=
'all_platform'
),
url
(
r'^process/$'
,
views
.
all_Process
,
name
=
'all_process'
),
url
(
r'^ws/report_table$'
,
views
.
wsPurchasesPM
,
name
=
'wsPurchasesPM'
),
url
(
r'^ws/report_table$'
,
views
.
wsPurchasesPM
,
name
=
'wsPurchasesPM'
),
]
]
\ No newline at end of file
administration/views.py
View file @
8ec19c3c
...
@@ -13,7 +13,7 @@ from django.http import HttpResponse, HttpResponseRedirect, HttpRequest, Http404
...
@@ -13,7 +13,7 @@ from django.http import HttpResponse, HttpResponseRedirect, HttpRequest, Http404
# Create your views here.
# Create your views here.
from
django.views.decorators.csrf
import
csrf_exempt
from
django.views.decorators.csrf
import
csrf_exempt
from
catalog.models
import
Purchase
,
Search
from
catalog.models
import
Purchase
,
Search
,
Platform
,
Process
from
catalog.views
import
config
from
catalog.views
import
config
USERS_PATH
=
config
[
'PATHS'
][
'PATH_NAS'
]
USERS_PATH
=
config
[
'PATHS'
][
'PATH_NAS'
]
...
@@ -250,4 +250,32 @@ def best_unit_size(bytes_size):
...
@@ -250,4 +250,32 @@ def best_unit_size(bytes_size):
return
str
(
round
(
bu_size
,
2
))
+
" "
+
unit
return
str
(
round
(
bu_size
,
2
))
+
" "
+
unit
#------------------------------------------------
#------------------------------------------------
def
all_Platform
(
request
):
platforms
=
Platform
.
objects
.
all
()
platforms_list
=
[]
for
platform
in
platforms
:
platforms_list
.
append
({
"id"
:
platform
.
id
,
"name"
:
platform
.
name
,
"acronym"
:
platform
.
acronym
,
"status"
:
platform
.
status
,
})
return
render
(
request
,
"Platform.html"
,{
'platforms'
:
platforms_list
})
#------------------------------------------------
def
all_Process
(
request
):
process
=
Process
.
objects
.
values
(
'id'
,
'name'
,
'status'
,
'platform__name'
,
'productLevel'
)
process_list
=
[]
for
process
in
process
:
process_list
.
append
({
"id"
:
process
[
'id'
],
"name"
:
process
[
'name'
],
"platform_id"
:
process
[
'platform__name'
],
"product_level"
:
process
[
'productLevel'
],
"status"
:
process
[
'status'
],
})
return
render
(
request
,
"Process.html"
,
{
'process'
:
process_list
})
catalog/models.py
View file @
8ec19c3c
...
@@ -10,6 +10,7 @@ from django.db import models
...
@@ -10,6 +10,7 @@ from django.db import models
class
Platform
(
models
.
Model
):
class
Platform
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
64
)
name
=
models
.
CharField
(
max_length
=
64
)
acronym
=
models
.
CharField
(
max_length
=
16
)
acronym
=
models
.
CharField
(
max_length
=
16
)
status
=
models
.
BooleanField
(
default
=
True
)
class
Polygon
(
models
.
Model
):
class
Polygon
(
models
.
Model
):
...
@@ -53,6 +54,7 @@ class Process(models.Model):
...
@@ -53,6 +54,7 @@ class Process(models.Model):
name
=
models
.
CharField
(
max_length
=
50
)
name
=
models
.
CharField
(
max_length
=
50
)
platform
=
models
.
ForeignKey
(
Platform
,
on_delete
=
models
.
CASCADE
,
default
=
''
)
platform
=
models
.
ForeignKey
(
Platform
,
on_delete
=
models
.
CASCADE
,
default
=
''
)
productLevel
=
models
.
CharField
(
max_length
=
8
,
default
=
''
)
productLevel
=
models
.
CharField
(
max_length
=
8
,
default
=
''
)
status
=
models
.
BooleanField
(
default
=
True
)
class
Search
(
models
.
Model
):
class
Search
(
models
.
Model
):
...
...
catalog/static/catalog/css/map.css
View file @
8ec19c3c
...
@@ -33,3 +33,7 @@ html, body
...
@@ -33,3 +33,7 @@ html, body
text-decoration
:
none
;
text-decoration
:
none
;
color
:
black
;
color
:
black
;
}
}
#cloudPercentageSelector
{
background
:
transparent
;
}
catalog/templates/base_top.html
View file @
8ec19c3c
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
<!-- jsPDF -->
<!-- jsPDF -->
<script
src=
'https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.3/jspdf.debug.js'
></script>
<script
src=
'https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.3/jspdf.debug.js'
></script>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.7.2/css/all.css"
integrity=
"sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin=
"anonymous"
>
{% block headMedia %}{% endblock %}
{% block headMedia %}{% endblock %}
</head>
</head>
<body
class=
"hold-transition skin-yellow sidebar-mini"
>
<body
class=
"hold-transition skin-yellow sidebar-mini"
>
...
@@ -33,7 +36,8 @@
...
@@ -33,7 +36,8 @@
<div
class=
"wrmapper"
>
<div
class=
"wrmapper"
>
<header
class=
"main-header"
>
<header
class=
"main-header"
>
<!-- Logo -->
<!-- Logo -->
<a
{%
if
request
.
user
.
is_authenticated
%}
href=
"{{ BASE_URL }}/catalog"
{%
else
%}
href=
"../../../"
{%
endif
%}
class=
"logo"
>
<a
{%
if
request
.
user
.
is_authenticated
%}
href=
"{{ BASE_URL }}/catalog"
{%
else
%}
href=
"../../../"
{%
endif
%}
class=
"logo"
>
<!-- mini logo for sidebar mini 50x50 pixels -->
<!-- mini logo for sidebar mini 50x50 pixels -->
<span
class=
"logo-mini"
><b>
G
</b>
eo
</span>
<span
class=
"logo-mini"
><b>
G
</b>
eo
</span>
<!-- logo for regular state and mobile devices -->
<!-- logo for regular state and mobile devices -->
...
@@ -123,8 +127,10 @@
...
@@ -123,8 +127,10 @@
<aside
class=
"control-sidebar control-sidebar-dark"
>
<aside
class=
"control-sidebar control-sidebar-dark"
>
<!-- Create the tabs -->
<!-- Create the tabs -->
<ul
class=
"nav nav-tabs nav-justified control-sidebar-tabs"
>
<ul
class=
"nav nav-tabs nav-justified control-sidebar-tabs"
>
<li
id=
"globe"
class=
"active"
><a
href=
"#control-sidebar-home-tab"
data-toggle=
"tab"
><i
class=
"fa fa-globe"
></i></a></li>
<li
id=
"globe"
class=
"active"
><a
href=
"#control-sidebar-home-tab"
data-toggle=
"tab"
><i
<li
id=
"cart"
><a
href=
"#control-sidebar-settings-tab"
onclick=
"updateCart()"
data-toggle=
"tab"
><i
class=
"fa fa-shopping-cart"
></i></a>
class=
"fa fa-globe"
></i></a></li>
<li
id=
"cart"
><a
href=
"#control-sidebar-settings-tab"
onclick=
"updateCart()"
data-toggle=
"tab"
><i
class=
"fa fa-shopping-cart"
></i></a>
</li>
</li>
</ul>
</ul>
<!-- Tab panes -->
<!-- Tab panes -->
...
@@ -197,9 +203,10 @@
...
@@ -197,9 +203,10 @@
{% block templates %}{% endblock %}
{% block templates %}{% endblock %}
<!-- T E M P L A T E S -->
<!-- T E M P L A T E S -->
<!-- MODAL 1 -->
<!-- MODAL 1 -->
{% block modal
1
%}{% endblock %}
{% block modal
s
%}{% endblock %}
<!-- MODAL 1 -->
<!-- MODAL 1 -->
<!-- Bootstrap 3.3.7 -->
<!-- Bootstrap 3.3.7 -->
<script
src=
"{% static 'catalog/adminlte/bower_components/bootstrap/dist/js/bootstrap.min.js' %}"
></script>
<script
src=
"{% static 'catalog/adminlte/bower_components/bootstrap/dist/js/bootstrap.min.js' %}"
></script>
<!-- AdminLTE App -->
<!-- AdminLTE App -->
...
@@ -209,7 +216,19 @@
...
@@ -209,7 +216,19 @@
<!-- Chartsjs -->
<!-- Chartsjs -->
<script
src=
"{% static 'catalog/js/Chart.min.js' %}"
type=
"text/javascript"
></script>
<script
src=
"{% static 'catalog/js/Chart.min.js' %}"
type=
"text/javascript"
></script>
{% block footer %}{% endblock %}
{% block scripts %}{% endblock %}
{% block scripts %}{% endblock %}
<div
id=
"ol"
></div>
{% if messages %}
<div
class=
"container col-md-2 col-lg-2 col-xs-2 col-sm-2"
style=
"bottom: 0; right: 0;position: absolute"
>
{% for message in messages %}
<div
{%
if
message
.
tags
%}
class=
"fade in alert alert-dismissible alert-{{ message.tags }}"
{%
endif
%}
>
<a
href=
"#"
class=
"close"
data-dismiss=
"alert"
aria-label=
"close"
>
×
</a>
<strong>
{{ message.tags }}!
</strong>
{{ message }}.
</div>
{% endfor %}
</div>
{% endif %}
</body>
</body>
</html>
</html>
catalog/templates/user_button.html
View file @
8ec19c3c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<!-- History element -->
<!-- History element -->
<li>
<li>
<a
class=
"treeview "
href=
"
../../../users
"
>
<a
class=
"treeview "
href=
"
{% url 'users' %}
"
>
<i
class=
"fa fa-user-circle"
></i>
<i
class=
"fa fa-user-circle"
></i>
<span>
Profile
</span>
<span>
Profile
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<!-- End History element -->
<!-- End History element -->
<!-- History element -->
<!-- History element -->
<li>
<li>
<a
class=
"treeview "
href=
"{
{ BASE_URL }}/reports
"
>
<a
class=
"treeview "
href=
"{
% url 'reports' %}
"
>
<i
class=
"fa fa-history"
></i>
<i
class=
"fa fa-history"
></i>
<span>
Shopping History
</span>
<span>
Shopping History
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</a>
</a>
</li>
</li>
<li>
<li>
<a
class=
"treeview "
href=
"{
{ BASE_URL }}/catalog/cart
"
>
<a
class=
"treeview "
href=
"{
% url 'show-cart' %}
"
>
<i
class=
"fa fa-shopping-cart"
></i>
<i
class=
"fa fa-shopping-cart"
></i>
<span>
View shopping cart
</span>
<span>
View shopping cart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
...
catalog/views.py
View file @
8ec19c3c
...
@@ -616,7 +616,6 @@ def Pay(request):
...
@@ -616,7 +616,6 @@ def Pay(request):
@
csrf_exempt
@
csrf_exempt
def
IPN
(
request
):
def
IPN
(
request
):
PATH_USERS
=
config
[
'PATHS'
][
'PATH_USERS'
]
PATH_USERS
=
config
[
'PATHS'
][
'PATH_USERS'
]
print
()
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'
)
...
...
reports/static/reports/css/ol-ext.css
0 → 100644
View file @
8ec19c3c
This diff is collapsed.
Click to expand it.
reports/static/reports/css/scldata.css
View file @
8ec19c3c
...
@@ -162,3 +162,58 @@ input[type=range]::-webkit-slider-thumb {
...
@@ -162,3 +162,58 @@ input[type=range]::-webkit-slider-thumb {
border-radius: 100%;
border-radius: 100%;
cursor: pointer;
cursor: pointer;
} */
} */
/* Reset Select */
select
{
-webkit-appearance
:
none
;
-moz-appearance
:
none
;
-ms-appearance
:
none
;
appearance
:
none
;
outline
:
0
;
box-shadow
:
none
;
border
:
0
!important
;
background
:
#2c3e50
;
background-image
:
none
;
}
/* Custom Select */
.select
{
position
:
relative
;
display
:
block
;
width
:
9em
;
height
:
3em
;
line-height
:
3
;
background
:
#2c3e50
;
overflow
:
hidden
;
border-radius
:
.25em
;
}
select
{
width
:
100%
;
height
:
100%
;
margin
:
0
;
padding
:
0
0
0
.5em
;
color
:
#fff
;
cursor
:
pointer
;
}
select
::-ms-expand
{
display
:
none
;
}
/* Arrow */
.select
::after
{
content
:
'\25BC'
;
position
:
absolute
;
top
:
0
;
right
:
0
;
bottom
:
0
;
padding
:
0
1em
;
background
:
#34495e
;
pointer-events
:
none
;
}
/* Transition */
.select
:hover::after
{
color
:
#f39c12
;
}
.select
::after
{
-webkit-transition
:
.25s
all
ease
;
-o-transition
:
.25s
all
ease
;
transition
:
.25s
all
ease
;
}
reports/static/reports/js/Reports_scripts.js
View file @
8ec19c3c
...
@@ -65,7 +65,6 @@ $(function () {
...
@@ -65,7 +65,6 @@ $(function () {
responsive
:
true
responsive
:
true
});
});
});
});
...
...
reports/static/reports/js/minimap.js
View file @
8ec19c3c
This diff is collapsed.
Click to expand it.
reports/static/reports/js/ol-ext.js
0 → 100644
View file @
8ec19c3c
This diff is collapsed.
Click to expand it.
reports/static/reports/js/reportImg.js
View file @
8ec19c3c
...
@@ -25,10 +25,13 @@ document.getElementById("myChart").onclick = function (evt) {
...
@@ -25,10 +25,13 @@ document.getElementById("myChart").onclick = function (evt) {
if
(
activePoint
.
length
>
0
){
if
(
activePoint
.
length
>
0
){
var
firstPoint
=
activePoint
[
0
];
var
firstPoint
=
activePoint
[
0
];
//console.log(firstPoint)
//console.log(firstPoint._datasetIndex) //indice de la clase a la que pertenece (vegetación, agua, etc.)
var
label
=
myChart
.
data
.
labels
[
firstPoint
.
_index
];
var
label
=
myChart
.
data
.
labels
[
firstPoint
.
_index
];
addImageLayer
(
label
)
//console.log(firstPoint._datasetIndex) //indice de la clase a la que pertenece (vegetación, agua, etc.)
addImageLayer
({
layerDate
:
label
});
//console.log(myChart.legend.legendItems[firstPoint._datasetIndex].text) //nombre de la capa a la que pertenece (vegetación, agua, etc.)
//console.log(myChart.legend.legendItems[firstPoint._datasetIndex].text) //nombre de la capa a la que pertenece (vegetación, agua, etc.)
//if (!firstPoint) return;
//if (!firstPoint) return;
activePoints
.
forEach
(
function
(
value
,
index
)
{
activePoints
.
forEach
(
function
(
value
,
index
)
{
...
...
reports/templates/Reports.html
View file @
8ec19c3c
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
<br>
<br>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li>
<li>
<a
class=
"treeview "
href=
"{
{ BASE_URL }}/catalog
"
>
<a
class=
"treeview "
href=
"{
% url 'map' %}
"
>
<i
class=
"fa fa-map"
></i>
<i
class=
"fa fa-map"
></i>
<span>
Home
</span>
<span>
Home
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
...
reports/templates/aside.html
View file @
8ec19c3c
...
@@ -35,6 +35,44 @@
...
@@ -35,6 +35,44 @@
<span
class=
"label label-primary pull-right"
></span>
<span
class=
"label label-primary pull-right"
></span>
</span>
</span>
</a>
</a>
<li
class=
"treeview"
id=
"compare"
>
<a
href=
"#"
onclick=
"compare(labels)"
>
<i
class=
"fas fa-columns"
></i>
<span>
Compare
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
<ul
class=
"treeview-menu sidebar-form"
id=
"compareOptions"
>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"setCompareDirection('vertical')"
id=
"compvertical"
>
<i
class=
"fas fa-arrows-alt-v"
></i>
<span>
Vertical
</span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"setCompareDirection('horizontal')"
id=
"comphorizontal"
>
<i
class=
"fas fa-arrows-alt-h"
></i>
<span>
Horizontal
</span>
</span>
</a>
</li>
</ul>
</li>
<!--
<a class="treeview " href="#" onclick="compare(labels)">
<i class="fas fa-columns"></i></i>
<i class="fa fa-eye-slash hideChart" style="display:none"></i>
<span class="showChart">Compare</span>
<span class="hideChart" style="display:none">Not compare</span>
<span class="pull-right-container">
<span class="label label-primary pull-right"></span>
</span>
</a>
-->
</li>
</li>
{% endif %}
{% endif %}
<li
class=
"treeview"
>
<li
class=
"treeview"
>
...
@@ -131,7 +169,7 @@
...
@@ -131,7 +169,7 @@
</a>
</a>
</li>
</li>
<li>
<li>
<a
class=
"treeview submenu"
href=
"
#"
id=
"downloadPdf
"
>
<a
class=
"treeview submenu"
href=
"
{% url 'PDF' purchaseID %}"
target=
"_blank"
download=
"Report
"
>
<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"
>
...
@@ -139,15 +177,6 @@
...
@@ -139,15 +177,6 @@
</span>
</span>
</a>
</a>
</li>
</li>
<li>
<a
class=
"treeview submenu"
href=
"../../static/reports/tmpImages/repsat_test_dev/{{ email }}/{{ purchaseID }}/{{ zone }}.pdf"
id=
"downloadPdf"
target=
"_blank"
>
<i
class=
"fa fa-file-pdf-o"
></i>
<span>
Export to PDF v2
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
</ul>
</ul>
</li>
</li>
<li
class=
"treeview"
>
<li
class=
"treeview"
>
...
...
reports/templates/sclData.html
View file @
8ec19c3c
...
@@ -5,12 +5,14 @@
...
@@ -5,12 +5,14 @@
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/body.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/body.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'reports/css/scldata.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'reports/css/scldata.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'reports/css/crossrange.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'reports/css/crossrange.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'reports/css/ol-ext.css' %}"
type=
"text/css"
>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
></script>
<link
rel=
"stylesheet"
href=
"https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css"
<link
rel=
"stylesheet"
href=
"https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css"
type=
"text/css"
>
type=
"text/css"
>
<script
src=
"https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js"
></script>
<script
src=
"https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
/>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"
></script>
<script
type=
"text/javascript"
src=
"{% static 'reports/js/ol-ext.js' %}"
></script>
{% endblock %}
{% endblock %}
{% block messages %}
{% block messages %}
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
...
@@ -117,7 +119,7 @@
...
@@ -117,7 +119,7 @@
{% block content %}
{% block content %}
<!-- Content Wrapper. Contains page content -->
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<!-- Main content -->
<div
class=
"container floating-panel"
style=
"position:absolute
; bottom: 40px; left: 12%; width: 500px; z-index: 1000"
>
<div
id=
"timeLine"
class=
"container floating-panel slidecontainer"
style=
"position:absolute; display:block
; bottom: 40px; left: 12%; width: 500px; z-index: 1000"
>
<div
class=
"range-control"
id=
"rangecontrol"
>
<div
class=
"range-control"
id=
"rangecontrol"
>
<span
id=
"tooltiptext"
>
{{ labels|first|slice:"6:8" }}/{{ labels|first|slice:"4:6" }}/{{ labels|first|slice:"0:4" }}
</span>
<span
id=
"tooltiptext"
>
{{ labels|first|slice:"6:8" }}/{{ labels|first|slice:"4:6" }}/{{ labels|first|slice:"0:4" }}
</span>
<input
class=
"cross-range"
id=
"inputRange"
type=
"range"
min=
"0"
max=
"{{ labels|length|add:'-1' }}"
step=
"1"
value=
"0"
data-thumbwidth=
"20"
style=
"background: transparent;"
>
<input
class=
"cross-range"
id=
"inputRange"
type=
"range"
min=
"0"
max=
"{{ labels|length|add:'-1' }}"
step=
"1"
value=
"0"
data-thumbwidth=
"20"
style=
"background: transparent;"
>
...
@@ -132,6 +134,26 @@
...
@@ -132,6 +134,26 @@
</div>
</div>
</div>
</div>
<div
id=
"selectLeft"
class=
"container floating-panel"
style=
"position:absolute; display:none; bottom: 50px; left: 30%; width: 300px; z-index: 1000"
>
<div
class=
"select"
>
<select
onchange=
"selectLeft(this.value)"
id=
"selectLeftCompare"
>
{% for label in labels %}
<option
value=
"{{label}}"
>
{{ label|slice:"6:8" }}/{{ label|slice:"4:6" }}/{{label|slice:"0:4" }}
</option>
{% endfor %}
</select>
</div>
</div>
<div
id=
"selectRight"
class=
"container floating-panel"
style=
"position:absolute; display:none; bottom: 50px; left: 75%; width: 300px; z-index: 1000"
>
<div
class=
"select"
>
<select
onchange=
"selectRight(this.value)"
id=
"selectRightCompare"
>
{% for label in labels %}
<option
value=
"{{label}}"
>
{{ label|slice:"6:8" }}/{{ label|slice:"4:6" }}/{{label|slice:"0:4" }}
</option>
{% endfor %}
</select>
</div>
</div>
<div
id=
"reportPage"
class=
"wrapper"
style=
"background-color: #ecf0f5"
>
<div
id=
"reportPage"
class=
"wrapper"
style=
"background-color: #ecf0f5"
>
<div
id=
"minimap"
class=
"minimap"
></div>
<div
id=
"minimap"
class=
"minimap"
></div>
...
@@ -247,31 +269,28 @@
...
@@ -247,31 +269,28 @@
{% block scripts %}
{% block scripts %}
<script
id=
"rendered-js"
>
<script
id=
"rendered-js"
>
$
(
'input[id="inputRange"]'
).
on
(
'input'
,
function
()
{
$
(
'input[id="inputRange"]'
).
on
(
'input'
,
function
()
{
let
control
=
$
(
this
);
let
controlMin
=
control
.
attr
(
'min'
);
let
controlMax
=
control
.
attr
(
'max'
);
let
controlVal
=
control
.
val
();
let
controlThumbWidth
=
control
.
data
(
'thumbwidth'
);
let
range
=
controlMax
-
controlMin
;
let
position
=
(
controlVal
-
controlMin
)
/
range
*
100
;
let
positionOffset
=
Math
.
round
(
controlThumbWidth
*
position
/
100
)
-
controlThumbWidth
/
2
;
let
fecha
=
$
(
"option:eq("
+
controlVal
+
")"
).
text
();
let
valor
=
$
(
"option:eq("
+
controlVal
+
")"
).
val
();
addImageLayer
({
layerDate
:
valor
});
var
control
=
$
(
this
),
controlMin
=
control
.
attr
(
'min'
),
controlMax
=
control
.
attr
(
'max'
),
controlVal
=
control
.
val
(),
controlThumbWidth
=
control
.
data
(
'thumbwidth'
);
var
range
=
controlMax
-
controlMin
;
var
position
=
(
controlVal
-
controlMin
)
/
range
*
100
;
var
positionOffset
=
Math
.
round
(
controlThumbWidth
*
position
/
100
)
-
controlThumbWidth
/
2
;
var
fecha
=
$
(
"option:eq("
+
controlVal
+
")"
).
text
();
var
valor
=
$
(
"option:eq("
+
controlVal
+
")"
).
val
();
addImageLayer
(
valor
);
$
(
"#maptitle"
).
empty
();
$
(
"#maptitle"
).
empty
();
$
(
"#maptitle"
).
append
(
"Map Date: "
+
fecha
);
$
(
"#maptitle"
).
append
(
"Map Date: "
+
fecha
);
$
(
"#tooltiptext"
).
empty
();
$
(
"#tooltiptext"
).
empty
();
$
(
"#tooltiptext"
).
append
(
fecha
);
$
(
"#tooltiptext"
).
append
(
fecha
);
});
});
var
slider2
=
document
.
getElementById
(
"inputRange"
);
var
slider2
=
document
.
getElementById
(
"inputRange"
);
var
sliderOffsetX
=
slider2
.
getBoundingClientRect
().
left
-
document
.
documentElement
.
getBoundingClientRect
().
left
;
var
sliderOffsetX
=
slider2
.
getBoundingClientRect
().
left
-
document
.
documentElement
.
getBoundingClientRect
().
left
;
var
sliderOffsetY
=
slider2
.
getBoundingClientRect
().
top
-
document
.
documentElement
.
getBoundingClientRect
().
top
;
var
sliderOffsetY
=
slider2
.
getBoundingClientRect
().
top
-
document
.
documentElement
.
getBoundingClientRect
().
top
;
var
sliderWidth
=
slider2
.
offsetWidth
-
1
;
var
sliderWidth
=
slider2
.
offsetWidth
-
1
;
...
@@ -282,20 +301,19 @@
...
@@ -282,20 +301,19 @@
value
=
sliderValAtPos
-
1
;
value
=
sliderValAtPos
-
1
;
var
fecha
=
$
(
"option:eq("
+
value
+
")"
).
text
();
var
fecha
=
$
(
"option:eq("
+
value
+
")"
).
text
();
var
valor
=
$
(
"option:eq("
+
value
+
")"
).
val
();
var
valor
=
$
(
"option:eq("
+
value
+
")"
).
val
();
$
(
"#tooltiptext"
).
empty
();
$
(
"#tooltiptext"
).
empty
();
$
(
"#tooltiptext"
).
css
({
"margin-left"
:
currentMouseXPos
+
'px'
,
"margin-top"
:
sliderOffsetY
+
'px'
});
$
(
"#tooltiptext"
).
css
({
"margin-left"
:
currentMouseXPos
+
'px'
,
"margin-top"
:
sliderOffsetY
+
'px'
});
$
(
"#tooltiptext"
).
append
(
fecha
);
$
(
"#tooltiptext"
).
append
(
fecha
);
});
});
</script>
</script>
<!-- page script -->
<!-- page script -->
<script>
<script>
var
legendOnClickHandler
=
function
(
e
,
legendItem
)
{
const
legendOnClickHandler
=
function
(
e
,
legendItem
)
{
var
index
=
legendItem
.
datasetIndex
;
const
index
=
legendItem
.
datasetIndex
;
var
ch
=
this
.
chart
;
const
ch
=
this
.
chart
;
le
t
checkbox_id
=
'#sclcheck-'
+
legendItem
.
text
.
toLowerCase
().
replace
(
/
\s
/g
,
'-'
);
cons
t
checkbox_id
=
'#sclcheck-'
+
legendItem
.
text
.
toLowerCase
().
replace
(
/
\s
/g
,
'-'
);
// isDatasetVisible return the opposite status?
// isDatasetVisible return the opposite status?
if
(
ch
.
getDatasetMeta
(
index
).
hidden
===
null
)
{
if
(
ch
.
getDatasetMeta
(
index
).
hidden
===
null
)
{
...
@@ -303,14 +321,22 @@
...
@@ -303,14 +321,22 @@
}
else
{
}
else
{
ch
.
getDatasetMeta
(
index
).
hidden
=
!
ch
.
getDatasetMeta
(
index
).
hidden
;
ch
.
getDatasetMeta
(
index
).
hidden
=
!
ch
.
getDatasetMeta
(
index
).
hidden
;
}
}
ch
.
update
();
ch
.
update
();
$
(
checkbox_id
+
" :input"
).
prop
(
"checked"
,
!
ch
.
getDatasetMeta
(
index
).
hidden
);
const
layerInput
=
$
(
checkbox_id
+
" :input"
);
addImageLayer
(
currentDate
);
layerInput
.
prop
(
"checked"
,
!
ch
.
getDatasetMeta
(
index
).
hidden
);
if
(
layerInput
.
prop
(
"checked"
))
{
addImageLayer
({
layerName
:
layerInput
.
val
()
});
}
else
{
removeLayer
(
layerInput
.
val
());
}
};
};
var
showSCLcheckboxes
=
function
(
datasets
)
{
const
showSCLcheckboxes
=
function
(
datasets
)
{
if
(
!
datasets
||
datasets
.
length
<
1
)
{
if
(
!
datasets
||
datasets
.
length
<
1
)
{
return
;
return
;
}
}
...
@@ -322,6 +348,43 @@
...
@@ -322,6 +348,43 @@
});
});
}
}
const
getSelectedLayersName
=
function
()
{
const
inputs
=
$
(
"input[name=layer_type]:checked"
);
let
values
=
[]
Object
.
keys
(
inputs
).
forEach
(
key
=>
{
let
value
=
inputs
[
key
].
value
;
if
(
value
)
{
values
.
push
(
value
)}
});
return
values
;
}
const
getChartDataIndex
=
function
(
id
)
{
const
datasetsLabels
=
myChart
.
config
.
data
.
datasets
.
map
(
data
=>
'sclcheck-'
+
data
.
label
.
toLowerCase
().
replace
(
' '
,
'-'
)
);
return
datasetsLabels
.
indexOf
(
id
);
}
$
(
'input[name=layer_type]'
).
on
(
'click'
,
function
()
{
const
input
=
$
(
this
);
const
index
=
getChartDataIndex
(
input
.
parent
().
attr
(
'id'
));
if
(
index
>
-
1
)
{
myChart
.
getDatasetMeta
(
index
).
hidden
=!
input
.
prop
(
"checked"
);
myChart
.
update
();
}
if
(
input
.
prop
(
"checked"
))
{
addImageLayer
({
layerName
:
input
.
val
()
});
}
else
{
removeLayer
(
input
.
val
());
}
});
var
label
;
var
label
;
// Recibimos el JSON con los datos desde el View
// Recibimos el JSON con los datos desde el View
{
%
autoescape
off
%
}
{
%
autoescape
off
%
}
...
...
reports/urls.py
View file @
8ec19c3c
...
@@ -16,4 +16,5 @@ urlpatterns = [
...
@@ -16,4 +16,5 @@ urlpatterns = [
url
(
r'^ws/process_progress$'
,
views
.
wsProcessProgress
,
name
=
'wsProcessProgress'
),
url
(
r'^ws/process_progress$'
,
views
.
wsProcessProgress
,
name
=
'wsProcessProgress'
),
url
(
r'^ws/is_public'
,
views
.
wsIs_Public
,
name
=
'wsIs_Public'
),
url
(
r'^ws/is_public'
,
views
.
wsIs_Public
,
name
=
'wsIs_Public'
),
url
(
r'^ws/wsEditTitle'
,
views
.
wsEditTitle
,
name
=
'wsEditTitle'
),
url
(
r'^ws/wsEditTitle'
,
views
.
wsEditTitle
,
name
=
'wsEditTitle'
),
url
(
r'^ws/PDF/(?P<purchase_id>(\d+))$'
,
views
.
PDFGenerator
,
name
=
'PDF'
),
]
]
reports/views.py
View file @
8ec19c3c
This diff is collapsed.
Click to expand it.
users/templates/User_profile.html
View file @
8ec19c3c
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
User Profile
User Profile
</h1>
</h1>
<ol
class=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li><a
href=
"
../
"
><i
class=
"fa fa-home"
></i>
Home
</a></li>
<li><a
href=
"
{% url 'map' %}
"
><i
class=
"fa fa-home"
></i>
Home
</a></li>
<li
class=
"active"
>
User profile
</li>
<li
class=
"active"
>
User profile
</li>
</ol>
</ol>
</section>
</section>
...
@@ -356,7 +356,8 @@
...
@@ -356,7 +356,8 @@
type
:
'POST'
,
type
:
'POST'
,
dataType
:
"json"
,
dataType
:
"json"
,
data
:
{
'title'
:
label
,
"user_id"
:
$
(
'#user_id'
).
val
()},
data
:
{
'title'
:
label
,
"user_id"
:
$
(
'#user_id'
).
val
()},
url
:
'../../users/ws/report_table'
,
//url: '../../users/ws/report_table',
url
:
'{% url "wsPurchasesPM" %}'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
);
console
.
log
(
data
);
$
(
'#mostrar'
).
empty
();
$
(
'#mostrar'
).
empty
();
...
...
users/templates/users_aside.html
View file @
8ec19c3c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<br>
<br>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li>
<li>
<a
class=
"treeview "
href=
"{
{ BASE_URL }}/reports
"
>
<a
class=
"treeview "
href=
"{
% url 'reports' %}
"
>
<i
class=
"fa fa-files-o"
></i>
<i
class=
"fa fa-files-o"
></i>
<span>
Reports
</span>
<span>
Reports
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
...
users/views.py
View file @
8ec19c3c
...
@@ -35,14 +35,14 @@ def Users(request):
...
@@ -35,14 +35,14 @@ def Users(request):
purchases
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
purchases
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
in_process
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
.
exclude
(
progress
=
100
)
in_process
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
.
exclude
(
progress
=
100
)
bytes_size
=
0
#
bytes_size = 0
for
path
,
directories
,
files
in
os
.
walk
(
USERS_PATH
+
"repsat_test_dev/"
+
user
.
email
):
#
for path, directories, files in os.walk(USERS_PATH + "repsat_test_dev/" + user.email):
for
filename
in
files
:
#
for filename in files:
bytes_size
+=
os
.
lstat
(
os
.
path
.
join
(
path
,
filename
))
.
st_size
#
bytes_size += os.lstat(os.path.join(path, filename)).st_size
for
directory
in
directories
:
#
for directory in directories:
bytes_size
+=
os
.
lstat
(
os
.
path
.
join
(
path
,
directory
))
.
st_size
#
bytes_size += os.lstat(os.path.join(path, directory)).st_size
bytes_size
+=
os
.
path
.
getsize
(
USERS_PATH
+
"repsat_test_dev/"
+
user
.
email
)
#
bytes_size += os.path.getsize(USERS_PATH + "repsat_test_dev/" + user.email)
size_repsat
=
best_unit_size
(
bytes_size
)
#
size_repsat = best_unit_size(bytes_size)
user_data
.
append
({
user_data
.
append
({
"user_id"
:
user
.
id
,
"user_id"
:
user
.
id
,
...
@@ -50,7 +50,7 @@ def Users(request):
...
@@ -50,7 +50,7 @@ def Users(request):
"searches"
:
searches
.
count
(),
"searches"
:
searches
.
count
(),
"purchases"
:
purchases
.
count
(),
"purchases"
:
purchases
.
count
(),
"in_process"
:
in_process
.
count
(),
"in_process"
:
in_process
.
count
(),
"size"
:
size_repsat
,
#
"size": size_repsat,
})
})
for
search
in
Search
.
objects
.
values
(
'search_name'
)
.
filter
(
user_id
=
user
.
id
)
.
annotate
(
for
search
in
Search
.
objects
.
values
(
'search_name'
)
.
filter
(
user_id
=
user
.
id
)
.
annotate
(
...
@@ -155,13 +155,13 @@ def User_id(request, user_id):
...
@@ -155,13 +155,13 @@ def User_id(request, user_id):
in_process
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
.
exclude
(
progress
=
100
)
in_process
=
Purchase
.
objects
.
filter
(
user_id
=
user
.
id
)
.
exclude
(
progress
=
100
)
bytes_size
=
0
bytes_size
=
0
for
path
,
directories
,
files
in
os
.
walk
(
USERS_PATH
+
"repsat_test_dev/"
+
user
.
email
):
#
for path, directories, files in os.walk(USERS_PATH + "repsat_test_dev/"+user.email):
for
filename
in
files
:
#
for filename in files:
bytes_size
+=
os
.
lstat
(
os
.
path
.
join
(
path
,
filename
))
.
st_size
#
bytes_size += os.lstat(os.path.join(path, filename)).st_size
for
directory
in
directories
:
#
for directory in directories:
bytes_size
+=
os
.
lstat
(
os
.
path
.
join
(
path
,
directory
))
.
st_size
#
bytes_size += os.lstat(os.path.join(path, directory)).st_size
bytes_size
+=
os
.
path
.
getsize
(
USERS_PATH
+
"repsat_test_dev/"
+
user
.
email
)
#
bytes_size += os.path.getsize(USERS_PATH + "repsat_test_dev/"+user.email)
size_repsat
=
best_unit_size
(
bytes_size
)
#
size_repsat = best_unit_size(bytes_size)
user_data
.
append
({
user_data
.
append
({
"user_id"
:
user
.
id
,
"user_id"
:
user
.
id
,
...
@@ -169,7 +169,7 @@ def User_id(request, user_id):
...
@@ -169,7 +169,7 @@ def User_id(request, user_id):
"searches"
:
searches
.
count
(),
"searches"
:
searches
.
count
(),
"purchases"
:
purchases
.
count
(),
"purchases"
:
purchases
.
count
(),
"in_process"
:
in_process
.
count
(),
"in_process"
:
in_process
.
count
(),
"size"
:
size_repsat
,
#
"size": size_repsat,
})
})
for
search
in
Search
.
objects
.
values
(
'search_name'
)
.
filter
(
user_id
=
user
.
id
)
.
annotate
(
for
search
in
Search
.
objects
.
values
(
'search_name'
)
.
filter
(
user_id
=
user
.
id
)
.
annotate
(
...
@@ -269,13 +269,13 @@ def wsPurchasesPM(request):
...
@@ -269,13 +269,13 @@ def wsPurchasesPM(request):
table_data
=
[]
table_data
=
[]
data
=
Purchase
.
objects
.
values
(
'user_id'
,
'search__endDate'
,
'search__startDate'
,
'aggreg_date'
,
data
=
Purchase
.
objects
.
values
(
'user_id'
,
'search__endDate'
,
'search__startDate'
,
'aggreg_date'
,
'search__process_id__name'
,
'
search__search_
name'
)
.
filter
(
'search__process_id__name'
,
'name'
)
.
filter
(
user_id
=
request
.
POST
.
get
(
'user_id'
),
purchased
=
True
,
user_id
=
request
.
POST
.
get
(
'user_id'
),
purchased
=
True
,
aggreg_date__month
=
to_if
(
request
.
POST
.
get
(
'title'
)))
.
order_by
(
'aggreg_date'
)
aggreg_date__month
=
to_if
(
request
.
POST
.
get
(
'title'
)))
.
order_by
(
'aggreg_date'
)
for
producto
in
data
:
for
producto
in
data
:
table_data
.
append
({
table_data
.
append
({
"search_name"
:
producto
[
'
search__search_
name'
],
"search_name"
:
producto
[
'name'
],
"process"
:
producto
[
'search__process_id__name'
],
"process"
:
producto
[
'search__process_id__name'
],
"purchase_date"
:
str
(
producto
[
'aggreg_date'
])[:
10
],
"purchase_date"
:
str
(
producto
[
'aggreg_date'
])[:
10
],
"startDate"
:
str
(
producto
[
'search__startDate'
])[:
10
],
"startDate"
:
str
(
producto
[
'search__startDate'
])[:
10
],
...
...
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