7df061c00f
- settings.html: Aktív/Inaktív rows -> run-blue check / neutral gray (Inaktív no longer red), update states -> run/crit/progress with sprite check/x/spinner, pencil + cancel buttons -> icons, storage badges -> tags, host-disk bar + JS drive capBar -> meters (usageColorClass -> nominal/warn/crit), state-text-* consumers on the new suffixes incl. JS-built class names. - debug.html, app_info.html, storage_init/attach.html, logs.html: emoji -> sprite icons or plain text in templates AND JS strings. - catchall.html (standalone, no sprite): v2 token sweep of its inline style, status emoji -> inline SVGs; a stopped app renders neutral, not red. - login.html: two-tone H1 (last word blue-bright). - setup_hub_versions.html: stale var(--border,#30363d) fallback -> v2. - Test Group F grep gate: all 34 banned patterns at ZERO across internal/web + internal/setup; Scenario E test now asserts the '--bg-0: #0A1220' token literal.
73 lines
2.4 KiB
HTML
73 lines
2.4 KiB
HTML
{{define "logs"}}
|
|
{{template "layout_start" .}}
|
|
<div class="page-header">
|
|
<a href="/stacks" class="btn btn-sm btn-outline">← Vissza</a>
|
|
<h2>{{.Stack.Meta.DisplayName}} — Naplók</h2>
|
|
</div>
|
|
<div class="logs-container" id="logs-container">
|
|
<pre class="logs-output" id="logs-output">{{.Logs}}</pre>
|
|
</div>
|
|
<div class="logs-actions">
|
|
<span class="logs-live-indicator" id="live-indicator">
|
|
<span class="logs-live-dot"></span> Élő
|
|
</span>
|
|
<button class="btn btn-outline btn-sm" id="logs-toggle" onclick="toggleLive()">Szüneteltetés</button>
|
|
<button class="btn btn-outline btn-sm" onclick="fetchLogs()">Frissítés</button>
|
|
</div>
|
|
<script>
|
|
(function() {
|
|
var container = document.getElementById('logs-container');
|
|
var output = document.getElementById('logs-output');
|
|
var indicator = document.getElementById('live-indicator');
|
|
var toggleBtn = document.getElementById('logs-toggle');
|
|
var live = true;
|
|
var timer = null;
|
|
var stackName = '{{.Stack.Name}}';
|
|
|
|
function isAtBottom() {
|
|
return container.scrollHeight - container.scrollTop - container.clientHeight < 50;
|
|
}
|
|
|
|
window.fetchLogs = function() {
|
|
fetch('/stacks/' + stackName + '/logs?raw=1')
|
|
.then(function(r) { return r.text(); })
|
|
.then(function(text) {
|
|
var wasAtBottom = isAtBottom();
|
|
output.textContent = text;
|
|
if (wasAtBottom) container.scrollTop = container.scrollHeight;
|
|
})
|
|
.catch(function() {});
|
|
};
|
|
|
|
function startPolling() {
|
|
if (timer) return;
|
|
timer = setInterval(window.fetchLogs, 3000);
|
|
}
|
|
|
|
function stopPolling() {
|
|
if (timer) { clearInterval(timer); timer = null; }
|
|
}
|
|
|
|
window.toggleLive = function() {
|
|
live = !live;
|
|
if (live) {
|
|
startPolling();
|
|
indicator.className = 'logs-live-indicator';
|
|
indicator.innerHTML = '<span class="logs-live-dot"></span> Élő';
|
|
toggleBtn.textContent = 'Szüneteltetés';
|
|
} else {
|
|
stopPolling();
|
|
indicator.className = 'logs-live-indicator logs-live-paused';
|
|
indicator.innerHTML = 'Szünetelve';
|
|
toggleBtn.textContent = 'Folytatás';
|
|
}
|
|
};
|
|
|
|
// Auto-scroll to bottom on initial load
|
|
container.scrollTop = container.scrollHeight;
|
|
startPolling();
|
|
})();
|
|
</script>
|
|
{{template "layout_end" .}}
|
|
{{end}}
|