about summary refs log tree commit diff
path: root/hosted
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-11-06 16:13:34 +0100
committerEmile <hanemile@protonmail.com>2019-11-06 16:13:34 +0100
commitc08c3f58ea355c971f76d6bac84d9166ddd33a22 (patch)
treed6a2dfec9f8be0bbfff9017ce02ab92ec99fdcd8 /hosted
parent4fc89345c1ad5482f3e2b5752343f1df5e102c89 (diff)
web pages
Diffstat (limited to 'hosted')
-rw-r--r--hosted/index.html71
1 files changed, 71 insertions, 0 deletions
diff --git a/hosted/index.html b/hosted/index.html
new file mode 100644
index 0000000..8790b34
--- /dev/null
+++ b/hosted/index.html
@@ -0,0 +1,71 @@
+{{define "index"}}
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
+        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
+    </head>
+    <body>
+        <nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4">
+            <a class="navbar-brand" href="/">Metrics</a>
+            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
+                <span class="navbar-toggler-icon"></span>
+            </button>
+            <div class="collapse navbar-collapse" id="navbarCollapse">
+                <ul class="navbar-nav mr-auto">
+                    <li class="nav-item active">
+                        <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
+                    </li>
+                    <li class="nav-item">
+                        <a class="nav-link" href="/metrics">Raw View</a>
+                    </li>
+                </ul>
+            </div>
+        </nav>
+        <main class="container" role="main">
+            <div class="jumbotron">
+
+			<form method="POST" action="/">
+			  <div class="row">
+				<div class="col">
+				  <input type="text" class="form-control" placeholder="key"
+                  name="key" id="key">
+				</div>
+				<div class="col">
+				  <input type="text" class="form-control" placeholder="value"
+                  name="value" id="value">
+				</div>
+			  </div>
+
+              <br>
+
+			  <table class="table">
+			    <thead>
+			    </thead>
+			    <tbody>
+              {{ range $key, $value := .Metrics }}
+			  	<tr>
+			  	  <th scope="row">{{ $key }}</th>
+			  	  <td>{{ $value }}</td>
+			  	</tr>
+              {{ end  }}
+			    </tbody>
+			  </table>
+
+		      <br>
+
+			  <div class="form-group row">
+				<div class="col-sm-12">
+                    <button type="submit" value="submit" class="btn btn-primary btn-lg btn-block">
+						Save changes
+                    </button>
+				</div>
+			  </div>
+
+			</form>
+            </div>
+        </main>
+    </body>
+</html>
+{{end}}