2021-01-15 11:45:49 -05:00
|
|
|
|
{{define "theme-default/service"}}
|
|
|
|
|
{{template "common/header" .}}
|
2021-01-17 20:42:44 -05:00
|
|
|
|
{{if ts .CustomCode}}
|
|
|
|
|
{{.CustomCode|safe}}
|
|
|
|
|
{{end}}
|
2021-01-15 11:45:49 -05:00
|
|
|
|
{{template "common/menu" .}}
|
|
|
|
|
<div class="nb-container">
|
|
|
|
|
<div class="ui container">
|
2021-01-16 01:20:42 -05:00
|
|
|
|
<div class="service-status">
|
|
|
|
|
<table class="ui celled table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2022-04-29 08:49:24 -04:00
|
|
|
|
<th class="ui center aligned">{{tr "Name"}}</th>
|
|
|
|
|
<th class="ui center aligned">{{tr "30DaysOnline"}}</th>
|
|
|
|
|
<th class="ui center aligned">{{tr "Details"}}</th>
|
|
|
|
|
<th class="ui center aligned">{{tr "Status"}}</th>
|
2021-01-16 01:20:42 -05:00
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{{range $service := .Services}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="ui center aligned">{{$service.Monitor.Name}}</td>
|
|
|
|
|
<td class="ui center aligned">
|
2022-05-01 12:45:03 -04:00
|
|
|
|
{{$service.TotalUptime|float32f}}%
|
2021-01-16 01:20:42 -05:00
|
|
|
|
</td>
|
|
|
|
|
<td class="ui center aligned">{{range $i,$d := $service.Delay}}
|
|
|
|
|
<div class="ui icon button {{className (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}}"
|
2022-04-29 08:49:24 -04:00
|
|
|
|
data-tooltip="{{dayBefore $i}},{{tr "Availability"}}:{{float32f (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}}%,{{tr "AverageLatency"}}:{{float32f $d}}ms">
|
2021-01-16 01:20:42 -05:00
|
|
|
|
</div> {{end}}
|
|
|
|
|
</td>
|
2021-01-16 22:44:50 -05:00
|
|
|
|
<td class="ui center aligned delay-today">
|
2021-11-06 04:00:08 -04:00
|
|
|
|
<i
|
|
|
|
|
class="delay-today {{className (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}"></i>
|
2021-01-16 22:44:50 -05:00
|
|
|
|
{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}
|
2021-01-16 01:20:42 -05:00
|
|
|
|
</td>
|
|
|
|
|
</tr> {{end}}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2021-11-06 04:00:08 -04:00
|
|
|
|
|
|
|
|
|
{{if .CycleTransferStats}}
|
|
|
|
|
|
2022-04-29 08:49:24 -04:00
|
|
|
|
<h2 style="text-align: center;">{{tr "CycleTransferStats"}}</h2>
|
2021-11-06 04:00:08 -04:00
|
|
|
|
|
|
|
|
|
<table class="ui celled table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="ui center aligned">ID</th>
|
2022-04-29 08:49:24 -04:00
|
|
|
|
<th class="ui center aligned">{{tr "Rules"}}</th>
|
|
|
|
|
<th class="ui center aligned">{{tr "Server"}}</th>
|
|
|
|
|
<th class="ui center aligned">{{tr "From"}}</th>
|
|
|
|
|
<th class="ui center aligned">{{tr "To"}}</th>
|
2021-11-10 20:40:10 -05:00
|
|
|
|
<th class="ui center aligned">MAX</th>
|
|
|
|
|
<th class="ui center aligned">MIN</th>
|
2022-04-29 08:49:24 -04:00
|
|
|
|
<th class="ui center aligned">{{tr "NextCheck"}}</th>
|
|
|
|
|
<th class="ui center aligned">{{tr "CurrentUsage"}}</th>
|
2022-05-30 05:21:21 -04:00
|
|
|
|
<th class='ui center aligned' style='padding: 0px 31px 0px 31px;'>{{tr "Transleft"}}</th>
|
2021-11-06 04:00:08 -04:00
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{{range $id, $stats := .CycleTransferStats}}
|
|
|
|
|
{{range $innerId, $transfer := $stats.Transfer}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="ui center aligned">{{$id}}</td>
|
|
|
|
|
<td class="ui center aligned">{{$stats.Name}}</td>
|
|
|
|
|
<td class="ui center aligned">{{index $stats.ServerName $innerId}}</td>
|
|
|
|
|
<td class="ui center aligned">{{$stats.From|tf}}</td>
|
|
|
|
|
<td class="ui center aligned">{{$stats.To|tf}}</td>
|
2021-11-10 20:40:10 -05:00
|
|
|
|
<td class="ui center aligned">{{$stats.Max|bf}}</td>
|
|
|
|
|
<td class="ui center aligned">{{$stats.Min|bf}}</td>
|
|
|
|
|
<td class="ui center aligned">{{(index $stats.NextUpdate $innerId)|sft}}</td>
|
2021-11-06 04:00:08 -04:00
|
|
|
|
<td class="ui center aligned">{{$transfer|bf}}</td>
|
2022-05-30 05:51:11 -04:00
|
|
|
|
<td class="ui center aligned" style="padding: 14px 0px 0px 0px; position: relative;"><div class="thirteen wide column"><div class="ui progress fine"><div class="bar" style="transition-duration: 300ms; min-width: unset; background-color: rgb(10, 148, 242); width: {{Transleft (UintToFloat $transfer) (UintToFloat $stats.Max)}}% !important;"></div><small style="position: absolute; top: 4px; margin-left: -20px;">{{Transleft (UintToFloat $transfer) (UintToFloat $stats.Max)}} %</small></div></div></td>
|
2021-11-06 04:00:08 -04:00
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
{{end}}
|
2021-01-15 11:45:49 -05:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{template "common/footer" .}}
|
|
|
|
|
{{end}}
|