Lots of changes to the website
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{{define "content"}}
|
||||
<div class="admin-wrap">
|
||||
<div class="admin-header">
|
||||
<h1>Edit Service Status</h1>
|
||||
<h1>Service Status</h1>
|
||||
<div class="admin-actions">
|
||||
<a href="/admin" class="btn btn-outline">Back</a>
|
||||
<a href="/status" class="btn btn-outline">View Status Page</a>
|
||||
@@ -18,16 +18,46 @@
|
||||
<p class="form-error">{{.Error}}</p>
|
||||
{{end}}
|
||||
|
||||
<p class="page-desc">
|
||||
Edit the raw JSON below. Valid status values: <code>up</code>, <code>degraded</code>,
|
||||
<code>down</code>, <code>unknown</code>.
|
||||
</p>
|
||||
|
||||
{{if .Page}}
|
||||
<form method="POST" action="/admin/status">
|
||||
<textarea name="json" class="json-editor" rows="30" spellcheck="false">{{.JSON}}</textarea>
|
||||
<table class="hw-table status-editor-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Service</th>
|
||||
<th>Status</th>
|
||||
<th>Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $i, $s := .Page.Services}}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="status-editor-name">{{$s.Name}}</span>
|
||||
{{if $s.Description}}<span class="hw-spec">{{$s.Description}}</span>{{end}}
|
||||
</td>
|
||||
<td>
|
||||
<select name="status_{{$i}}" class="status-select status-select-{{$s.Status}}">
|
||||
<option value="up" {{if eq $s.Status "up"}}selected{{end}}>up</option>
|
||||
<option value="degraded" {{if eq $s.Status "degraded"}}selected{{end}}>degraded</option>
|
||||
<option value="down" {{if eq $s.Status "down"}}selected{{end}}>down</option>
|
||||
<option value="unknown" {{if eq $s.Status "unknown"}}selected{{end}}>unknown</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="note_{{$i}}" value="{{$s.Note}}" placeholder="Optional note…" class="status-note-input">
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="editor-footer">
|
||||
<button type="submit" class="btn">Save</button>
|
||||
{{if .Page.LastChecked}}
|
||||
<span class="status-last-checked">Last auto-checked: {{.Page.LastChecked.Format "2006-01-02 15:04 UTC"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
</form>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user