From 3d127900bf67012305f226110322805ba31e1fb3 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Wed, 23 Nov 2016 09:53:38 -0800 Subject: [PATCH] Rename state to severity. This is a more accurated representation of what it means. Signed-off-by: David Calavera --- README.md | 2 +- site/archetypes/incidents.md | 6 +++--- site/data/{states.toml => severity.toml} | 0 site/layouts/partials/header.html | 2 +- site/layouts/partials/incident.html | 4 ++-- site/layouts/partials/systems.html | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) rename site/data/{states.toml => severity.toml} (100%) diff --git a/README.md b/README.md index 0e152d6..982fb25 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/site/archetypes/incidents.md b/site/archetypes/incidents.md index 719b635..b15029b 100644 --- a/site/archetypes/incidents.md +++ b/site/archetypes/incidents.md @@ -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. diff --git a/site/data/states.toml b/site/data/severity.toml similarity index 100% rename from site/data/states.toml rename to site/data/severity.toml diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html index 6da62f1..bd978a1 100644 --- a/site/layouts/partials/header.html +++ b/site/layouts/partials/header.html @@ -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" }} diff --git a/site/layouts/partials/incident.html b/site/layouts/partials/incident.html index 2abe1d9..3879b84 100644 --- a/site/layouts/partials/incident.html +++ b/site/layouts/partials/incident.html @@ -6,9 +6,9 @@
{{- .Content -}}
- {{- $alert := index .Site.Data.states.alerts .Params.state -}} + {{- $alert := index .Site.Data.severity.alerts .Params.severity -}}

- {{ index .Site.Data.states.descriptions .Params.state }} + {{ index .Site.Data.severity.descriptions .Params.severity }}

diff --git a/site/layouts/partials/systems.html b/site/layouts/partials/systems.html index 36ebffd..662c3a8 100644 --- a/site/layouts/partials/systems.html +++ b/site/layouts/partials/systems.html @@ -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 }}
@@ -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) }}