From 9f7e8177ec2d0504fbe1aee6759b962417415056 Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Mon, 16 Jan 2023 19:55:15 +0700 Subject: [PATCH] Button to test notifications --- CHANGELOG.md | 6 ++--- README.md | 39 ++++++++++++++---------------- docker-compose.yml | 3 ++- internal/web/config.go | 13 ++++++++++ internal/web/templates/config.html | 12 ++++++--- internal/web/webgui.go | 1 + 6 files changed, 45 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9bdc98..b3a0f2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [v0.9.1] - 2023-01- +## [v0.9.1] - 2023-01-16 ### Added - Scan host for open ports -- Docker image with embed CSS - App version on config page -- Check if update available +- Check if update is available +- Button to test notifications ### Changed - Small fixes diff --git a/README.md b/README.md index 2949ca2..ab6d914 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,27 @@ -
-
-● There can be one or more Interfaces, space separated
● After changing Host, Port or Path to DB you need to restart the app
-● Timeout means time between scans
+● Timeout means time between scans (in seconds)
● Shoutrrr URL provides notifications to Discord, Email, Gotify, Telegram and other services. Link to documentation
● If you want to detect unknown hosts by MAC only, set Ignore IP to "yes"
● The Clear table button below will delete all records from table. If you want to delete a single host, click on its MAC and press Delete host button
diff --git a/internal/web/webgui.go b/internal/web/webgui.go index 0566e9d..14d958f 100644 --- a/internal/web/webgui.go +++ b/internal/web/webgui.go @@ -49,6 +49,7 @@ func Gui(configPath, bootPath string) { http.HandleFunc("/save_config/", saveConfigHandler) http.HandleFunc("/search_hosts/", searchHandler) http.HandleFunc("/sort_hosts/", sortHandler) + http.HandleFunc("/test_notify/", testNotifyHandler) http.HandleFunc("/update_host/", updateHandler) err := http.ListenAndServe(address, nil) check.IfError(err)