Commit 2cc82468 authored by Nelso Jost's avatar Nelso Jost

FIX: some settings and data count()

parent 14f28a95
......@@ -81,12 +81,10 @@ mysql-setup:
mysql -u root -p < production/MYSQL_SETUP
deploy:
@ echo "-------------------------------------------------------"
mkdir -p production/nginx-gunicorn/logs
sudo ${VENV}/bin/python production/nginx-gunicorn/deploy.py ${PORT}
undeploy:
@ echo "-------------------------------------------------------"
sudo ${VENV}/bin/python production/nginx-gunicorn/undeploy.py
clean-logs-nginx:
......@@ -94,7 +92,6 @@ clean-logs-nginx:
mkdir -p production/nginx-gunicorn/logs
clean-all: clean-venv
rm -rf app/db.sqlite
py3clean app
logtail-nginx-access:
......
......@@ -91,7 +91,7 @@ def init_sensor_forms(sensors, nickname_index_focus=None, include_stats=False):
f.description.data = sensor['description']
f.description.name = '@description_' + str(i)
if include_stats:
f.stats = {'points_count': len(Sensor.get(sensor['id']).rawdata.all())}
f.stats = {'points_count': Sensor.get(sensor['id']).rawdata.count()}
all_forms.append(f)
if nickname_index_focus == -1 and f:
f.nickname.has_focus = True
......@@ -187,7 +187,7 @@ def view_board_sensor(id, sensor_nickname):
form.board_choices.data = id
update_need_refresh()
return render_template('viewboardsensor.html', config=config, form=form,
return render_template('viewsensor.html', config=config, form=form,
board_id=id,
current_sensor=Sensor.get(sensor_nickname).to_json,
all_sensors=[s.to_json for s in board.sensors.all()],
......
......@@ -4,7 +4,7 @@
server {
listen 80;
server_name dados.cta.if.ufrgs;
server_name dados.cta.if.ufrgs.br;
root {base_dir}/app/static;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment