statping/source/tmpl/index.html

116 lines
4.2 KiB
HTML
Raw Normal View History

2018-06-10 01:31:13 +00:00
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
2018-06-26 07:01:41 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1.0, user-scalable=0">
2018-06-30 05:08:08 +00:00
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
2018-06-24 06:44:15 +00:00
{{if .Core.OfflineAssets}}
2018-06-30 00:57:05 +00:00
<link rel="stylesheet" href="https://assets.statup.io/bootstrap.min.css">
2018-06-24 06:44:15 +00:00
{{ else }}
<link rel="stylesheet" href="/css/bootstrap.min.css">
{{end}}
2018-06-30 00:57:05 +00:00
<link rel="stylesheet" href="/css/base.css">
2018-06-19 04:48:25 +00:00
<title>{{.Core.Name}} Status</title>
2018-06-10 01:31:13 +00:00
</head>
<body>
2018-06-24 11:51:07 +00:00
<div class="container col-md-7 col-sm-12 mt-2 sm-container">
2018-06-19 04:48:25 +00:00
2018-06-30 22:22:56 +00:00
<h1 class="col-12 text-center mb-4 mt-sm-3 header-title">{{.Core.Name}}</h1>
2018-06-10 01:31:13 +00:00
2018-06-19 04:48:25 +00:00
{{ if .Core.Description }}
2018-06-30 22:22:56 +00:00
<h5 class="col-12 text-center mb-5 header-desc">{{ .Core.Description }}</h5>
2018-06-19 04:48:25 +00:00
{{ end }}
2018-06-27 06:45:00 +00:00
<div class="col-12 full-col-12 mb-5">
2018-06-22 04:02:57 +00:00
<div class="list-group online_list">
{{ range .Services }}
2018-06-27 06:45:00 +00:00
<a href="#" class="service_li list-group-item list-group-item-action {{if not .Online}}bg-danger text-white{{ end }}" data-id="{{.Id}}">
2018-06-22 04:02:57 +00:00
{{ .Name }}
{{if .Online}}
2018-06-30 22:22:56 +00:00
<span class="badge bg-success float-right pulse-glow">ONLINE</span>
2018-06-22 04:02:57 +00:00
{{ else }}
2018-06-30 22:22:56 +00:00
<span class="badge bg-white text-black-50 float-right pulse">OFFLINE</span>
2018-06-22 04:02:57 +00:00
{{end}}
</a>
{{ end }}
2018-06-15 04:30:10 +00:00
</div>
2018-06-22 04:02:57 +00:00
</div>
2018-06-27 06:45:00 +00:00
<div class="col-12 full-col-12">
2018-06-10 01:31:13 +00:00
{{ range .Services }}
2018-06-27 02:59:59 +00:00
<div class="mt-4" id="service_id_{{.Id}}">
2018-06-10 01:31:13 +00:00
<div class="card">
2018-06-27 06:45:00 +00:00
<div class="card-body">
2018-06-26 07:01:41 +00:00
<div class="col-12">
2018-06-27 07:44:44 +00:00
<h4 class="mt-3"><a href="/service/{{.Id}}"{{if not .Online}} class="text-danger"{{end}}>{{ .Name }}</a>
{{if .Online}}
2018-06-30 22:22:56 +00:00
<span class="badge bg-success float-right">ONLINE</span>
2018-06-27 07:44:44 +00:00
{{ else }}
2018-06-30 22:22:56 +00:00
<span class="badge bg-danger float-right pulse">OFFLINE</span>
2018-06-27 07:44:44 +00:00
{{end}}</h4>
2018-06-11 00:20:42 +00:00
2018-06-27 06:45:00 +00:00
<div class="row stats_area mt-5 mb-5">
2018-06-22 06:56:44 +00:00
<div class="col-4">
2018-06-15 04:30:10 +00:00
<span class="lg_number">{{.Online24}}%</span>
2018-06-10 01:31:13 +00:00
Online last 24 Hours
</div>
2018-06-22 06:56:44 +00:00
<div class="col-4">
2018-06-15 04:30:10 +00:00
<span class="lg_number">{{.AvgTime}}ms</span>
2018-06-10 01:31:13 +00:00
Average Response
</div>
2018-06-22 06:56:44 +00:00
<div class="col-4">
2018-06-15 04:30:10 +00:00
<span class="lg_number">{{.AvgUptime}}%</span>
2018-06-10 01:31:13 +00:00
Total Uptime
</div>
</div>
2018-06-22 04:02:57 +00:00
{{ if .LimitedFailures }}
2018-06-22 06:56:44 +00:00
2018-06-22 04:02:57 +00:00
{{ end }}
2018-06-26 07:01:41 +00:00
</div>
2018-06-10 01:31:13 +00:00
</div>
2018-06-27 06:45:00 +00:00
{{ if .AvgTime }}
<div class="chart-container">
<canvas id="service_{{ .Id }}"></canvas>
</div>
{{ end }}
<div class="lower_canvas full-col-12 text-white{{if not .Online}} bg-danger{{end}}">
<div class="col-12">
2018-06-30 22:22:56 +00:00
<span class="col-10 d-none d-md-inline">{{.SmallText}}</span>
<a href="/service/{{ .Id }}" class="btn {{if .Online}}btn-success{{else}}btn-danger{{end}} btn-sm float-right col-sm-4 col-md-2 dyn-dark">View Service</a>
2018-06-27 06:45:00 +00:00
</div>
</div>
2018-06-10 01:31:13 +00:00
</div>
</div>
{{ end }}
</div>
</div>
2018-06-22 04:02:57 +00:00
{{template "footer"}}
2018-06-10 04:16:04 +00:00
2018-06-30 00:57:05 +00:00
{{if .Core.OfflineAssets}}
<script src="https://assets.statup.io/jquery-3.3.1.slim.min.js"></script>
<script src="https://assets.statup.io/bootstrap.min.js"></script>
<script src="https://assets.statup.io/Chart.bundle.min.js"></script>
{{ else }}
<script src="/js/jquery-3.3.1.slim.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/Chart.bundle.min.js"></script>
{{end}}
<script src="/js/main.js"></script>
2018-07-04 01:19:18 +00:00
<script src="/charts.js"></script>
2018-06-19 04:48:25 +00:00
{{ if .Core.Style }}
<style>
{{ safe .Core.Style }}
</style>
{{ end }}
2018-06-24 06:44:15 +00:00
2018-06-10 01:31:13 +00:00
</body>
</html>