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

{% block title %}{% trans "Node" %} {{ node.name|default:_("unknown") }} ({{ node.ip }}){% endblock %}

{% block content %}
<h1><img src="/images/status_{{ node.status_as_string }}_small.png" title="{{ node.status_as_string }}" alt="{{ node.status_as_string }}"/>&nbsp;{% trans "Node Information" %} - {{ node.name|default:_("unknown") }} ({{ node.ip }})</h1>

{% if node.warnings %}
<div class="error">
  {% blocktrans %}<b>WARNING:</b> Some problems were found in this node's configuration! Continued operation of this node might disrupt normal network operations, so these issues must be addressed! The following problems have been detected:{% endblocktrans %}<br />
  <br>
  {% for warning in node.get_warnings %}
  <i>{{ warning }}</i><br/>
  {% endfor %}
</div>
{% endif %}
<div class="embedded">
{% if node.geo_lat and node.geo_long %}
<div id="gmap" style="width:400px; height: 300px;"></div>
{% endif %}
</div>
<h3 class="section_title">{% trans "General Information" %}
{% if current_owner %}
<a href="/nodes/edit/{{ node.ip }}"><img src="/images/edit.png" title="{% trans "Edit node configuration" %}" alt="{% trans "Edit" %}" /></a>
{% if node.is_resettable %}
<a href="/nodes/reset/{{ node.ip }}"><img src="/images/clean.png" title="{% trans "Reset node statistics" %}" alt="{% trans "Reset" %}" /></a>
{% endif %}
<a href="/nodes/remove/{{ node.ip }}"><img src="/images/delete.png" title="{% trans "Delete node" %}" alt="{% trans "Delete" %}" /></a>
{% endif %}
</h3>

