Added error-url parameter to monitor sites
This commit is contained in:
parent
a7e235441b
commit
c8200f2972
3 changed files with 10 additions and 0 deletions
|
|
@ -25,7 +25,11 @@
|
|||
<img class="monitor-site-icon{{ if .Icon.IsFlatIcon }} flat-icon{{ end }}" src="{{ .Icon.URL }}" alt="" loading="lazy">
|
||||
{{ end }}
|
||||
<div class="min-width-0">
|
||||
{{ if and .Status.Error ( ne "" .ErrorURL)}}
|
||||
<a class="size-h3 color-highlight text-truncate block" href="{{ .ErrorURL | safeURL }}" {{ if not .SameTab }}target="_blank"{{ end }} rel="noreferrer">{{ .Title }}</a>
|
||||
{{ else }}
|
||||
<a class="size-h3 color-highlight text-truncate block" href="{{ .URL | safeURL }}" {{ if not .SameTab }}target="_blank"{{ end }} rel="noreferrer">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
<ul class="list-horizontal-text">
|
||||
{{ if not .Status.Error }}
|
||||
<li title="{{ .Status.Code }}">{{ .StatusText }}</li>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ type monitorWidget struct {
|
|||
Sites []struct {
|
||||
*SiteStatusRequest `yaml:",inline"`
|
||||
Status *siteStatus `yaml:"-"`
|
||||
ErrorURL string `yaml:"error-url"`
|
||||
Title string `yaml:"title"`
|
||||
Icon customIconField `yaml:"icon"`
|
||||
SameTab bool `yaml:"same-tab"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue