<commit_before>{% extends "base.html" %}

{% load filters %}

{% block title %}{{project_name}}: List of records{% endblock %}



{% block content %} 

<br/>

<!-- DataTables CSS -->
<link rel="stylesheet" type="text/css"
      href="/media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css"
      href="/media/css/dataTables.colVis.css">

<!-- jQuery -->
<script type="text/javascript" charset="utf8" src="/media/js/jquery.js"></script>

<!-- DataTables -->
<script type="text/javascript" charset="utf8"
        src="/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf8"
        src="/media/js/dataTables.colVis.js"></script>


<div style="display:none">


    "columns": [
      {"sortable": false}, <!-- repository -->
      {"sortable": false}, <!-- label -->
      {"sortable": false}, <!-- tag -->
      {"sortable": false}, <!-- reason -->
      {"sortable": false}, <!-- outcome -->
      {"sortable": false}, <!-- duration -->
      null, <!-- processes -->
      null, <!-- time -->
      null, <!-- exec. -->
      {"sortable:" false}, <!-- main -->
      {"sortable": false} <!-- version -->
      ],   

</div>

<script>
  $(document).ready( function () {

  var hd_cl = {{settings.hidden_cols|as_json|safe}};
  var record_list = $('#record_dt').DataTable({
    "columnDefs": [
      {"sortable":false,  "targets":["repository-c", "label-c",
       "tag-c", "reason-c", "outcome-c", "main-c", "version-c"]},   
      {"visible":false, "targets": hd_cl},
    ],
    <!--"dom": 'lfrC<"clear">tip',     <!-- Order: 'l'ength, 'f'ilter,  p'r'ocessing, 'C'olumns, 't'able, 'i'nformation, 'p'agination -->
    "paging": true,
    "ordering": true,
    "info": true, <!-- "Showing x of y entries" -->
    "filter": true,  
    "order": [[$('th.time-c').index(), "desc"]], <!-- default sort column -->
    } );

  document.onkeydown = checkKey;

  function checkKey(e) {

      e = e || window.event;

      if (e.keyCode == '37') {
          record_list.page('previous').draw(false);
      }
      else if (e.keyCode == '39') {
          record_list.page('next').draw(false);
      }
  }

    } );
</script>


<!--    "repository", "label",
    "tag", 
    "reason", 
    "outcome", 
    "duration", 
    "processes", 
    "ename", 
    "eversion", 
    "date", 
    "time", 
    "main", 
    "version", 
    "arguments" -->


<div style="margin-left:2%; margin-right:3%">
<table class='hover row-border' id='record_dt'>

  <thead>
    <tr>
      <th class='repository-c'>repository</th>
      <th class='label-c'>label</th>
      <th class='tag-c'>tag</th>
      <th class='reason-c'>reason</th>
      <th class='outcome-c'>outcome</th>
      <th class='duration-c'>duration</th>
      <th class='processes-c'>processes</th>
      <th class='time-c'>time</th>
      <th class='exec-c'>exec.</th>
      <th class='main-c'>main</th>
      <th class='version-c'>version</th>
      <th class='arguments-c'>arguments</th>
    </tr>
  </thead>

  <tbody>

    {% for record in sim_list %}

    <tr>     
      <!--<td class='dataTable_td'  id = 'version-hid' class='d-hid'>                     {{record.version}}<commit_msg>colum visibility toggle<commit_after>{% extends "base.html" %}

{% load filters %}

{% block title %}{{project_name}}: List of records{% endblock %}



{% block content %} 

<br/>

<!-- DataTables CSS -->
<link rel="stylesheet" type="text/css"
      href="/media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css"
      href="/media/css/dataTables.colVis.css">

<!-- jQuery -->
<script type="text/javascript" chadatrset="utf8" src="/media/js/jquery.js"></script>

<!-- DataTables -->
<script type="text/javascript" charset="utf8"
        src="/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf8"
        src="/media/js/dataTables.colVis.js"></script>


