<commit_before>{% extends "_base.html" %}
{% block title %} - {{ title }}{% endblock %}
{% block addHeaders %}
    <link href="{{ url_for('static', filename='css/ui.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/base.css') }}" rel="stylesheet">
{% endblock %}
{% block body %}
    <div id="static_div_header">
        <div id="generated_messages_product">&nbsp;</div>
        <h2>{{ title }}{% if testing %} - Testing API Calls{% else %} - API Calls{% endif %}</h2>
        {% if session.get('username') %}
            <div id="global_vars">
                <input id="ddi" name="ddi" type="hidden" value="{{ session.get('ddi') }}"></input>
                {% if require_dc %}
                    <label class="region-dc-label">{% if restrict_dcs %}Region{% else %}Data Center{% endif %}:</label>
                    <select id="data_center" name="data_center">
                        {% if restrict_dcs %}
                            <option value="none" selected="selected">Select Region</option>
                        {% else %}
                            <option value="none" selected="selected">Select Data Center</option>
                        {% endif %}
                        {% for option in data_centers %}
                            <option value="{{ option.get('abbreviation')|lower }}">{{ option.get('abbreviation') }}</option>
                        {% endfor %}
                    </select>
                {% endif %}
                {% if check_if_admin %}
                    {% if not testing %}
                        <button class="btn btn-info testing-button">View Testing Calls</button>
                    {% else %}
                        <button class="btn btn-info active-button">View Active Calls</button>
                    {% endif %}
                {% endif %}
            </div>
        {% endif %}
    </div>
    <div class="row offset-calls">
        <div class="col-md-2">
            <div class="well">
                <ul class="nav nav-pills nav-stacked left-nav">
                    <li class="navbar-header">API Calls</li>
                    {% for menu in api_calls %}
                        <li>
                            <a href="#{{ menu.get('title')|lower|slug }}-{{ title|lower }}" class="toc">{{ menu.get('title') }}</a>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </div>
        <div class="col-md-10">
            {% set call_loop = api_calls.rewind() %}
            {% include '_api_call_template.html' %}
        </div>
    </div>
    <a class="scrollup product">Scroll</a>
{% endblock %}
{% block jquery %}
    <script src="{{ url_for('static', filename='js/ui.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootbox.min.js') }}"></script>
	<script>
        var global_count = 0;
        var require_dc = '{{ require_dc|lower }}';
        var restrict_dcs = '{{ restrict_dcs|lower }}';
        var testing = '{{ testing|lower }}';
        var user = '{{ session.get("username") }}';
        $(document).ready(function(){
            $('.prod-popover').popover();
            $('.tooltip-title').tooltip();
            $(window).scroll(function(){
                if ( $(this).scrollTop() > 100 ) {
                    $('.scrollup').fadeIn();
                } else {
                    $('.scrollup').fadeOut();
                }
            });
            $("#data_center").change();
            {% if session.get('username') %}
                scroll_if_anchor(window.location.hash, 45);
            {% else %}
                scroll_if_anchor(window.location.hash, 0);
            {% endif %}
        });
	</script>
{% endblock %}
<commit_msg>Change from jinja to javascript if/else<commit_after>{% extends "_base.html" %}
{% block title %} - {{ title }}{% endblock %}
{% block addHeaders %}
    <link href="{{ url_for('static', filename='css/ui.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/base.css') }}" rel="stylesheet">
{% endblock %}
{% block body %}
    <div id="static_div_header">
        <div id="generated_messages_product">&nbsp;</div>
        <h2>{{ title }}{% if testing %} - Testing API Calls{% else %} - API Calls{% endif %}</h2>
        {% if session.get('username') %}
            <div id="global_vars">
                <input id="ddi" name="ddi" type="hidden" value="{{ session.get('ddi') }}"></input>
                {% if require_dc %}
                    <label class="region-dc-label">{% if restrict_dcs %}Region{% else %}Data Center{% endif %}:</label>
                    <select id="data_center" name="data_center">
                        {% if restrict_dcs %}
                            <option value="none" selected="selected">Select Region</option>
                        {% else %}
                            <option value="none" selected="selected">Select Data Center</option>
                        {% endif %}
                        {% for option in data_centers %}
                            <option value="{{ option.get('abbreviation')|lower }}">{{ option.get('abbreviation') }}</option>
                        {% endfor %}
                    </select>
                {% endif %}
                {% if check_if_admin %}
                    {% if not testing %}
                        <button class="btn btn-info testing-button">View Testing Calls</button>
                    {% else %}
                        <button class="btn btn-info active-button">View Active Calls</button>
                    {% endif %}
                {% endif %}
            </div>
        {% endif %}
    </div>
    <div class="row offset-calls">
        <div class="col-md-2">
            <div class="well">
                <ul class="nav nav-pills nav-stacked left-nav">
                    <li class="navbar-header">API Calls</li>
                    {% for menu in api_calls %}
                        <li>
                            <a href="#{{ menu.get('title')|lower|slug }}-{{ title|lower }}" class="toc">{{ menu.get('title') }}</a>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </div>
        <div class="col-md-10">
            {% set call_loop = api_calls.rewind() %}
            {% include '_api_call_template.html' %}
        </div>
    </div>
    <a class="scrollup product">Scroll</a>
{% endblock %}
{% block jquery %}
    <script src="{{ url_for('static', filename='js/ui.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootbox.min.js') }}"></script>
	<script>
        var global_count = 0;
        var require_dc = '{{ require_dc|lower }}';
        var restrict_dcs = '{{ restrict_dcs|lower }}';
        var testing = '{{ testing|lower }}';
        var user = '{{ session.get("username") }}';
        $(document).ready(function(){
            $('.prod-popover').popover();
            $('.tooltip-title').tooltip();
            $(window).scroll(function(){
                if ( $(this).scrollTop() > 100 ) {
                    $('.scrollup').fadeIn();
                } else {
                    $('.scrollup').fadeOut();
                }
            });
            $("#data_center").change();
            if (user != 'None') {
                scroll_if_anchor(window.location.hash, 45);
            } else {
                scroll_if_anchor(window.location.hash, 0);
            }
        });
	</script>
{% endblock %}

{'fraction_non_alphanumeric': 0.17786086259847778, 'fraction_numerical': 0.0032047002269995992, 'mean_word_length': 1.5836495343221801, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 105, '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': '4724628', 'n_tokens_mistral': 2214, 'n_tokens_neox': 1977, 'n_words': 417}