<commit_before>{% extends "main/base.html" %}
{% load crispy_forms_tags %}

{% block content %}
<h2 style="margin-bottom:50px">Subject Management</h2>

<div class="row" style="margin-top:0px">

    <!--<div class="col-lg-12">
        <div>
            <a class='btn btn-default btn-lg' href='#'>xxx</a>
            <a class='btn btn-default btn-lg' target="_blank" href=''>xxx</a>
      </div>-->
</div>

    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-body">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#settings" data-toggle="tab">Settings</a></li>
                <li><a href="#blacklist" data-toggle="tab">Blacklist</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane fade in active" id="settings">
                    <h4>Blacklist Settings</h4>
                    {% crispy form %}
                </div>
                <div class="tab-pane fade in" id="blacklist">
                    <h4>Blacklist Conditions</h4>

                    {% if blacklists %}
                    <table class="table table-condensed table-striped table-hover" id="blacklist-table">
                        <thead>
                            <tr>
                                <th>Worker</th>
                                <th>Flags</th>
                                <th>Status</th>
                            </tr>
                        </thead>
                        <tbody>
                           {% for blacklist in blacklists %}
                            <tr>
                               <td>{{ blacklist.worker.id }}</td>
                               <td>{{ blacklist.flags|length }}</td>
                               <td>{% if blacklist.active %}
                                    <span color="red">blacklisted</span>
                                    {% else %}
                                    <span color="orangered">pending</span>
                                    {% endif %}
                               </td>
                            </tr>
                           {% endfor %}
                        </tbody>
                    </table>
                    {% else %}
                    <div class="alert alert-info" role="alert">No subjects have been flagged for blacklist.</div>
                    {% endif %}
               </div>
            </div>
</div>
{% endblock %}
{% block scripts %}<commit_msg>updating subject management page to not show blacklist subjects if disabled<commit_after>{% extends "main/base.html" %}
{% load crispy_forms_tags %}

{% block content %}
<h2 style="margin-bottom:50px">Subject Management</h2>

<div class="row" style="margin-top:0px">

    <!--<div class="col-lg-12">
        <div>
            <a class='btn btn-default btn-lg' href='#'>xxx</a>
            <a class='btn btn-default btn-lg' target="_blank" href=''>xxx</a>
      </div>-->
</div>

    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-body">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#settings" data-toggle="tab">Settings</a></li>
                <li><a href="#blacklist" data-toggle="tab">Blacklist</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane fade in active" id="settings">
                    <h4>Blacklist Settings</h4>
                    {% crispy form %}
                </div>
                <div class="tab-pane fade in" id="blacklist">
                    <h4>Blacklist Conditions</h4>

                  {% if battery.blacklist_active %}
                    {% if blacklists %}
                    <table class="table table-condensed table-striped table-hover" id="blacklist-table">
                        <thead>
                            <tr>
                                <th>Worker</th>
                                <th>Flags</th>
                                <th>Status</th>
                            </tr>
                        </thead>
                        <tbody>
                           {% for blacklist in blacklists %}
                            <tr>
                               <td>{{ blacklist.worker.id }}</td>
                               <td>{{ blacklist.flags|length }}</td>
                               <td>{% if blacklist.active %}
                                    <span color="red">blacklisted</span>
                                    {% else %}
                                    <span color="orangered">pending</span>
                                    {% endif %}
                               </td>
                            </tr>
                           {% endfor %}
                        </tbody>
                    </table>
                    {% else %}
                    <div class="alert alert-info" role="alert">No subjects have been flagged for blacklist.</div>
                    {% endif %}
               {% else %}
               <div class="alert alert-info" role="alert">Blacklist is currently disabled for this battery</div>
               {% endif %}
               </div>
            </div>
</div>
{% endblock %}
{% block scripts %}
{'fraction_non_alphanumeric': 0.13952164009111617, 'fraction_numerical': 0.004935459377372817, 'mean_word_length': 1.0525905726529021, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2893205', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1277, 'n_words': 276}