<commit_before><%= javascript_include_tag 'DataTables-1.8.2/jquery.js', 'DataTables-1.8.2/jquery.dataTables.js', 'DataTables-1.8.2/jquery.dataTables.rowGrouping.js', 'DataTables-1.8.2/Scroller.js' %>
<% id ||= 'workflow_runs_table' %>
<% default_sort ||= [6, 'desc'] %>
<% show_user ||= false %>
<%
  unless defined?(poll)
     poll = true
  end
%>
<script type="text/javascript">
    jQuery.noConflict();
    var $j = jQuery;
    $j('#<%= id -%>').data('poller', null);
    $j(document).ready(function () {
        workflow_runs_table = $j('#<%= id -%>').dataTable({
            "bPaginate":false,
            "bLengthChange":false,
            "bFilter":true,
            "bSort":true,
            "bInfo":false,
            "bAutoWidth":false,
            "bRetrieve":true,
            "oLanguage": {
                "sEmptyTable": "No workflow runs found"
            },
            "aaSorting":[
                [ <%= default_sort[0] -%>, "<%= default_sort[1] -%>" ]
            ],
            "aoColumns":[
                <% if show_user %>
                { "sWidth":"24%" },
                { "sWidth":"8%" },
                <% else %>
                { "sWidth":"32%" },
                { "sWidth":"0%","bSearchable": false, "bVisible": false },
                <% end %>
                { "sWidth":"15%" },
                { "sWidth":"10%" },
                { "sWidth":"8%" },
                { "iDataSort": 5, "sWidth":"10%", "bSearchable": false },
                { "bSearchable": false, "bVisible": false }, //Unix timestamp of "created" date for sorting purposes
                { "iDataSort": 7, "sWidth":"10%", "bSearchable": false },
                { "bSearchable": false, "bVisible": false }, //Unix timestamp of "finished" date for sorting purposes
                { "sWidth":"5%", "bSortable":false, "bSearchable": false }
            ]
        });
        <% if poll %>
          $j('#<%= id -%>').data('poller', window.setInterval(function () { $j.get("<%= polling_url %>", null, null, "script") }, 5000));
        <% end %>
    });
</script>

<% redirect_to ||= taverna_player.runs_path %>
<div id="workflow_runs">
  <div class="scroll_box">
    <table cellpadding="0" cellspacing="0" class="display" id="<%= id -%>" style="">
      <thead>
      <tr>
        <th>Run</th>
        <th>User</th>
        <th>Workflow</th>
        <th>Category</th>
        <th>State</th>
        <th>Created</th>
        <th>Created Timestamp</th>
        <th>Finished</th>
        <th>Finished Timestamp</th>
        <th>Actions</th><commit_msg>[SERVINF-364] Fixed dates being ordered alphanumerically<commit_after><%= javascript_include_tag 'DataTables-1.8.2/jquery.js', 'DataTables-1.8.2/jquery.dataTables.js', 'DataTables-1.8.2/jquery.dataTables.rowGrouping.js', 'DataTables-1.8.2/Scroller.js' %>
<% id ||= 'workflow_runs_table' %>
<% default_sort ||= [6, 'desc'] %>
<% show_user ||= false %>
<%
  unless defined?(poll)
     poll = true
  end
%>
<script type="text/javascript">
    jQuery.noConflict();
    var $j = jQuery;
    $j('#<%= id -%>').data('poller', null);
    $j(document).ready(function () {
        workflow_runs_table = $j('#<%= id -%>').dataTable({
            "bPaginate":false,
            "bLengthChange":false,
            "bFilter":true,
            "bSort":true,
            "bInfo":false,
            "bAutoWidth":false,
            "bRetrieve":true,
            "oLanguage": {
                "sEmptyTable": "No workflow runs found"
            },
            "aaSorting":[
                [ <%= default_sort[0] -%>, "<%= default_sort[1] -%>" ]
            ],
            "aoColumns":[
                <% if show_user %>
                { "sWidth":"24%" },
                { "sWidth":"8%" },
                <% else %>
                { "sWidth":"32%" },
                { "sWidth":"0%","bSearchable": false, "bVisible": false },
                <% end %>
                { "sWidth":"15%" },
                { "sWidth":"10%" },
                { "sWidth":"8%" },
                { "iDataSort": 6, "sWidth":"10%", "bSearchable": false },
                { "bSearchable": false, "bVisible": false }, //Unix timestamp of "created" date for sorting purposes
                { "iDataSort": 8, "sWidth":"10%", "bSearchable": false },
                { "bSearchable": false, "bVisible": false }, //Unix timestamp of "finished" date for sorting purposes
                { "sWidth":"5%", "bSortable":false, "bSearchable": false }
            ]
        });
        <% if poll %>
          $j('#<%= id -%>').data('poller', window.setInterval(function () { $j.get("<%= polling_url %>", null, null, "script") }, 5000));
        <% end %>
    });
</script>

<% redirect_to ||= taverna_player.runs_path %>
<div id="workflow_runs">
  <div class="scroll_box">
    <table cellpadding="0" cellspacing="0" class="display" id="<%= id -%>" style="">
      <thead>
      <tr>
        <th>Run</th>
        <th>User</th>
        <th>Workflow</th>
        <th>Category</th>
        <th>State</th>
        <th>Created</th>
        <th>Created Timestamp</th>
        <th>Finished</th>
        <th>Finished Timestamp</th>
        <th>Actions</th>
{'fraction_non_alphanumeric': 0.20271580989330748, 'fraction_numerical': 0.01571290009699321, 'mean_word_length': 1.971757925072046, 'pattern_counts': {'":': 66, '<': 93, '<?xml version=': 0, '>': 93, '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': '4033293', 'n_tokens_mistral': 1800, 'n_tokens_neox': 1645, 'n_words': 290}