<commit_before>{% extends "admin/base.html" %}

{% set title = _('Bulk Addon Validation') %}
{% block title %}{{ page_title(title) }}{% endblock %}

{% block js %}
{{ super() }}
<script src="{{ media('js/zamboni/admin_validation.js') }}"></script>
{% endblock %}

{% block content %}
<section id="admin-validation">
  <h2>{{ title }}</h2>
  {% include "messages.html" %}
  {{ form.errors }}
  <form action="{{ url('zadmin.start_validation') }}" method="post">
  {{ csrf() }}
  <div class="form-row">
    {% for elem in ('application', 'curr_max_version', 'target_version') %}
      <label id="label-{{ elem }}" for="id_{{ elem }}">{{ form[elem].label }}</label>
      <span id="elem-{{ elem }}">{{ form[elem] }}</span>
    {% endfor %}
  </div>
  <div class="form-row last-row">
    <label for="id_finish_email">{{ form['finish_email'].label }}</label>
    <span id="elem-finish_email">{{ form['finish_email'] }}</span>
    <div class="button">
      <button type="submit">{{ _('Start validation') }}</button>
    </div>
  </div>
  </form>
  <div class="featured daily-message">
    <div class="featured-inner validation-intro">
      <ul>
        <li>The latest versions for all addons that support an app <em>in
        between</em> <b>Current Max Version</b> and <b>Target Max Version</b>
        will be validated for compatibility with the target. You can then
        choose to upgrade those versions or email the developers about
        failures.</li>
        <li>If we find any public versions that
        <em>already</em> support a newer app/version then nothing is tested
        nor auto upgraded.</li>
        <li>If we find any beta versions or versions
        under review then those are validated/upgraded <em>in addition to the
        latest public version</em>.</li>
      </ul>
    </div>
  </div>
  <table>
    <tr>
      <th>{{ _('Tests Started') }}</th>
      <th>{{ _('Tests Finished') }}</th>
      <th>{{ _('Current Version') }}</th>
      <th>{{ _('Target Version') }}</th>
      <th>{{ _('Tested') }}</th>
      <th>{{ _('Failing') }}</th>
      <th>{{ _('Passing') }}</th>
      <th>{{ _('Exceptions') }}</th>
      <th>{{ _('Actions') }}</th>
    </tr>
    {% for job in validation_jobs %}
    <tr>
      <td>{{ job.created }}</td>
      <td>{{ job.completed }}</td>
      <td>{{ job.curr_max_version.version }}</td>
      <td>{{ job.target_version.version }}</td>
      <td>{{ job.stats['total'] }}</td>
      <td>{{ job.stats['failing'] }}
        {% if job.completed and job.stats['failing'] > 0 %}
            <a href="" class="notify v-popup"
                       data-job-url="{{ url('zadmin.notify.failure', job.pk) }}"
                       data-notify-count="{{ job.stats['failing'] }}">Notify</a>
          {% if job.preview_failure_mail_link %}
            [<a href="{{ job.preview_failure_mail_link }}">Download Email Log</a>]
          {% endif %}
        {% endif %}
      </td>
      <td>{{ job.stats['passing'] }}
          {% if job.completed and job.stats['passing'] > 0 %}
              <a href="#" class="set-max-version v-popup"
                          data-job-version="{{ job.target_version.version }}"
                          data-job-url="{{ url('zadmin.notify.success', job.pk) }}"
                          data-job-count="{{ job.stats['passing'] }}">Set max version</a>
            {% if job.preview_success_mail_link %}
              [<a href="{{ job.preview_success_mail_link }}">Download Email Log</a>]
            {% endif %}
          {% endif %}
      </td>
      <td>{{ job.stats['errors'] }}</td>
      <td></td>
    </tr>
    {% endfor %}
  </table>
</section>

