-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
182 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""remote sensors | ||
Revision ID: 453b00e0ca8e | ||
Revises: 3cf7480569d1 | ||
Create Date: 2019-05-20 19:37:40.689172 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '453b00e0ca8e' | ||
down_revision = '3cf7480569d1' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.create_table('remotesensor', | ||
sa.Column('id', sa.Integer(), nullable=False), | ||
sa.Column('key', sa.String(), nullable=False), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.drop_table('remotesensor') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% extends "_base.html" %} | ||
{% set title='New sensor' %} | ||
{% set heading='Configure new sensor' %} | ||
|
||
{% block breadcumb %} | ||
<ol class="breadcrumb"> | ||
<li>Home</li> | ||
<li>Sensors</li> | ||
<li class="active">New remote</li> | ||
</ol> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<p> | ||
For remote sensors it is possible to push new temperature values with an HTTP API. | ||
</p> | ||
<form action="" method="post"> | ||
{{ form.csrf_token }} | ||
<div class="row"> | ||
<div class="col-md-2"> | ||
{{ form.name.label }} | ||
{% if form.name.errors %}<br><span class="text-danger">{{ form.name.errors[0] }}</span>{% endif %} | ||
</div> | ||
<div class="col-md-4"> | ||
{{ form.name(class_="form-control") }} | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-2"> | ||
</div> | ||
<div class="col-md-4"> | ||
<button type="submit" class="btn btn-primary">Create</button> | ||
</div> | ||
</div> | ||
</form> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters