Changeset - 4463175b5e6d
[Not reviewed]
ennstatus/api/__pycache__/__init__.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/api/__pycache__/functions.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/api/__pycache__/views.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/donate/__pycache__/__init__.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/donate/__pycache__/forms.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/donate/__pycache__/functions.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/donate/__pycache__/views.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/status/__pycache__/__init__.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/status/__pycache__/functions.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/status/__pycache__/views.cpython-33.pyc
Show inline comments
 
deleted file
 
binary diff not shown
ennstatus/templates/status/macros.html
Show inline comments
 
@@ -18,44 +18,48 @@
 
  <p class={{ color }}>{{ obfs }}</p>
 
{% endmacro %}
 

	
 
{% macro create_country(country) %}
 
  {% set country_class = "flag-" + country|lower|replace(' ', '-') %}
 
  <i class={{ country_class }}></i> {{ country|title }}
 
{% endmacro %}
 

	
 
{% macro create_fingerprint(fingerprint) %}
 
  <a href="http://torstatus.enn.lu/#details/{{ fingerprint }}">{{ fingerprint|upper}}</a>
 
{% endmacro %}
 

	
 
{% macro create_name(name) %}
 
  <a href="http://{{ name }}.enn.lu">{{ name }}</a>
 
{% endmacro %}
 

	
 
{% macro create_server_table(server_type, servers) %}
 
  {% if server_type in ('Exit', 'Relay') %}
 
    {% set headers = ['#', 'Name', 'IP', 'Server Status', 'Tor Status', 'Country', 'Fingerprint', 'Last Updated (UTC)'] %}
 
  {% else %}
 
    {% set headers = ['#', 'Name', 'Server Status', 'Tor Status', 'Country', 'OBFS', 'Last Updated (UTC)'] %}
 
  {% endif %}
 
  <h2>{{ server_type }}</h2>
 
  <table class="table table-bordered table-striped">
 
    <thead>
 
      <tr>
 
        {% for name in headers %}
 
          <th>{{ name }}</th>
 
        {% endfor %}
 
      </tr>
 
    </thead>
 
    <tbody>
 
      {% for server in servers %}
 
        <tr>
 
          <td>{{ loop.index }}</td>
 
          <td>{{ server['server_name'] }}</td>
 
          <td>{{ create_name(server['server_name']) }}</td>
 
          {% if server_type in ('Exit', 'Relay') %}
 
            <td>{{ server['ip'] }}</td>
 
          {% endif %}
 
          {% for status in [server['server_status'], server['tor_status']] %}
 
            <td>{{ colorize_status(status) }}</td>
 
          {% endfor %}
 
          <td>{{ create_country(server['country']) }}</td>
 
          {% if server_type in ('Exit', 'Relay') %}
 
            <td>{{ create_fingerprint(server['fingerprint']) }}</td>
 
          {% else %}
 
            <td>{{ colorize_obfs(server['obfs']) }}</td>
 
          {% endif %}
0 comments (0 inline, 0 general)