From 21fd842bde5e879408d62b50b1aa3c8d781f714b Mon Sep 17 00:00:00 2001
From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com>
Date: Thu, 30 May 2024 22:10:12 +0100
Subject: [PATCH] Refactor monitor: allow insecure requests & use of simple
icons
---
internal/assets/templates/monitor.html | 8 +++---
internal/feed/monitor.go | 33 +++++++++++++++++-----
internal/feed/requests.go | 14 ++++++++-
internal/widget/monitor.go | 39 +++++++++++---------------
4 files changed, 60 insertions(+), 34 deletions(-)
diff --git a/internal/assets/templates/monitor.html b/internal/assets/templates/monitor.html
index e618f8b..0333741 100644
--- a/internal/assets/templates/monitor.html
+++ b/internal/assets/templates/monitor.html
@@ -22,13 +22,13 @@
{{ define "site" }}
{{ if .IconUrl }}
-
+
{{ end }}
-
{{ .Title }}
+
{{ .Title }}
{{ if not .Status.Error }}
- - {{ .StatusText }}
+ - {{ .StatusText }}
- {{ .Status.ResponseTime.Milliseconds | formatNumber }}ms
{{ else if .Status.TimedOut }}
- Timed Out
@@ -37,7 +37,7 @@
{{ end }}
-{{ if eq .StatusStyle "good" }}
+{{ if eq .StatusStyle "ok" }}