<div style="display:none">


    "columns": [
      {"sortable": false}, <!-- repository -->
      {"sortable": false}, <!-- label -->
      {"sortable": false}, <!-- tag -->
      {"sortable": false}, <!-- reason -->
      {"sortable": false}, <!-- outcome -->
      {"sortable": false}, <!-- duration -->
      null, <!-- processes -->
      null, <!-- time -->
      null, <!-- exec. -->
      {"sortable:" false}, <!-- main -->
      {"sortable": false} <!-- version -->
      ],   

</div>

<script>
  $(document).ready( function () {

  var hd_cl = {{settings.hidden_cols|as_json|safe}};
  var record_list = $('#record_dt').DataTable({
    "columnDefs": [
      {"sortable":false,  "targets":["repository-c", "label-c",
       "tag-c", "reason-c", "outcome-c", "main-c", "version-c"]},   
      {"visible":false, "targets": hd_cl},
    ],
    <!--"dom": 'lfrC<"clear">tip',     <!-- Order: 'l'ength, 'f'ilter,  p'r'ocessing, 'C'olumns, 't'able, 'i'nformation, 'p'agination -->
    "paging": true,
    "ordering": true,
    "info": true, <!-- "Showing x of y entries" -->
    "filter": true,  
    "order": [[$('th.time-c').index(), "desc"]], <!-- default sort column -->
    } );



    <!-- Column visibility toggle -->
    $('a.toggle-vis').on( 'click', function (e) {
        e.preventDefault();

        // Get the column API object
        var column = record_list.column( $(this).attr('data-column') );
 
        // Toggle the visibility
        column.visible( ! column.visible() );
    } );


  <!-- Arrow key page turning -->
  document.onkeydown = checkKey;
  function checkKey(e) {

      e = e || window.event;

      if (e.keyCode == '37') {
          record_list.page('previous').draw(false);
      }
      else if (e.keyCode == '39') {
          record_list.page('next').draw(false);
      }
  }

    } );

</script>


<!--    "repository", "label",
    "tag", 
    "reason", 
    "outcome", 
    "duration", 
    "processes", 
    "ename", 
    "eversion", 
    "date", 
    "time", 
    "main", 
    "version", 
    "arguments" -->



<div>
  Toggle
  column: <a class="toggle-vis"
	     data-column="0">Name</a>
  - <a class="toggle-vis"
       data-column= "1">Position</a>
  - <a class="toggle-vis"
       data-column="2">Office</a>
  - <a class="toggle-vis"
       data-column="3">Age</a>
  - <a class="toggle-vis"
       data-column="4">Start date</a>
  - <a class= "toggle-vis"
       data-column="5">Salary</a>
</div>

<div style="margin-left:2%; margin-right:3%">
<table class='hover row-border' id='record_dt'>

  <thead>
    <tr>
      <th class='repository-c'>repository</th>
      <th class='label-c'>label</th>
      <th class='tag-c'>tag</th>
      <th class='reason-c'>reason</th>
      <th class='outcome-c'>outcome</th>
      <th class='duration-c'>duration</th>
      <th class='processes-c'>processes</th>
      <th class='time-c'>time</th>
      <th class='exec-c'>exec.</th>
      <th class='main-c'>main</th>
      <th class='version-c'>version</th>
      <th class='arguments-c'>arguments</th>
    </tr>
  </thead>

  <tbody>

    {% for record in sim_list %}

    <tr>     
      <!--<td class='dataTable_td'  id = 'version-hid' class='d-hid'>                     {{record.version}}
{'fraction_non_alphanumeric': 0.2308991135500211, 'fraction_numerical': 0.0033769523005487546, 'mean_word_length': 2.517070757050965, 'pattern_counts': {'":': 38, '<': 153, '<?xml version=': 0, '>': 149, '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': '2874207', 'n_tokens_mistral': 2509, 'n_tokens_neox': 2397, 'n_words': 454}