simple-icinga-dashboard/template.html

49 lines
1.9 KiB
HTML
Raw Permalink Normal View History

2020-11-21 21:35:43 +00:00
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
2021-04-11 08:57:02 +00:00
<title>${title}</title>
2020-11-21 21:35:43 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap.min.css">
2021-04-11 08:57:02 +00:00
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>${mood}</text></svg>">
2020-11-21 21:35:43 +00:00
</head>
<body>
<div class="container">
<div class="page-header my-5" id="banner">
<div class="row">
2021-04-10 15:45:20 +00:00
<div class="col-lg-8">
2021-04-11 08:57:02 +00:00
<h1>Status: ${mood}</h1>
2020-11-21 21:35:43 +00:00
</div>
</div>
</div>
2021-04-11 08:57:02 +00:00
% for prettyname, details in sorted(hosts.items()):
<div class="row">
<div class="col">
<div class="card text-white border-primary mb-3">
<div id="${details['hostname']}" class="card-header d-flex justify-content-between align-items-center">
<h4><a href="#${details['hostname']}">${prettyname}</a></h4>
<span class="badge badge-${details['host_badge']}">${details['host_state']}</span>
</div>
<div class="card-body">
<ul class="list-group">
% for service_name, service_details in sorted(details['services'].items()):
<li class="list-group-item d-flex justify-content-between align-items-center">
${service_name}
<span class="badge badge-${service_details['badge']}">${service_details['state']}</span>
</li>
% endfor
</ul>
</div>
</div>
</div>
</div>
% endfor
2020-11-21 21:35:43 +00:00
</div>
<script type="text/javascript">
window.setTimeout(function() {
window.location.reload();
}, 30000);
</script>
2020-11-21 21:35:43 +00:00
</body>
</html>