statping/source/tmpl/index.html

126 lines
5.3 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">
{{if USE_CDN}}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<link rel="stylesheet" href="https://assets.statup.io/base.css">
2018-06-24 06:44:15 +00:00
{{ else }}
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/base.css">
2018-06-24 06:44:15 +00:00
{{end}}
2018-06-30 00:57:05 +00:00
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">
{{ if not .Services }}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">No Services to Monitor!</h4>
<p>Your Statup Status Page is working correctly, but you don't have any services to monitor. Go to the <b>Dashboard</b> and add a website to begin really using your status page!</p>
<hr>
<p class="mb-0">If this is a bug, please make an issue in the Statup Github Repo. <a href="https://github.com/hunterlong/statup" class="btn btn-sm btn-outline-danger float-right">Statup Github Repo</a></p>
</div>
{{end}}
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 USE_CDN}}
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.min.js"></script>
<script src="https://assets.statup.io/main.js"></script>
2018-06-30 00:57:05 +00:00
{{ 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>
<script src="/js/main.js"></script>
{{end}}
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>