Skip to content

Commit

Permalink
Noalmerge
Browse files Browse the repository at this point in the history
  • Loading branch information
VanessaHuertas committed May 19, 2018
1 parent 7433f38 commit c83413c
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 37 deletions.
8 changes: 4 additions & 4 deletions EntidadVirtual/API_REST/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
import json
from os import environ as env
from werkzeug.exceptions import HTTPException
import horarios.horariosLogic as hl
# import horarios.horariosLogic as hl
from authlib.flask.client import OAuth
from six.moves.urllib.parse import urlencode
import requests
from functools import wraps
from dotenv import load_dotenv, find_dotenv

app = Flask(__name__, static_url_path='/public', static_folder='./public', template_folder='templates')
app.secret_key = 'estaesunaclavesecreta'
Expand All @@ -28,7 +29,7 @@
client.connect("broker.mqtt-dashboard.com", 1883)

app.config['MONGO_DBNAME'] = 'restdb'
app.config['MONGO_URI'] = 'mongodb://localhdost:27017/restdb'
app.config['MONGO_URI'] = 'mongodb://localhost:27017/restdb'

mongo = PyMongo(app)
oauth = OAuth(app)
Expand Down Expand Up @@ -58,7 +59,7 @@ def insert_cerradura():
nuevo_candado = "0;"+password+";"+posicion;

#hl.agregar_candado(hora_inicio, hora_fin, posicion)
hl.agregar_candado(hora_inicio, hora_fin, posicion)
# hl.agregar_candado(hora_inicio, hora_fin, posicion)
client.publish(topico, nuevo_candado)
return jsonify(nuevo_candado)

Expand Down Expand Up @@ -521,6 +522,5 @@ def add_hub(id_propietario):
return jsonify({'result': output})



if __name__ == '__main__':
app.run(debug=True)
11 changes: 10 additions & 1 deletion Front/SoftSecurity/src/app/alerta/alerta.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ div#alerta {
right:662px;
left:160px;
height:180px;
width:490px;
width:490px;
background-color:white;
z-index:0;
}
Expand All @@ -12,3 +12,12 @@ p.textoAlerta {
color: #8f0000;
font-size: 200%;
}

div#redPointer {
width:45px;
height:45px;
left:30px;
margin:10px;
background-image: url(/imagenes/redPointer.png);
z-index:1;
}
5 changes: 3 additions & 2 deletions Front/SoftSecurity/src/app/alerta/alerta.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<div id="alerta">
<div>
<p class="textoAlerta" style="font-weight: bold;"><img src="./imagenes/redPointer.png" style="width:65px;height:65px;margin-right:10px;">Alertas!</p>
<p class="textoAlerta" style="font-weight: bold;">Alertas!</p>
</div>

<div id="redPointer">
</div>
</div>


Expand Down
24 changes: 2 additions & 22 deletions Front/SoftSecurity/src/app/fallo/fallo.component.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
<div id="fallo" ng-app="myApp" ng-controller="falloCtrl">
<div id="fallo">
<div>
<p class="textoFallo" style="font-weight: bold;">Fallos!</p>
</div>

<div id="listaFallo">
<ul>
<div id="texto">
<li ng-repeat="fallo in myData">
{{fallo.tipoFallo + ', ' + fallo.fecha + ', ' + fallo.hora}}
</li>
</div>
</ul>
</div>

</div>

<script>
var app = angular.module('myApp',[]);
app.controller('falloCtrl', function($scope, $http){
$http.get("").then(function(response){
$scope.myData = response.data.records;
});
});
</script>
</div>
11 changes: 8 additions & 3 deletions Front/SoftSecurity/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@
</li>
</ul>
</div>
<div id="sesion">
<p class="textoSoft" style="font-weight: bold;">SoftSecurity</p>
<div id="listaFallo">
</div>
<div class="perfil">
<div id="sesion" style="width:1500px; padding:3px;">
<div style="widows: 900px; float:left;">
<p class="textoSoft" style="font-weight: bold;">SoftSecurity</p>
</div>
<div id="perfil" style="width:300px; float:right;">
<p class="logout" style="font-weight: bold;"><a href="http://localhost:5000/logout">Log Out!</a></p>
</div>
</div>

<div id="menu">
Expand Down
25 changes: 20 additions & 5 deletions Front/SoftSecurity/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,30 @@ div#sesion {
background-color:#2f3030;
}

div.perfil {
margin-left:1000px;
line-height:75px;
p.logout {
top:120%;
font-size:180%;
color:blue;
}

div#listaAlerta {
position:absolute;
left:300px;
top:200px;
top:200px;
height:140px;
width:350px;
color:black;
z-index:1;
overflow:scroll;
}

div#listaFallo {
position:absolute;
left:300px;
top:400px;
height:125px;
width:350px;
color:black;
z-index:1;
z-index:1;
overflow:scroll;
}

0 comments on commit c83413c

Please sign in to comment.