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

make title-url of pihole and pihole-v6 default to /admin
pull/476/head
Svilen Markov 2025-03-18 13:13:46 +07:00 committed by GitHub
commit 7c9f79f243
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

@ -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 {