<!DOCTYPE html>
<html> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>{% block title %}pymodbus | server{% endblock %}</title> 
 
    <link rel="stylesheet" type="text/css" href="/media/css/bootstrap.min.css" /> 
    <link rel="stylesheet" type="text/css" href="/media/css/bootstrap-responsive.min.css" /> 
    <link rel="stylesheet" type="text/css" href="/media/css/application.css" /> 
</head> 

<body> 

  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <!-- toolbar -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <a class="brand" href="#">pymodbus</a>
        <div class="nav-collapse collapse">
          <ul class="nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#help">Help</a></li>
            <li><a href="#about">About</a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>

  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <!-- content -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <div class='container'> 

    <!-- datastore container -->
    <div class='tabbable tabs-left'>
      <ul class='nav nav-tabs'>
        <li class="active"><a href="#pane-coils" data-toggle="tab">Coils</a></li>
        <li><a href="#pane-discretes" data-toggle="tab">Discretes</a></li>
        <li><a href="#pane-holdings" data-toggle="tab">Holding Registers</a></li>
        <li><a href="#pane-inputs" data-toggle="tab">Input Registers</a></li>
      </ul>
      <div class='tab-content'>
        <div class="tab-pane active" id="pane-coils">
        </div>
        <div class="tab-pane" id="pane-discretes">
        </div>
        <div class="tab-pane" id="pane-holdings">
        </div>
        <div class="tab-pane" id="pane-inputs">
        </div>
      </div>
    </div>

    <!-- settings container -->
    <div id="py-container">
      <div class='row'>
        <div id='py-identity' class='span4'>
          <h2>Device Identity</h2>
        </div>
  
        <div id='py-counters' class='span4'>
          <h2>Device Counters</h2>
        </div>
  
        <div id='py-device' class='span4'>
          <h2>Device Settings</h2>
        </div>
      </div>
    </div>

  </div>

  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <!-- templates -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <script type="text/template" id="py-table-template">
    <table class='table table-condensed table-bordered'>
      <thead>
        <tr>
          <th>Setting</th>
          <th>Value</th>
        </tr>
      </thead>
      <tbody>
        <% _.each(_.keys(settings), function(setting) { %>
        <tr>
          <td><%= setting %></td>
          <td><%= settings[setting] %></td>
        </tr>
        <% }); %>
      </tbody>
    </table>
  </script>

  <script type="text/template" id="py-datastore-template">
    <table class='table table-condensed table-bordered table-hover'>
      <thead>
        <tr>
          <th>address</th>
          <% _.each(_.range(10), function(id) { %>
            <th><%= id %></th>
          <% }); %>
        </tr>
      </thead>
      <tbody><tr>
        <% _.each(data, function(val, key) { %>
        <%= (key % 10 == 0) ? '</tr><tr><td class="data-mark">' + key + '</td>' : '' %>
          <td><%= val %></td>
        <% }); %>
      </tbody>
    </table>
  </script>

  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <!-- javascript -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <script type="text/javascript" src="/media/js/jquery.min.js"></script> 
  <script type="text/javascript" src="/media/js/underscore.min.js"></script> 
  <script type="text/javascript" src="/media/js/bootstrap.min.js"></script>
  <script type="text/javascript" src="/media/js/backbone.min.js"></script> 
  <script type="text/javascript" src="/media/js/application.js"></script> 

</body> 

</html>
