<commit_before>{% extends "bootstrap/base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "bootstrap/fixes.html" as fixes %}
{% import "bootstrap/utils.html" as util %}

{% block styles %}
{{super()}}
<style>
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20px;
}
.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#error {
    font-size: 14pt;
    background-color: #FFA5A5;
    display: none;
    padding: 10px 20px;
    border-radius: 2px;
}

td { white-space: nowrap; }
</style>
<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css">
{% endblock %}

{% block content %}
<div class="container" style="width:90%">

    <div class="col-md-6">
        <div class="row">
            <div class="col-md-4">
                <img class="img-responsive" src="https://raw.githubusercontent.com/job/irrexplorer/master/docs/irrexplorer-logo.png" />
            </div>
            <div class="col-md-1">
            </div>
            <div class="col-md-7">
                <div class="row">&nbsp;
                </div>
                <form id="form">
                    <h2>Prefix</h2><input type="text" name="prefix"/>
                    <button id="btnsearch" type="submit" class="btn btn-primary" name="search" value="Search">Search</button>
                </form>
            </div>
        </div>

        <div class="row">&nbsp;</div>

        <div class="row">
            <div>

                    <div class="row" id="loading" style="display:none">
                        <div class="col-md-2 col-md-offset-5"><img src="/static/img/loading.gif"/></div>
                    </div>
                <table id="example" class="display" cellspacing="0" width="100%"></table>
                <div id="error"></div>

            </div>
        </div>
        <div class="row">
        </div>
    </div>

    <div class="col-md-3">
    </div>

</div>
<div>
    <div class="pull-right">
        Source code available on <a href="https://github.com/job/irrexplorer">Github</a>.
    </div>
</div>


{% endblock %}

{% block scripts %}
{{super()}}
<script type="text/javascript" src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {

    // look at what is after /prefix/ in the URL
    // if something is present then search straight away
    prefixurl = "";
    var pathArray = window.location.pathname.split( '/' );
    if (pathArray[pathArray.length - 1 ] != "exact_prefix") {
        if (pathArray[pathArray.length - 2] == "exact_prefix") {
            prefixurl = pathArray[pathArray.length - 1];
        }
        if (pathArray[pathArray.length - 3] == "exact_prefix") {
            prefixurl = pathArray[pathArray.length - 2] + "/" + pathArray[pathArray.length - 1];
        }
    };
    if (prefixurl != "") {
        $('form').find('input[name="prefix"]').val(prefixurl);
        prefixsearch();
    };

    $("form").submit(function (e) {
        e.preventDefault(); //prevent default form submit
        window.location.href = '/exact_prefix/' + $('form').find('input[name="prefix"]').val();
        //prefixsearch();
    });

});

function state_loaded() {
    $("#btnsearch").prop("disabled",false); 
    $("#loading").hide();
    $("#btnsearch").html('Search');  
}<commit_msg>re-target prefix query form to /prefix/<commit_after>{% extends "bootstrap/base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "bootstrap/fixes.html" as fixes %}
{% import "bootstrap/utils.html" as util %}

{% block styles %}
{{super()}}
<style>
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20px;
}
.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#error {
    font-size: 14pt;
    background-color: #FFA5A5;
    display: none;
    padding: 10px 20px;
    border-radius: 2px;
}

td { white-space: nowrap; }
</style>
<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css">
{% endblock %}

{% block content %}
<div class="container" style="width:90%">

    <div class="col-md-6">
        <div class="row">
            <div class="col-md-4">
                <img class="img-responsive" src="https://raw.githubusercontent.com/job/irrexplorer/master/docs/irrexplorer-logo.png" />
            </div>
            <div class="col-md-1">
            </div>
            <div class="col-md-7">
                <div class="row">&nbsp;
                </div>
                <form id="form">
                    <h2>Prefix</h2><input type="text" name="prefix"/>
                    <button id="btnsearch" type="submit" class="btn btn-primary" name="search" value="Search">Search</button>
                </form>
            </div>
        </div>

        <div class="row">&nbsp;</div>

        <div class="row">
            <div>

                    <div class="row" id="loading" style="display:none">
                        <div class="col-md-2 col-md-offset-5"><img src="/static/img/loading.gif"/></div>
                    </div>
                <table id="example" class="display" cellspacing="0" width="100%"></table>
                <div id="error"></div>

            </div>
        </div>
        <div class="row">
        </div>
    </div>

    <div class="col-md-3">
    </div>

</div>
<div>
    <div class="pull-right">
        Source code available on <a href="https://github.com/job/irrexplorer">Github</a>.
    </div>
</div>


{% endblock %}

{% block scripts %}
{{super()}}
<script type="text/javascript" src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {

    // look at what is after /prefix/ in the URL
    // if something is present then search straight away
    prefixurl = "";
    var pathArray = window.location.pathname.split( '/' );
    if (pathArray[pathArray.length - 1 ] != "exact_prefix") {
        if (pathArray[pathArray.length - 2] == "exact_prefix") {
            prefixurl = pathArray[pathArray.length - 1];
        }
        if (pathArray[pathArray.length - 3] == "exact_prefix") {
            prefixurl = pathArray[pathArray.length - 2] + "/" + pathArray[pathArray.length - 1];
        }
    };
    if (prefixurl != "") {
        $('form').find('input[name="prefix"]').val(prefixurl);
        prefixsearch();
    };

    $("form").submit(function (e) {
        e.preventDefault(); //prevent default form submit
        window.location.href = '/prefix/' + $('form').find('input[name="prefix"]').val();
        //prefixsearch();
    });

});

function state_loaded() {
    $("#btnsearch").prop("disabled",false); 
    $("#loading").hide();
    $("#btnsearch").html('Search');  
}
{'fraction_non_alphanumeric': 0.19365682548962293, 'fraction_numerical': 0.015200233849751535, 'mean_word_length': 2.2820143884892086, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 109, 'https://': 4, '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': '4199145', 'n_tokens_mistral': 2317, 'n_tokens_neox': 2156, 'n_words': 425}