Manage external site-prober actions va API and Dashboard

This commit is contained in:
ayurishchev committed 2026-08-26 19:45:48 +03:00
1 parent f22ad569b6
commit 42f584dd3c
28 files changed
+717 -32

No files matched your search

+12
View File
@@ -4,6 +4,7 @@ import (
"errors"
"html/template"
"net/http"
"strconv"
"strings"
"time"
)
@@ -87,12 +88,23 @@ func derefStr(s *string) string {
return *s
}
// joinInts renders a []int as a comma-separated string, for pre-filling the
// inbound-checks ports form field on /settings.
func joinInts(ints []int, sep string) string {
parts := make([]string, len(ints))
for i, n := range ints {
parts[i] = strconv.Itoa(n)
}
return strings.Join(parts, sep)
}
var funcMap = template.FuncMap{
"ipBadge": ipBadge,
"validatorBadge": validatorBadge,
"fmtTime": fmtTime,
"deref": derefStr,
"join": strings.Join,
"joinInts": joinInts,
}
func parseTemplates() (*template.Template, error) {