statping/source/tmpl/dashboard.html

89 lines
2.5 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, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/base.css">
<title>Statup | Dashboard</title>
</head>
<body>
<div class="container col-md-7 col-sm-12 mt-md-5 bg-light">
{{template "nav"}}
<div class="col-12 mt-5">
<div class="row stats_area mb-5">
<div class="col-4">
<span class="lg_number">{{ .CountServices }}</span>
Total Services
</div>
<div class="col-4">
<span class="lg_number">{{ .Count24Failures }}</span>
Failures last 24 Hours
</div>
<div class="col-4">
<span class="lg_number">{{ .CountOnline }}</span>
Online Services
</div>
</div>
<div class="row mt-4">
<div class="col-12">
<h3>Services</h3>
<div class="list-group mb-5 mt-3">
{{ range .Services }}
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{{.Name}}</h5>
<small>{{if .Online}} <span class="badge badge-success">ONLINE</span> {{else}} <span class="badge badge-danger">OFFLINE</span> {{end}}</small>
</div>
<p class="mb-1">{{.SmallText}}</p>
</a>
{{ end }}
</div>
<h3>Latest Failures</h3>
{{ range .Services }}
{{ if .LimitedFailures }}
<div class="list-group mt-3">
{{ range .LimitedFailures }}
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{{.ParseError}}</h5>
<small>Reported {{.Ago}}</small>
</div>
<p class="mb-1">{{.Issue}}</p>
</a>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>
{{template "footer"}}
<script src="/js/jquery-3.3.1.slim.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>