about summary refs log tree commit diff
path: root/hosted/index.html
blob: 8790b34b30fc9111a5cc8e677d3e9b036c3dfa8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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}}