Fix busy binary reinstall and add per-node log viewing.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -49,6 +49,9 @@
|
||||
<form method="POST" action="/admin/nodes/{{.Node.ID}}/sync">
|
||||
<button class="btn btn-ghost" type="submit">Синхронизировать протоколы</button>
|
||||
</form>
|
||||
<form method="POST" action="/admin/nodes/{{.Node.ID}}/logs">
|
||||
<button class="btn btn-ghost" type="submit">Обновить логи</button>
|
||||
</form>
|
||||
<form method="POST" action="/admin/nodes/{{.Node.ID}}/delete" onsubmit="return confirm('Удалить ноду из панели?');">
|
||||
<button class="btn btn-ghost" type="submit">Удалить</button>
|
||||
</form>
|
||||
@@ -137,6 +140,20 @@
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<section class="panel-section" id="logs">
|
||||
<div class="section-head">
|
||||
<h2>Логи сервера</h2>
|
||||
<form method="POST" action="/admin/nodes/{{.Node.ID}}/logs">
|
||||
<button class="btn btn-sm btn-ghost" type="submit">Обновить</button>
|
||||
</form>
|
||||
</div>
|
||||
{{if .Node.RuntimeLog}}
|
||||
<pre class="code-block log">{{.Node.RuntimeLog}}</pre>
|
||||
{{else}}
|
||||
<p class="muted">Логов ещё нет. Нажмите «Обновить логи» — панель заберёт agent API и docker logs по SSH.</p>
|
||||
{{end}}
|
||||
</section>
|
||||
|
||||
<section class="panel-section meta-grid">
|
||||
<div><span class="stat-label">Агент</span><div>{{if .Node.AgentVersion}}{{.Node.AgentVersion}}{{else}}—{{end}}</div></div>
|
||||
<div><span class="stat-label">Last seen</span><div>{{if .Node.LastSeenAt}}{{.Node.LastSeenAt}}{{else}}—{{end}}</div></div>
|
||||
|
||||
@@ -56,7 +56,13 @@
|
||||
<td>{{.NodePort}}</td>
|
||||
<td>{{.InstallMode}}</td>
|
||||
<td><span class="badge {{statusClass (printf "%s" .Status)}}">{{.StatusLabel}}</span></td>
|
||||
<td class="actions"><a class="btn btn-sm btn-ghost" href="/admin/nodes/{{.ID}}">Открыть</a></td>
|
||||
<td class="actions actions-multi">
|
||||
<a class="btn btn-sm btn-ghost" href="/admin/nodes/{{.ID}}">Открыть</a>
|
||||
<a class="btn btn-sm btn-ghost" href="/admin/nodes/{{.ID}}#logs">Логи</a>
|
||||
<form method="POST" action="/admin/nodes/{{.ID}}/logs">
|
||||
<button class="btn btn-sm btn-ghost" type="submit">Обновить логи</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user