<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <title>Parl Cluster</title>
  <link rel="shortcut icon" href="../static/favicon.ico">
  <script type="text/javascript" src="../static/js/jquery.min.js"></script>
  <script src="../static/js/echarts.min.js"></script>
  <script src="../static/js/parl.js"></script>
  <link rel="stylesheet" href="../static/css/bootstrap-parl.min.css">
</head>

<body>
  <nav class="navbar navbar-expand-lg navbar-light bg-dark fixed-top">
    <div class="container">
      <a class="navbar-brand">
        <img src="../static/logo.png" style="height: 30px">
      </a>
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav">
          <li class="nav-item" id="worker_nav">
            <a class="btn text-white" href="workers">Worker</a>
          </li>
          <li class="nav-item" id="client_nav">
            <a class="btn text-white" href="clients">Client</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>


  <div class="container" id="client_container">
    <h5 class="font-weight-light text-center text-lg-left mt-4 mb-4">
      Client status
    </h5>
    <table class="table table-striped">
        <thead>
          <tr>
            <th scope="col">#</th>
            <th scope="col">Path</th>
            <th scope="col">Hostname</th>
            <th scope="col">Actor Num</th>
            <th scope="col">Time (min)</th>
          </tr>
        </thead>
        <tbody id='table'>
          <th colspan="5">Loading Data...</th>
        </tbody>
      </table>
  </div>



  <script>
    var res = {};

    $(document).ready(function () {
      $.get('cluster', function (data, status) {
        res = data;
        autoTable(res);
      });

      setInterval(function () {
        $.get('cluster', function (data, status) {
          res = data;
          autoTable(res);
        });
      }, 10000);

    });
  </script>
</body>
</html>