<div class="hidden">
    <div class="popup" id="notify">
        <form method="post" action="" data-url="{{ url('zadmin.notify.syntax') }}">
            {{ csrf() }}
            <p>{# placeholder for form text #}</p>
            <p>Available variables: {{ ', '.join(success_form.variables) }}</p>
            <p class="js-hidden error"></p>
            <div>{# placeholder for the form #}</div>
            <button type="submit">
                {{ _('Continue') }}
            </button>
            <span class="cancel"><a href="#">{{ _('Cancel') }}</a></span>
        </form>
    </div>
</div>

<div class="hidden" id="success-form">
    {{ success_form.as_p() }}
</div>

<div class="hidden" id="failure-form">
    {{ failure_form.as_p() }}
</div>
{% endblock %}
<commit_msg>Removes all translated strings on validation admin page<commit_after>{% extends "admin/base.html" %}

{% set title = 'Bulk Addon Validation' %}
{% block title %}{{ page_title(title) }}{% endblock %}

{% block js %}
{{ super() }}
<script src="{{ media('js/zamboni/admin_validation.js') }}"></script>
{% endblock %}

{% block content %}
<section id="admin-validation">
  <h2>{{ title }}</h2>
  {% include "messages.html" %}
  {{ form.errors }}
  <form action="{{ url('zadmin.start_validation') }}" method="post">
  {{ csrf() }}
  <div class="form-row">
    {% for elem in ('application', 'curr_max_version', 'target_version') %}
      <label id="label-{{ elem }}" for="id_{{ elem }}">{{ form[elem].label }}</label>
      <span id="elem-{{ elem }}">{{ form[elem] }}</span>
    {% endfor %}
  </div>
  <div class="form-row last-row">
    <label for="id_finish_email">{{ form['finish_email'].label }}</label>
    <span id="elem-finish_email">{{ form['finish_email'] }}</span>
    <div class="button">
      <button type="submit">Start validation</button>
    </div>
  </div>
  </form>
  <div class="featured daily-message">
    <div class="featured-inner validation-intro">
      <ul>
        <li>The latest versions for all addons that support an app <em>in
        between</em> <b>Current Max Version</b> and <b>Target Max Version</b>
        will be validated for compatibility with the target. You can then
        choose to upgrade those versions or email the developers about
        failures.</li>
        <li>If we find any public versions that
        <em>already</em> support a newer app/version then nothing is tested
        nor auto upgraded.</li>
        <li>If we find any beta versions or versions
        under review then those are validated/upgraded <em>in addition to the
        latest public version</em>.</li>
      </ul>
    </div>
  </div>
  <table>
    <tr>
      <th>Tests Started</th>
      <th>Tests Finished</th>
      <th>Current Version</th>
      <th>Target Version</th>
      <th>Tested</th>
      <th>Failing</th>
      <th>Passing</th>
      <th>Exceptions</th>
      <th>Actions</th>
    </tr>
    {% for job in validation_jobs %}
    <tr>
      <td>{{ job.created }}</td>
      <td>{{ job.completed }}</td>
      <td>{{ job.curr_max_version.version }}</td>
      <td>{{ job.target_version.version }}</td>
      <td>{{ job.stats['total'] }}</td>
      <td>{{ job.stats['failing'] }}
        {% if job.completed and job.stats['failing'] > 0 %}
            <a href="" class="notify v-popup"
                       data-job-url="{{ url('zadmin.notify.failure', job.pk) }}"
                       data-notify-count="{{ job.stats['failing'] }}">Notify</a>
          {% if job.preview_failure_mail_link %}
            [<a href="{{ job.preview_failure_mail_link }}">Download Email Log</a>]
          {% endif %}
        {% endif %}
      </td>
      <td>{{ job.stats['passing'] }}
          {% if job.completed and job.stats['passing'] > 0 %}
              <a href="#" class="set-max-version v-popup"
                          data-job-version="{{ job.target_version.version }}"
                          data-job-url="{{ url('zadmin.notify.success', job.pk) }}"
                          data-job-count="{{ job.stats['passing'] }}">Set max version</a>
            {% if job.preview_success_mail_link %}
              [<a href="{{ job.preview_success_mail_link }}">Download Email Log</a>]
            {% endif %}
          {% endif %}
      </td>
      <td>{{ job.stats['errors'] }}</td>
      <td></td>
    </tr>
    {% endfor %}
  </table>
</section>

<div class="hidden">
    <div class="popup" id="notify">
        <form method="post" action="" data-url="{{ url('zadmin.notify.syntax') }}">
            {{ csrf() }}
            <p>{# placeholder for form text #}</p>
            <p>Available variables: {{ ', '.join(success_form.variables) }}</p>
            <p class="js-hidden error"></p>
            <div>{# placeholder for the form #}</div>
            <button type="submit">Continue</button>
            <span class="cancel"><a href="#">{{ _('Cancel') }}</a></span>
        </form>
    </div>
</div>

<div class="hidden" id="success-form">
    {{ success_form.as_p() }}
</div>

<div class="hidden" id="failure-form">
    {{ failure_form.as_p() }}
</div>
{% endblock %}

{'fraction_non_alphanumeric': 0.20440467997247075, 'fraction_numerical': 0.0009176416609314062, 'mean_word_length': 2.4654213036565977, 'pattern_counts': {'":': 0, '<': 243, '<?xml version=': 0, '>': 247, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '123444', 'n_tokens_mistral': 2874, 'n_tokens_neox': 2725, 'n_words': 673}