build / build (push) Successful in 1m43s
- include SMB drop-ins from /etc/samba/smb.conf.d into the generated smb.conf - keep smbd/nfs-server running while other services (/etc/exports.d, drop-ins) share, instead of disabling them when nasmon has no shares of its own - list those shares read-only on /shares - settings: RepoISO URL; poll its /api/integration/status, dashboard card, menu link, alerts for portal down, stale worker, failed jobs, unmounted publications Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
88 lines
5.7 KiB
HTML
88 lines
5.7 KiB
HTML
{{define "content"}}
|
|
{{template "flash" .}}
|
|
{{with .Data}}{{$c := .C}}
|
|
<form method="post" action="/settings" class="settings">
|
|
|
|
<section class="card">
|
|
<h2>E-mail (SMTP)</h2>
|
|
<div class="form-grid">
|
|
<label>Server <input name="smtp_host" value="{{$c.SMTP.Host}}" placeholder="smtp.yandex.ru"></label>
|
|
<label>Port <input name="smtp_port" type="number" min="1" max="65535" value="{{$c.SMTP.Port}}"></label>
|
|
<label>Security
|
|
<select name="smtp_security">
|
|
<option value="starttls" {{if eq $c.SMTP.Security "starttls"}}selected{{end}}>STARTTLS (587)</option>
|
|
<option value="tls" {{if eq $c.SMTP.Security "tls"}}selected{{end}}>TLS / SSL (465)</option>
|
|
<option value="none" {{if eq $c.SMTP.Security "none"}}selected{{end}}>none (25)</option>
|
|
</select>
|
|
</label>
|
|
<label>User <input name="smtp_user" value="{{$c.SMTP.User}}" autocomplete="off"></label>
|
|
<label>Password <input name="smtp_pass" type="password" autocomplete="new-password" placeholder="{{if .HasPass}}•••••••• (unchanged){{else}}not set{{end}}">
|
|
{{if .HasPass}}<span class="small"><input type="checkbox" name="smtp_clear_pass" value="1"> clear stored password</span>{{end}}</label>
|
|
<label>From <input name="smtp_from" value="{{$c.SMTP.From}}" placeholder="same as user"></label>
|
|
<label class="wide">Recipients <textarea name="smtp_to" rows="2" placeholder="one address per line">{{.ToText}}</textarea></label>
|
|
<label>Subject prefix <input name="smtp_prefix" value="{{$c.SMTP.SubjectPrefix}}"></label>
|
|
</div>
|
|
<p class="muted small">Gmail/Yandex/Mail.ru need an app password, not the account password. Yandex: smtp.yandex.ru 465 TLS; Gmail: smtp.gmail.com 587 STARTTLS.</p>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Alerts</h2>
|
|
<div class="form-grid">
|
|
<label class="check"><input type="checkbox" name="alerts_enabled" value="1" {{if $c.AlertsEnabled}}checked{{end}}> Send e-mail alerts</label>
|
|
<label class="check"><input type="checkbox" name="notify_resolved" value="1" {{if $c.NotifyResolved}}checked{{end}}> Also mail when a problem clears</label>
|
|
<label>Remind about open alerts every <span class="unit"><input name="remind_hours" type="number" min="0" value="{{$c.RemindHours}}"> hours (0 = never)</span></label>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>SMART polling</h2>
|
|
<div class="form-grid">
|
|
<label>Check every <span class="unit"><input name="smart_interval" type="number" min="1" value="{{$c.SmartIntervalMin}}"> minutes</span></label>
|
|
<label class="check"><input type="checkbox" name="smart_skip_standby" value="1" {{if $c.SmartSkipStandby}}checked{{end}}> Do not wake disks in standby</label>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Thresholds</h2>
|
|
<div class="form-grid">
|
|
<label>Disk temperature <span class="unit"><input name="th_disk_temp" type="number" min="0" value="{{$c.Thresholds.DiskTempC}}"> °C</span></label>
|
|
<label>CPU temperature <span class="unit"><input name="th_cpu_temp" type="number" min="0" value="{{$c.Thresholds.CPUTempC}}"> °C</span></label>
|
|
<label>Pool capacity <span class="unit"><input name="th_pool_cap" type="number" min="0" max="100" value="{{$c.Thresholds.PoolCapacityPct}}"> %</span></label>
|
|
<label>Scrub older than <span class="unit"><input name="th_scrub_days" type="number" min="0" value="{{$c.Thresholds.ScrubMaxAgeDays}}"> days</span></label>
|
|
<label>Root filesystem free below <span class="unit"><input name="th_rootfs_free" type="number" min="0" max="100" value="{{$c.Thresholds.RootFSFreePct}}"> %</span></label>
|
|
<label>NVMe percentage used <span class="unit"><input name="th_nvme_used" type="number" min="0" max="100" value="{{$c.Thresholds.NVMeUsedPct}}"> %</span></label>
|
|
<label>NVMe spare below <span class="unit"><input name="th_nvme_spare" type="number" min="0" max="100" value="{{$c.Thresholds.NVMeSparePct}}"> %</span></label>
|
|
</div>
|
|
<p class="muted small">0 disables a threshold. SMART health FAILED, reallocated/pending sectors, pool state and vdev errors always alert.</p>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Scheduled self-tests</h2>
|
|
<div class="form-grid">
|
|
<label class="check"><input type="checkbox" name="st_enabled" value="1" {{if $c.SelfTests.Enabled}}checked{{end}}> Run SMART self-tests automatically</label>
|
|
<label>Short test every <span class="unit"><input name="st_short_days" type="number" min="0" value="{{$c.SelfTests.ShortDays}}"> days</span></label>
|
|
<label>Long test every <span class="unit"><input name="st_long_days" type="number" min="0" value="{{$c.SelfTests.LongDays}}"> days</span></label>
|
|
<label>Start window from <span class="unit"><input name="st_hour" type="number" min="0" max="23" value="{{$c.SelfTests.Hour}}">:00, 3 hours</span></label>
|
|
</div>
|
|
<p class="muted small">Tests start only for disks that are awake. A long test on a large HDD takes many hours; disk stays usable.</p>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Integrations</h2>
|
|
<div class="form-grid">
|
|
<label class="wide">RepoISO URL <input name="repoiso_url" value="{{$c.Integrations.RepoISOURL}}" placeholder="http://127.0.0.1"></label>
|
|
</div>
|
|
<p class="muted small">RepoISO (ISO library, apt/dnf repositories, Proxmox ISO exports) on this host. nasmon polls
|
|
<span class="mono"><url>/api/integration/status</span> every minute, shows a dashboard card, alerts when the portal
|
|
or its worker is down, and adds a menu link. Use the local address (<span class="mono">http://127.0.0.1</span>) — the
|
|
status endpoint only answers on loopback. Empty disables the integration.</p>
|
|
</section>
|
|
|
|
<div class="actions">
|
|
<button type="submit" name="action" value="save">Save</button>
|
|
<button type="submit" name="action" value="test" class="secondary">Save & send test e-mail</button>
|
|
</div>
|
|
</form>
|
|
{{end}}
|
|
{{end}}
|