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

{% block title %}{% trans "Node List" %}{% endblock %}
{% block contenttype %}nodelist{% endblock %}
{% block rss %}
  <link rel="alternate" href="/feeds/rss/events" title="wlan ljubljana - Latest mesh events" type="application/rss+xml" />
{% endblock %}

{% block altlinks %}
  <h3>{% trans "Download in other formats" %}:</h3>
  <ul>
    <li class="first last"><a href="/feeds/rss/events">{% trans "RSS Feed" %}</a></li>
  </ul>
{% endblock %}

{% block content %}
<h1>{% trans "Node List" %}</h1>
<table border="0" width="100%" class="listing">
<thead>
  <tr>
    <th width="22"></th>
    <th width="150"><b>{% trans "Node name" %}</b></th>
    <th width="100"><b>IP</b></th>
    <th width="280"><b>{% trans "Last seen up" %}</b></th>
    <th width="70"><b>{% trans "Status" %}</b></th>
    <th width="70" align="center"><b>{% trans "Peers" %}</b></th>
    <th width="70" align="center"><b>{% trans "Clients" %}</b></th>
    <th width="90" align="center"><b>{% trans "Project" %}</b></th>
  </tr>
</thead>
<tbody>
  {% for node in nodes %}
  {% ifchanged node.node_type %}
  <tr class="section_title">
    <td colspan="9"><b>{{ node.node_type_as_string_plural }}</b></td>
  </tr>
  {% endifchanged %}
  <tr class="{% cycle 'odd' 'even' %}">
    <td align="center">
      {% if node.warnings %}
      <a href="/nodes/node/{{ node.ip }}">
        <img src="/images/warnings_small.png" title="{% trans "Some problems were detected with this node! Click for details." %}" border="0" />
      </a>
      {% endif %}
    </td>
    <td><a href="/nodes/node/{{ node.ip }}">{{ node.name|default:_("unknown") }}</a></td>
    <td>{{ node.ip }}</td>
    <td>{{ node.last_seen|default:_("never") }}</td>
    <td class="node_status_{{ node.status_as_string }}">{{ node.status_as_string }}</td>
    {% if node.is_down %}
    <td align="center">0</td>
    <td align="center">0</td>
    {% else %}
    <td align="center">{{ node.peers }}</td>
	<td align="center">{{ node.clients }}</td>
    {% endif %}
    <td align="center">{{ node.project }}</td>
  </tr>
  {% endfor %}
</tbody>
</table>
<br/>
{% trans "Status legend" %}:<br/>
<ul>
  <li><span class="node_status_up">up</span> - {% trans "node is reachable" %}</li>
  <li><span class="node_status_invalid">invalid</span> - {% trans "IP is not allocated but is seen" %}</li><commit_msg>Fixed default values for client count and project.<commit_after>{% extends "base.html" %}
{% load i18n %}

{% block title %}{% trans "Node List" %}{% endblock %}
{% block contenttype %}nodelist{% endblock %}
{% block rss %}
  <link rel="alternate" href="/feeds/rss/events" title="wlan ljubljana - Latest mesh events" type="application/rss+xml" />
{% endblock %}

{% block altlinks %}
  <h3>{% trans "Download in other formats" %}:</h3>
  <ul>
    <li class="first last"><a href="/feeds/rss/events">{% trans "RSS Feed" %}</a></li>
  </ul>
{% endblock %}

{% block content %}
<h1>{% trans "Node List" %}</h1>
<table border="0" width="100%" class="listing">
<thead>
  <tr>
    <th width="22"></th>
    <th width="150"><b>{% trans "Node name" %}</b></th>
    <th width="100"><b>IP</b></th>
    <th width="280"><b>{% trans "Last seen up" %}</b></th>
    <th width="70"><b>{% trans "Status" %}</b></th>
    <th width="70" align="center"><b>{% trans "Peers" %}</b></th>
    <th width="70" align="center"><b>{% trans "Clients" %}</b></th>
    <th width="90" align="center"><b>{% trans "Project" %}</b></th>
  </tr>
</thead>
<tbody>
  {% for node in nodes %}
  {% ifchanged node.node_type %}
  <tr class="section_title">
    <td colspan="9"><b>{{ node.node_type_as_string_plural }}</b></td>
  </tr>
  {% endifchanged %}
  <tr class="{% cycle 'odd' 'even' %}">
    <td align="center">
      {% if node.warnings %}
      <a href="/nodes/node/{{ node.ip }}">
        <img src="/images/warnings_small.png" title="{% trans "Some problems were detected with this node! Click for details." %}" border="0" />
      </a>
      {% endif %}
    </td>
    <td><a href="/nodes/node/{{ node.ip }}">{{ node.name|default:_("unknown") }}</a></td>
    <td>{{ node.ip }}</td>
    <td>{{ node.last_seen|default:_("never") }}</td>
    <td class="node_status_{{ node.status_as_string }}">{{ node.status_as_string }}</td>
    {% if node.is_down %}
    <td align="center">0</td>
    <td align="center">0</td>
    {% else %}
    <td align="center">{{ node.peers }}</td>
    <td align="center">{{ node.clients|default:"0" }}</td>
    {% endif %}
    <td align="center">{{ node.project|default:_("unknown") }}</td>
  </tr>
  {% endfor %}
</tbody>
</table>
<br/>
{% trans "Status legend" %}:<br/>
<ul>
  <li><span class="node_status_up">up</span> - {% trans "node is reachable" %}</li>
  <li><span class="node_status_invalid">invalid</span> - {% trans "IP is not allocated but is seen" %}</li>
{'fraction_non_alphanumeric': 0.25769787146104567, 'fraction_numerical': 0.013845835916511676, 'mean_word_length': 3.7544204322200394, 'pattern_counts': {'":': 0, '<': 189, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5924751', 'n_tokens_mistral': 1912, 'n_tokens_neox': 1767, 'n_words': 428}