<commit_before>extend layout

block content
  h1 Status
  .row
    .col-md-3
      h3 Statistics
      table.table
        thead
          tr
            th Stat
            th Count
        tbody
          each val, key in result
            if typeof val === "number"
              tr
                td=key
                td(id=key)=val
    .col-md-3
      h3 Last Added
      table.table#last_added
        thead
          tr
            th Match ID
            th Ended
        tbody
          each match in result.last_added
            tr
              td=match.match_id
              td=moment.unix(match.start_time + match.duration).fromNow()
    .col-md-3
      h3 Last Parsed
      table.table#last_parsed
        thead
          tr
            th Match ID
            th Ended
        tbody
          each match in result.last_parsed
            tr
              td=match.match_id
              td=moment.unix(match.start_time + match.duration).fromNow()
    .col-md-3
      h3 Queue
      table.table
        thead
          tr
            th Type
            th Count
        tbody
          each val, key in result.kue
            tr
              td=key
              td(id="kue_"+key)=val

append footer_assets
  //-
    script(src="/socket.io/socket.io.js")
    script.
      var data = !{JSON.stringify(result)}
      statusHandler(data);
      var socket = io.connect();
      socket.on('status', statusHandler);
      function statusHandler(data){
      console.log(data);<commit_msg>fixed links on status page<commit_after>extend layout

block content
  h1 Status
  .row
    .col-md-3
      h3 Statistics
      table.table
        thead
          tr
            th Stat
            th Count
        tbody
          each val, key in result
            if typeof val === "number"
              tr
                td=key
                td(id=key)=val
    .col-md-3
      h3 Last Added
      table.table#last_added
        thead
          tr
            th Match ID
            th Ended
        tbody
          each match in result.last_added
            tr
              td: a(href="/matches/"+match.match_id)= match.match_id
              td=moment.unix(match.start_time + match.duration).fromNow()
    .col-md-3
      h3 Last Parsed
      table.table#last_parsed
        thead
          tr
            th Match ID
            th Ended
        tbody
          each match in result.last_parsed
            tr
              td: a(href="/matches/"+match.match_id)= match.match_id
              td=moment.unix(match.start_time + match.duration).fromNow()
    .col-md-3
      h3 Queue
      table.table
        thead
          tr
            th Type
            th Count
        tbody
          each val, key in result.kue
            tr
              td=key
              td(id="kue_"+key)=val

append footer_assets
  //-
    script(src="/socket.io/socket.io.js")
    script.
      var data = !{JSON.stringify(result)}
      statusHandler(data);
      var socket = io.connect();
      socket.on('status', statusHandler);
      function statusHandler(data){
      console.log(data);
{'fraction_non_alphanumeric': 0.0787350758309132, 'fraction_numerical': 0.005808325266214908, 'mean_word_length': 1.2254127781765973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '5171481', 'n_tokens_mistral': 893, 'n_tokens_neox': 872, 'n_words': 221}