statping/html/tmpl/services.html

113 lines
4.2 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/base.css">
<title>Statup | Services</title>
</head>
<body>
<div class="container">
{{template "nav"}}
<div class="row">
<div class="col-12">
<h3>Services</h3>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Status</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{{range .}}
<tr>
<th scope="row">{{.Id}}</th>
<td>{{.Name}}</td>
<td>{{if .Online}}<span class="badge badge-success">ONLINE</span>{{else}}<span class="badge badge-danger">OFFLINE</span>{{end}} </td>
<td class="text-right">
<div class="btn-group" data-toggle="buttons">
<a href="/service/{{.Id}}" class="btn btn-primary">View</a>
<a href="/service/{{.Id}}/delete" class="btn btn-danger">Delete</a>
</div>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<div class="col-12">
<h3>Create Service</h3>
<form action="/services" method="POST">
<div class="form-group row">
<label for="inputEmail3" class="col-sm-4 col-form-label">Service Name</label>
<div class="col-sm-8">
<input type="text" name="name" class="form-control" id="inputEmail3" placeholder="Name">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Application Endpoint (URL)</label>
<div class="col-sm-8">
<input type="text" name="domain" class="form-control" id="inputPassword3" placeholder="https://google.com">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Expected Response (Regex)</label>
<div class="col-sm-8">
<input type="text" name="expected" class="form-control" id="inputPassword3" placeholder="string">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Expected Status Code</label>
<div class="col-sm-8">
<input type="number" name="expected_status" class="form-control" id="inputPassword3" placeholder="200">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">HTTP Method</label>
<div class="col-sm-8">
<input type="text" name="method" class="form-control" id="inputPassword3" placeholder="GET">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Check Interval (Seconds)</label>
<div class="col-sm-8">
<input type="number" name="interval" class="form-control" id="inputPassword3" placeholder="10">
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<a class="btn btn-primary">Test</a>
<button type="submit" class="btn btn-success">Create Service</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="/js/jquery-3.3.1.slim.min.js"></script>
</body>
</html>