Rename state to severity.

This is a more accurated representation of what it means.

Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
David Calavera 2016-11-23 09:53:38 -08:00
parent 5bed59b2e0
commit 3d127900bf
No known key found for this signature in database
GPG Key ID: DE3D437CCBECE2C4
6 changed files with 11 additions and 11 deletions

View File

@ -46,7 +46,7 @@ Create a new incident using Hugo with a command like this:
hugo -s site new -k incidents incidents/oh-no-something-went-wrong.md
```
Hugo will create a new Markdown file for you with title and date based on the file name and a few predefined settings in the header. To learn more about the different states and report, you can see more detailed examples in `site/archetypes/incidents.md`.
Hugo will create a new Markdown file for you with title and date based on the file name and a few predefined settings in the header. To learn more about the different severities and report, you can see more detailed examples in `site/archetypes/incidents.md`.
After explaining the current situation in the incident, you can just push the file to GitHub. Netlify will deploy the indicent announcement for you in a matter of seconds.

View File

@ -5,16 +5,16 @@
# when running `hugo new incidents/new-incident.md`,
# so we don't have to specify them here.
# state: represents the global state of
# severity: represents the impact of
# your system due to the current incident.
# This is the list of supported states:
# This is the list of supported severities:
#
# - under-maintenance
# - degraded-performance
# - partial-outage
# - major-outage
#
state = "degraded-performance"
severity = "degraded-performance"
# affectedsystem: is a list of systems affected
# by the incident.

View File

@ -7,7 +7,7 @@
{{ $incidents := where .Site.Pages.ByDate.Reverse "Section" "incidents" }}
{{ $active := where $incidents "Params.resolved" "!=" true }}
{{ $major := where $active "Params.state" "major-outage" }}
{{ $major := where $active "Params.severity" "major-outage" }}
<html>
<head>

View File

@ -6,9 +6,9 @@
<div class="incident-description">
{{- .Content -}}
</div>
{{- $alert := index .Site.Data.states.alerts .Params.state -}}
{{- $alert := index .Site.Data.severity.alerts .Params.severity -}}
<p class="incident-status color-{{ $alert }}">
{{ index .Site.Data.states.descriptions .Params.state }}
{{ index .Site.Data.severity.descriptions .Params.severity }}
</p>
</div>

View File

@ -1,5 +1,5 @@
{{ $okAlert := index .content.Site.Data.states.alerts "ok"}}
{{ $okDesc := index .content.Site.Data.states.descriptions "ok" }}
{{ $okAlert := index .content.Site.Data.severity.alerts "ok"}}
{{ $okDesc := index .content.Site.Data.severity.descriptions "ok" }}
{{ with .content.Site.Params.systems }}
<div class="systems">
@ -12,8 +12,8 @@
{{ if $.incidents }}
{{ range $.incidents }}
{{ if in .Params.affectedsystems $name }}
{{ $alert := index .Site.Data.states.alerts .Params.state }}
{{ $desc := index .Site.Data.states.descriptions .Params.state }}
{{ $alert := index .Site.Data.severity.alerts .Params.severity }}
{{ $desc := index .Site.Data.severity.descriptions .Params.severity }}
{{ partial "status-badge" (dict "alert" $alert "description" $desc) }}
{{ else }}
{{ partial "status-badge" (dict "alert" $okAlert "description" $okDesc) }}