Types, types, types...

This commit is contained in:
Kalzu Rekku
2025-06-14 01:19:57 +03:00
parent 44c13c16df
commit c98081d360
7 changed files with 87 additions and 27 deletions

View File

@ -58,7 +58,7 @@
<p><strong>IP:</strong> {{ row_node.ip }}</p>
<p><strong>Last Seen:</strong> {{ row_node.formatted_last_seen }}</p>
<p><strong>Uptime:</strong> {{ row_node.formatted_uptime }}</p>
<p><strong>Load Avg (1m, 5m, 15m):</strong> {{ row_node.load_avg | map('%.2f' | format) | join(', ') if row_node.load_avg else 'N/A' }}</p>
<p><strong>Load Avg (1m, 5m, 15m):</strong> {{ row_node.load_avg_fmt | join(', ') if row_node.load_avg_fmt else 'N/A' }}</p>
<p><strong>Memory Usage:</strong> {{ '%.2f' | format(row_node.memory_usage_percent) + '%' if row_node.memory_usage_percent is not none else 'N/A' }}</p>
</div>
{% else %}

View File

@ -9,7 +9,7 @@
<div class="header-container">
<h1>Node Monitor Logs</h1>
<p>Service UUID: <code>{{ service_uuid }}</code></p>
<p>Total Logs: <span id="log-count">{{ log_count }}</span> (Auto-refreshing every 5 seconds)</p>
<p>Total Logs: <span id="log-count">{{ log_count }}</span> (<span id="polling-status"></span>)</p>
<div class="filter-container">
<fieldset>
<legend>Log Level</legend>
@ -21,6 +21,7 @@
<label for="since-filter">Since (UTC ISO 8601):</label>
<input type="datetime-local" id="since-filter" placeholder="e.g., 2025-06-11T13:32 (UTC)">
<button id="apply-filters">Apply</button>
<button id="toggle-polling"></button> {# Added toggle-polling button #}
</div>
</div>
<div id="log-table-container" data-service-uuid="{{ service_uuid }}">