Add node mode with SSH auto-install and Remnawave-style manual deploy.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{.Title}} · VPN Panel</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/static/css/app.css">
|
||||
</head>
|
||||
<body class="page-admin">
|
||||
<aside class="sidebar">
|
||||
<a class="brand" href="/admin">VPN Panel</a>
|
||||
<nav>
|
||||
<a class="{{if eq .Active "dashboard"}}active{{end}}" href="/admin">Обзор</a>
|
||||
<a class="{{if eq .Active "nodes"}}active{{end}}" href="/admin/nodes">Ноды</a>
|
||||
<a class="{{if eq .Active "protocols"}}active{{end}}" href="/admin/protocols">Протоколы</a>
|
||||
</nav>
|
||||
<div class="sidebar-foot">
|
||||
<span class="user-chip">{{.UserName}}</span>
|
||||
<form method="POST" action="/logout"><button type="submit" class="link-btn">Выйти</button></form>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main class="admin-main">
|
||||
<header class="admin-header row-head">
|
||||
<div>
|
||||
<h1>Ноды</h1>
|
||||
<p class="muted">Удалённые серверы: автоустановка по SSH или ручной docker compose</p>
|
||||
</div>
|
||||
<a class="btn btn-primary" href="/admin/nodes/new">+ Добавить ноду</a>
|
||||
</header>
|
||||
|
||||
{{if .Flash}}<div class="alert ok">Готово: {{.Flash}}</div>{{end}}
|
||||
{{if .Error}}<div class="alert">Ошибка: {{.Error}}</div>{{end}}
|
||||
|
||||
{{if .Nodes}}
|
||||
<div class="table-wrap">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Имя</th>
|
||||
<th>Хост</th>
|
||||
<th>API порт</th>
|
||||
<th>Режим</th>
|
||||
<th>Статус</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Nodes}}
|
||||
<tr>
|
||||
<td><strong><a href="/admin/nodes/{{.ID}}">{{.Name}}</a></strong></td>
|
||||
<td><code>{{.Host}}</code></td>
|
||||
<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>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="empty-state">
|
||||
<p>Нод пока нет. Добавьте сервер — панель сама поставит Docker и агент (или выдаст compose как Remnawave).</p>
|
||||
<a class="btn btn-primary" href="/admin/nodes/new">Добавить первую ноду</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user