wagon/front/dashboard.html

37 lines
1.7 KiB
HTML
Raw Normal View History

2022-09-12 13:49:18 -06:00
<html>
<head>
<title>Wireguard Dashboard</title>
</head>
<body>
<p>Use this console to edit your network-connected devices. </p>
2022-11-01 18:58:36 -06:00
2022-09-12 13:49:18 -06:00
<h2>Your peers</h2>
<p data-bind="hidden:isLoaded"><code>Loading...</code></p>
2022-11-06 17:29:44 -07:00
<table data-bind="visible:isLoaded" style="display:none">
2022-09-12 13:49:18 -06:00
<thead><tr>
<th>Host</th><th>SSL</th><th></th>
2022-09-12 13:49:18 -06:00
</tr></thead>
<tbody data-bind="foreach:peers"><tr>
2022-11-07 12:28:29 -07:00
<td data-bind="text:domain"></td>
2022-11-06 17:30:51 -07:00
<td><a data-bind="attr:{href:crtHref}">cert</a> / <a data-bind="attr:{href:keyHref}">key</a></td>
2022-11-07 12:35:38 -07:00
<td><button style="float:right" data-bind="click:$parent.delPeer,disable:$data.cantDelete||$data.isDeleting,text:deleteText">Delete</button></td>
2022-09-12 13:49:18 -06:00
</tr></tbody>
</table>
2022-11-01 18:58:36 -06:00
2022-09-12 13:49:18 -06:00
<h2>Add a peer</h2>
<p>To add a new peer, type in a hostname and click add. The hostname must be 3-10 lowercase letters and numbers <code>/[a-z0-9]{3,10}/</code>. Keep it short for your own sake!</p>
<p data-bind="hidden:isLoaded"><code>Loading...</code></p>
2022-11-06 17:29:44 -07:00
<div data-bind="visible:isLoaded" style="display:none">
2022-09-12 13:49:18 -06:00
<input type="text" data-bind="textInput:newPeerName,event:{keypress:addKeyPress}" placeholder="mypc1"></input>
<button data-bind="click:addPeer,disable:isAdding,text:addText">Add</button>
</div>
2022-11-07 13:19:06 -07:00
<p>After clicking "Add", the new peer's config will appear below. Copy and paste it into your wireguard client and start the service. <b>This configuration will not be shown again!</b> If you lose the config, you will need to delete the peer and recreate it. </p>
2022-09-12 13:49:18 -06:00
<hr>
<pre data-bind="text:newConfigText"></pre>
2022-11-01 18:58:36 -06:00
<script src="/knockout.min.js" integrity="sha512-vs7+jbztHoMto5Yd/yinM4/y2DOkPLt0fATcN+j+G4ANY2z4faIzZIOMkpBmWdcxt+596FemCh9M18NUJTZwvw==
"></script>
2022-09-12 13:49:18 -06:00
<script src="/dashboard.js"></script>
</body>
</html>