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
47d50fcc
Commit
47d50fcc
authored
Apr 08, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
21a0421e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
567 additions
and
23 deletions
+567
-23
Platform.html
administration/templates/Platform.html
+270
-0
Process.html
administration/templates/Process.html
+228
-0
administration_aside.html
administration/templates/administration_aside.html
+22
-4
dashboard.html
administration/templates/dashboard.html
+12
-15
urls.py
administration/urls.py
+4
-2
views.py
administration/views.py
+28
-2
base_top.html
catalog/templates/base_top.html
+3
-0
No files found.
administration/templates/Platform.html
0 → 100644
View file @
47d50fcc
This diff is collapsed.
Click to expand it.
administration/templates/Process.html
0 → 100644
View file @
47d50fcc
{% 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=
"../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=
"is_superuser"
value=
"1"
{%
if
not
request
.
user
.
is_superuser
%}
disabled
{%
endif
%}
{%
if
user
.
superuser =
=
True
%}
checked
{%
endif
%}
>
</td>
<td>
<button
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>
{% 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 %}
{% 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 @
47d50fcc
...
...
@@ -2,7 +2,7 @@
<br>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li>
<a
class=
"treeview "
href=
"{
{ BASE_URL }}/administration
"
>
<a
class=
"treeview "
href=
"{
% url 'Dashboard' %}
"
>
<i
class=
"fa fa-home"
></i>
<span>
Dashboard
</span>
<span
class=
"pull-right-container"
>
...
...
@@ -11,7 +11,7 @@
</a>
</li>
<li>
<a
class=
"treeview "
href=
"
../../administration/request
"
>
<a
class=
"treeview "
href=
"
{% url 'request' %}
"
>
<i
class=
"fa fa-user-plus"
></i>
<span>
Request
</span>
<span
class=
"pull-right-container"
>
...
...
@@ -20,7 +20,7 @@
</a>
</li>
<li>
<a
class=
"treeview "
href=
"
../../administration/users
"
>
<a
class=
"treeview "
href=
"
{% url 'active_users' %}
"
>
<i
class=
"fa fa-users"
></i>
<span>
Active users
</span>
<span
class=
"pull-right-container"
>
...
...
@@ -29,6 +29,24 @@
</a>
</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();">
<i class="fa fa-backward"></i>
<span>Back</span>
...
...
@@ -36,6 +54,6 @@
<span class="label label-primary pull-right"></span>
</span>
</a>
</li>
</li
--
>
</ul>
</div>
\ No newline at end of file
administration/templates/dashboard.html
View file @
47d50fcc
...
...
@@ -8,7 +8,8 @@
<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"
/>
<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 %}
{% block messages %}
...
...
@@ -194,7 +195,7 @@
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
</div>
<div
class=
"col-md-2 col-sm-6 col-xs-12"
>
<div
class=
"info-box"
>
...
...
@@ -412,7 +413,7 @@
{% endblock %}
{% block footer %}
<footer
class=
" page-footer font-small special-color-dark pt-5"
style=
"bottom: 0; position: absolute"
>
<footer
class=
" page-footer font-small special-color-dark pt-5"
style=
"bottom: 0; position: absolute"
>
<!-- Footer Elements -->
<div
class=
"container"
>
<!-- Social buttons
...
...
@@ -454,8 +455,6 @@
<!-- Copyright -->
</footer>
{% endblock %}
...
...
@@ -513,7 +512,6 @@
});
// mostrar imagen al dar click en los puntos
document
.
getElementById
(
"salesChart"
).
onclick
=
function
(
evt
)
{
// activePoints = myChart.getElementsAtEvent(evt);
...
...
@@ -534,7 +532,7 @@
console
.
log
(
"hola"
);
$
(
'#mostrar'
).
empty
();
$
(
'#mostrar'
).
append
(
"<table class=
\"
table table-hover
\"
id=
\"
example
\"
>"
+
$
(
'#mostrar'
).
append
(
"<table class=
\"
table table-hover
\"
id=
\"
example
\"
>"
+
"<thead>"
+
"<tr>"
+
"<th class=
\"
text-center
\"
>User ID</th>"
+
...
...
@@ -548,21 +546,20 @@
"<tbody id=
\"
tbody
\"
class=
\"
text-center
\"
>"
);
$
.
each
(
data
,
function
(
key
,
val
)
{
$
(
"#tbody"
).
append
(
"<tr>"
+
"<td>"
+
val
[
'user_id'
]
+
"</td>"
+
"<td>"
+
val
[
'username'
]
+
"</td>"
+
"<td>"
+
val
[
'email'
]
+
"</td>"
+
"<td>"
+
val
[
'purchases'
]
+
"</td>"
+
$
(
"#tbody"
).
append
(
"<tr>"
+
"<td>"
+
val
[
'user_id'
]
+
"</td>"
+
"<td>"
+
val
[
'username'
]
+
"</td>"
+
"<td>"
+
val
[
'email'
]
+
"</td>"
+
"<td>"
+
val
[
'purchases'
]
+
"</td>"
+
//"
<
td
>
"+val['storage']+"
<
/td>"
+
"<td>"
+
val
[
'in_process'
]
+
"</td>"
+
"<td>"
+
val
[
'in_process'
]
+
"</td>"
+
"</tr>"
);
});
$
(
'#mostrar'
).
append
(
"</tbody>"
+
"</table>"
);
$
(
'#example'
).
DataTable
({
});
$
(
'#example'
).
DataTable
({});
}
});
...
...
administration/urls.py
View file @
47d50fcc
...
...
@@ -4,8 +4,10 @@ from . import views
urlpatterns
=
[
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'^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'
),
]
\ No newline at end of file
administration/views.py
View file @
47d50fcc
...
...
@@ -13,7 +13,7 @@ from django.http import HttpResponse, HttpResponseRedirect, HttpRequest, Http404
# Create your views here.
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
USERS_PATH
=
config
[
'PATHS'
][
'PATH_NAS'
]
...
...
@@ -250,4 +250,30 @@ def best_unit_size(bytes_size):
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
,
})
return
render
(
request
,
"Platform.html"
,{
'platforms'
:
platforms_list
})
#------------------------------------------------
def
all_Process
(
request
):
process
=
Process
.
objects
.
values
(
'id'
,
'name'
,
'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'
],
})
return
render
(
request
,
"Process.html"
,
{
'process'
:
process_list
})
catalog/templates/base_top.html
View file @
47d50fcc
...
...
@@ -22,6 +22,9 @@
<!-- jsPDF -->
<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 %}
</head>
<body
class=
"hold-transition skin-yellow sidebar-mini"
>
...
...
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