<commit_before>{% extends base.html %}

{% block title %}Transaction Log{% end %}

{% block includes %}
<script type="text/javascript" charset="utf-8" src="/static/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/js/dataTables.bootstrap.js"></script>
<link href="/static/css/dataTables.bootstrap.css" rel="stylesheet">
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">

.top-buffer { margin-bottom:30px; }
.check {}
.launch-modal {margin: 20px;}
.modal-dialog-center{
  width: 320px;
  margin: 0;
  position: absolute;
  top: 35%;
  left: 42%;
}
.clear { clear: both; height: 80px; }

</style>

{% end %}


{% block content %}
<div id="wrap">
  <div class="container">
    <div class="row top-buffer">
       <div class="col-mid-12">
         <button class="btn btn-danger" onclick="createZestBtn()" id="createZest">Create Zest Script !</button>
         <button class="btn btn-info" onclick="window.open(mySpace.zest_console_url);" id="ZestConsole"> Zest Script Console</button>
       </div>
    </div>

    <div class="row ">
      <div class="col-mid-12">
         <table id="transactionLog" class="table table-striped table-bordered">
            <thead>
                <tr>
                    <th>Select</th>
                    <th> ID </th>
                    <th> Link </th>
                    <th> Scope </th>
                    <th> Seconds </th>
                    <th> Time </th>
                    <th> Status </th>
                    <th> Method </th>
                    <th> URL </th>
                    <th> Data </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
      </div>
   </div>
  </div>
</div>

<!--Fixed-footer for Zest creation-->
<div class="clear"></div>  <!--used for margin between body and footer-->
  <div class="navbar navbar-default navbar-fixed-bottom" id="#fixed_bar">
   <div class= container >
    <div style="text-align: center;">
      <button class="btn btn-primary btn-lg launch-modal" id="sendBtn" data-toggle="modal" data-target="#ScriptModal" disabled="true">Send
      </button>
      <button class="btn btn-danger btn-lg" onclick="CloseFooter()">Close</button>
    </div>
  </div>
</div>

<!--Script Name Modal-->
<div class="modal fade" id="ScriptModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog-center">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button"  class="close"  data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Enter Script Name :</h4>
        <h6 class="modal-title" id="name_tip">(only alphanumeric characters)</h6>
      </div>
      <div class="modal-body">
        <p id="Filecheck" style="color:red"></p>
        <input type="text" id="textareaID" class="form-control"></input>
      </div>
      <div class="modal-footer">
         <button type="button" class="btn btn-primary" id="saveBtn" onclick="RequestSender()">Generate!</button>
        <button type="button" class="btn btn-default"  data-dismiss="modal">Cancel</button>

      </div>
    </div>
  </div>
</div>

<script>

var mySpace = {
                    max_id:0,
                    transactions_api_url:"{{ transactions_api_url }}",
                    transaction_log_url:"{{ transaction_log_url }}",
                    zest_console_url:"{{ zest_console_url }}"
                  };


var transactionLog;

function addTransactions(data, status, xhr){
    $.each(data, function(index, obj){
            jQuery('#transactionLog').dataTable().fnAddData([

                                                '<input  type="checkbox"  class="check" name="'+obj.id+'"/>',
                                                obj.id,
                                                '<a href="'+mySpace.transaction_log_url+obj.id+'"><span class="btn btn-primary btn-sm"><i class="fa fa-chevron-circle-right"></i> View</span></a>',
                                                obj.scope,
                                                obj.time_human,
                                                obj.time,
                                                obj.response_status,
                                                obj.method,
                                                obj.url,
                                                obj.data
                                                ]);
            mySpace.max_id = obj.id;
            });
}

var oTable;

//function to make checkboxes and footer visible
function createZestBtn(){

        disableButton("createZest");
        fnShowHide(0);
        MakeFootervisible();
}

