{% load i18n static%}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE|default:'en' }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
  <meta charset="UTF-8">
  <title></title>
  <link rel="stylesheet" type="text/css" media="screen" href="{% static "layui/css/layui.css" %}?v=2.4.3"/>
  <script src="{% static 'locale/i18n.min.js' %}?v=1.2"></script>
  <script src="{{ STATIC_URL }}locale/i18n_{{ LANGUAGE_CODE|default:'en' }}.js?v=1.3"></script>
  <script src="{% static "layui/layui.js" %}?v=2.4.3" type="text/javascript"></script>
</head>
<body>
<div>
  <table id="id_online" class="layui-hide" lay-filter="online"></table>
</div>
<script>

  layui.use(['table', 'form', 'element'], function () {
    var table = layui.table;
    var $ = layui.$;
    var tb = table.render({
      id: "id_online"
      , elem: "#id_online"
      , toolbar: false
      , canSelectRow: 'false'
      , method: 'GET'
      , cellMinWidth: 80
      , autowidth: 'true'
      ,height: 'full-20'
      , size: 'sm'
      , cols: [
        [
          {field: 'id', type: "checkbox", hide: true}
          , {field: 'sn', title: "{% trans 'terminal_field_sn' %}"}
          , {field: 'alias', title: "{% trans 'terminal_field_alias' %}"}
          , {field: 'device_area', title: "{% trans 'terminal_field_area' %}"}
          , {field: 'ip_address', title: "{% trans 'terminal_field_ipAddress' %}"}
        ]
      ]
      , loading: true
      , url: '/base/api/dashboardOnline/'
      ,request: {
          pageName: 'page' //Default：page
          ,limitName: 'page_size' //Default：limit
        }
      , page: {
        layout: ['prev', 'page', 'next', 'limit', 'count']
      }
      , text: {
        none: gettext("none_data")
      }
      , pagerId: "pages"
      ,limit: 50
      ,limits: [10, 20, 50, 80, 100, 200]
    });
  });
</script>
</body>

</html>
