From 4a968698e45ece04b25f41783298b9b397a191a1 Mon Sep 17 00:00:00 2001
From: Mantas <11616378+mistermantas@users.noreply.github.com>
Date: Thu, 24 Jan 2019 19:23:35 +0200
Subject: cState is now stable on v3.0 - 2019-01-24 (info: #41)
---
layouts/issues/issue.html | 96 +++++++++++++++++++++++++++++++++--------------
1 file changed, 67 insertions(+), 29 deletions(-)
(limited to 'layouts/issues/issue.html')
diff --git a/layouts/issues/issue.html b/layouts/issues/issue.html
index 014a33a..c344f57 100644
--- a/layouts/issues/issue.html
+++ b/layouts/issues/issue.html
@@ -6,43 +6,81 @@
{{ $isDown := where $active "Params.severity" "=" "down" }}
+
+ {{ .Title }}
+
+
+
+ {{ if .Site.Params.dateFormat }}
+ {{ .Date.Format .Site.Params.dateFormat }}
+ {{ else }}
+ {{ .Date.Format "January 2, 2006 at 3:04 PM" }}
+ {{ end }}
+
+
+
+ {{ range .Params.Affected }}
+ {{ . }}
+ {{ end }}
+
+
{{ if .Params.Resolved }}
-
-
- {{ $t := (time .Params.ResolvedWhen) }}
- {{ $timeDiff := (sub $t.Unix .Date.Unix) }}
- {{ $diffInMin := (div $timeDiff 60) }}
-
-
- {{ if lt $timeDiff 60 }}
- ✓ Resolved
+ {{ $t := (time .Params.ResolvedWhen) }}
+ {{ $timeDiff := (sub $t.Unix .Date.Unix) }}
+ {{ $diffInMin := (div $timeDiff 60) }}
+
+
+
+ {{ if lt $timeDiff 60 }}
+
+
+ {{ T "resolved" }} {{ T "inUnderAMinute" }}.
+
+
+ {{ else }}
+ {{ if gt $timeDiff 3600 }}
+
+
+ {{ T "resolvedAfter" }}
+
+ {{ $minutesForCalc := (mod $diffInMin 60) }}
+
+ {{ div (sub $diffInMin $minutesForCalc) 60 }}h
+ {{ $minutesForCalc }}m {{ T "ofDowntime" }}.
+
+
+
+ {{ if .Site.Params.dateFormat }}
+ {{ dateFormat .Site.Params.dateFormat .Params.resolvedWhen }}
+ {{ else }}
+ {{ dateFormat "January 2, 2006 at 3:04 PM" .Params.resolvedWhen }}
+ {{ end }}
+
+
{{ else }}
+
+
+ {{ T "resolvedAfter" }}
- ✓ Resolved after
- {{ if gt $timeDiff 3600 }}
- {{ $minutesForCalc := (mod $diffInMin 60) }}
+ {{ $secsForCalc := (mod $timeDiff 60) }}
- {{ div (sub $diffInMin $minutesForCalc) 60 }}h
- {{ $minutesForCalc }}m of downtime
- {{ else }}
- {{ $secsForCalc := (mod $timeDiff 60) }}
+ {{ div (sub $timeDiff $secsForCalc) 60 }}m
+ {{ T "ofDowntime" }}.
+
- {{ div (sub $timeDiff $secsForCalc) 60 }}m
- of downtime
- {{ end }}
-
+
+ {{ if .Site.Params.dateFormat }}
+ {{ dateFormat .Site.Params.dateFormat .Params.resolvedWhen }}
+ {{ else }}
+ {{ dateFormat "January 2, 2006 at 3:04 PM" .Params.resolvedWhen }}
+ {{ end }}
+
+
{{ end }}
-
+ {{ end }}
{{ else }}
-
Ongoing, services {{ if eq .Params.severity "notice" }}on notice{{ else }}{{ .Params.severity }}{{ end }}
+
{{ T "downtimeOngoing" }}
{{ end }}
-
-
-
- {{ .Date.Format "January 02, 2006 at 3:04 PM" }}
-
{{ .Content }}
--
cgit v1.2.3-70-g09d2