From e29f38937cdf077a99b45c27e49f553d4dd8d0d7 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Thu, 15 Dec 2022 11:16:56 +0100 Subject: monfront - add basic interface to create some entities --- cmd/monfront/templates/create_index.html | 84 +++++++++++++++++++++++++++++++ cmd/monfront/templates/header.html | 1 + cmd/monfront/templates/rows_to_table.html | 19 +++++++ 3 files changed, 104 insertions(+) create mode 100644 cmd/monfront/templates/create_index.html create mode 100644 cmd/monfront/templates/rows_to_table.html (limited to 'cmd/monfront/templates') diff --git a/cmd/monfront/templates/create_index.html b/cmd/monfront/templates/create_index.html new file mode 100644 index 0000000..1e4a67e --- /dev/null +++ b/cmd/monfront/templates/create_index.html @@ -0,0 +1,84 @@ +{{ template "header" . }} +
+

create entries

+
+ checks +
+

+

+ +

+

+

+

+
+ options + +
+

+

+
+
+
+ nodes +
+ create new node +
+

+

+

+
+
+ {{ template "rows_to_table" .Content.nodes }} +
+
+ commands +
+ create new command +
+

+

+

+

+
+
+ {{ template "rows_to_table" .Content.commands }} +
+
+ checkers +
+ create new checker instance +
+

+

+

+
+
+ {{ template "rows_to_table" .Content.checkers }} +
+
+ notifier +
+ create new notifier +
+

+

+

+
+
+ {{ template "rows_to_table" .Content.notifier }} +
+
+{{ template "footer" . }} diff --git a/cmd/monfront/templates/header.html b/cmd/monfront/templates/header.html index c31a43c..aa8fe4b 100644 --- a/cmd/monfront/templates/header.html +++ b/cmd/monfront/templates/header.html @@ -92,6 +92,7 @@
  • home
  • checks
  • groups
  • +
  • create
  • {{ if .Error }}
    {{ .Error }}
    {{ end }} diff --git a/cmd/monfront/templates/rows_to_table.html b/cmd/monfront/templates/rows_to_table.html new file mode 100644 index 0000000..04add21 --- /dev/null +++ b/cmd/monfront/templates/rows_to_table.html @@ -0,0 +1,19 @@ + + + {{ range $col := .Columns }} + + {{ end }} + + + {{ range $row := .Rows }} + + {{ range $col := $row }} + + {{ end }} + + + {{ end }} +
    {{ $col }}
    {{ if $col.Valid }}{{ $col.String }}{{ end }} + + +
    -- cgit v1.2.3-70-g09d2