Add config profiles with inbound assignment for nodes.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
<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 "profiles"}}active{{end}}" href="/admin/profiles">Профили</a>
|
||||
<a class="{{if eq .Active "protocols"}}active{{end}}" href="/admin/protocols">Протоколы</a>
|
||||
</nav>
|
||||
<div class="sidebar-foot">
|
||||
@@ -58,6 +59,64 @@
|
||||
<a class="btn btn-ghost" href="/admin/nodes">К списку</a>
|
||||
</div>
|
||||
|
||||
<section class="panel-section">
|
||||
<h2>Config Profile</h2>
|
||||
<form class="form-card" method="POST" action="/admin/nodes/{{.Node.ID}}/profile">
|
||||
<label>Профиль для этой ноды
|
||||
<select name="profile_id">
|
||||
<option value="none">— без профиля —</option>
|
||||
{{range .Profiles}}
|
||||
<option value="{{.ID}}" {{if eq $.Node.ProfileIDString (printf "%s" .ID)}}selected{{end}}>{{.Name}} ({{.InboundCount}} inbound)</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</label>
|
||||
<p class="hint">При назначении все inbound профиля включаются на ноде. Потом можно выключить отдельные.</p>
|
||||
<button class="btn btn-primary" type="submit">Назначить профиль</button>
|
||||
</form>
|
||||
{{if .Node.ProfileName}}
|
||||
<p class="muted" style="margin-top:0.75rem">Текущий: <strong>{{.Node.ProfileName}}</strong> · <a href="/admin/profiles/{{.Node.ProfileIDString}}">открыть профиль</a></p>
|
||||
{{end}}
|
||||
</section>
|
||||
|
||||
{{if .NodeInbounds}}
|
||||
<section class="panel-section">
|
||||
<h2>Инбаунды на ноде</h2>
|
||||
<div class="table-wrap">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tag</th>
|
||||
<th>Протокол</th>
|
||||
<th>Порт</th>
|
||||
<th>Network / Security</th>
|
||||
<th>На ноде</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .NodeInbounds}}
|
||||
<tr>
|
||||
<td><code>{{.Tag}}</code></td>
|
||||
<td>{{.ProtocolName}}</td>
|
||||
<td>{{.Port}}</td>
|
||||
<td>{{.Network}} / {{.Security}}</td>
|
||||
<td><span class="badge {{if .NodeEnabled}}on{{else}}off{{end}}">{{if .NodeEnabled}}ON{{else}}OFF{{end}}</span></td>
|
||||
<td class="actions">
|
||||
<form method="POST" action="/admin/nodes/{{$.Node.ID}}/inbounds/{{.ID}}">
|
||||
<input type="hidden" name="action" value="{{if .NodeEnabled}}disable{{else}}enable{{end}}">
|
||||
<button class="btn btn-sm {{if .NodeEnabled}}btn-ghost{{else}}btn-primary{{end}}" type="submit">
|
||||
{{if .NodeEnabled}}Выключить{{else}}Включить{{end}}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<section class="panel-section">
|
||||
<h2>Протоколы на этом сервере</h2>
|
||||
<div class="table-wrap">
|
||||
|
||||
Reference in New Issue
Block a user