2020-10-13 05:32:21 +01:00
{% extends 'base.html' %}
{% block content %}
2020-10-17 23:01:38 +01:00
< div id = "index" class = "container" >
2020-10-13 05:32:21 +01:00
2020-10-17 23:01:38 +01:00
< div id = "addnode" class = "pure-g center section" >
< div class = "title pure-u-1" >
< h2 > Add A Node< / h2 >
< / div >
< form method = "POST" action = "{{ url_for('add') }}" class = "pure-form pure-u-1" >
{{ form.csrf_token }}
{% for f in form %}
{% if f.name != 'csrf_token' %}
< div class = "form-group" >
{{ f.label }}
{{ f }}
< / div >
{% endif %}
{% endfor %}
< ul >
{% for field, errors in form.errors.items() %}
< li > {{ form[field].label }}: {{ ', '.join(errors) }}< / li >
{% endfor %}
< / ul >
< button type = "submit" class = "pure-button pure-button-primary" > Submit< / button >
< / form >
2020-10-13 05:32:21 +01:00
< / div >
2020-10-17 23:01:38 +01:00
< div id = "nodes" class = "pure-u-1 center section" >
< h2 > Find a Node< / h2 >
{% if nodes %}
< table class = "pure-table pure-table-horizontal pure-table-striped center" >
< thead >
< tr >
< th > URL< / th >
< th > Available< / th >
< th > Network< / th >
2020-10-18 00:27:54 +01:00
< th > Height< / th >
2020-10-17 23:01:38 +01:00
< th > Last Checked< / th >
< / tr >
< / thead >
< tbody >
{% for node in nodes %}
< tr >
2020-10-24 07:46:14 +01:00
< td > {% if node.is_tor %}< img src = "/static/images/tor.svg" width = "15px" > {% endif %}{{ node.url }}< / td >
2020-10-18 09:59:03 +01:00
< td >
{% if node.available %}
< div class = "icon-check" style = "color:green;" > < / div >
{% else %}
< div class = "icon-close" style = "color:red;" > < / div >
{% endif %}
< / td >
2020-10-17 23:01:38 +01:00
< td > {{ node.nettype }}< / td >
2020-10-18 00:27:54 +01:00
< td > {{ node.last_height }}< / td >
2020-10-17 23:16:18 +01:00
< td > {{ node.datetime_checked | humanize }}< / td >
2020-10-17 23:01:38 +01:00
< / tr >
2020-10-17 08:36:44 +01:00
{% endfor %}
2020-10-17 23:01:38 +01:00
< / tbody >
< / table >
{% if page > 1 %}
< a href = "/?page={{ page - 1 }}" class = "pure-button btn" > Back< / a >
{% endif %}
{% if page < total_pages and total_pages > 0 %}
< a href = "/?page={{ page + 1 }}" class = "pure-button btn" > Next< / a >
{% endif %}
{% else %}
< p > No nodes in the database yet...< / p >
{% endif %}
2020-10-18 09:18:35 +01:00
< br >
2020-10-24 07:46:14 +01:00
< a href = "{% if 'crypto' in request.args %}{{ request.url }}&{% else %}/?{% endif %}nettype=mainnet" > < button class = "pure-button search-btn" > Mainnet< / button > < / a >
< a href = "{% if 'crypto' in request.args %}{{ request.url }}&{% else %}/?{% endif %}nettype=testnet" > < button class = "pure-button search-btn" > Testnet< / button > < / a >
< a href = "{% if 'crypto' in request.args %}{{ request.url }}&{% else %}/?{% endif %}nettype=stagenet" > < button class = "pure-button search-btn" > Stagenet< / button > < / a >
{% if 'onion' not in request.args %}< a href = "{% if 'nettype' in request.args or 'crypto' in request.args %}{{ request.url }}&{% else %}/?{% endif %}onion=true" > < button class = "pure-button search-btn" > < img src = "/static/images/tor.svg" width = 15px > Onion< / button > < / a > {% endif %}
< a href = "/?crypto=wownero" > < button class = "pure-button search-btn wownero" > < img src = "/static/images/wownero.svg" width = 50px > < / button > < / a >
< br >
< a href = "/" > < button class = "pure-button search-btn button-warning" > Clear< / button > < / a >
2020-10-17 23:01:38 +01:00
< / div >
2020-10-13 05:32:21 +01:00
< / div >
{% endblock %}