//function to toggle visibility of a column in datable
function fnShowHide( iCol ){<commit_msg>[interface] Removed normal time from transaction log since it occupies space and human time is good enough for a user<commit_after>{% extends base.html %}

{% block title %}Transaction Log{% end %}

{% block includes %}
<script type="text/javascript" charset="utf-8" src="/static/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/js/dataTables.bootstrap.js"></script>
<link href="/static/css/dataTables.bootstrap.css" rel="stylesheet">
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">

.top-buffer { margin-bottom:30px; }
.check {}
.launch-modal {margin: 20px;}
.modal-dialog-center{
  width: 320px;
  margin: 0;
  position: absolute;
  top: 35%;
  left: 42%;
}
.clear { clear: both; height: 80px; }

</style>

{% end %}


{% block content %}
<div id="wrap">
  <div class="container">
    <div class="row top-buffer">
       <div class="col-mid-12">
         <button class="btn btn-danger" onclick="createZestBtn()" id="createZest">Create Zest Script !</button>
         <button class="btn btn-info" onclick="window.open(mySpace.zest_console_url);" id="ZestConsole"> Zest Script Console</button>
       </div>
    </div>

    <div class="row ">
      <div class="col-mid-12">
         <table id="transactionLog" class="table table-striped table-bordered">
            <thead>
                <tr>
                    <th>Select</th>
                    <th> ID </th>
                    <th> Link </th>
                    <th> Scope </th>
                    <th> Seconds </th>
                    <th> Status </th>
                    <th> Method </th>
                    <th> URL </th>
                    <th> Data </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
      </div>
   </div>
  </div>
</div>

<!--Fixed-footer for Zest creation-->
<div class="clear"></div>  <!--used for margin between body and footer-->
  <div class="navbar navbar-default navbar-fixed-bottom" id="#fixed_bar">
   <div class= container >
    <div style="text-align: center;">
      <button class="btn btn-primary btn-lg launch-modal" id="sendBtn" data-toggle="modal" data-target="#ScriptModal" disabled="true">Send
      </button>
      <button class="btn btn-danger btn-lg" onclick="CloseFooter()">Close</button>
    </div>
  </div>
</div>

<!--Script Name Modal-->
<div class="modal fade" id="ScriptModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog-center">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button"  class="close"  data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Enter Script Name :</h4>
        <h6 class="modal-title" id="name_tip">(only alphanumeric characters)</h6>
      </div>
      <div class="modal-body">
        <p id="Filecheck" style="color:red"></p>
        <input type="text" id="textareaID" class="form-control"></input>
      </div>
      <div class="modal-footer">
         <button type="button" class="btn btn-primary" id="saveBtn" onclick="RequestSender()">Generate!</button>
        <button type="button" class="btn btn-default"  data-dismiss="modal">Cancel</button>

      </div>
    </div>
  </div>
</div>

<script>

var mySpace = {
                    max_id:0,
                    transactions_api_url:"{{ transactions_api_url }}",
                    transaction_log_url:"{{ transaction_log_url }}",
                    zest_console_url:"{{ zest_console_url }}"
                  };


var transactionLog;

function addTransactions(data, status, xhr){
    $.each(data, function(index, obj){
            jQuery('#transactionLog').dataTable().fnAddData([

                                                '<input  type="checkbox"  class="check" name="'+obj.id+'"/>',
                                                obj.id,
                                                '<a href="'+mySpace.transaction_log_url+obj.id+'"><span class="btn btn-primary btn-sm"><i class="fa fa-chevron-circle-right"></i> View</span></a>',
                                                obj.scope,
                                                obj.time_human,
                                                obj.response_status,
                                                obj.method,
                                                obj.url,
                                                obj.data
                                                ]);
            mySpace.max_id = obj.id;
            });
}

var oTable;

//function to make checkboxes and footer visible
function createZestBtn(){

        disableButton("createZest");
        fnShowHide(0);
        MakeFootervisible();
}

//function to toggle visibility of a column in datable
function fnShowHide( iCol ){
{'fraction_non_alphanumeric': 0.15635879582224044, 'fraction_numerical': 0.005529387671513414, 'mean_word_length': 1.8879361324659965, 'pattern_counts': {'":': 0, '<': 203, '<?xml version=': 0, '>': 203, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2645497', 'n_tokens_mistral': 2829, 'n_tokens_neox': 2699, 'n_words': 611}