{%set loadUrl = data['url']['data'] + '&ajax=1' %}
{% if data['ajax'] == False %}
<!DOCTYPE html>
<html>
    <head>
        {%include '../inc/header.html'%}
        {% if 'camera' in data and data['camera'] %}
        <link href="{{static_url('pc/lib/player/video-js.min.css')}}" rel="stylesheet">
        {% end %}
    </head>
    <body>
        <div class="wrapper clearfix">
            {%include '../inc/nav.html'%}
            <div class="right-cont">
            {%include '../inc/top.html'%}
            <div class="main">
                {%include '../inc/msg.html'%}
                {%include 'inc/menu.html'%}

                {% if 'stat' in data and data['stat'] %}
                <div>
                    <div class="pannel" name="chart" id="chart">
                        <h2>今日（<span class="name">{{data['stat']['name']}}</span>）数据趋势</h2>
                        <div class="box" id="main" style="width: 100%;height:405px;"></div>
                    </div> 
                </div>
                {% end %}

                {% if 'camera' in data and data['camera'] %}
                {% for k,v in enumerate(data['camera']) %}
                <div class="{% if k%2 == 0 %}left{% else %}right{% end %} w-half">
                    <div class="pannel">
                        <h2>{{v['name']}}</h2>
                        <video id="player-{{k}}" class="player video-js vjs-default-skin" controls>
                          <source
                             src="{{v['value']}}"
                             type="application/x-mpegURL">
                        </video>
                    </div>
                </div>
                {% end %}
                {% end %}

                <div id="loadMain">
                {% end %}

                {% if 'pic' in data and data['pic'] %}

                {% if 'camera' in data and data['camera'] %}
                {%set index = 0 %}
                {% for v in data['camera'] %}
                {%set index = index+1 %}
                {% end %}
                {% else %}
                {%set index = 0 %}
                {% end %}

                {% for k,v in enumerate(data['pic']) %}
                <div class="{% if index%2 == 0 %}left{% else %}right{% end %} w-half">
                    <div class="pannel">
                        <h2>{{v['name']}}</h2>
                        <div class="box">
                            <img src="{{v['value']}}" width="100%" style="display: block;" />
                        </div>
                    </div>
                </div>
                {%set index = index+1 %}
                {% end %}
                {% end %}

                {%include 'inc/data.html'%}
                {% if data['ajax'] == False %}
                </div>
            </div>
        </div>
    </div>
{%include '../inc/footer.html'%}
{%include '../inc/script.html'%}
{% end %}

{% if 'stat' not in data %}
{% else %}
{% if data['ajax'] == False %}
{%include 'chart/simple.html'%}
{% else %}
{%include 'chart/ajax.html'%}
{% end %}
{% end %}
{% if data['ajax'] == False %}
{%include 'inc/load.html'%}
</body>
</html>
{% end %}