<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="anthor" content="IvanD.Mido">
        <meta http-equiv="refresh" content="10">
        <script src="{{url_for('static',filename = 'jquery.min.js')}}"></script>
        <script src="{{url_for('static',filename = 'buttonclick.js')}}"></script>
        <title>智能家居</title>
    </head>
    <style>
        body {
            text-align: center;}
        table, th, td {
            border:1px solid black;}
    </style>
        
    <body>
        <div class="header">
            <h1>智能家居</h1>
        </div>
        <div class="box1">
            <h3>           
                <input id="chart" style="font-size:20px;margin-right:50px" type="button" value="实时图表" onclick="window.open('/chart')" >
                <input id="cur_camera" style="font-size:20px;margin-right:50px" type="button" value="视频监控" onclick="window.open('/cur_camera')" >
                <input id="remote_control" style="font-size:20px;margin-right:50px" type="button" value="远程控制" onclick="window.open('/remote_control')" >     
                <input id="analyze" style="font-size:20px;margin-right:50px" type="button" value="数据分析" onclick="window.open('/analyze')" >    

            </h3>
        </div>
        <div class="table">
            <table style="width:100%">
                {% for i in data[::-1] %}
                <tr>
                  <th>编号</th>
                  <th>时间</th>
                  <th>时段</th>
                  <th>温度(℃)</th>
                  <th>湿度(%)</th>
                  <th>光照</th>
                  <th>漏水</th>
                </tr>
                <tr>
                <td>{{i[0]}}</td>
                <td>{{i[1]}}</td>
                <td>{{i[2]}}</td>
                <td>{{i[3]}}</td>
                <td>{{i[4]}}</td>
                <td>{{i[5]}}</td>
                <td>{{i[6]}}</td>
                </tr>
                {% endfor %}
                </table>
        </div>
        <br>
    </body>
</html>