http-server-status/template/index.html

118 lines
4.5 KiB
HTML
Raw Normal View History

2021-09-20 13:45:01 +00:00
<html>
<head>
2021-09-20 14:48:13 +00:00
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
2021-09-20 21:59:44 +00:00
<title>HTTP Status Page</title>
2021-09-20 13:45:01 +00:00
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>HTTP Status Page</h1>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="card">
2021-11-25 01:01:27 +00:00
<div class="card-header {{if .checks.DiscSpace.Success }}bg-success{{else}}bg-danger{{end}}" id="hddtitle">
2021-09-20 13:45:01 +00:00
Check HDD
</div>
<div class="card-body" id="hddpercent">
2021-11-25 01:01:27 +00:00
<table class="table">
{{range $key, $val := .checks.DiscSpace.Data}}
<tr>
<td>{{ $key }}</td>
<td>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: {{ $val }}%;" aria-valuenow="{{ $val }}" aria-valuemin="0" aria-valuemax="100">{{ $val }}%</div>
</div>
</td>
</tr>
{{end }}
</table>
2021-09-20 13:45:01 +00:00
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
2021-11-25 01:01:27 +00:00
<div class="card-header {{if .checks.MemoryUsage.Success }}bg-success{{else}}bg-danger{{end}}" id="ramtitle">
2021-09-20 13:45:01 +00:00
Check RAM
2021-11-25 01:01:27 +00:00
2021-09-20 13:45:01 +00:00
</div>
<div class="card-body">
2021-11-25 01:01:27 +00:00
<table class="table">
<tr>
<th>Ram</th>
<td>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: {{ .checks.MemoryUsage.Data.ram }}%;" aria-valuenow="{{ .checks.MemoryUsage.Data.ram }}" aria-valuemin="0" aria-valuemax="100">{{ .checks.MemoryUsage.Data.ram }}%</div>
</div>
</td>
</tr>
<tr>
<th>Swap</th>
<td>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: {{ .checks.MemoryUsage.Data.swap }}%;" aria-valuenow="{{ .checks.MemoryUsage.Data.swap }}" aria-valuemin="0" aria-valuemax="100">{{ .checks.MemoryUsage.Data.swap }}%</div>
</div>
</td>
</tr>
</table>
2021-09-20 13:45:01 +00:00
</div>
</div>
</div>
</div>
2021-09-20 21:59:44 +00:00
<div class="row" style="margin-top: 20px;">
<div class="col-md-6">
<div class="card">
2021-11-25 01:01:27 +00:00
<div class="card-header {{if .checks.SystemLoad.Success }}bg-success{{else}}bg-danger{{end}}" id="loadtitle">
2021-09-20 21:59:44 +00:00
Check Load
2021-11-25 01:01:27 +00:00
2021-09-20 21:59:44 +00:00
</div>
<div class="card-body">
2021-11-25 01:01:27 +00:00
<table class="table">
<tr>
<th>1</th>
<td>{{ .checks.SystemLoad.Data.Loadavg1 }}</td>
</tr>
<tr>
<th>5</th>
<td>{{ .checks.SystemLoad.Data.Loadavg5 }}</td>
</tr>
<tr>
<th>15</th>
<td>{{ .checks.SystemLoad.Data.Loadavg15 }}</td>
</tr>
</table>
2021-09-20 21:59:44 +00:00
</div>
</div>
</div>
2021-10-21 10:15:55 +00:00
<div class="col-md-6">
<div class="card">
2021-11-25 01:01:27 +00:00
<div class="card-header {{if .checks.SystemdStatus.Success }}bg-success{{else}}bg-danger{{end}}" id="systemdtitle">
2021-10-21 10:15:55 +00:00
Systemd Check
</div>
<div class="card-body">
2021-11-25 01:01:27 +00:00
<table class="table">
{{range $key, $val := .checks.SystemdStatus.Data}}
<tr>
<td>{{ $key }}</td>
<td>
{{ $val }}
</td>
</tr>
{{end }}
</table>
2021-10-21 10:15:55 +00:00
</div>
</div>
</div>
2021-09-20 21:59:44 +00:00
</div>
2021-09-20 13:45:01 +00:00
</div>
</body>
</html>