Carga
Carga
This commit is contained in:
36
templates/acceder.html
Normal file
36
templates/acceder.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<div class="sufee-login d-flex align-content-center flex-wrap">
|
||||
<div class="container" >
|
||||
<div class="login-content">
|
||||
<div class="login-logo">
|
||||
<a href="{% url 'index' %}">
|
||||
<img class="align-content" src="/static/images/logocsv2.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="login-form">
|
||||
|
||||
<form method="POST" action="" class="mt-2" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button type="submit" class="btn btn-success">Iniciar Sesion</button>
|
||||
|
||||
<div class="register-link m-t-15 text-center">
|
||||
<p>No tienes una cuenta? <a href="{% url 'registro' %}"> Registrate</a></p>
|
||||
<p>Olvidaste tu contraseña? <a href="{% url 'reset_password' %}"> Recuperala</a></p>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
37
templates/actualizar.html
Normal file
37
templates/actualizar.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section class="vh-100" >
|
||||
<div class="container py-5 h-100">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col-md-12 col-xl-8">
|
||||
|
||||
<div class="card" style="border-radius: 15px;">
|
||||
<div class="card-body text-center">
|
||||
|
||||
|
||||
<form method="POST" action="" class="mt-3" autocomplete="off" >
|
||||
{% csrf_token %}
|
||||
{{ form|crispy|safe }}
|
||||
|
||||
<button type="submit" class="btn btn-success">Guardar</button>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
|
||||
37
templates/actualizar_sensorf.html
Normal file
37
templates/actualizar_sensorf.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section class="vh-100" >
|
||||
<div class="container py-5 h-100">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col-md-12 col-xl-8">
|
||||
|
||||
<div class="card" style="border-radius: 15px;">
|
||||
<div class="card-body text-center">
|
||||
|
||||
|
||||
<form method="POST" action="" class="mt-3" autocomplete="off" >
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<button type="submit" class="btn btn-success">Guardar</button>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
|
||||
37
templates/actualizar_telegram.html
Normal file
37
templates/actualizar_telegram.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section class="vh-100" >
|
||||
<div class="container py-5 h-100">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col-md-12 col-xl-8">
|
||||
|
||||
<div class="card" style="border-radius: 15px;">
|
||||
<div class="card-body text-center">
|
||||
|
||||
|
||||
<form method="POST" action="" class="mt-3" autocomplete="off" >
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<button type="submit" class="btn btn-success">Guardar</button>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
|
||||
137
templates/altasensoresf.html
Normal file
137
templates/altasensoresf.html
Normal file
@@ -0,0 +1,137 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
<!-- <meta http-equiv="refresh" content="5"> -->
|
||||
|
||||
|
||||
{% endblock head %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="content" >
|
||||
<div class="animated fadeIn">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">SUBDIRECCIÓN DE INGENIERÍA BIOMÉDICA</strong>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<table id="example1" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>id SENSOR</th>
|
||||
<th>UBICACION</th>
|
||||
<th>TEMP_MIN</th>
|
||||
<th>TEMP_MAX</th>
|
||||
<th>HUMEDAD_MIN</th>
|
||||
<th>HUMEDAD_MAX</th>
|
||||
<th>ACTIVO</th>
|
||||
<th>VER HUMEDAD</th>
|
||||
<th>OPCIONES</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for dato in datos %}
|
||||
<tr>
|
||||
<td>{{ dato.id }}</td>
|
||||
<td>{{ dato.idsensor }}</td>
|
||||
<td>{{ dato.nombre }}</td>
|
||||
<td>{{ dato.temp_min }}</td>
|
||||
<td>{{ dato.temp_max }}</td>
|
||||
<td>{{ dato.hume_min }}</td>
|
||||
<td>{{ dato.hume_max }}</td>
|
||||
<td>{{ dato.activo }}</td>
|
||||
<td>{{ dato.ver_humedad }}</td>
|
||||
<td>
|
||||
{% if user.is_superuser %}
|
||||
<a href="{% url 'actualizasensorf' dato.id %}" class="btn btn-success btn-rounded btn-lg" >Actualizar Datos</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">CONFIGURACIÓN TELEGRAM</strong>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="example2" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>idBot</th>
|
||||
<th>idGrupo</th>
|
||||
<th>OPCIONES</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for tele in teleg %}
|
||||
<tr>
|
||||
<td>{{ tele.id }}</td>
|
||||
<td>{{ tele.idBot }}</td>
|
||||
<td>{{ tele.idGrupo }}</td>
|
||||
<td>
|
||||
{% if user.is_superuser %}
|
||||
<a href="{% url 'actualizatelegram' tele.id %}" class="btn btn-success btn-rounded btn-lg" >Actualizar Datos</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div><!-- .animated -->
|
||||
</div><!-- .content -->
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#example1').DataTable({
|
||||
"pageLength": 50,
|
||||
"order": [[1, "asc" ]],
|
||||
});
|
||||
} );
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#example2').DataTable({
|
||||
"pageLength": 50,
|
||||
"order": [[1, "asc" ]],
|
||||
});
|
||||
} );
|
||||
</script>
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
|
||||
|
||||
361
templates/base.html
Normal file
361
templates/base.html
Normal file
@@ -0,0 +1,361 @@
|
||||
{% load static %}
|
||||
|
||||
<!doctype html>
|
||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
|
||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
|
||||
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>SENSORES</title>
|
||||
|
||||
{% block head %}
|
||||
|
||||
|
||||
{% endblock head %}
|
||||
|
||||
<meta name="description" content="acceso">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="apple-touch-icon" href="/static/images/QRAUqs9.png">
|
||||
<link rel="shortcut icon" href="/static/images/QRAUqs9.png">
|
||||
|
||||
<link rel="stylesheet" href="/static/assets/css/normalize.min.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/themify-icons.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/pe-icon-7-stroke.min.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/flag-icon.min.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/cs-skin-elastic.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/lib/datatable/buttons.bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/lib/datatable/buttons.dataTables.min.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/lib/datatable/dataTables.bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/assets/css/style.css">
|
||||
|
||||
<!--
|
||||
<link rel="stylesheet" href="/static/lib/datatables-1.10.20/css/dataTables.bootstrap4.min.css"/>
|
||||
<link rel="stylesheet" href="/static/lib/datatables-1.10.20/plugins/responsive-2.2.3/css/responsive.bootstrap4.min.css"/>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> -->
|
||||
<link href="/static/assets/css/chartist.min.css" rel="stylesheet">
|
||||
<link href="/static/assets/css/jqvmap.min.css" rel="stylesheet">
|
||||
|
||||
<link href="/static/assets/css/weather-icons.css" rel="stylesheet" />
|
||||
<link href="/static/assets/css/fullcalendar.min.css" rel="stylesheet" />
|
||||
<script src="/static/assets/js/c6b758e399.js" crossorigin="anonymous"></script>
|
||||
|
||||
<style>
|
||||
|
||||
#weatherWidget .currentDesc {
|
||||
color: #ffffff!important;
|
||||
}
|
||||
.traffic-chart {
|
||||
min-height: 335px;
|
||||
}
|
||||
#flotPie1 {
|
||||
height: 150px;
|
||||
}
|
||||
#flotPie1 td {
|
||||
padding:3px;
|
||||
}
|
||||
#flotPie1 table {
|
||||
top: 20px!important;
|
||||
right: -10px!important;
|
||||
}
|
||||
.chart-container {
|
||||
display: table;
|
||||
min-width: 270px ;
|
||||
text-align: left;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
#flotLine5 {
|
||||
height: 105px;
|
||||
}
|
||||
|
||||
#flotBarChart {
|
||||
height: 150px;
|
||||
}
|
||||
#cellPaiChart{
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Left Panel -->
|
||||
<aside id="left-panel" class="left-panel">
|
||||
<nav class="navbar navbar-expand-sm navbar-default">
|
||||
<div id="main-menu" class="main-menu collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active">
|
||||
<a href="{% url 'index' %}">PRINCIPAL</a>
|
||||
</li>
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<a href="{% url 'altasensoresf' %}" >ALTA SENSORES</a>
|
||||
</li>
|
||||
<!--
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<a href="{% url 'sensoresfijos' %}" > <i class="menu-icon fa fa-laptop"></i>Sensores Fijos en tiempo real</a>
|
||||
</li>
|
||||
-->
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">REGISTRO EN TIEMPO REAL</a>
|
||||
{% for menu in menus %}
|
||||
{% if menu.activo == 'SI' %}
|
||||
<li style="text-transform: uppercase;"><a href="{% url 'sensoresfijosdianew' menu.idsensor %}"><i class="menu-icon fa fa-laptop"></i>{{ menu.nombre }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="menu-item-has-children dropdown">
|
||||
<a href="{% url 'sensoresf' %}">CONSULTA HISTORIAL DE LECTURAS</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
</aside>
|
||||
<!-- /#left-panel -->
|
||||
<!-- Right Panel -->
|
||||
<div id="right-panel" class="right-panel">
|
||||
<!-- Header-->
|
||||
<header id="header" class="header">
|
||||
<div class="top-left">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="{% url 'index' %}"><img src="/static/images/logocds.jpg" alt="Logo"></a>
|
||||
<a class="navbar-brand hidden" href="{% url 'index' %}"><img src="/static/images/logocds.jpg" alt="Logo"></a>
|
||||
<a id="menuToggle" class="menutoggle"><i class="fa fa-bars"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-right">
|
||||
<div class="header-menu">
|
||||
<div class="header-left">
|
||||
<button class="search-trigger"><i class="fa fa-search"></i></button>
|
||||
<div class="form-inline">
|
||||
<form class="search-form">
|
||||
<input class="form-control mr-sm-2" type="text" placeholder="Search ..." aria-label="Search">
|
||||
<button class="search-close" type="submit"><i class="fa fa-close"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="dropdown for-notification">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="notification" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-bell"></i>
|
||||
<span class="count bg-danger">0</span>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="notification">
|
||||
<p class="red">Notificaciones</p>
|
||||
<!--
|
||||
<a class="dropdown-item media" href="#">
|
||||
<i class="fa fa-check"></i>
|
||||
<p>Server #1 overloaded.</p>
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item media" href="#">
|
||||
<i class="fa fa-info"></i>
|
||||
<p>Server #2 overloaded.</p>
|
||||
</a>
|
||||
<a class="dropdown-item media" href="#">
|
||||
<i class="fa fa-warning"></i>
|
||||
<p>Server #3 overloaded.</p>
|
||||
</a>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown for-message">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="message" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<span class="count bg-primary"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="message">
|
||||
<p class="red">Correos</p>
|
||||
<!--
|
||||
<a class="dropdown-item media" href="#">
|
||||
<span class="photo media-left"><img alt="avatar" src="/static/images/avatar/1.jpg"></span>
|
||||
<div class="message media-body">
|
||||
<span class="name float-left">Jonathan Smith</span>
|
||||
<span class="time float-right">Just now</span>
|
||||
<p>Hello, this is an example msg</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="dropdown-item media" href="#">
|
||||
<span class="photo media-left"><img alt="avatar" src="/static/images/avatar/2.jpg"></span>
|
||||
<div class="message media-body">
|
||||
<span class="name float-left">Jack Sanders</span>
|
||||
<span class="time float-right">5 minutes ago</span>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="dropdown-item media" href="#">
|
||||
<span class="photo media-left"><img alt="avatar" src="/static/images/avatar/3.jpg"></span>
|
||||
<div class="message media-body">
|
||||
<span class="name float-left">Cheryl Wheeler</span>
|
||||
<span class="time float-right">10 minutes ago</span>
|
||||
<p>Hello, this is an example msg</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="dropdown-item media" href="#">
|
||||
<span class="photo media-left"><img alt="avatar" src="/static/images/avatar/4.jpg"></span>
|
||||
<div class="message media-body">
|
||||
<span class="name float-left">Rachel Santos</span>
|
||||
<span class="time float-right">15 minutes ago</span>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur</p>
|
||||
</div>
|
||||
</a>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-area dropdown float-right">
|
||||
{% if user.is_authenticated %}
|
||||
<a href="#" class="dropdown-toggle active" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="user-avatar rounded-circle" src="/static/images/logo2.png" alt="User Avatar">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="user-avatar rounded-circle" src="/static/images/logo2.png" alt="User Avatar">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<div class="user-menu dropdown-menu">
|
||||
{% if user.is_authenticated %}
|
||||
<a class="nav-link" href="{% url 'index' %}"><i class="fa fa- user"></i>{{ user.username }}</a>
|
||||
|
||||
<a class="nav-link" href="{% url 'salir' %}"><i class="fa fa-power -off"></i>Salir</a>
|
||||
|
||||
{% else %}
|
||||
<a class="nav-link" href="{% url 'acceder' %}"><i class="fa fa- user"></i>Login</a>
|
||||
<a class="nav-link" href="{% url 'registro' %}"><i class="fa fa- user"></i>Registro</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<!-- /#header -->
|
||||
{% if messages %}
|
||||
<div class="row mt-3 mb-3">
|
||||
<div class="col-12">
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.tags }}">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
<div class="clearfix"></div>
|
||||
<!-- Footer -->
|
||||
<footer class="site-footer" >
|
||||
<div class="footer-inner bg-white">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<span class="copyright" style="color: #000000;">
|
||||
Copyright ©
|
||||
<script>
|
||||
document.write(new Date().getFullYear())
|
||||
</script>
|
||||
Hecho por Depto. Biomedica, Ing. de Software e Ing. Mecatronica{ Generacion 2019 - 2022 }
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- /.site-footer -->
|
||||
</div>
|
||||
<!-- /#right-panel -->
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="/static/assets/js/jquery.min.js"></script>
|
||||
<script src="/static/assets/js/popper.min.js"></script>
|
||||
<script src="/static/assets/js/bootstrap.min.js"></script>
|
||||
<script src="/static/assets/js/jquery.matchHeight.min.js"></script>
|
||||
<script src="/static/assets/js/main.js"></script>
|
||||
|
||||
<!-- Chart js -->
|
||||
<script src="/static/assets/js/Chart.bundle.min.js"></script>
|
||||
|
||||
<!--Chartist Chart-->
|
||||
<script src="/static/assets/js/chartist.min.js"></script>
|
||||
<script src="/static/assets/js/chartist-plugin-legend.min.js"></script>
|
||||
|
||||
<script src="/static/assets/js/jquery.flot.min.js"></script>
|
||||
<script src="/static/assets/js/jquery.flot.pie.min.js"></script>
|
||||
<script src="/static/assets/js/jquery.flot.spline.min.js"></script>
|
||||
|
||||
<script src="/static/assets/js/jquery.simpleWeather.min.js"></script>
|
||||
<script src="/static/assets/js/weather-init.js"></script>
|
||||
|
||||
<script src="/static/assets/js/moment.min.js"></script>
|
||||
<script src="/static/assets/js/fullcalendar.min.js"></script>
|
||||
<script src="/static/assets/js/init/fullcalendar-init.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="/static/assets/js/lib/data-table/datatables.min.js"></script>
|
||||
<script src="/static/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/static/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||
<script src="/static/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||
<script src="/static/assets/js/lib/data-table/jszip.min.js"></script>
|
||||
<script src="/static/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||
<script src="/static/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||
<script src="/static/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||
<script src="/static/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||
<script src="/static/assets/js/init/datatables-init.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#example').DataTable({
|
||||
"pageLength": 100,
|
||||
"order": [[0, "desc" ]],
|
||||
});
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
48
templates/email.html
Normal file
48
templates/email.html
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
<!DOCTYPE >
|
||||
<html>
|
||||
<head>
|
||||
<title>Acceso</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<!-- Animated -->
|
||||
<div class="animated fadeIn">
|
||||
|
||||
<!-- Traffic -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<p align="center"><img src="http://server.mxsig.com.mx:9000/images/logocds.jpg" alt="Logo"></a></p>
|
||||
|
||||
<P align="center">Alerta de sensor</P>
|
||||
|
||||
<table width="600" border="0" align="center" bgcolor="#00B050" >
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td height="50" >SENSOR:{{ sensor }}<br> TEMPERATURA: {{ temp }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- /# column -->
|
||||
</div>
|
||||
<!-- /Traffic -->
|
||||
|
||||
</div>
|
||||
<!-- .animated -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
43
templates/index.html
Normal file
43
templates/index.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Content -->
|
||||
<div class="content" >
|
||||
<!-- Animated -->
|
||||
<div class="animated fadeIn">
|
||||
|
||||
<!-- Traffic -->
|
||||
<div class="row" >
|
||||
<div class="col-lg-12" >
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="box-title">SUBDIRECCIÓN DE INGENIERÍA BIOMÉDICA</h4>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<div class="mx-auto d-block">
|
||||
<img src="/static/images/Principal.png" alt="Logo" width="100%">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-body"></div>
|
||||
</div>
|
||||
</div><!-- /# column -->
|
||||
</div>
|
||||
<!-- /Traffic -->
|
||||
|
||||
</div>
|
||||
<!-- .animated -->
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
37
templates/password_reset.html
Normal file
37
templates/password_reset.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<br><br><br>
|
||||
<div class="container" >
|
||||
<br><br><br>
|
||||
<div class="row">
|
||||
<div class="col-2"></div>
|
||||
<div class="col-8">
|
||||
<div class="login-logo">
|
||||
<a href="{% url 'index' %}">
|
||||
<img class="align-content" src="/static/images/logo.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding: 20px;">
|
||||
<h3>Cambiar Contraseña</h3>
|
||||
<br>
|
||||
<p>¿Olvidaste tu contraseña? Ingresa tu correo para enviarte el link de recuperacion y cambiar la
|
||||
contraseña.</p>
|
||||
|
||||
<form method="post" class="mt-3 md-2" class="form-control">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="Submit" name="Send email" style="text-align: center;" class="btn btn-primary m-3">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
34
templates/password_reset_done.html
Normal file
34
templates/password_reset_done.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<br><br><br>
|
||||
<div class="container" >
|
||||
<br><br><br>
|
||||
<div class="row">
|
||||
<div class="col-2"></div>
|
||||
<div class="col-8">
|
||||
<div class="login-logo">
|
||||
<a href="{% url 'index' %}">
|
||||
<img class="align-content" src="/static/images/logo.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="card" style="padding: 20px;">
|
||||
<h3>Contraseña Restablecida</h3>
|
||||
|
||||
<br><br><br>
|
||||
<p>Tu contraseña ha sido cambiada, ahora ya puedes iniciar sesion.</p>
|
||||
<br>
|
||||
<p>Si no recives el correo, verifica que es el correo con que te registraste y verifica tu carpeta de correo no deseado o carpeta de spam.</p>
|
||||
<br>
|
||||
<a href="{% url 'acceder' %}">Acceder</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
39
templates/password_reset_form.html
Normal file
39
templates/password_reset_form.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<br><br><br>
|
||||
<div class="container" >
|
||||
<br><br><br>
|
||||
<div class="row">
|
||||
<div class="col-2"></div>
|
||||
<div class="col-8">
|
||||
<div class="login-logo">
|
||||
<a href="{% url 'index' %}">
|
||||
<img class="align-content" src="/static/images/logo.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="card" style="padding: 20px;">
|
||||
|
||||
<h3>Ingresa tu Nueva Contraseña</h3>
|
||||
|
||||
<p>Ingrese su nueva contraseña dos veces para que podamos verificar que la ingresó correctamente.</p>
|
||||
|
||||
<form method="post" class="mt-3 md-2" class="form-control">
|
||||
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="Submit" name="Update Password" style="text-align: center;" class="btn btn-primary m-3">
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
33
templates/password_reset_sent.html
Normal file
33
templates/password_reset_sent.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<br><br><br>
|
||||
<div class="container" >
|
||||
<br><br><br>
|
||||
<div class="row">
|
||||
<div class="col-2"></div>
|
||||
<div class="col-8">
|
||||
<div class="login-logo">
|
||||
<a href="{% url 'index' %}">
|
||||
<img class="align-content" src="/static/images/logo.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="card" style="padding: 20px;">
|
||||
<h3>Envio de restablecimiento</h3>
|
||||
|
||||
|
||||
<p>Se te ha enviado un correo con las instrucciones te llegara pronto.</p>
|
||||
|
||||
<p>Si no recives el correo, verifica que es el correo con que te registraste y verifica tu carpeta de correo no deseado o carpeta de spam.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
58
templates/recupera.html
Normal file
58
templates/recupera.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!doctype html>
|
||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
|
||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
|
||||
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Ela Admin - HTML5 Admin Template</title>
|
||||
<meta name="description" content="Ela Admin - HTML5 Admin Template">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="apple-touch-icon" href="https://i.imgur.com/QRAUqs9.png">
|
||||
<link rel="shortcut icon" href="https://i.imgur.com/QRAUqs9.png">
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.0/normalize.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lykmapipo/themify-icons@0.1.2/css/themify-icons.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixeden-stroke-7-icon@1.2.3/pe-icon-7-stroke/dist/pe-icon-7-stroke.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/css/flag-icon.min.css">
|
||||
<link rel="stylesheet" href="assets/css/cs-skin-elastic.css">
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800' rel='stylesheet' type='text/css'>
|
||||
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> -->
|
||||
</head>
|
||||
<body class="bg-dark">
|
||||
|
||||
<div class="sufee-login d-flex align-content-center flex-wrap">
|
||||
<div class="container">
|
||||
<div class="login-content">
|
||||
<div class="login-logo">
|
||||
<a href="index.html">
|
||||
<img class="align-content" src="images/logo.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="login-form">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>Email address</label>
|
||||
<input type="email" class="form-control" placeholder="Email">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-flat m-b-15">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.4/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery-match-height@0.7.2/dist/jquery.matchHeight.min.js"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
81
templates/registro.html
Normal file
81
templates/registro.html
Normal file
@@ -0,0 +1,81 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<div class="sufee-login d-flex align-content-center flex-wrap">
|
||||
<div class="container" >
|
||||
<div class="login-content">
|
||||
<div class="login-logo">
|
||||
<a href="{% url 'index' %}">
|
||||
<img class="align-content" src="/static/images/logo.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="login-form">
|
||||
<form method="POST" action="" >
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label>Nombre</label>
|
||||
<input name="first_name" type="text" class="form-control" placeholder="Nombre">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Apellidos</label>
|
||||
<input name="last_name" type="text" class="form-control" placeholder="Apellido">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>USUARIO</label>
|
||||
<input name="username" type="text" class="form-control" placeholder="Usuario">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Correo</label>
|
||||
<input name="email" type="email" class="form-control" placeholder="Email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Contraseña</label>
|
||||
<input name="password1" type="password" class="form-control" placeholder="Password">
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
Su contraseña no puede asemejarse tanto a su otra información personal.
|
||||
</li>
|
||||
<li>
|
||||
Su contraseña debe contener al menos 8 caracteres.
|
||||
</li>
|
||||
<li>
|
||||
Su contraseña no puede ser una clave utilizada comúnmente.
|
||||
</li>
|
||||
<li>
|
||||
Su contraseña no puede ser completamente numérica.
|
||||
</li>
|
||||
</ul>
|
||||
<div class="form-group">
|
||||
<label>Contraseña</label>
|
||||
<input name="password2" type="password" class="form-control" placeholder="Password">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
Para verificar, introduzca la misma contraseña anterior.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> Agree the terms and policy
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-flat m-b-30 m-t-30">Registro</button>
|
||||
|
||||
<div class="register-link m-t-15 text-center">
|
||||
<p>Ya tienes una cuenta ? <a href="{% url 'acceder' %}"> Inicia Sesion</a></p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
485
templates/sensores.html
Normal file
485
templates/sensores.html
Normal file
@@ -0,0 +1,485 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
<!-- <meta http-equiv="refresh" content="3"> -->
|
||||
|
||||
<script src="/static/lib/Highcharts-10.2.1/highcharts.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/data.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/exporting.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/export-data.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/accessibility.js"></script>
|
||||
|
||||
|
||||
|
||||
{% endblock head %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="breadcrumbs">
|
||||
<div class="breadcrumbs-inner">
|
||||
<div class="row m-0">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>CIUDAD SALUD</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<div class="animated fadeIn">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">Sensores {{ data.f }}</strong>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div id="container-online1"></div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div id="container-online2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div id="container-online3"></div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div id="container-online4"></div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- .animated -->
|
||||
</div><!-- .content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="application/javascript">
|
||||
Highcharts.chart('container-online1', {
|
||||
chart: {
|
||||
type: 'spline',
|
||||
animation: Highcharts.svg, // don't animate in old IE
|
||||
marginRight: 10,
|
||||
events: {
|
||||
load: function () {
|
||||
var series = this.series[0];
|
||||
setInterval(function () {
|
||||
$.ajax({
|
||||
url: window.location.pathname, //window.location.pathname
|
||||
type: 'POST',
|
||||
data: {
|
||||
'action': 'get_graph_online1'
|
||||
},
|
||||
dataType: 'json',
|
||||
}).done(function (data) {
|
||||
if (!data.hasOwnProperty('error')) {
|
||||
var x = (new Date()).getTime();
|
||||
series.addPoint([x, data.y], true, true);
|
||||
return false;
|
||||
}
|
||||
message_error(data.error);
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
alert(textStatus + ': ' + errorThrown);
|
||||
}).always(function (data) {
|
||||
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
},
|
||||
time: {
|
||||
useUTC: false
|
||||
},
|
||||
title: {
|
||||
text: 'SENSOR T001'
|
||||
},
|
||||
accessibility: {
|
||||
announceNewData: {
|
||||
enabled: true,
|
||||
minAnnounceInterval: 15000,
|
||||
announcementFormatter: function (allSeries, newSeries, newPoint) {
|
||||
if (newPoint) {
|
||||
return 'Nuevo registro Agregado: ' + newPoint.y;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
tickPixelInterval: 150
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'TEMPERATURA'
|
||||
},
|
||||
plotLines: [{
|
||||
value: 0,
|
||||
width: 1,
|
||||
color: '#808080'
|
||||
}]
|
||||
},
|
||||
tooltip: {
|
||||
},
|
||||
legend: {
|
||||
enabled: false
|
||||
},
|
||||
exporting: {
|
||||
enabled: false
|
||||
},
|
||||
series: [{
|
||||
name: 'SENSOR T001',
|
||||
data: (function () {
|
||||
// generate an array of random data
|
||||
var data = [],
|
||||
time = (new Date()).getTime(),
|
||||
i;
|
||||
|
||||
for (i = -19; i <= 0; i += 1) {
|
||||
data.push({
|
||||
x: time + i * 3000,
|
||||
y: Math.random()
|
||||
});
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}]
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script type="application/javascript">
|
||||
Highcharts.chart('container-online2', {
|
||||
chart: {
|
||||
type: 'spline',
|
||||
animation: Highcharts.svg, // don't animate in old IE
|
||||
marginRight: 10,
|
||||
events: {
|
||||
load: function () {
|
||||
var series = this.series[0];
|
||||
setInterval(function () {
|
||||
$.ajax({
|
||||
url: window.location.pathname, //window.location.pathname
|
||||
type: 'POST',
|
||||
data: {
|
||||
'action': 'get_graph_online2'
|
||||
},
|
||||
dataType: 'json',
|
||||
}).done(function (data) {
|
||||
if (!data.hasOwnProperty('error')) {
|
||||
var x = (new Date()).getTime();
|
||||
series.addPoint([x, data.y], true, true);
|
||||
return false;
|
||||
}
|
||||
message_error(data.error);
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
alert(textStatus + ': ' + errorThrown);
|
||||
}).always(function (data) {
|
||||
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
},
|
||||
time: {
|
||||
useUTC: false
|
||||
},
|
||||
title: {
|
||||
text: 'SENSOR T002'
|
||||
},
|
||||
accessibility: {
|
||||
announceNewData: {
|
||||
enabled: true,
|
||||
minAnnounceInterval: 15000,
|
||||
announcementFormatter: function (allSeries, newSeries, newPoint) {
|
||||
if (newPoint) {
|
||||
return 'Nuevo registro Agregado: ' + newPoint.y;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
tickPixelInterval: 150
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'TEMPERATURA'
|
||||
},
|
||||
plotLines: [{
|
||||
value: 0,
|
||||
width: 1,
|
||||
color: '#808080'
|
||||
}]
|
||||
},
|
||||
tooltip: {
|
||||
},
|
||||
legend: {
|
||||
enabled: false
|
||||
},
|
||||
exporting: {
|
||||
enabled: false
|
||||
},
|
||||
series: [{
|
||||
name: 'SENSOR T002',
|
||||
data: (function () {
|
||||
// generate an array of random data
|
||||
var data = [],
|
||||
time = (new Date()).getTime(),
|
||||
i;
|
||||
|
||||
for (i = -19; i <= 0; i += 1) {
|
||||
data.push({
|
||||
x: time + i * 3000,
|
||||
y: Math.random()
|
||||
});
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}]
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="application/javascript">
|
||||
Highcharts.chart('container-online3', {
|
||||
chart: {
|
||||
type: 'spline',
|
||||
animation: Highcharts.svg, // don't animate in old IE
|
||||
marginRight: 10,
|
||||
events: {
|
||||
load: function () {
|
||||
var series = this.series[0];
|
||||
setInterval(function () {
|
||||
$.ajax({
|
||||
url: window.location.pathname, //window.location.pathname
|
||||
type: 'POST',
|
||||
data: {
|
||||
'action': 'get_graph_online3'
|
||||
},
|
||||
dataType: 'json',
|
||||
}).done(function (data) {
|
||||
if (!data.hasOwnProperty('error')) {
|
||||
var x = (new Date()).getTime();
|
||||
series.addPoint([x, data.y], true, true);
|
||||
return false;
|
||||
}
|
||||
message_error(data.error);
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
alert(textStatus + ': ' + errorThrown);
|
||||
}).always(function (data) {
|
||||
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
},
|
||||
time: {
|
||||
useUTC: false
|
||||
},
|
||||
title: {
|
||||
text: 'SENSOR T003'
|
||||
},
|
||||
accessibility: {
|
||||
announceNewData: {
|
||||
enabled: true,
|
||||
minAnnounceInterval: 15000,
|
||||
announcementFormatter: function (allSeries, newSeries, newPoint) {
|
||||
if (newPoint) {
|
||||
return 'Nuevo registro Agregado: ' + newPoint.y;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
tickPixelInterval: 150
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'TEMPERATURA'
|
||||
},
|
||||
plotLines: [{
|
||||
value: 0,
|
||||
width: 1,
|
||||
color: '#808080'
|
||||
}]
|
||||
},
|
||||
tooltip: {
|
||||
},
|
||||
legend: {
|
||||
enabled: false
|
||||
},
|
||||
exporting: {
|
||||
enabled: false
|
||||
},
|
||||
series: [{
|
||||
name: 'SENSOR T003',
|
||||
data: (function () {
|
||||
// generate an array of random data
|
||||
var data = [],
|
||||
time = (new Date()).getTime(),
|
||||
i;
|
||||
|
||||
for (i = -19; i <= 0; i += 1) {
|
||||
data.push({
|
||||
x: time + i * 3000,
|
||||
y: Math.random()
|
||||
});
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}]
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="application/javascript">
|
||||
Highcharts.chart('container-online4', {
|
||||
chart: {
|
||||
type: 'spline',
|
||||
animation: Highcharts.svg, // don't animate in old IE
|
||||
marginRight: 10,
|
||||
events: {
|
||||
load: function () {
|
||||
var series = this.series[0];
|
||||
setInterval(function () {
|
||||
$.ajax({
|
||||
url: window.location.pathname, //window.location.pathname
|
||||
type: 'POST',
|
||||
data: {
|
||||
'action': 'get_graph_online4'
|
||||
},
|
||||
dataType: 'json',
|
||||
}).done(function (data) {
|
||||
if (!data.hasOwnProperty('error')) {
|
||||
var x = (new Date()).getTime();
|
||||
series.addPoint([x, data.y], true, true);
|
||||
return false;
|
||||
}
|
||||
message_error(data.error);
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
alert(textStatus + ': ' + errorThrown);
|
||||
}).always(function (data) {
|
||||
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
},
|
||||
time: {
|
||||
useUTC: false
|
||||
},
|
||||
title: {
|
||||
text: 'SENSOR T004'
|
||||
},
|
||||
accessibility: {
|
||||
announceNewData: {
|
||||
enabled: true,
|
||||
minAnnounceInterval: 15000,
|
||||
announcementFormatter: function (allSeries, newSeries, newPoint) {
|
||||
if (newPoint) {
|
||||
return 'Nuevo registro Agregado: ' + newPoint.y;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
tickPixelInterval: 150
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'TEMPERATURA'
|
||||
},
|
||||
plotLines: [{
|
||||
value: 0,
|
||||
width: 1,
|
||||
color: '#808080'
|
||||
}]
|
||||
},
|
||||
tooltip: {
|
||||
},
|
||||
legend: {
|
||||
enabled: false
|
||||
},
|
||||
exporting: {
|
||||
enabled: false
|
||||
},
|
||||
series: [{
|
||||
name: 'SENSOR T004',
|
||||
data: (function () {
|
||||
// generate an array of random data
|
||||
var data = [],
|
||||
time = (new Date()).getTime(),
|
||||
i;
|
||||
|
||||
for (i = -19; i <= 0; i += 1) {
|
||||
data.push({
|
||||
x: time + i * 1000,
|
||||
y: Math.random()
|
||||
});
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}]
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#bootstrap-data-table-export').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
|
||||
|
||||
440
templates/sensores_fijos_dia.html
Normal file
440
templates/sensores_fijos_dia.html
Normal file
@@ -0,0 +1,440 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
<!-- <meta http-equiv="refresh" content="20"> -->
|
||||
|
||||
<script src="/static/lib/Highcharts-10.2.1/highcharts.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/data.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/series-label.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/exporting.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/export-data.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/accessibility.js"></script>
|
||||
<style type="text/css">
|
||||
.highcharts-figure,
|
||||
.highcharts-data-table table {
|
||||
min-width: 360px;
|
||||
max-width: 800px;
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
.highcharts-data-table table {
|
||||
font-family: Verdana, sans-serif;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #ebebeb;
|
||||
margin: 10px auto;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.highcharts-data-table caption {
|
||||
padding: 1em 0;
|
||||
font-size: 1.2em;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.highcharts-data-table th {
|
||||
font-weight: 600;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.highcharts-data-table td,
|
||||
.highcharts-data-table th,
|
||||
.highcharts-data-table caption {
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.highcharts-data-table thead tr,
|
||||
.highcharts-data-table tr:nth-child(even) {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.highcharts-data-table tr:hover {
|
||||
background: #f1f7ff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
{% endblock head %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="breadcrumbs">
|
||||
<div class="breadcrumbs-inner">
|
||||
<div class="row m-0">
|
||||
<div class="col-sm-12">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>SUBDIRECCIÓN DE INGENIERÍA BIOMÉDICA</h1>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="page-header float-right">
|
||||
<form method="POST" action="{% url 'sensoresfijosdia' %}" class="mt-2" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<button type="submit" class="btn btn-success">Consultar</button>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">Sensor</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<select class="custom-select" name="sensor" >
|
||||
<option selected>Sensor....</option>
|
||||
{% for sensor in sensores %}
|
||||
<option value="{{ sensor.idsensor }}">{{ sensor.nombre }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">INICIO</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<input name="fecha_ini" type="date" placeholder="" class="form-control" value="" required>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">FIN</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<input name="fecha_fin" type="date" placeholder="" class="form-control" value="" required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="page-header float-left">
|
||||
{% for menu in menus %}
|
||||
{% if menu.activo == 'SI' %}
|
||||
<a href="{% url 'sensoresfijosdianew' menu.idsensor %}" class="btn btn-success ">{{ menu.nombre }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<div class="animated fadeIn">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">DATOS OBTENIDOS DE SENSORES</strong>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<figure class="highcharts-figure">
|
||||
<div id="containert001"></div>
|
||||
<p class="highcharts-description">
|
||||
TEMPERATURA SENSOR {{ sensort.nombre }} TOTAL REGISTROS {{ count }}<br>
|
||||
<code>Fecha: {{ fecha_ini }} hasta {{ fecha_fin }}<br> Tmin: {{ temmin.temp }} H:{{ temmin.hora }} <br> Tmax: {{ temmax.temp }} H:{{ temmax.hora }}</code>
|
||||
</p>
|
||||
<hr>
|
||||
<div id="containert001h"></div>
|
||||
<p class="highcharts-description">
|
||||
HUMEDAD SENSOR {{ sensort.nombre }} <br>
|
||||
<code>Fecha: {{ fecha_ini }} hasta {{ fecha_fin }} <br> Hmin: {{ humemin.hume }} Hora:{{ humemin.hora }} <br> Hmax: {{ humemax.hume }} Hora:{{ humemax.hora }}</code>
|
||||
</p>
|
||||
<hr>
|
||||
<div id="containert001dual"></div>
|
||||
<p class="highcharts-description">
|
||||
TEMPERATURA SENSOR {{ sensort.nombre }} <br>
|
||||
<code>Fecha: {{ fecha_ini }} hasta {{ fecha_fin }} <br> Tmin: {{ temmin.temp }} H:{{ temmin.hora }} <br> Tmax: {{ temmax.temp }} H:{{ temmax.hora }}</code>
|
||||
</p>
|
||||
<hr>
|
||||
|
||||
</figure>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="page-header float-right">
|
||||
<form method="POST" action="{% url 'sensoresrango' %}" class="mt-2" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<button type="submit" class="btn btn-success">Ver Tabla</button>
|
||||
</div>
|
||||
|
||||
<div class="input-group-prepend">
|
||||
<input name="sensor" type="hidden" placeholder="" class="form-control" value="{{ sensort }}" >
|
||||
</div>
|
||||
|
||||
<div class="input-group-prepend">
|
||||
<input name="fecha_ini" type="hidden" placeholder="" class="form-control" value="{{ fecha_ini }}" >
|
||||
</div>
|
||||
|
||||
<div class="input-group-prepend">
|
||||
<input name="fecha_fin" type="hidden" placeholder="" class="form-control" value="{{ fecha_fin }}" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- .animated -->
|
||||
</div><!-- .content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="application/javascript">
|
||||
Highcharts.chart('containert001', {
|
||||
chart: {
|
||||
type: 'spline'
|
||||
},
|
||||
title: {
|
||||
{% if sensort.nombre == NULL %}
|
||||
text: 'TEMPERATURA SENSOR {{ sensort }} de {{ fecha_ini }} hasta {{ fecha_fin }}'
|
||||
{% else %}
|
||||
text: 'TEMPERATURA SENSOR {{ sensort.nombre }} de {{ fecha_ini }} hasta {{ fecha_fin }}'
|
||||
{% endif %}
|
||||
|
||||
},
|
||||
subtitle: {
|
||||
text: 'Fecha: {{ fecha }} <br> Tmin: {{ temmin.temp }} H:{{ temmin.hora }} & Tmax: {{ temmax.temp }} H:{{ temmax.hora }}'
|
||||
},
|
||||
xAxis: {
|
||||
categories: [
|
||||
{% for dato in datos %}
|
||||
|
||||
'{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}',
|
||||
{% endfor %}
|
||||
],
|
||||
accessibility: {
|
||||
description: 'Months of the year'
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Temperatura'
|
||||
},
|
||||
labels: {
|
||||
formatter: function () {
|
||||
return this.value + '°';
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
crosshairs: true,
|
||||
shared: true
|
||||
},
|
||||
plotOptions: {
|
||||
spline: {
|
||||
marker: {
|
||||
radius: 4,
|
||||
lineColor: '#666666',
|
||||
lineWidth: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '{{ sensort }}',
|
||||
marker: {
|
||||
symbol: 'square'
|
||||
},
|
||||
data: [
|
||||
{% for dato in datos %}
|
||||
{{ dato.temp }},
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
|
||||
Highcharts.chart('containert001h', {
|
||||
chart: {
|
||||
type: 'spline'
|
||||
},
|
||||
title: {
|
||||
{% if sensort.nombre == NULL %}
|
||||
text: 'HUMEDAD SENSOR {{ sensort }} de {{ fecha_ini }} hasta {{ fecha_fin }}'
|
||||
{% else %}
|
||||
text: 'HUMEDAD SENSOR {{ sensort.nombre }} de {{ fecha_ini }} hasta {{ fecha_fin }}'
|
||||
{% endif %}
|
||||
|
||||
},
|
||||
subtitle: {
|
||||
text: 'Fecha: {{ fecha }} <br> Hmin: {{ humemin.hume }} H:{{ humemin.hora }} & Hmax: {{ humemax.hume }} H:{{ humemax.hora }}'
|
||||
},
|
||||
xAxis: {
|
||||
categories: [
|
||||
{% for dato in datos %}
|
||||
|
||||
'{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}',
|
||||
{% endfor %}
|
||||
],
|
||||
accessibility: {
|
||||
description: 'Months of the year'
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Humedad'
|
||||
},
|
||||
labels: {
|
||||
formatter: function () {
|
||||
return this.value + '%';
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
crosshairs: true,
|
||||
shared: true
|
||||
},
|
||||
plotOptions: {
|
||||
spline: {
|
||||
marker: {
|
||||
radius: 4,
|
||||
lineColor: '#666666',
|
||||
lineWidth: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '{{ sensort }}',
|
||||
marker: {
|
||||
symbol: 'square'
|
||||
},
|
||||
data: [
|
||||
{% for dato in datos %}
|
||||
{{ dato.hume }},
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
Highcharts.chart('containert001dual', {
|
||||
chart: {
|
||||
type: 'spline'
|
||||
},
|
||||
title: {
|
||||
{% if sensort.nombre == NULL %}
|
||||
text: 'TEMPERATURA Y HUMEDAD SENSOR {{ sensort }} de {{ fecha_ini }} hasta {{ fecha_fin }}'
|
||||
{% else %}
|
||||
text: 'TEMPERATURA Y HUMEDAD SENSOR {{ sensort.nombre }} de {{ fecha_ini }} hasta {{ fecha_fin }}'
|
||||
{% endif %}
|
||||
|
||||
},
|
||||
subtitle: {
|
||||
text: 'Fecha: {{ fecha }} <br> Hmin: {{ humemin.hume }} H:{{ humemin.hora }} & Hmax: {{ humemax.hume }} H:{{ humemax.hora }}'
|
||||
},
|
||||
xAxis: {
|
||||
categories: [
|
||||
{% for dato in datos %}
|
||||
|
||||
'{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}',
|
||||
{% endfor %}
|
||||
],
|
||||
accessibility: {
|
||||
description: 'Months of the year'
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Humedad'
|
||||
},
|
||||
labels: {
|
||||
formatter: function () {
|
||||
return this.value + '%|°';
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
crosshairs: true,
|
||||
shared: true
|
||||
},
|
||||
plotOptions: {
|
||||
spline: {
|
||||
marker: {
|
||||
radius: 4,
|
||||
lineColor: '#666666',
|
||||
lineWidth: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '{{ sensort.nombre }}',
|
||||
marker: {
|
||||
symbol: 'square'
|
||||
},
|
||||
data: [
|
||||
{% for dato in datos %}
|
||||
{{ dato.temp }},
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
} ,
|
||||
{
|
||||
name: '{{ sensort.nombre }}',
|
||||
marker: {
|
||||
symbol: 'square'
|
||||
},
|
||||
data: [
|
||||
{% for dato in datos %}
|
||||
{{ dato.hume }},
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
|
||||
|
||||
416
templates/sensores_fijos_dianew.html
Normal file
416
templates/sensores_fijos_dianew.html
Normal file
@@ -0,0 +1,416 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
<meta http-equiv="refresh" content="30">
|
||||
<!-- -->
|
||||
|
||||
<script src="/static/lib/Highcharts-10.2.1/highcharts.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/data.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/series-label.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/exporting.js"></script>
|
||||
<!-- < guión src = "/static/lib/Highcharts-10.2.1/modules/offline-exporting.js" > < / guión > -->
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/export-data.js"></script>
|
||||
<script src="/static/lib/Highcharts-10.2.1/modules/accessibility.js"></script>
|
||||
<style type="text/css">
|
||||
.highcharts-figure,
|
||||
.highcharts-data-table table {
|
||||
min-width: 360px;
|
||||
max-width: 800px;
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
.highcharts-data-table table {
|
||||
font-family: Verdana, sans-serif;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #ebebeb;
|
||||
margin: 10px auto;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.highcharts-data-table caption {
|
||||
padding: 1em 0;
|
||||
font-size: 1.2em;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.highcharts-data-table th {
|
||||
font-weight: 600;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.highcharts-data-table td,
|
||||
.highcharts-data-table th,
|
||||
.highcharts-data-table caption {
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.highcharts-data-table thead tr,
|
||||
.highcharts-data-table tr:nth-child(even) {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.highcharts-data-table tr:hover {
|
||||
background: #f1f7ff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
{% endblock head %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="breadcrumbs" >
|
||||
<div class="breadcrumbs-inner">
|
||||
<div class="row m-0" >
|
||||
<div class="col-sm-12">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>SUBDIRECCIÓN DE INGENIERÍA BIOMÉDICA</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12" >
|
||||
<div class="page-header float-right">
|
||||
<form method="POST" action="{% url 'sensoresfijosdia' %}" class="mt-2" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<button type="submit" class="btn btn-success">Consultar</button>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">Sensor</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<select class="custom-select" name="sensor" >
|
||||
<option selected>Sensor....</option>
|
||||
{% for sensor in sensores %}
|
||||
{% if sensor.activo == 'SI' %}
|
||||
<option value="{{ sensor.idsensor }}">{{ sensor.nombre }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">INICIO</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<input name="fecha_ini" type="date" placeholder="" class="form-control" value="" required>
|
||||
</div>
|
||||
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">FIN</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<input name="fecha_fin" type="date" placeholder="" class="form-control" value="" required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% for menu in menus %}
|
||||
{% if menu.activo == 'SI' %}
|
||||
<a href="{% url 'sensoresfijosdianew' menu.idsensor %}" class="btn btn-success ">{{ menu.nombre }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<div class="animated fadeIn">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">DATOS OBTENIDOS DE SENSORES</strong>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<figure class="highcharts-figure">
|
||||
<div id="containert001"></div>
|
||||
<p class="highcharts-description">
|
||||
TEMPERATURA SENSOR {{ sensort.nombre }} <br>
|
||||
<code>Fecha: {{ fecha }} <br> Tmin: {{ temmin.temp }} H:{{ temmin.hora }} <br> Tmax: {{ temmax.temp }} H:{{ temmax.hora }}</code>
|
||||
</p>
|
||||
<hr>
|
||||
|
||||
{% if sensort.ver_humedad == 'SI' %}
|
||||
<div id="containert001h"></div>
|
||||
<p class="highcharts-description">
|
||||
HUMEDAD SENSOR {{ sensort.nombre }} <br>
|
||||
<code>Fecha: {{ fecha }} <br> Hmin: {{ humemin.hume }} Hora:{{ humemin.hora }} <br> Hmax: {{ humemax.hume }} Hora:{{ humemax.hora }}</code>
|
||||
</p>
|
||||
<hr>
|
||||
<div id="containert001dual"></div>
|
||||
<p class="highcharts-description">
|
||||
TEMPERATURA SENSOR {{ sensort.nombre }} <br>
|
||||
<code>Fecha: {{ fecha }} Tmin: {{ temmin.temp }} H:{{ temmin.hora }} Tmax: {{ temmax.temp }} H:{{ temmax.hora }}</code> <br>
|
||||
<code>Fecha: {{ fecha }} Hmin: {{ humemin.hume }} Hora:{{ humemin.hora }} Hmax: {{ humemax.hume }} Hora:{{ humemax.hora }}</code>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- .animated -->
|
||||
</div><!-- .content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
|
||||
Highcharts.chart('containert001', {
|
||||
chart: {
|
||||
type: 'spline'
|
||||
},
|
||||
title: {
|
||||
{% if sensort.nombre == NULL %}
|
||||
text: 'TEMPERATURA SENSOR {{ sensort }}'
|
||||
{% else %}
|
||||
text: 'TEMPERATURA SENSOR {{ sensort.nombre }}'
|
||||
{% endif %}
|
||||
},
|
||||
subtitle: {
|
||||
text: 'Fecha: {{ fecha }} <br> Tmin: {{ temmin.temp }} H:{{ temmin.hora }} & Tmax: {{ temmax.temp }} H:{{ temmax.hora }}'
|
||||
},
|
||||
xAxis: {
|
||||
categories: [
|
||||
{% for dato in datos %}
|
||||
{% if dato.temp == -200 %}
|
||||
'<p style="color:#FF0000";>{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}</p>',
|
||||
{% else %}
|
||||
'{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}',
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
],
|
||||
accessibility: {
|
||||
description: ''
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Temperatura'
|
||||
},
|
||||
labels: {
|
||||
formatter: function () {
|
||||
return this.value + '°';
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
crosshairs: true,
|
||||
shared: true
|
||||
},
|
||||
plotOptions: {
|
||||
spline: {
|
||||
marker: {
|
||||
radius: 4,
|
||||
lineColor: '#666666',
|
||||
lineWidth: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '{{ sensort.nombre }}',
|
||||
marker: {
|
||||
symbol: 'square'
|
||||
},
|
||||
data: [
|
||||
{% for dato in datos %}
|
||||
{{ dato.temp }},
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Highcharts.chart('containert001h', {
|
||||
chart: {
|
||||
type: 'spline'
|
||||
},
|
||||
title: {
|
||||
{% if sensort.nombre == NULL %}
|
||||
text: 'HUMEDAD SENSOR {{ sensort }}'
|
||||
{% else %}
|
||||
text: 'HUMEDAD SENSOR {{ sensort.nombre }}'
|
||||
{% endif %}
|
||||
},
|
||||
subtitle: {
|
||||
text: 'Fecha: {{ fecha }} <br> Hmin: {{ humemin.hume }} H:{{ humemin.hora }} & Hmax: {{ humemax.hume }} H:{{ humemax.hora }}'
|
||||
},
|
||||
xAxis: {
|
||||
categories: [
|
||||
{% for dato in datos %}
|
||||
{% if dato.hume == -200 %}
|
||||
'<p style="color:#FF0000";>{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}</p>',
|
||||
{% else %}
|
||||
'{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}',
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
],
|
||||
accessibility: {
|
||||
description: 'Meses'
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Humedad'
|
||||
},
|
||||
labels: {
|
||||
formatter: function () {
|
||||
return this.value + '%';
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
crosshairs: true,
|
||||
shared: true
|
||||
},
|
||||
plotOptions: {
|
||||
spline: {
|
||||
marker: {
|
||||
radius: 4,
|
||||
lineColor: '#666666',
|
||||
lineWidth: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '{{ sensort.nombre }}',
|
||||
marker: {
|
||||
symbol: 'diamond'
|
||||
},
|
||||
data: [
|
||||
{% for dato in datos %}
|
||||
{{ dato.hume }},
|
||||
{% endfor %}
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Highcharts.chart('containert001dual', {
|
||||
chart: {
|
||||
type: 'spline'
|
||||
},
|
||||
title: {
|
||||
{% if sensort.nombre == NULL %}
|
||||
text: 'TEMPERATURA Y HUMEDAD SENSOR {{ sensort }}'
|
||||
{% else %}
|
||||
text: 'TEMPERATURA Y HUMEDAD SENSOR {{ sensort.nombre }}'
|
||||
{% endif %}
|
||||
},
|
||||
subtitle: {
|
||||
text: 'Fecha: {{ fecha }} <br> Hmin: {{ humemin.hume }} H:{{ humemin.hora }} & Hmax: {{ humemax.hume }} H:{{ humemax.hora }}'
|
||||
},
|
||||
xAxis: {
|
||||
categories: [
|
||||
{% for dato in datos %}
|
||||
{% if dato.temp == -200 %}
|
||||
'<p style="color:#FF0000";>{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}</p>',
|
||||
{% else %}
|
||||
'{{ dato.fecha|date:'d/m' }}-{{ dato.hora }}',
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
],
|
||||
accessibility: {
|
||||
description: 'Meses'
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Temperatura y Humedad'
|
||||
},
|
||||
labels: {
|
||||
formatter: function () {
|
||||
return this.value + '% | °';
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
crosshairs: true,
|
||||
shared: true
|
||||
},
|
||||
plotOptions: {
|
||||
spline: {
|
||||
marker: {
|
||||
radius: 4,
|
||||
lineColor: '#666666',
|
||||
lineWidth: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: 'Temperatura',
|
||||
marker: {
|
||||
symbol: 'square'
|
||||
},
|
||||
data: [
|
||||
{% for dato in datos %}
|
||||
{{ dato.temp }},
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
} ,
|
||||
{
|
||||
name: 'Humedad',
|
||||
marker: {
|
||||
symbol: 'diamond'
|
||||
},
|
||||
data: [
|
||||
{% for dato in datos %}
|
||||
{{ dato.hume }},
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
140
templates/sensoresf.html
Normal file
140
templates/sensoresf.html
Normal file
@@ -0,0 +1,140 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
<!-- <meta http-equiv="refresh" content="5"> -->
|
||||
|
||||
|
||||
{% endblock head %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="breadcrumbs">
|
||||
<div class="breadcrumbs-inner">
|
||||
<div class="row m-0">
|
||||
<div class="col-sm-12">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>SUBDIRECCIÓN DE INGENIERÍA BIOMÉDICA</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<div class="animated fadeIn">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">DATOS OBTENIDOS DE SENSORES</strong>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<form method="POST" action="{% url 'sensoresfijosdia' %}" class="mt-2" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<button type="submit" class="btn btn-success">Consultar</button>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">Sensor</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<select class="custom-select" name="sensor" >
|
||||
<option selected>Sensor....</option>
|
||||
{% for sensor in sensores %}
|
||||
<option value="{{ sensor.idsensor }}">{{ sensor.nombre }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">INICIO</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<input name="fecha_ini" type="date" placeholder="" class="form-control" value="" required>
|
||||
</div>
|
||||
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">FIN</label>
|
||||
</div>
|
||||
<div class="input-group-prepend">
|
||||
<input name="fecha_fin" type="date" placeholder="" class="form-control" value="" required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<table id="example" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>SENSOR</th>
|
||||
<th>TEMPERATURA</th>
|
||||
<th>HUMEDAD</th>
|
||||
<th>FECHA</th>
|
||||
<th>HORA</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for dato in datos %}
|
||||
<tr>
|
||||
<td>{{ dato.id }}</td>
|
||||
<td>{{ dato.idsensor }}</td>
|
||||
<td>{{ dato.temp }}</td>
|
||||
<td>{{ dato.hume }}</td>
|
||||
<td>{{ dato.fecha }}</td>
|
||||
<td>{{ dato.hora }}</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- .animated -->
|
||||
</div><!-- .content -->
|
||||
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#bootstrap-data-table-export').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
|
||||
|
||||
103
templates/sensoresm.html
Normal file
103
templates/sensoresm.html
Normal file
@@ -0,0 +1,103 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
<!-- <meta http-equiv="refresh" content="1"> -->
|
||||
|
||||
{% endblock head %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="breadcrumbs">
|
||||
<div class="breadcrumbs-inner">
|
||||
<div class="row m-0">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>UNIVERSIDAD POLITÉCNICA DE TAPACHULA</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<div class="animated fadeIn">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">sensor</strong>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="example" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>SENSOR</th>
|
||||
<th>TEMPERATURA_S1</th>
|
||||
<th>HUMEDAD_S1</th>
|
||||
<th>TEMPERATURA_S2</th>
|
||||
<th>HUMEDAD_S2</th>
|
||||
<th>TEMPERATURA_S3</th>
|
||||
<th>HUMEDAD_S3</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for dato in datos %}
|
||||
<tr>
|
||||
<td>{{ dato.id }}</td>
|
||||
<td>{{ dato.idsensor }}</td>
|
||||
<td>{{ dato.temps1 }}</td>
|
||||
<td>{{ dato.humes1 }}</td>
|
||||
<td>{{ dato.temps2 }}</td>
|
||||
<td>{{ dato.humes2 }}</td>
|
||||
<td>{{ dato.temps3 }}</td>
|
||||
<td>{{ dato.humes3 }}</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- .animated -->
|
||||
</div><!-- .content -->
|
||||
{% endblock content %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#bootstrap-data-table-export').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
|
||||
|
||||
101
templates/telegram.html
Normal file
101
templates/telegram.html
Normal file
@@ -0,0 +1,101 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
<!-- <meta http-equiv="refresh" content="5"> -->
|
||||
|
||||
|
||||
{% endblock head %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="breadcrumbs">
|
||||
<div class="breadcrumbs-inner">
|
||||
<div class="row m-0">
|
||||
<div class="col-sm-4">
|
||||
<div class="page-header float-left">
|
||||
<div class="page-title">
|
||||
<h1>CIUDAD SALUD</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="page-header float-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="animated fadeIn">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">sensor</strong>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<table id="example1" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>idBot</th>
|
||||
<th>idGrupo</th>
|
||||
<th>OPCIONES</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for dato in datos %}
|
||||
<tr>
|
||||
<td>{{ dato.id }}</td>
|
||||
<td>{{ dato.idBot }}</td>
|
||||
<td>{{ dato.idGrupo }}</td>
|
||||
<td>
|
||||
{% if user.is_superuser %}
|
||||
<a href="{% url 'actualizatelegram' dato.id %}" class="btn btn-primary btn-rounded btn-lg" >Actualizar Datos</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div><!-- .animated -->
|
||||
</div><!-- .content -->
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#example1').DataTable({
|
||||
"pageLength": 50,
|
||||
"order": [[1, "desc" ]],
|
||||
});
|
||||
} );
|
||||
</script>
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
|
||||
|
||||
70
templates/user.html
Normal file
70
templates/user.html
Normal file
@@ -0,0 +1,70 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Content -->
|
||||
<div class="content">
|
||||
<!-- Animated -->
|
||||
<div class="animated fadeIn">
|
||||
|
||||
<!-- Traffic -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<p align="center"><img src="/static/images/logo.png" alt="Logo"></a></p>
|
||||
|
||||
<table width="500" border="0" align="center" style="background-color: #FFFFFF;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="100" height="100" alt=""><img src="/static/images/image016.png" /></td>
|
||||
|
||||
<td Colspan="3" height="100" alt="" align="center"><img src="/static/images/marque.png" /></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td Colspan="3" width="150" height="150" alt="" align="center"><img src="/static/images/image026.png" width="150" height="150" alt="" align="center"/></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td Colspan="3" >
|
||||
<br>
|
||||
<p align="center">Nombre: Kristel Mendoza</p>
|
||||
<p align="center">Tipo de Usuario: Estudiante</p>
|
||||
<p align="center">ID: 193391</p>
|
||||
<p align="center">Acceso:Clase</p>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td Colspan="3" align="center" >
|
||||
<button type="submit" class="btn btn-success">Registrar</button>
|
||||
<button type="submit" class="btn btn-danger">Cancelar</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div><!-- /# column -->
|
||||
</div>
|
||||
<!-- /Traffic -->
|
||||
|
||||
</div>
|
||||
<!-- .animated -->
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
82
templates/usuarios.html
Normal file
82
templates/usuarios.html
Normal file
@@ -0,0 +1,82 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<!-- End Navbar -->
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
{% if user.is_superuser %}
|
||||
<a href="{% url 'registro' %}" class="btn btn-info float-right" >Crear Usuario IB</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-primary">
|
||||
<h4 class="card-title ">USUARIOS</h4>
|
||||
<p class="card-category">USUARIOS</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="data">
|
||||
<thead class=" text-primary">
|
||||
<tr>
|
||||
<th>__</th>
|
||||
<th>USUARIO Ó IB</th>
|
||||
<th>NOMBRE</th>
|
||||
<th>APELLIDOS</th>
|
||||
<th>ULTIMA CONEXION</th>
|
||||
<th>ES ADMIN</th>
|
||||
<th>ACCIONES</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
{% for dato in datos %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>{{ dato.username }}</td>
|
||||
<td>{{ dato.first_name }}</td>
|
||||
<td>{{ dato.last_name }}</td>
|
||||
<td>{{ dato.last_login }}</td>
|
||||
<td>
|
||||
{% if dato.is_superuser %}
|
||||
<p>Admin</p>
|
||||
{% else %}
|
||||
<p>Usuario</p>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{% if user.is_superuser %}<a href="{% url 'userupdate' dato.id %}" class="btn btn-primary">Actualizar</a>{% endif %}</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
47
templates/usuariosupdate.html
Normal file
47
templates/usuariosupdate.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<!-- End Navbar -->
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-primary">
|
||||
<h4 class="card-title ">actualizar</h4>
|
||||
<p class="card-category">usuarios</p>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="" class="mt-3" autocomplete="off" >
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button type="submit" class="btn btn-success">Guardar</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
12
templates/vacia.html
Normal file
12
templates/vacia.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ok</title>
|
||||
</head>
|
||||
<body>
|
||||
<h4>OK</h4>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user