mirror of
https://github.com/linuxserver/cstate.git
synced 2026-02-20 07:55:25 +08:00
Remove average downtime message from categories
Removes https://github.com/cstate/cstate/blob/master/layouts/_default/list.html#L39-L42
This commit is contained in:
parent
05bb135e19
commit
b0f23b768e
112
layouts/_default/list.html
Normal file
112
layouts/_default/list.html
Normal file
@ -0,0 +1,112 @@
|
||||
{{ partial "meta" . }}
|
||||
{{ $title := .Title }}
|
||||
|
||||
<body class="default list">
|
||||
<header>
|
||||
<div class="contain">
|
||||
<a href="{{ .Site.BaseURL }}">← {{ T "goBack" }} <em>{{ .Site.Title }}</em></a>
|
||||
<div class="padding"></div>
|
||||
<div class="padding"></div>
|
||||
|
||||
<h1 class="clean">{{ $title }}</h1>
|
||||
|
||||
{{ range .Site.Params.systems }}
|
||||
{{ if eq .name $title }}
|
||||
{{ with .description }}
|
||||
<p class="bold">{{ . }}</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- Average downtime -->
|
||||
{{ if not .Site.Params.disableComplexCalculations }}
|
||||
<p class="bold">
|
||||
<em>
|
||||
{{ $resolved := first 5 (where .Pages "Params.resolved" "=" true) }}
|
||||
|
||||
{{ if gt $resolved 0 }}
|
||||
{{ $.Scratch.Set "counter" 0 }}
|
||||
{{ range $resolved }}
|
||||
|
||||
{{ $t := (time .Params.ResolvedWhen) }}
|
||||
{{ $timeDiff := (sub $t.Unix .Date.Unix) }}
|
||||
{{ $diffInMin := (div $timeDiff 60) }}
|
||||
|
||||
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") $diffInMin) }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
</em>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<small class="faded">{{ len .Pages }} {{ T "entries" }}, {{ T "newestToOldest" }}</small>
|
||||
|
||||
<div class="padding"></div>
|
||||
<hr class="clean">
|
||||
</div>
|
||||
{{ $incidents := .Pages }}
|
||||
</header>
|
||||
|
||||
<div class="contain contain--more" id="incidents">
|
||||
{{ if not $incidents }}
|
||||
<div class="padding"></div>
|
||||
<h3>{{ T "calmBeforeTheStorm" }}</h3>
|
||||
<p>{{ T "noIncidentsDesc" }}</p>
|
||||
<div class="padding"></div>
|
||||
<div class="padding"></div>
|
||||
<div class="padding"></div>
|
||||
{{ else }}
|
||||
{{ $paginator := .Paginate $incidents .Site.Params.incidentPostsPerPage }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ .Render "small" }}
|
||||
{{ end }}
|
||||
|
||||
<!-- If there are more than 2 pages, show pagination -->
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<hr>
|
||||
|
||||
<div class="center">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<a href="{{ $paginator.Prev.URL }}#incidents">
|
||||
⭠
|
||||
{{ T "prev" }}
|
||||
</a>
|
||||
{{ else }}
|
||||
<span class="faded">
|
||||
⭠
|
||||
{{ T "prev" }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
{{ $paginator.PageNumber }}
|
||||
/
|
||||
{{ $paginator.TotalPages }}
|
||||
|
||||
|
||||
|
||||
{{ if $paginator.HasNext }}
|
||||
<a href="{{ $paginator.Next.URL }}#incidents">
|
||||
{{ T "next" }}
|
||||
⭢
|
||||
</a>
|
||||
{{ else }}
|
||||
<span class="faded">
|
||||
{{ T "next" }}
|
||||
⭢
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="padding"></div>
|
||||
</div>
|
||||
|
||||
{{ partial "js" . }}
|
||||
{{ partial "footer" . }}
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user