<commit_before>{% extends "base.html" %}
{% load i18n %}
{% load podcasts %}

{% load menu %}
{% block mainmenu %}{{ "/admin/"|main_menu }}{% endblock %}
{% block sectionmenu %}{{ "/admin/"|section_menu:"Admin" }}{% endblock %}

{% block title %}{% trans "Host Information" %}{% endblock %}

{% block header %}
 <h1>{% trans "Host Information" %}</h1>
{% endblock %}

{% block content %}

 <table class="list">

  <tr>
   <td><strong>{% trans "mygpo Version" %}</strong></td>
   <td>
    {% if git_commit %}
     <a href="https://github.com/gpodder/mygpo/commit/{{ git_commit }}">{{ git_commit }} {{ git_msg }}</a>
    {% else %}
     could not be determined &mdash; run <strong><tt>git show HEAD</tt></strong> in the base directory
    {% endif %}
   </td>
  </tr>

  <tr>
   <td><strong>{% trans "Base Directory" %}</strong></td>
   <td><tt>{{ base_dir }}</tt></td>
  </tr>

  <tr>
   <td><strong>{% trans "Main Database" %}</strong></td>
   <td><tt>{{ main_db }}</tt></td>
  </tr>

  <tr>
   <td><strong>{% trans "Hostname" %}</strong></td>
   <td><tt>{{ hostname }}</tt></td>
  </tr>

  <tr>
   <td><strong>{% trans "Django Version" %}</strong></td>
   <td><tt>{{ django_version }}</tt></td>
  </tr>

  {% for task in db_tasks %}
   <tr>
    <td>
     {% if forloop.first %}
      <strong>{% trans "Database Tasks" %}</strong>
     {% endif %}
    </td>
    <td>
     <ul>
      {% for key, val in task.items %}
       <li>{{ key }}: {{ val}}</li>
      {% endfor %}
     </ul>
    </td>
   </tr>
  {% endfor %}

  <tr>
   <td><strong>{% trans "Scheduled Celery Tasks" %}</strong></td>
   <td><tt>{{ num_celery_tasks }}</tt></td>
  </tr>


 </table>

{% endblock %}

<commit_msg>optimize display of "Host Information" page<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load podcasts %}

{% load menu %}
{% block mainmenu %}{{ "/admin/"|main_menu }}{% endblock %}
{% block sectionmenu %}{{ "/admin/"|section_menu:"Admin" }}{% endblock %}

{% block title %}{% trans "Host Information" %}{% endblock %}

{% block header %}
 <h1>{% trans "Host Information" %}</h1>
{% endblock %}

{% block content %}

 <table class="list">

  <tr>
   <td><strong>{% trans "mygpo Version" %}</strong></td>
   <td>
    {% if git_commit %}
     <a href="https://github.com/gpodder/mygpo/commit/{{ git_commit }}">{{ git_commit }} {{ git_msg }}</a>
    {% else %}
     could not be determined &mdash; run <strong><tt>git show HEAD</tt></strong> in the base directory
    {% endif %}
   </td>
  </tr>

  <tr>
   <td><strong>{% trans "Base Directory" %}</strong></td>
   <td><tt>{{ base_dir }}</tt></td>
  </tr>

  <tr>
   <td><strong>{% trans "Main Database" %}</strong></td>
   <td><tt>{{ main_db }}</tt></td>
  </tr>

  <tr>
   <td><strong>{% trans "Hostname" %}</strong></td>
   <td><tt>{{ hostname }}</tt></td>
  </tr>

  <tr>
   <td><strong>{% trans "Django Version" %}</strong></td>
   <td><tt>{{ django_version|join:"." }}</tt></td>
  </tr>

  <tr>
   <td><strong>{% trans "Scheduled Celery Tasks" %}</strong></td>
   <td><tt>{{ num_celery_tasks }}</tt></td>
  </tr>

  <tr>
   <td><strong>{% trans "Database Tasks" %}</strong></td>
   <td>{{ db_tasks|length }}</td>
  </tr>

  {% for task in db_tasks %}
   <tr>
    <td></td>
    <td>
     <ul>
      {% for key, val in task.items %}
       <li>{{ key }}: {{ val}}</li>
      {% endfor %}
     </ul>
    </td>
   </tr>
  {% endfor %}


 </table>

{% endblock %}


{'fraction_non_alphanumeric': 0.2591615362063911, 'fraction_numerical': 0.0023453532688361184, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 169, '<?xml version=': 0, '>': 169, 'https://': 2, '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': '2222201', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1278, 'n_words': 304}