From fa05045d31c05c8928020f05f1d281901d983b2b Mon Sep 17 00:00:00 2001 From: Gibheer Date: Thu, 2 Dec 2021 17:54:14 +0100 Subject: cmd/monfront - import monfront from separate repository This is the import from the separate monfront repository. The history could not be imported, but this should suffice. --- cmd/monfront/templates/check.html | 51 ++++++++++++++ cmd/monfront/templates/checkfilter.html | 49 ++++++++++++++ cmd/monfront/templates/checkformfooter.html | 1 + cmd/monfront/templates/checkformheader.html | 43 ++++++++++++ cmd/monfront/templates/checklist.html | 29 ++++++++ cmd/monfront/templates/error.html | 1 + cmd/monfront/templates/footer.html | 76 +++++++++++++++++++++ cmd/monfront/templates/grouplist.html | 21 ++++++ cmd/monfront/templates/header.html | 101 ++++++++++++++++++++++++++++ 9 files changed, 372 insertions(+) create mode 100644 cmd/monfront/templates/check.html create mode 100644 cmd/monfront/templates/checkfilter.html create mode 100644 cmd/monfront/templates/checkformfooter.html create mode 100644 cmd/monfront/templates/checkformheader.html create mode 100644 cmd/monfront/templates/checklist.html create mode 100644 cmd/monfront/templates/error.html create mode 100644 cmd/monfront/templates/footer.html create mode 100644 cmd/monfront/templates/grouplist.html create mode 100644 cmd/monfront/templates/header.html (limited to 'cmd/monfront/templates') diff --git a/cmd/monfront/templates/check.html b/cmd/monfront/templates/check.html new file mode 100644 index 0000000..e30f62a --- /dev/null +++ b/cmd/monfront/templates/check.html @@ -0,0 +1,51 @@ + {{ template "header" . }} +
+ {{ template "checkformheader" . }} + {{ $mapping := .Mappings }} + {{ with .CheckDetails }} + +
+

check for service {{ .Name }}

+
current state
+
current notice{{ if .Notice }}{{ .Notice.String }}{{ end }}
+
Message{{ .Message }}
+
enabled{{ .Enabled }}
+
updated{{ .Updated.Format "2006.01.02 15:04:05" }}
+
next check{{ .NextTime.Format "2006.01.02 15:04:05" }}
+
last refresh{{ .LastRefresh.Format "2006.01.02 15:04:05" }}
+
mapping{{ .MappingId }}
+
+ +
+

command {{ .CommandName }}

+
Message{{ .CommandMessage }}
+
command line{{ join .CommandLine " " }}
+
+
+

checker {{ .CheckerName }}

+
Description{{ .CheckerMsg }}
+
+
+

notifications

+ + + + {{ range .Notifications -}} + + + + + + + + {{ end -}} + +
notifierstatecreatedsentoutput
{{ .NotifierName }}{{ (index $mapping .MappingId .State).Title }}{{ .Inserted.Format "2006.01.02 15:04:05" }}{{ if .Sent.Valid }}{{ .Sent.Time.Format "2006.01.02 15:04:05" }}{{ end }}{{ .Output }}
+
+ {{ end }} + {{ template "checkformfooter" . }} +
+ {{ template "footer" . }} diff --git a/cmd/monfront/templates/checkfilter.html b/cmd/monfront/templates/checkfilter.html new file mode 100644 index 0000000..f86ce3c --- /dev/null +++ b/cmd/monfront/templates/checkfilter.html @@ -0,0 +1,49 @@ +
+ +
diff --git a/cmd/monfront/templates/checkformfooter.html b/cmd/monfront/templates/checkformfooter.html new file mode 100644 index 0000000..5582354 --- /dev/null +++ b/cmd/monfront/templates/checkformfooter.html @@ -0,0 +1 @@ + diff --git a/cmd/monfront/templates/checkformheader.html b/cmd/monfront/templates/checkformheader.html new file mode 100644 index 0000000..7662670 --- /dev/null +++ b/cmd/monfront/templates/checkformheader.html @@ -0,0 +1,43 @@ + {{ if .CanEdit }} +
+ + + {{ end }} diff --git a/cmd/monfront/templates/checklist.html b/cmd/monfront/templates/checklist.html new file mode 100644 index 0000000..17830ef --- /dev/null +++ b/cmd/monfront/templates/checklist.html @@ -0,0 +1,29 @@ + {{ template "header" . }} +
+ {{ template "checkfilter" . }} + {{ template "checkformheader" . }} + + + + {{ $current := "" }} + {{ $mapping := .Mappings }} + {{ range .Checks }} + + + + + + + + + + {{ end }} + +
hostservicestatusfornext check inmessage
{{ if ne $current .NodeName }}{{ $current = .NodeName }}{{ .NodeName }}{{ end }}{{ .CheckName }} + {{- if ne .Notify true }}{{ end -}} + {{- if .Notice.Valid }}{{ end -}} + {{ .CommandName }} + {{ since .StateSince }}{{ in .NextTime }}{{ .Msg }}
+ {{ template "checkformfooter" . }} +
+ {{ template "footer" . }} diff --git a/cmd/monfront/templates/error.html b/cmd/monfront/templates/error.html new file mode 100644 index 0000000..efffc4c --- /dev/null +++ b/cmd/monfront/templates/error.html @@ -0,0 +1 @@ +{{ .Error }} diff --git a/cmd/monfront/templates/footer.html b/cmd/monfront/templates/footer.html new file mode 100644 index 0000000..124b585 --- /dev/null +++ b/cmd/monfront/templates/footer.html @@ -0,0 +1,76 @@ + + + diff --git a/cmd/monfront/templates/grouplist.html b/cmd/monfront/templates/grouplist.html new file mode 100644 index 0000000..fa0554c --- /dev/null +++ b/cmd/monfront/templates/grouplist.html @@ -0,0 +1,21 @@ + {{ template "header" . }} + {{ template "checkformheader" . }} + + + + + {{ $current := "" }} + {{ $mapping := .Mappings }} + {{ range .Groups }} + + + + + + + {{ end }} + +
grouphostworst state
{{ if ne $current .Name }}{{ $current = .Name }}{{ .Name }}{{ end }}{{ .NodeName }}{{ (index $mapping .MappingId .State).Title }}
+
+ {{ template "checkformfooter" . }} + {{ template "footer" . }} diff --git a/cmd/monfront/templates/header.html b/cmd/monfront/templates/header.html new file mode 100644 index 0000000..1f9040d --- /dev/null +++ b/cmd/monfront/templates/header.html @@ -0,0 +1,101 @@ + + + + {{ .Title }} + + + + + + +
+ {{ if .Error }}
{{ .Error }}
{{ end }} -- cgit v1.2.3-70-g09d2