aboutsummaryrefslogtreecommitdiff
path: root/web/static/app/templates
diff options
context:
space:
mode:
Diffstat (limited to 'web/static/app/templates')
-rw-r--r--web/static/app/templates/device.html34
-rw-r--r--web/static/app/templates/front-page.html23
-rw-r--r--web/static/app/templates/property.html42
3 files changed, 99 insertions, 0 deletions
diff --git a/web/static/app/templates/device.html b/web/static/app/templates/device.html
new file mode 100644
index 0000000..b466fdc
--- /dev/null
+++ b/web/static/app/templates/device.html
@@ -0,0 +1,34 @@
+<div class="container">
+
+ <h1>
+ {{ctrl.device.key}}
+ <small class="text-muted">device</small>
+ </h1>
+
+ <ul>
+ <li>Created: {{ctrl.device.created_timestamp | date}}</li>
+ <li>Name: {{ctrl.property.name}}</li>
+ <li>Description: {{ctrl.property.description}}</li>
+ </ul>
+
+ <h3>Properties</h3>
+
+ <table class="table">
+ <thead>
+ <tr>
+ <td>Registered</td>
+ <td>Key</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="p in ctrl.device.properties | orderBy:'key'">
+ <td>
+ {{p.created_timestamp | date:'medium'}}
+ </td>
+ <td>
+ <a href="#/device/{{ctrl.device.id}}/property/{{p.id}}">{{p.key}}</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</div>
diff --git a/web/static/app/templates/front-page.html b/web/static/app/templates/front-page.html
new file mode 100644
index 0000000..68026c3
--- /dev/null
+++ b/web/static/app/templates/front-page.html
@@ -0,0 +1,23 @@
+<div class="container">
+
+ <h2>Devices</h2>
+
+ <table class="table">
+ <thead>
+ <tr>
+ <th>Registered</th>
+ <th>Key</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="d in ctrl.devices | orderBy:'key'">
+ <td>
+ {{d.created_timestamp | date:'medium'}}
+ </td>
+ <td>
+ <a href="#/device/{{d.id}}">{{d.key}}</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</div>
diff --git a/web/static/app/templates/property.html b/web/static/app/templates/property.html
new file mode 100644
index 0000000..5f925e7
--- /dev/null
+++ b/web/static/app/templates/property.html
@@ -0,0 +1,42 @@
+<div class="container">
+
+ <h1>
+ <a href="#/device/{{ctrl.device.id}}">{{ctrl.device.key}}</a>
+ <small class="muted">device</small>
+ </h1>
+
+ <h2>
+ {{ctrl.property.key}}
+ <small class="muted">property</small>
+ </h2>
+
+ <ul>
+ <li>Created: {{ctrl.property.created_timestamp | date}}</li>
+ <li>Name: {{ctrl.property.name}}</li>
+ <li>Description: {{ctrl.property.description}}</li>
+ </ul>
+
+ <h3>Latest Values</h3>
+
+ <table class="table">
+ <thead>
+ <tr>
+ <th>Timestamp</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="v in ctrl.values">
+ <td>{{v.timestamp | date:'medium'}}</td>
+ <td>{{v.value}}</td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr ng-repeat="v in ctrl.values">
+ <td>{{v.timestamp | date:'medium'}}</td>
+ <td>{{v.value}}</td>
+ </tr>
+ </tbody>
+ </table>
+
+</div>