<commit_before><head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  <script src="/static/ace.js"></script>
  <link href="/static/jsoneditor.min.css" rel="stylesheet" type="text/css">
  <script src="/static/jsoneditor.min.js"></script>

  <script>
  function makeEditor(elemId, jsonValue) {
     // create the editor
     var container = document.getElementById(elemId);
     var options = {mode: 'code'};
     var editor = new JSONEditor(container, options, jsonValue);
     container.editor = editor;
  }

  function editorValue(editorId, bodyId) {
     var container = document.getElementById(editorId);
     var editor = container.editor;
     document.getElementById(bodyId).value = editor.getText();
  }
  </script>
</head>
<body>
<h1>Collection {{dbname}}/{{collname}}</h1>

<form action="/shutdown" method="post">
  <button name="shutdown" value="shutdown">Shutdown Server</button>
</form>

{% for doc in rc.client.all_documents( collname) %}
  {% set docdump = json.dumps(doc, sort_keys=True, indent=1) %}
  <div id="{{doc._id}}" style="text-align:center;vertical-align:middle;">
  <h3>{{doc._id}}
  {% if status and status_id == str(doc._id) %}
    [{{status}}]
  {% endif %}
  </h3>
  <div id="jsoneditor{{doc._id}}" style="padding-left:5em;width:80em;height:25em;text-align:left;"></div>
  <script>makeEditor("jsoneditor{{doc._id}}", {{docdump | safe}})</script>
  <br/><br/>
  <form method="POST" action="#{{doc._id}}" onsubmit="editorValue('jsoneditor{{doc._id}}', 'body{{doc._id}}');">
    <input type="hidden" id="body{{doc._id}}" name="body" value="" />
    <input type="submit" value="Save" name="save"/>
    <input type="submit" value="Delete" name="delete"/><commit_msg>FIX: space in collname<commit_after><head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  <script src="/static/ace.js"></script>
  <link href="/static/jsoneditor.min.css" rel="stylesheet" type="text/css">
  <script src="/static/jsoneditor.min.js"></script>

  <script>
  function makeEditor(elemId, jsonValue) {
     // create the editor
     var container = document.getElementById(elemId);
     var options = {mode: 'code'};
     var editor = new JSONEditor(container, options, jsonValue);
     container.editor = editor;
  }

  function editorValue(editorId, bodyId) {
     var container = document.getElementById(editorId);
     var editor = container.editor;
     document.getElementById(bodyId).value = editor.getText();
  }
  </script>
</head>
<body>
<h1>Collection {{dbname}}/{{collname}}</h1>

<form action="/shutdown" method="post">
  <button name="shutdown" value="shutdown">Shutdown Server</button>
</form>

{% for doc in rc.client.all_documents(collname) %}
  {% set docdump = json.dumps(doc, sort_keys=True, indent=1) %}
  <div id="{{doc._id}}" style="text-align:center;vertical-align:middle;">
  <h3>{{doc._id}}
  {% if status and status_id == str(doc._id) %}
    [{{status}}]
  {% endif %}
  </h3>
  <div id="jsoneditor{{doc._id}}" style="padding-left:5em;width:80em;height:25em;text-align:left;"></div>
  <script>makeEditor("jsoneditor{{doc._id}}", {{docdump | safe}})</script>
  <br/><br/>
  <form method="POST" action="#{{doc._id}}" onsubmit="editorValue('jsoneditor{{doc._id}}', 'body{{doc._id}}');">
    <input type="hidden" id="body{{doc._id}}" name="body" value="" />
    <input type="submit" value="Save" name="save"/>
    <input type="submit" value="Delete" name="delete"/>
{'fraction_non_alphanumeric': 0.20634458672875436, 'fraction_numerical': 0.006402793946449359, 'mean_word_length': 4.9360967184801385, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, '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': '6065460', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1139, 'n_words': 211}