blob: d75a0718ceb8db594b266c1a252bca19b87c6749 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
{{ partial "meta" . }}
{{ $incidents := where .Site.RegularPages "Params.section" "issue" }}
{{ $active := where $incidents "Params.resolved" "=" false }}
{{ $isNotice := where $active "Params.severity" "=" "notice" }}
{{ $isDisrupted := where $active "Params.severity" "=" "disrupted" }}
{{ $isDown := where $active "Params.severity" "=" "down" }}
<body class="status-homepage status-{{ if $isDown }}down{{ else }}{{ if $isDisrupted}}disrupted{{ else }}{{ if $isNotice }}notice{{ else }}ok{{ end }}{{ end }}{{ end }} {{ if not .Site.Params.alwaysKeepBrandColor }}change-header-color{{ end }}">
{{ partial "header" . }}
<!-- Main -->
<div class="contain">
<noscript>
<p class="error">Uh oh! It looks like you have disabled JavaScript. Please <a href="//enable-javascript.com">enable scripting</a> to enhance your experience on this website.</p>
<div class="padding"></div>
</noscript>
<!-- Main info -->
<div class="summary">
<strong>
{{ if $isDown }}
Experiencing major issues
{{ else }}
{{ if $isDisrupted }}
Experiencing disruptions
{{ else }}
{{ if $isNotice }}
Please read announcement
{{ else }}
All systems operational
{{ end }}{{ end }}{{ end }}
</strong>
<span class="summary__date" onclick="location.reload()"></span>
</div>
{{ if $active }}
<div class="announcement-box">
{{ range $active }}
<div class="padding">
<p><strong>{{ .Title }}</strong></p>
{{ .Content | safeHTML | truncate 500 "…" }}
<p><a href="{{ .Permalink }}">Continue reading</a></p>
</div>
{{ else }}{{ end }}
</div>
{{ end }}
{{ if .Site.Params.autoRefresh }}
<div class="faded right">
<small><em>We will try to refresh every 5 minutes</em></small>
</div>
<div class="padding-s"></div>
{{ else }}
<div class="padding"></div>
{{ end }}
<!-- Individual info -->
<div class="components">
{{ $systems := .Site.Params.systems }}
{{ range $index, $systems }}
{{ $activeComponentIssues := where $active "Params.affected" "intersect" (slice .name) }}
{{ $thisIsNotice := where $activeComponentIssues "Params.severity" "=" "notice" }}
{{ $thisIsDisrupted := where $activeComponentIssues "Params.severity" "=" "disrupted" }}
{{ $thisIsDown := where $activeComponentIssues "Params.severity" "=" "down" }}
<div class="component" data-status="{{ if $thisIsDown }}down{{ else }}{{ if $thisIsDisrupted }}disrupted{{ else }}{{ if $thisIsNotice }}notice{{ else }}ok{{ end }}{{ end }}{{ end }}">
{{ $this := .name }}
{{ .name }}
{{ with .description }}
<span class="description">
<span class="faded">(?)</span>
<span class="description__text">
{{ . }}
</span>
</span>
{{ end }}
<span class="component-status">
{{ if $thisIsDown }}
Down
{{ else }}
{{ if $thisIsDisrupted }}
Disrupted
{{ else }}
{{ if $thisIsNotice }}
Maintenance
{{ else }}
Operational
{{ end }}{{ end }}{{ end }}
</span>
{{ with .partial }}
<div>
{{ partial . . }}
</div>
{{ end }}
</div>
{{ end }}
</div>
{{ if .Site.Params.enableCustomHTML }}
{{ partial "custom/homepage-summary" . }}
{{ end }}
<!-- End main -->
</div>
{{ if .Site.Params.customTabs }}
<div class="tabs">
<div class="contain tabs--inner">
<a href="/#incidents" class="tab tab--current">
Incidents
</a>
{{ range .Site.Params.customTabs }}
<a href="{{ .link }}" class="tab tab--other">
{{ .name }}
</a>
{{ end }}
</div>
</div>
{{ else }}
<div class="contain">
<h2 class="center">Incident history</h2>
<hr>
</div>
{{ end }}
<div class="contain" id="incidents">
<div class="padding"></div>
{{ if not $incidents }}
<div class="padding"></div>
<h3>Is it the calm before the storm?</h3>
<p>This status page has no logged incidents. This may be because the status page owner (or owners) have recently set up their status page, have had no downtime, or have not logged any downtime.</p>
<div class="padding"></div>
<div class="padding"></div>
<div class="padding"></div>
{{ else }}
{{ $paginator := .Paginate $incidents .Site.Params.incidentPostsPerPage }}
{{ range $paginator.Pages }}
{{ .Render "issue" }}
{{ end }}
<!-- If there are more than 2 pages, show pagination -->
{{ if gt $paginator.TotalPages 1 }}
<hr>
<div class="center">
{{ if $paginator.HasPrev }}
<a href="{{ $paginator.Prev.URL }}#incidents">
⭠
Previuos
</a>
{{ else }}
<span class="faded">
⭠
Previuos
</span>
{{ end }}
{{ $paginator.PageNumber }}
/
{{ $paginator.TotalPages }}
{{ if $paginator.HasNext }}
<a href="{{ $paginator.Next.URL }}#incidents">
Next
⭢
</a>
{{ else }}
<span class="faded">
Next
⭢
</span>
{{ end }}
</div>
{{ end }}
{{ end }}
</div>
{{ partial "js" . }}
{{ partial "footer" . }}
</body>
</html>
|