Merge pull request #466 from ralphocdol/dns-stats-pihole-default-title-url

make title-url of pihole and pihole-v6 default to /admin
This commit is contained in:
Svilen Markov 2025-03-18 13:13:46 +00:00 committed by GitHub
commit 7c9f79f243
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,9 +61,15 @@ func makeDNSWidgetTimeLabels(format string) [8]string {
}
func (widget *dnsStatsWidget) initialize() error {
titleURL := strings.TrimRight(widget.URL, "/")
switch widget.Service {
case dnsServicePihole, dnsServicePiholeV6:
titleURL = titleURL + "/admin"
}
widget.
withTitle("DNS Stats").
withTitleURL(string(widget.URL)).
withTitleURL(titleURL).
withCacheDuration(10 * time.Minute)
switch widget.Service {