Files
felhom-controller/controller/internal/web/templates/settings_notifications.html
T
admin bc278944a3
gates / gates (push) Successful in 25s
controller v0.264.0: the household is told when an update is undone or held, in its language
app_update_undone / app_update_held events (09 decision 15), on by
default and seeded once on existing boxes; R-606 update sentences as
key+args rendered per reader; R-646 startup applied-meta backfill for
apps current with the catalog; R-620 a disabled notifier WARNs once per
event type. Needs hub v0.120.0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-09-23 13:51:21 +02:00

155 lines
10 KiB
HTML

{{define "settings_notifications"}}
{{template "layout_start" .}}
<div class="page-header">
<h2>{{T "settings_notifications.beallitasok_ertesitesek"}}</h2>
</div>
<!-- Section C: Notification Preferences -->
<div class="settings-card">
<h3>{{T "settings_notifications.ertesitesek"}}</h3>
{{if .HubEnabled}}
{{if .NotificationSuccess}}<div class="alert alert-info">{{.NotificationSuccess}}</div>{{end}}
{{if .NotificationError}}<div class="alert alert-error">{{.NotificationError}}</div>{{end}}
<form method="POST" action="/settings/notifications">
{{.CSRFField}}
<div class="form-group">
<label for="notification_email">{{T "settings_notifications.e_mail_cim"}}</label>
<input type="email" id="notification_email" name="notification_email"
value="{{with .NotificationPrefs}}{{.Email}}{{end}}"
placeholder="{{T "settings_notifications.pelda_email"}}" class="form-control">
</div>
<div class="form-group">
<label>{{T "settings_notifications.hibak_es_figyelmeztetesek"}}</label>
<div class="checkbox-group">
<label class="toggle">
<input type="checkbox" name="event_backup_failed" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "backup_failed"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.biztonsagi_mentes_sikertelen"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_db_dump_failed" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "db_dump_failed"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.adatbazis_mentes_sikertelen"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_backup_integrity_failed" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "backup_integrity_failed"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.mentes_serules_eszlelve"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_crossdrive_failed" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "crossdrive_failed"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.masodlagos_mentes_sikertelen"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_offbox_enlarge_blocked" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "offbox_enlarge_blocked"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.tavoli_mentes_tarhelykeret_figyelmeztete"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_disk_warning" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "disk_warning"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.lemez_beteloben_90_felett"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_disk_critical" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "disk_critical"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.lemez_megtelt_vagy_meghibasodott"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_storage_disconnected" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "storage_disconnected"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.meghajto_levalasztva"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_node_down" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "node_down"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.szerver_nem_elerheto"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_health_critical" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "health_critical"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.rendszer_allapot_kritikus"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_expected_backup_missed" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "expected_backup_missed"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.elvart_fajlmentes_elmaradt"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_expected_dbdump_missed" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "expected_dbdump_missed"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.elvart_adatbazismentes_elmaradt"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_app_start_failed" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "app_start_failed"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.alkalmazas_nem_fut"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_app_update_undone" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "app_update_undone"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.app_update_undone"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_app_update_held" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "app_update_held"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.app_update_held"}}</span>
</label>
</div>
</div>
<div class="form-group">
<label>{{T "settings_notifications.tajekoztato"}}</label>
<div class="checkbox-group">
<label class="toggle">
<input type="checkbox" name="event_storage_reconnected" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "storage_reconnected"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.meghajto_ujra_csatlakoztatva"}}</span>
</label>
<label class="toggle">
<input type="checkbox" name="event_health_recovered" {{with .NotificationPrefs}}{{range .EnabledEvents}}{{if eq . "health_recovered"}}checked{{end}}{{end}}{{end}}>
<span class="toggle-label">{{T "settings_notifications.rendszer_allapot_helyreallt"}}</span>
</label>
</div>
</div>
<div class="form-group">
<label for="cooldown_hours">{{T "settings_notifications.ertesitesi_szunet"}}</label>
<div class="form-inline">
<input type="number" id="cooldown_hours" name="cooldown_hours" min="1" max="168"
value="{{with .NotificationPrefs}}{{.CooldownHours}}{{end}}"
class="form-control form-control-narrow">
<span class="form-hint">{{T "settings_notifications.ora_azonos_problema_eseten_ennyi"}}</span>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">{{T "settings_notifications.mentes"}}</button>
<button type="submit" formaction="/settings/notifications/test" class="btn btn-outline">{{T "settings_notifications.teszt_email_kuldese"}}</button>
</div>
</form>
{{else}}
<div class="alert alert-info">
{{T "settings_notifications.az_ertesitesek_a_kozponti_rendszeren"}}
</div>
{{end}}
</div>
<!-- Section: App email (SMTP relay) -->
{{if .AppEmailAvailable}}
<div class="settings-card">
<h3>{{T "settings_notifications.alkalmazas_email"}}</h3>
<p class="settings-card-desc">
{{T "settings_notifications.az_alkalmazasok_a_felhom_on"}}
</p>
{{if .AppEmailSuccess}}<div class="alert alert-info">{{.AppEmailSuccess}}</div>{{end}}
{{if .AppEmailError}}<div class="alert alert-error">{{.AppEmailError}}</div>{{end}}
<form method="POST" action="/settings/app-email">
{{.CSRFField}}
<div class="form-group">
<label style="display:flex;align-items:center;gap:.5rem">
<input type="checkbox" name="app_email_enabled" value="on" {{if .AppEmailEnabled}}checked{{end}}>
{{T "settings_notifications.alkalmazas_email_engedelyezese"}}
</label>
</div>
<div class="form-group">
<label for="app_email_from_name">{{T "settings_notifications.felado_neve_opcionalis"}}</label>
<input type="text" id="app_email_from_name" name="app_email_from_name"
value="{{.AppEmailFromName}}" placeholder="{{T "settings_notifications.pl_a_haztartas_neve"}}" class="form-control">
<span class="form-hint">{{T "settings_notifications.ez_jelenik_meg_a_kimeno"}}</span>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">{{T "settings_notifications.mentes"}}</button>
</div>
</form>
<p class="settings-card-desc" style="margin-top:.75rem">
{{T "settings_notifications.bekapcsolas_utan_az_egyes_alkalmazasokna"}}
</p>
</div>
{{end}}
{{template "layout_end" .}}
{{end}}