<commit_before><html>
<head>
  <title>Simple StatsD Counters</title>
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript" src="jquery.dynatable.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="jquery.dynatable.css">
</head>

<body>
  <h1>Statsd Viewer</h1>
  <h2>Counters</h2>
  <table class="table table-striped" id="remote">
    <thead>
      <th>Counter Name</th>
      <th>Value</th>
    </thead>
    <tbody>
    </tbody>
  </table>
  <script type="text/javascript">
    $('#remote').dynatable({
      dataset: {
        records: []
      }
    });
    var t = $('#remote').data('dynatable');

    function reload() {
      console.log('reload');
      $.ajax({
        url: '/counters',
        success: function(data){
          // t.records.updateFromJson({
          //   records: data
          // });
          t.settings.dataset.originalRecords = data;
          t.process();
        }
      });<commit_msg>Better dynatable configuration<commit_after><html>
<head>
  <title>Simple StatsD Counters</title>
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript" src="jquery.dynatable.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="jquery.dynatable.css">
</head>

<body>
  <h1>Statsd Viewer</h1>
  <h2>Counters</h2>
  <table class="table table-striped" id="remote">
    <thead>
      <th>Counter Name</th>
      <th>Value</th>
    </thead>
    <tbody>
    </tbody>
  </table>
  <script type="text/javascript">
    $('#remote').dynatable({
      features: {
        paginate: false,
        sort: true,
        search: true,
        recordCount: true,
      },
      dataset: {
        records: []
      },
      inputs: { queryEvent: 'keyup' }
    });
    var t = $('#remote').data('dynatable');

    function reload() {
      console.log('reload');
      $.ajax({
        url: '/counters',
        success: function(data){
          // t.records.updateFromJson({
          //   records: data
          // });
          t.settings.dataset.originalRecords = data;
          t.process();
        }
      });
{'fraction_non_alphanumeric': 0.18838103374626228, 'fraction_numerical': 0.00854335753951303, 'mean_word_length': 2.4696296296296296, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1022611', 'n_tokens_mistral': 780, 'n_tokens_neox': 766, 'n_words': 128}