Gemini, trying to make this "done".
This commit is contained in:
@ -1,21 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="refresh" content="5"> <!-- Fallback auto-refresh -->
|
||||
<!-- Removed: <meta http-equiv="refresh" content="5"> -->
|
||||
<title>Node Monitor Logs - {{ service_uuid }}</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
<link rel="stylesheet" href="{{ url_for('static', path='/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="header-container">
|
||||
<h1>Node Monitor Logs</h1>
|
||||
<p>Service UUID: <code>{{ service_uuid }}</code></p>
|
||||
<p>Total Logs: <span id="log-count">0</span> (Auto-refreshing every 5 seconds)</p>
|
||||
<p>Total Logs: <span id="log-count">{{ log_count }}</span> (Auto-refreshing every 5 seconds)</p>
|
||||
<div class="filter-container">
|
||||
<fieldset>
|
||||
<legend>Log Level</legend>
|
||||
<label><input type="radio" name="log-level" value="" checked> All</label>
|
||||
<label><input type="radio" name="log-level" value="INFO"> INFO</label>
|
||||
<label><input type="radio" name="log-level" value="WARNING"> WARNING</label>
|
||||
<label><input type="radio" name="log-level" value="ERROR"> ERROR</label>
|
||||
</fieldset>
|
||||
<label for="since-filter">Since (ISO):</label>
|
||||
<input type="datetime-local" id="since-filter" placeholder="2025-06-11T13:32:00">
|
||||
<button id="apply-filters">Apply</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="log-table-container">
|
||||
<p class="loading-message">Loading logs...</p>
|
||||
<div id="log-table-container" data-service-uuid="{{ service_uuid }}">
|
||||
{% if logs %}
|
||||
<table class="log-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>Level</th>
|
||||
<th>Message</th>
|
||||
<th>Extra</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in logs %}
|
||||
<tr>
|
||||
<td>{{ log.timestamp }}</td>
|
||||
<td class="log-level log-level-{{ (log.level or '').lower() }}">{{ log.level }}</td>
|
||||
<td>{{ log.message }}</td>
|
||||
<td>
|
||||
{% if log.extra %}
|
||||
<div class="json-toggle">Show JSON</div>
|
||||
<pre class="json-content" style="display: none;">{{ log.extra | tojson(indent=2) }}</pre>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="loading-message">No logs available on server.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<script src="/static/logs.js"></script>
|
||||
<script>
|
||||
// Pass the base path for API calls if mounted under a subpath
|
||||
window.API_BASE_PATH = "{{ root_path }}";
|
||||
</script>
|
||||
<script src="{{ url_for('static', path='/logs.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user