Code

Add rudimentary support for dynamic graphs based on a metrics query.
[sysdb/webui.git] / templates / graphs.tmpl
diff --git a/templates/graphs.tmpl b/templates/graphs.tmpl
new file mode 100644 (file)
index 0000000..43ec622
--- /dev/null
@@ -0,0 +1,12 @@
+<section>
+       <h1>Graphs</h1>
+       <form action="/graphs" method="POST">
+               <input type="text" name="metrics-query" value="{{.Query}}"
+                      class="query" placeholder="Search metrics" required />
+               <button type="submit">GO</button>
+       </form><br />
+{{if .Metrics}}
+       <img src="/graph/q/{{.Metrics}}" border="0" />
+{{end}}
+       <p>&nbsp;</p>
+</section>