diff options
-rw-r--r-- | exampleSite/config.yml | 21 | ||||
-rw-r--r-- | exampleSite/content/issues/2018-04-13-unavailable-guilds-connection-issues.md | 1 | ||||
-rw-r--r-- | i18n/de.yaml | 18 | ||||
-rw-r--r-- | i18n/en.yaml | 12 | ||||
-rw-r--r-- | i18n/lt.yaml | 14 | ||||
-rw-r--r-- | layouts/_default/list.html | 28 | ||||
-rw-r--r-- | layouts/index.svg | 2 |
7 files changed, 84 insertions, 12 deletions
diff --git a/exampleSite/config.yml b/exampleSite/config.yml index b384501..afb644b 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -219,16 +219,17 @@ params: # name: Name # link: https://example.com - # Auto refresh the page - # every ~5 min + # Disable complex server-side + # calculations that may impact + # your build performance # - # This does nothing but - # refresh the page; it - # does not send alerts! + # Disables math calculations + # for average downtime on + # systems ("/affected/") pages # - # Default: true + # Default: false # BOOLEAN; `true`, `false` - autoRefresh: true + disableComplexCalculations: false # Incident posts shown # in one page @@ -316,3 +317,9 @@ outputs: - html - json - rss + - svg + +outputFormats: + svg: + isPlainText: true + mediaType: image/svg+xml
\ No newline at end of file diff --git a/exampleSite/content/issues/2018-04-13-unavailable-guilds-connection-issues.md b/exampleSite/content/issues/2018-04-13-unavailable-guilds-connection-issues.md index a5213d1..170bd1f 100644 --- a/exampleSite/content/issues/2018-04-13-unavailable-guilds-connection-issues.md +++ b/exampleSite/content/issues/2018-04-13-unavailable-guilds-connection-issues.md @@ -7,6 +7,7 @@ resolvedWhen: 2018-04-13 17:30:00 severity: down affected: - API + - Media Proxy section: issue --- diff --git a/i18n/de.yaml b/i18n/de.yaml index 15a6153..7ff9a57 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -1,5 +1,5 @@ # German language file for cState -# Version 3.0 +# Version 4.1 - id: languageCode translation: de @@ -125,7 +125,23 @@ ## ## v3 ## + - id: entries translation: Einträge - id: newestToOldest translation: von alt nach neu + +## +## v4 +## +- id: notFoundAffected + translation: Es sieht so aus als würde dieses Dokument nicht existieren, oder es hatte noch nie einen aufgezeichneten Ausfall. + +## +## v4.1 +## + +- id: averageSystemsDowntime + translation: Zurzeit, basierend auf Durchschnittsdaten, sieht es so aus, als ob dieses System für ungefähr +- id: averageSystemsDowntimeSecondPart + translation: Minuten ausfällt.
\ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml index e417040..2826eca 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,5 +1,6 @@ # English language file for cState -# Version 3.0 +# Official +# Version 4.1 - id: languageCode translation: en @@ -137,3 +138,12 @@ ## - id: notFoundAffected translation: It looks like this system either does not exist or has never had any recorded downtime. + +## +## v4.1 +## + +- id: averageSystemsDowntime + translation: Recently, based on averages data, it looks like this system has gone down for about +- id: averageSystemsDowntimeSecondPart + translation: minutes at a time. diff --git a/i18n/lt.yaml b/i18n/lt.yaml index bee5e28..5c1368d 100644 --- a/i18n/lt.yaml +++ b/i18n/lt.yaml @@ -1,5 +1,6 @@ # Lithuanian language file for cState -# Version 3.0 +# Official +# Version 4.1 - id: languageCode translation: en @@ -136,4 +137,13 @@ ## v4 ## - id: notFoundAffected - translation: Ši sistema neturi nė vieno įrašo. Arba neegzistuoja, arba nė vieną kartą nebuvo sutrukdyta jos veikla.
\ No newline at end of file + translation: Ši sistema neturi nė vieno įrašo. Arba neegzistuoja, arba nė vieną kartą nebuvo sutrukdyta jos veikla. + +## +## v4.1 +## + +- id: averageSystemsDowntime + translation: Pastaruoju metu, regis, šis komponentas sutrikimų metu neveikia apie +- id: averageSystemsDowntimeSecondPart + translation: min. diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b8c14c6..8d80798 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -18,6 +18,34 @@ {{ end }} {{ end }} + + <!-- Average downtime --> + {{ if not .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 }} + + {{ T "averageSystemsDowntime" }} + + {{ div ($.Scratch.Get "counter") (len $resolved) }} + {{ T "averageSystemsDowntimeSecondPart" }} + {{ end }} + </em> + </p> + {{ end }} + + <small class="faded">{{ len .Pages }} {{ T "entries" }}, {{ T "newestToOldest" }}</small> <div class="padding"></div> diff --git a/layouts/index.svg b/layouts/index.svg index 4b235e0..dbd6483 100644 --- a/layouts/index.svg +++ b/layouts/index.svg @@ -33,7 +33,7 @@ </clipPath> <g clip-path="url(#a)" fill="#fff" > <rect x="0" y="0" width="100%" height="100%" fill="#555" /> - <rect x="{{ $right_box_padding }}ex" y="0" height="100%" width="100%" fill="#{{ $status_color }}"/> + <rect x="{{ $right_box_padding }}ex" y="0" height="100%" width="100%" fill="{{ $status_color }}"/> <rect x="0" y="0" width="100%" height="100%" fill="url(#b)"/> <text x="{{ $left_text_padding }}ex" y="15" fill="#010101" fill-opacity=".3">{{ $shield_prefix }}</text> |