diff --git a/site/i18n.yml b/site/i18n.yml index 0a6c2dfa..d6b0642a 100644 --- a/site/i18n.yml +++ b/site/i18n.yml @@ -16,9 +16,14 @@ pastIncidents: Past Incidents pastIncidentsResolved: Resolved in $MINUTES minuted with $POSTS posts liveStatus: Live Status overallUptime: Overall uptime $UPTIME% +overallUptimeTitle: Overall uptime averageResponseTime: Average response time $TIMEms +averageResponseTimeTitle: Average response sevelDayResponseTime: 7-day response time responseTimeMs: Response time (ms) +up: Up +down: Down +ms: ms loading: Loading navStatus: Status navGitHub: GitHub diff --git a/site/src/components/Incident.svelte b/site/src/components/Incident.svelte index 1b8d92b7..3228ae65 100644 --- a/site/src/components/Incident.svelte +++ b/site/src/components/Incident.svelte @@ -45,38 +45,12 @@ footer { margin-top: 2rem; } - dl { - margin-bottom: 1.5rem; - } - dl dt { - font-weight: bold; - } - dl dd { - margin: 0 0 1rem 0; - } p { margin-top: 0; } h2 { line-height: 1; } - .closed { - background-color: #16a085; - } - .open { - background-color: #c0392b; - } - .closed, - .open { - display: inline-block; - color: #fff; - padding: 0.33rem 0.5rem; - border-radius: 0.2rem; - font-size: 70%; - vertical-align: middle; - margin-top: -0.2rem; - margin-left: 0.5rem; - } .r { text-align: right; } @@ -91,7 +65,7 @@ {config.i18n.incidentDetails} {:else} {incident.title} - + {incident.state === 'closed' ? config.i18n.incidentFixed : config.i18n.incidentOngoing} {/if} diff --git a/site/src/components/Summary.svelte b/site/src/components/Summary.svelte new file mode 100644 index 00000000..d90339ec --- /dev/null +++ b/site/src/components/Summary.svelte @@ -0,0 +1,53 @@ + + + + +
+ {#if loading} + + {:else if summary} +

+ {summary.name} + + {summary.status === 'up' ? config.i18n.up : config.i18n.down} + +

+
+
{config.i18n.overallUptimeTitle}
+
{summary.uptime}%
+
{config.i18n.averageResponseTimeTitle}
+
{summary.time}{config.i18n.ms}
+
+ {/if} +
diff --git a/site/src/routes/history/[number].svelte b/site/src/routes/history/[number].svelte index b33fda06..12438e76 100644 --- a/site/src/routes/history/[number].svelte +++ b/site/src/routes/history/[number].svelte @@ -6,10 +6,12 @@ + diff --git a/site/static/global.css b/site/static/global.css index ef07de08..e1d36325 100644 --- a/site/static/global.css +++ b/site/static/global.css @@ -91,3 +91,32 @@ article.up { section + h2 { margin-top: 2rem; } + +.tag.closed, +.tag.up { + background-color: #16a085; +} +.tag.open, +.tag.down { + background-color: #c0392b; +} +.tag { + display: inline-block; + color: #fff; + padding: 0.33rem 0.5rem; + border-radius: 0.2rem; + font-size: 70%; + vertical-align: middle; + margin-top: -0.2rem; + margin-left: 0.5rem; +} + +dl { + margin-bottom: 1.5rem; +} +dl dt { + font-weight: bold; +} +dl dd { + margin: 0 0 1rem 0; +}