<table border="0" width="300">
  <tr>
    <td style="width: 120px;">{% trans "IP address" %}</td>
    <td>{{ node.ip }}</td>
  </tr>
  <tr>
    <td>{% trans "Name" %}</td>
    <td>{{ node.name|default:_("unknown") }}</td>
  </tr>
  {% if node.url %}
  <tr>
    <td></td>
    <td class="small_text"><a href="{{ node.url }}" class="ext-link"><span class="icon">&nbsp;</span>{% trans "visit home page" %}</a></td>
  </tr>
  {% endif %}
  <tr>
    <td>{% trans "Maintainer" %}</td>
    {% if node.owner %}
    {% if user.is_authenticated and node.owner.email %}
    <td><a class="mail-link" href="mailto:{{ node.owner.email }}"><span class="icon">&nbsp;</span>{{ node.owner.username }}</a></td>
    {% else %}
    <td>{{ node.owner.username }}</td>
    {% endif %}
    {% else %}
    <td>{% trans "Unknown" %}</td>
    {% endif %}
  </tr>
  <tr>
    <td>{% trans "Node type" %}</td>
    <td>{{ node.node_type_as_string }}</td>
  </tr>
  <tr>
    <td>{% trans "Location" %}</td>
    <td>{{ node.location|default:_("Unknown") }}</td>
  </tr>
  <tr>
    <td>{% trans "Node status" %}</td>
    <td class="node_status_{{ node.status_as_string }}">{{ node.status_as_string }}</td>
  </tr>
  <tr>
    <td>{% trans "Project" %}</td>
    <td>{{ node.project.name|default:_("Unknown") }}</td>
  </tr>
  <tr>
    <td>{% trans "System node" %}</td>
    <td>{% if node.system_node %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  <tr>
    <td>{% trans "Border router" %}</td>
    <td>{% if node.border_router %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  <tr>
    <td>{% trans "Last seen" %}</td>
    {% if node.last_seen %}
    <td>{{ node.last_seen|date }}</td>
    {% else %}
    <td>{% trans "never" %}</td>
    {% endif %}
  </tr>
  {% if node.is_mesh_node %}
  <tr>
    <td>{% trans "Clients so far" %}</td>
    <td>{{ node.clients_so_far|default:"0" }}</td>
  </tr>
  {% endif %}
  <tr>
    <td>{% trans "Stability" %}</td>
    <td>{{ node.get_stability|default:_("unknown") }} %</td>
  </tr>
</table>
<h3 id="details_title">{% trans "Details" %}</h3>
<table border="0" id="details_list" class="layout">
  <tr>
    <td style="width: 300px;"></td>
    <td></td>
  </tr>
  {% if node.is_mesh_node or node.is_mobile_node %}
  <tr class="section_title">
    <td colspan="2">{% trans "Antenna Information" %}</td>
  </tr>
  <tr>
    <td>{% trans "External antenna" %}</td>
    <td>{% if node.ant_external %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  <tr>
    <td>{% trans "Type" %}</td>
    <td>{{ node.ant_type_as_string }}</td>
  </tr>
  <tr>
    <td>{% trans "Polarization" %}</td>
    <td>{{ node.ant_polarization_as_string }}</td>
  </tr>
  {% if node.profile %}
  <tr class="section_title">
    <td colspan="2">
      {% trans "Image Generator Information" %}
      {% if current_owner %}&nbsp;[<a href="/generator/request/{{ node.ip }}">{% trans "generate image" %}</a>]{% endif %}
    </td>
  </tr>
  <tr>
    <td>{% trans "Router type" %}</td>
    <td>{{ node.profile.template.name|default:_("Unknown") }}</td>
  </tr>
  <tr>
    <td>{% trans "VPN enabled" %}</td>
    <td>{% if node.profile.use_vpn %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  <tr>
    <td>{% trans "Captive portal enabled" %}</td>
    <td>{% if node.profile.use_captive_portal %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  {% if current_owner and node.installedpackage_set.all %}
  <tr>
    <td>{% trans "Installed packages" %}</td>
    <td><a href="/nodes/installed_packages/{{ node.ip }}">{% trans "show list" %}</a></td>
  </tr>
  {% endif %}
  {% endif %}<commit_msg>Hid antenna information for nodes without external antenna.<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load gmap %}
{% load conversion %}

{% block title %}{% trans "Node" %} {{ node.name|default:_("unknown") }} ({{ node.ip }}){% endblock %}

{% block content %}
<h1><img src="/images/status_{{ node.status_as_string }}_small.png" title="{{ node.status_as_string }}" alt="{{ node.status_as_string }}"/>&nbsp;{% trans "Node Information" %} - {{ node.name|default:_("unknown") }} ({{ node.ip }})</h1>

{% if node.warnings %}
<div class="error">
  {% blocktrans %}<b>WARNING:</b> Some problems were found in this node's configuration! Continued operation of this node might disrupt normal network operations, so these issues must be addressed! The following problems have been detected:{% endblocktrans %}<br />
  <br>
  {% for warning in node.get_warnings %}
  <i>{{ warning }}</i><br/>
  {% endfor %}
</div>
{% endif %}
<div class="embedded">
{% if node.geo_lat and node.geo_long %}
<div id="gmap" style="width:400px; height: 300px;"></div>
{% endif %}
</div>
<h3 class="section_title">{% trans "General Information" %}
{% if current_owner %}
<a href="/nodes/edit/{{ node.ip }}"><img src="/images/edit.png" title="{% trans "Edit node configuration" %}" alt="{% trans "Edit" %}" /></a>
{% if node.is_resettable %}
<a href="/nodes/reset/{{ node.ip }}"><img src="/images/clean.png" title="{% trans "Reset node statistics" %}" alt="{% trans "Reset" %}" /></a>
{% endif %}
<a href="/nodes/remove/{{ node.ip }}"><img src="/images/delete.png" title="{% trans "Delete node" %}" alt="{% trans "Delete" %}" /></a>
{% endif %}
</h3>

<table border="0" width="300">
  <tr>
    <td style="width: 120px;">{% trans "IP address" %}</td>
    <td>{{ node.ip }}</td>
  </tr>
  <tr>
    <td>{% trans "Name" %}</td>
    <td>{{ node.name|default:_("unknown") }}</td>
  </tr>
  {% if node.url %}
  <tr>
    <td></td>
    <td class="small_text"><a href="{{ node.url }}" class="ext-link"><span class="icon">&nbsp;</span>{% trans "visit home page" %}</a></td>
  </tr>
  {% endif %}
  <tr>
    <td>{% trans "Maintainer" %}</td>
    {% if node.owner %}
    {% if user.is_authenticated and node.owner.email %}
    <td><a class="mail-link" href="mailto:{{ node.owner.email }}"><span class="icon">&nbsp;</span>{{ node.owner.username }}</a></td>
    {% else %}
    <td>{{ node.owner.username }}</td>
    {% endif %}
    {% else %}
    <td>{% trans "Unknown" %}</td>
    {% endif %}
  </tr>
  <tr>
    <td>{% trans "Node type" %}</td>
    <td>{{ node.node_type_as_string }}</td>
  </tr>
  <tr>
    <td>{% trans "Location" %}</td>
    <td>{{ node.location|default:_("Unknown") }}</td>
  </tr>
  <tr>
    <td>{% trans "Node status" %}</td>
    <td class="node_status_{{ node.status_as_string }}">{{ node.status_as_string }}</td>
  </tr>
  <tr>
    <td>{% trans "Project" %}</td>
    <td>{{ node.project.name|default:_("Unknown") }}</td>
  </tr>
  <tr>
    <td>{% trans "System node" %}</td>
    <td>{% if node.system_node %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  <tr>
    <td>{% trans "Border router" %}</td>
    <td>{% if node.border_router %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  <tr>
    <td>{% trans "Last seen" %}</td>
    {% if node.last_seen %}
    <td>{{ node.last_seen|date }}</td>
    {% else %}
    <td>{% trans "never" %}</td>
    {% endif %}
  </tr>
  {% if node.is_mesh_node %}
  <tr>
    <td>{% trans "Clients so far" %}</td>
    <td>{{ node.clients_so_far|default:"0" }}</td>
  </tr>
  {% endif %}
  <tr>
    <td>{% trans "Stability" %}</td>
    <td>{{ node.get_stability|default:_("unknown") }} %</td>
  </tr>
</table>
<h3 id="details_title">{% trans "Details" %}</h3>
<table border="0" id="details_list" class="layout">
  <tr>
    <td style="width: 300px;"></td>
    <td></td>
  </tr>
  {% if node.is_mesh_node or node.is_mobile_node %}
  <tr class="section_title">
    <td colspan="2">{% trans "Antenna Information" %}</td>
  </tr>
  <tr>
    <td>{% trans "External antenna" %}</td>
    <td>{% if node.ant_external %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  {% if node.ant_external %}
  <tr>
    <td>{% trans "Type" %}</td>
    <td>{{ node.ant_type_as_string }}</td>
  </tr>
  <tr>
    <td>{% trans "Polarization" %}</td>
    <td>{{ node.ant_polarization_as_string }}</td>
  </tr>
  {% endif %}
  {% if node.profile %}
  <tr class="section_title">
    <td colspan="2">
      {% trans "Image Generator Information" %}
      {% if current_owner %}&nbsp;[<a href="/generator/request/{{ node.ip }}">{% trans "generate image" %}</a>]{% endif %}
    </td>
  </tr>
  <tr>
    <td>{% trans "Router type" %}</td>
    <td>{{ node.profile.template.name|default:_("Unknown") }}</td>
  </tr>
  <tr>
    <td>{% trans "VPN enabled" %}</td>
    <td>{% if node.profile.use_vpn %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  <tr>
    <td>{% trans "Captive portal enabled" %}</td>
    <td>{% if node.profile.use_captive_portal %}{% trans "YES" %}{% else %}{% trans "NO" %}{% endif %}</td>
  </tr>
  {% if current_owner and node.installedpackage_set.all %}
  <tr>
    <td>{% trans "Installed packages" %}</td>
    <td><a href="/nodes/installed_packages/{{ node.ip }}">{% trans "show list" %}</a></td>
  </tr>
  {% endif %}
  {% endif %}
{'fraction_non_alphanumeric': 0.26047479428733566, 'fraction_numerical': 0.0052965099782464765, 'mean_word_length': 3.5557949159844893, 'pattern_counts': {'":': 0, '<': 371, '<?xml version=': 0, '>': 371, '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': '1074812', 'n_tokens_mistral': 4265, 'n_tokens_neox': 3947, 'n_words': 982}