Merge pull request #17 from netlify/subsitute_state_with_severity

Rename state to severity.
This commit is contained in:
David Calavera 2016-11-23 10:01:15 -08:00 committed by GitHub
commit 0a81eb2f9b
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 -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. 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`, # when running `hugo new incidents/new-incident.md`,
# so we don't have to specify them here. # 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. # your system due to the current incident.
# This is the list of supported states: # This is the list of supported severities:
# #
# - under-maintenance # - under-maintenance
# - degraded-performance # - degraded-performance
# - partial-outage # - partial-outage
# - major-outage # - major-outage
# #
state = "degraded-performance" severity = "degraded-performance"
# affectedsystem: is a list of systems affected # affectedsystem: is a list of systems affected
# by the incident. # by the incident.

View File

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

View File

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

View File

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