2018-06-10 01:31:13 +00:00
|
|
|
<!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">
|
|
|
|
|
2018-06-10 03:44:47 +00:00
|
|
|
<title>Statup | Services</title>
|
2018-06-10 01:31:13 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
|
2018-06-11 03:41:02 +00:00
|
|
|
{{template "nav"}}
|
2018-06-10 01:31:13 +00:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
2018-06-10 03:44:47 +00:00
|
|
|
<h3>Services</h3>
|
2018-06-10 01:31:13 +00:00
|
|
|
|
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">#</th>
|
2018-06-10 03:44:47 +00:00
|
|
|
<th scope="col">Name</th>
|
2018-06-11 00:20:42 +00:00
|
|
|
<th scope="col">Status</th>
|
|
|
|
<th scope="col"></th>
|
2018-06-10 01:31:13 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .}}
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{{.Id}}</th>
|
2018-06-10 03:44:47 +00:00
|
|
|
<td>{{.Name}}</td>
|
2018-06-11 03:41:02 +00:00
|
|
|
<td>{{if .Online}}<span class="badge badge-success">ONLINE</span>{{else}}<span class="badge badge-danger">OFFLINE</span>{{end}} </td>
|
2018-06-11 00:20:42 +00:00
|
|
|
<td class="text-right">
|
2018-06-10 03:44:47 +00:00
|
|
|
<div class="btn-group" data-toggle="buttons">
|
2018-06-11 03:41:02 +00:00
|
|
|
<a href="/service/{{.Id}}" class="btn btn-primary">View</a>
|
|
|
|
<a href="/service/{{.Id}}/delete" class="btn btn-danger">Delete</a>
|
2018-06-10 03:44:47 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
2018-06-10 01:31:13 +00:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2018-06-10 03:44:47 +00:00
|
|
|
<div class="col-12">
|
|
|
|
|
|
|
|
<h3>Create Service</h3>
|
|
|
|
|
2018-06-11 03:41:02 +00:00
|
|
|
<form action="/services" method="POST">
|
2018-06-10 03:44:47 +00:00
|
|
|
<div class="form-group row">
|
2018-06-11 00:20:42 +00:00
|
|
|
<label for="inputEmail3" class="col-sm-4 col-form-label">Service Name</label>
|
|
|
|
<div class="col-sm-8">
|
2018-06-10 03:44:47 +00:00
|
|
|
<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">
|
2018-06-11 03:41:02 +00:00
|
|
|
<label for="inputPassword3" class="col-sm-4 col-form-label">Check Interval (Seconds)</label>
|
2018-06-10 03:44:47 +00:00
|
|
|
<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">
|
2018-06-11 00:20:42 +00:00
|
|
|
<a class="btn btn-primary">Test</a>
|
|
|
|
<button type="submit" class="btn btn-success">Create Service</button>
|
2018-06-10 03:44:47 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2018-06-10 01:31:13 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="/js/jquery-3.3.1.slim.min.js"></script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|