iot-with-document-store-db

git clone git://git.codymlewis.com/iot-with-document-store-db.git
Log | Files | Refs | README

node.html (2606B)


      1 <!DOCTYPE html>
      2 <html lang="en">
      3     <head>
      4         <title>{{title}} - Sensors</title>
      5         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
      6         <meta name="viewport" content="width=device-width, initial-scale=1" />
      7         <meta name="author" content="Cody Lewis" />
      8         <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
      9             integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
     10         <link rel='stylesheet' href='/static/stylesheets/style.css' />
     11     </head>
     12     <body>
     13         <div class="root">
     14             <a href="/" style="float:left">
     15                 <span style="font-size: 96px; color: black; padding: 15px;">
     16                     <i class="fas fa-chevron-left"></i>
     17                 </span>
     18             </a>
     19             <h1>Sensor {{title}}</h1>
     20             <h2>{{data['type']}}</h2>
     21                 <table class="tbl">
     22                     <tr>
     23                         <th>Time</th>
     24                         {% if data['type'] == "Themometer" %}
     25                             <th>Temperature (°C)</th>
     26                         {% elif data['type'] == "Acnemometer" %}
     27                             <th>Speed (m/s)</th>
     28                             <th>Pressure (HpA)</th>
     29                         {% elif data['type'] == "Smart Light" %}
     30                             <th>Status</th>
     31                             <th>Usage (kW/h)</th>
     32                         {% elif data['type'] == "Pulse Oximeter" %}
     33                             <th>Pulse Rate (bpm)</th>
     34                         {% endif %}
     35                     </tr>
     36                     {% for row in data['data'] %}
     37                         <tr>
     38                             <td>{{ row['time'] }}</td>
     39                             {% if data['type'] == "Themometer" %}
     40                                 <td>{{ row['temp']  }}</td>
     41                             {% elif data['type'] == "Acnemometer" %}
     42                                 <td>{{ row['speed']  }}</td>
     43                                 <td>{{ row['pressure'] }}</td>
     44                             {% elif data['type'] == "Smart Light" %}
     45                                 <td>{{ row['status'] }}</td>
     46                                 <td>{{ row['usage'] }}</td>
     47                             {% elif data['type'] == "Pulse Oximeter" %}
     48                                 <td>{{ row['rate'] }}</td>
     49                             {% endif %}
     50                         </tr>
     51                     {% endfor %}
     52                 </table>
     53             <br />
     54         </div>
     55     </body>
     56 </html>