parse and display instance countries

This commit is contained in:
4cuck committed 2023-10-16 23:32:09 +02:00
1 parent b7498ceb3d
commit e0826ab468
16 files changed
+2681 -1773

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@
<li><code>Points</code> is a weighted instance score based on the availability over the last 3h, 30 and 120 days, together with the version.</li>
</ul>
<p><a href="https://github.com/4cuck/nitter-status">Sourcecode</a></p>
<p><a rel="nofollow" href="https://github.com/4cuck/nitter-status">Sourcecode</a></p>
<p>License: AGPL3</p>
</body>
</html>
+8 -7
View File
@@ -4,7 +4,6 @@
<head>
<meta charset="utf-8">
<link href="/static/bootstrap.min.css" rel="stylesheet">
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nitter Instance Health</title>
</head>
@@ -12,16 +11,17 @@
<div class="container">
<h1>Nitter Instance Uptime & Health</h1>
<p><a href="/about">About</a></p>
<p>Please use <a href="/api/v1/instances">/api/v1/instances</a> for bots.</p>
<p>Last Updated {{last_updated}} <a href="https://time.is/UTC">UTC</a>.</p>
<p>Please use <a rel="nofollow" href="/api/v1/instances">/api/v1/instances</a> for bots.</p>
<p>Last Updated {{last_updated}} <a rel="nofollow" href="https://time.is/UTC">UTC</a>.</p>
<div class="table-responsive">
<table class="table sortable">
<thead>
<tr>
<th scope="col">Instance</th>
<th scope="col">Country</th>
<th scope="col">Healthy</th>
<th scope="col">Response Time</th>
<th scope="col">Average</th>
<th scope="col">Response Times</th>
<th scope="col">Average (ms)</th>
<th scope="col">RSS</th>
<th scope="col">Version</th>
<th scope="col">Points</th>
@@ -30,7 +30,8 @@
<tbody>
{% for host in instances -%}
<tr>
<td><a href="{{host.url}}">{{host.domain}}</a></td>
<td><a rel="nofollow external" href="{{host.url}}">{{host.domain}}</a></td>
<td>{{host.country}}</td>
<td>
{%- if host.is_bad_host -%}
<div title="Host known for blocking healthchecks">❓</div>
@@ -42,7 +43,7 @@
<td>
{%- if host.recent_pings|length > 0 -%}
{%- set height = 57 -%}
{%- set width = 182 -%}
{%- set width = 100 -%}
{%- set amount = host.recent_pings|length -%}
{%- set width_bar = width / amount -%}
{%- set offset = 5 -%}