all repos — rastro @ 303f75c7f98bcf857e2ef49ec4c4489ce9eb333b

BitTorrent tracker!

app/templates/lists.html (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
{% extends "base.html" %}
{% block title %}{{ t('lists_title') }} — {{ app_name }}{% endblock %}
{% block content %}
<h2>{{ t('lists_heading') }}</h2>
<p>{{ t('lists_blurb') }}</p>

<form class="filters" method="get" action="/lists">
  <label>{{ t('filter_protocol') }}
    <select name="protocol">
      <option value="">{{ t('filter_any') }}</option>
      <option value="udp" {% if protocol=='udp' %}selected{% endif %}>UDP</option>
      <option value="http" {% if protocol=='http' %}selected{% endif %}>HTTP</option>
      <option value="https" {% if protocol=='https' %}selected{% endif %}>HTTPS</option>
    </select>
  </label>
  <label>{{ t('min_uptime') }}
    <input type="number" name="min_uptime" step="0.01" min="0" max="1" value="{{ min_uptime }}">
  </label>
  <label>{{ t('max_latency') }}
    <input type="number" name="max_latency" min="1" value="{{ max_latency }}">
  </label>
  <label>{{ t('filter_ip') }}
    <select name="ip">
      <option value="any" {% if ip=='any' %}selected{% endif %}>{{ t('filter_any') }}</option>
      <option value="ipv4" {% if ip=='ipv4' %}selected{% endif %}>IPv4</option>
      <option value="ipv6" {% if ip=='ipv6' %}selected{% endif %}>IPv6</option>
    </select>
  </label>
  <label>{{ t('filter_limit') }}
    <input type="number" name="limit" min="1" max="50" value="{{ limit }}">
  </label>
  <label>{{ t('min_age') }}
    <input type="number" name="min_age_days" min="0" step="0.1" value="{{ min_age_days }}">
  </label>
  <label>{{ t('diversity') }}
    <select name="diversity">
      <option value="true" {% if diversity %}selected{% endif %}>{{ t('diversity_on') }}</option>
      <option value="false" {% if not diversity %}selected{% endif %}>{{ t('diversity_off') }}</option>
    </select>
  </label>
  <button type="submit">{{ t('generate') }}</button>
</form>

<p><strong>{{ entries|length }}</strong> {{ t('selected_count') }}</p>
<p>
  <button type="button" class="copy-btn" data-copy-target="#list-out">{{ t('copy_btn') }}</button>
  <a href="{{ api_txt }}">{{ t('download_txt') }}</a> ·
  <a href="{{ api_json }}">{{ t('open_json') }}</a>
</p>
<p class="muted mono">{{ t('permalink') }}: {{ api_txt }}</p>
<pre id="list-out" class="list-out">{{ txt }}</pre>
{% endblock %}