The errors other packages give a page (store, catalog, mirror) are shown in its language; a percentage is written as the language writes it (%93 in Turkish); the footer's time in its date form; and a stale form is refused with a sentence rather than "bad request". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
33 lines
1.8 KiB
HTML
33 lines
1.8 KiB
HTML
{{define "node_logs"}}<!doctype html>
|
|
<html lang="{{lang}}"><head>
|
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
{{if .Follow}}<meta http-equiv="refresh" content="5">{{end}}
|
|
<title>llmgw — {{t "logs.title" .Node}}</title><link rel="stylesheet" href="{{stylesheet}}">
|
|
</head><body><div class="wrap">
|
|
<header>
|
|
<h1>{{.Node}}</h1>
|
|
<p class="sub">{{if eq .Source "agent"}}{{t "logs.agent"}}{{else}}{{th "logs.engine" .Source}}{{end}} · {{t "logs.last_lines" .Count}}</p>
|
|
{{if .OnAdminListener}}<nav><a href="{{.Back}}">{{t "node.nav.cluster"}}</a></nav>{{else}}{{template "nav" .Nav}}{{end}}
|
|
</header>
|
|
|
|
<p>
|
|
{{- $d := . -}}
|
|
{{range .Sources}}<a href="{{$d.Base}}?source={{.}}&lines={{$d.Count}}{{if $d.Follow}}&follow=1{{end}}"{{if eq . $d.Source}} aria-current="page"><strong>{{.}}</strong>{{else}}>{{.}}{{end}}</a> {{end}}
|
|
</p>
|
|
<p class="note">
|
|
{{range .Counts}}<a href="{{$d.Base}}?source={{$d.Source}}&lines={{.}}{{if $d.Follow}}&follow=1{{end}}">{{.}}</a> {{end}}{{t "logs.lines"}} ·
|
|
{{if .Follow}}<a href="{{.Base}}?source={{.Source}}&lines={{.Count}}">{{t "logs.stop"}}</a>{{else}}<a href="{{.Base}}?source={{.Source}}&lines={{.Count}}&follow=1">{{t "logs.follow"}}</a> {{t "logs.follow_every"}}{{end}}
|
|
</p>
|
|
|
|
{{/* An error from the control plane or the node is shown as it came. */}}
|
|
{{if .Error}}<p class="bad">{{.Error}}</p>{{end}}
|
|
{{if .Lines}}<pre id="log">{{range .Lines}}{{.}}
|
|
{{end}}</pre>
|
|
{{/* Newest at the bottom, like a terminal, and scrolled there: the line
|
|
worth reading is almost always the last one. */}}
|
|
<script>window.scrollTo(0, document.body.scrollHeight);</script>
|
|
{{else if not .Error}}<p class="empty">{{t "logs.empty"}}</p>{{end}}
|
|
|
|
<footer class="note">llmgw {{.Version}} · {{stamp .Now}}{{template "langs"}}</footer>
|
|
</div></body></html>{{end}}
|