2021-01-20 09:22:17 -05:00
|
|
|
{{define "theme-daynight/service"}}
|
2021-01-24 01:56:16 -05:00
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh-Hans">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>{{.Title}}</title>
|
|
|
|
<link rel="shortcut icon" type="image/png" href="/static/logo.png" />
|
2021-01-24 05:06:19 -05:00
|
|
|
<link rel="stylesheet" href="/static/theme-daynight/css/service.css?v202101241800" />
|
|
|
|
|
2021-01-24 01:56:16 -05:00
|
|
|
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet" />
|
|
|
|
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
|
|
|
|
|
|
|
{{if ts .CustomCode}}
|
|
|
|
{{.CustomCode|safe}}
|
|
|
|
{{end}}
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body data-theme="light" data-gridlist="list">
|
|
|
|
<article>
|
|
|
|
<header class="nav-bar clearfix">
|
2021-01-24 08:17:37 -05:00
|
|
|
<figure class="logo"><a href="/">{{.Conf.Site.Brand}}</a></figure>
|
2021-01-24 01:56:16 -05:00
|
|
|
<div class="icon-container">
|
|
|
|
<div class="row cf">
|
|
|
|
<div class="three col">
|
|
|
|
<div class="hamburger" id="hamburger-icon"><span class="line"></span><span class="line"></span><span class="line"></span></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<nav class="nav-menu">
|
|
|
|
<ul>
|
|
|
|
<li><a href="/">首页</a></li>
|
|
|
|
<li><a href="/service">服务状态</a></li>
|
2021-01-24 08:30:19 -05:00
|
|
|
{{if .Admin}}
|
2021-01-25 01:10:04 -05:00
|
|
|
<li><a href="/server" style="padding:.8em;text-align:center;">管理后台</a></li>
|
2021-01-24 01:56:16 -05:00
|
|
|
{{else}}
|
|
|
|
<li><a href="/login">登录</a></li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<section class="toggle-container">
|
|
|
|
<div class="dark-mode-toggle">
|
|
|
|
<label class="switcher">
|
|
|
|
<input type="checkbox" name="theme" id="dark-light" />
|
|
|
|
<div>
|
|
|
|
<i class="fas fa-sun" title="白昼模式"></i>
|
|
|
|
<i class="fas fa-moon" title="暗黑模式"></i>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="grid-mode-toggle">
|
|
|
|
<label class="switcher">
|
|
|
|
<input type="checkbox" name="grid" id="grid-list" checked />
|
|
|
|
<div>
|
|
|
|
<i class="fas fa-th" title="网格视图"></i>
|
|
|
|
<i class="fas fa-list-ul" title="列表视图"></i>
|
|
|
|
</div>
|
|
|
|
</label>
|
2021-01-20 09:22:17 -05:00
|
|
|
</div>
|
2021-01-24 01:56:16 -05:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<main>
|
|
|
|
<section class="monitor-header">
|
|
|
|
<h2>服务状态</h2>
|
|
|
|
<h4>最近30天在线率</h4>
|
|
|
|
</section>
|
|
|
|
<section class="monitor-container">
|
|
|
|
{{range $service := .Services}}
|
|
|
|
<section class="monitor-info-container">
|
|
|
|
<div class="monitor-state">
|
|
|
|
<span class="monitor-state-dot {{className (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}"></span>
|
|
|
|
<span class="monitor-state-text">{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}</span>
|
|
|
|
</div>
|
|
|
|
<div class="monitor-name">{{$service.Monitor.Name}}</div>
|
|
|
|
<div class="monitor-uptime">{{float32f (divU64 $service.TotalUp (addU64 $service.TotalUp $service.TotalDown))}}%</div>
|
|
|
|
|
|
|
|
<div class="corner-container">
|
|
|
|
{{range $i,$d := $service.Delay}}
|
|
|
|
<div class="corner {{className (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}}" aria-expanded="false">
|
|
|
|
<ul class="sub-content">
|
|
|
|
<li>{{dayBefore $i}}</li>
|
|
|
|
<li>{{float32f (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}}%</li>
|
|
|
|
<li>{{float32f $d}}ms</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{{end}}
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
<div class="footer-container">
|
|
|
|
<div>
|
|
|
|
<a href="https://github.com/naiba/nezha" target="_blank">Powered by 哪吒面板 · {{.Version}}</a>
|
|
|
|
<p>
|
|
|
|
©
|
|
|
|
<span id="copyright-date"
|
|
|
|
><script>
|
|
|
|
document.getElementById("copyright-date").appendChild(document.createTextNode(new Date().getFullYear()));
|
|
|
|
</script></span
|
|
|
|
>
|
|
|
|
· <a href="https://blog.jackiesung.com" target="_blank">Theme designed by Jackie Sung</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</footer>
|
|
|
|
<!-- Back to top button -->
|
|
|
|
<a id="back-to-top"></a>
|
|
|
|
</article>
|
|
|
|
|
2021-01-24 05:06:19 -05:00
|
|
|
<script src="/static/theme-daynight/js/service.js?v202101241800"></script>
|
|
|
|
|
2021-01-24 01:56:16 -05:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
{{end}}
|