123 lines
5.9 KiB
HTML
123 lines
5.9 KiB
HTML
{{ define "config" }}
|
|
|
|
<body>
|
|
<div class="container-lg mt-5">
|
|
<div class="row">
|
|
<div class="col-md-6 table-responsive">
|
|
<table class="table">
|
|
<form action="/save_config/" method="post">
|
|
<tr>
|
|
<td>Interfaces</td>
|
|
<td><input name="iface" type="text" class="form-control" value="{{ .Config.Iface }}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Path to DB</td>
|
|
<td><input name="dbpath" type="text" class="form-control" value="{{ .Config.DbPath }}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Host</td>
|
|
<td><input name="host" type="text" class="form-control" value="{{ .Config.GuiIP }}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Port</td>
|
|
<td><input name="port" type="text" class="form-control" value="{{ .Config.GuiPort }}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Timeout (seconds)</td>
|
|
<td><input name="timeout" type="number" class="form-control" value="{{ .Config.Timeout }}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Shoutrrr URL</td>
|
|
<td>
|
|
<textarea name="shout" class="form-control" style="width: 100%;" rows="3" wrap="soft">{{ .Config.ShoutURL }}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Theme</td>
|
|
<td><select name="theme" class="form-select">
|
|
<option selected>{{ .Config.Theme }}</option>
|
|
{{ range .Themes }}
|
|
<option value="{{ . }}">{{ . }}</option>
|
|
{{ end }}
|
|
</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Color mode</td>
|
|
<td><select name="color" class="form-select">
|
|
<option selected>{{ .Config.Color }}</option>
|
|
<option value="light">light</option>
|
|
<option value="dark">dark</option>
|
|
</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Ignore IP</td>
|
|
<td>
|
|
<select name="ignoreip" class="form-select">
|
|
<option selected value="{{ .Config.IgnoreIP }}">{{ .Config.IgnoreIP }}</option>
|
|
<option value="yes">yes</option>
|
|
<option value="no">no</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Log Level</td>
|
|
<td>
|
|
<select name="loglevel" class="form-select">
|
|
<option selected value="{{ .Config.LogLevel }}">{{ .Config.LogLevel }}</option>
|
|
<option value="short">short</option>
|
|
<option value="verbose">verbose</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Keep history (days)</td>
|
|
<td><input name="history" type="number" class="form-control" value="{{ .Config.HistDays }}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Arp Timeout</td>
|
|
<td>
|
|
<select name="arp_timeout" class="form-select">
|
|
<option selected value="{{ .Config.ArpTimeout }}">{{ .Config.ArpTimeout }}</option>
|
|
<option value="100">100</option>
|
|
<option value="250">250</option>
|
|
<option value="500">500</option>
|
|
<option value="1000">1000</option>
|
|
<option value="1500">1500</option>
|
|
<option value="2000">2000</option>
|
|
<option value="3000">3000</option>
|
|
<option value="5000">5000</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><button type="submit" class="btn btn-primary">Save</button></td>
|
|
</form>
|
|
<td>
|
|
<a href="/test_notify/"><button style="float: right;" class="btn btn-success">Test notification</button></a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<p>Current version: {{ .Version }}</p>
|
|
<div class="alert alert-info" role="alert">
|
|
<p>● There can be one or more <b>Interfaces</b>, space separated</p>
|
|
<p>● After changing <b>Host</b>, <b>Port</b> or <b>Path to DB</b> you need to restart the app</p>
|
|
<p>● <b>Timeout</b> means time between scans (in seconds)</p>
|
|
<p>● <b>Shoutrrr URL</b> provides notifications to Discord, Email, Gotify, Telegram and other services. <a href="https://containrrr.dev/shoutrrr/v0.5/services/overview/" target="_blank">Link to documentation</a></p>
|
|
<p>● If you want to detect unknown hosts by MAC only, set <b>Ignore IP</b> to "yes"</p>
|
|
<p>● <b>Log Level</b> defines how much log output you want to see</p>
|
|
<p>● The <b>Clear table</b> button below will delete all records from table. If you want to delete a single host, click on its MAC and press <b>Delete host</b> button</p>
|
|
<p>● <b>Arp Timeout</b> per host timeout for <b>arp-scan</b> (in milliseconds). Default: 500</p>
|
|
</div>
|
|
<br>
|
|
<form action="/clear/" method="post">
|
|
<button type="submit" class="btn btn-danger">Clear table</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{{ template "footer" }}
|
|
{{ end }}
|