{{define "theme-mdui/service"}}
Name | SLA | Details of Last 30 Days | Now |
---|---|---|---|
{{$service.Monitor.Name}} | {{float32f (divU64 $service.TotalUp (addU64 $service.TotalUp $service.TotalDown))}}% | {{range $i,$d := $service.Delay}} {{$percent := (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}} {{if eq $percent 0.0}} favorite_border {{else if ge $percent 95.0}} favorite {{else if ge $percent 80.0}} favorite {{else}} favorite {{end}} {{end}} |
{{$percent := (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}
{{if eq $percent 0.0}}
sentiment_neutral
{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} {{else if ge $percent 95.0}}{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} {{else if ge $percent 80.0}} sentiment_dissatisfied{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} {{else}} sentiment_very_dissatisfied{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} {{end}} |