mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-24 21:09:49 -06:00
backmerge
This commit is contained in:
@@ -277,7 +277,13 @@ class ServiceMonitor:
|
||||
if total_count == 0:
|
||||
return None
|
||||
|
||||
if total_count < 3:
|
||||
# Only show uptime for a window if we have data older than it
|
||||
if hours:
|
||||
cur.execute(
|
||||
'SELECT EXISTS(SELECT 1 FROM service_checks WHERE service_id = %s AND timestamp <= %s)',
|
||||
(service_id, cutoff),
|
||||
)
|
||||
if not cur.fetchone()[0]:
|
||||
return None
|
||||
|
||||
return round((online_count / total_count) * 100, 2)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<link rel="canonical" href="{{ request.url_root | trim('/') }}{{ var['canonical'] }}" />
|
||||
<script defer src="{{ url_for('static', filename='js/checkbox.js') }}"></script>
|
||||
<script defer src="{{ url_for('static', filename='js/responsive.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/chessbed.js') }}"></script>
|
||||
{# <script src="{{ url_for('static', filename='js/chessbed.js') }}"></script> #}
|
||||
<script defer src="{{ url_for('static', filename='js/idler.js') }}"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/p5@1.4.1/lib/p5.min.js"></script>
|
||||
<title>{{ var['title'] }}</title>
|
||||
|
||||
Reference in New Issue
Block a user