Use one name for each thing the UI shows (closes #399)
check / check (push) Successful in 3m21s
check / check (push) Successful in 3m21s
The UI gave one thing several names. The `database` type is now Archive in the type list, on its badge and on the edit page, and its settings read "Archive expiry" and "Archive rotation" everywhere. The retry field is "Delivery attempts", with help text, errors and the target list saying it counts every attempt; a stored 0 shows as one attempt. The target list uses one capitalisation. The navbar says "Sign out", the sign-in page "Sign in", and the resubmit notice "webhook" instead of "source". The README follows. Stored values, their meaning, routes and form field names are unchanged. Model: opus-5-5
This commit was merged in pull request #491.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{{template "base" .}}
|
||||
|
||||
{{define "title"}}Login - Webhooker{{end}}
|
||||
{{define "title"}}Sign in - Webhooker{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<div class="min-h-screen flex items-center justify-center py-12 px-4">
|
||||
@@ -52,7 +52,7 @@
|
||||
>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn-primary w-full py-3">Sign In</button>
|
||||
<button type="submit" class="btn-primary w-full py-3">Sign in</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{{if .CSRFToken}}
|
||||
<form method="POST" action="/pages/logout" class="inline">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
||||
<button type="submit" class="btn-secondary">Logout</button>
|
||||
<button type="submit" class="btn-secondary">Sign out</button>
|
||||
</form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -49,7 +49,7 @@
|
||||
{{if .CSRFToken}}
|
||||
<form method="POST" action="/pages/logout">
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
||||
<button type="submit" class="btn-secondary w-full">Logout</button>
|
||||
<button type="submit" class="btn-secondary w-full">Sign out</button>
|
||||
</form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
<select x-ref="type" aria-label="Target type" class="input text-sm p-2 flex-1">
|
||||
<option value="http">HTTP</option>
|
||||
<option value="slack">Slack</option>
|
||||
<option value="database">Database</option>
|
||||
<option value="database">Archive</option>
|
||||
<option value="log">Log</option>
|
||||
</select>
|
||||
<button type="button" @click="next" class="btn-primary text-sm">Next</button>
|
||||
@@ -182,10 +182,10 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex gap-2 items-center">
|
||||
<label class="text-sm text-gray-700">Max retries:</label>
|
||||
<label class="text-sm text-gray-700">Delivery attempts:</label>
|
||||
<input type="number" name="max_retries" :value="maxRetries" placeholder="0" min="0" max="20" class="input text-sm w-24">
|
||||
</div>
|
||||
<p class="text-xs text-gray-500 mt-1">This is the total number of delivery attempts, not retries on top of the first: a value of 3 makes three attempts in all. 0 means a single attempt with no retries and no circuit breaker.</p>
|
||||
<p class="text-xs text-gray-500 mt-1">How many times each delivery is attempted in all, the first attempt included. 0 means a single attempt with no retries and no circuit breaker.</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -198,10 +198,10 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex gap-2 items-center">
|
||||
<label class="text-sm text-gray-700">Max retries:</label>
|
||||
<label class="text-sm text-gray-700">Delivery attempts:</label>
|
||||
<input type="number" name="max_retries" :value="maxRetries" placeholder="0" min="0" max="20" class="input text-sm w-24">
|
||||
</div>
|
||||
<p class="text-xs text-gray-500 mt-1">This is the total number of delivery attempts, not retries on top of the first: a value of 3 makes three attempts in all. 0 means a single attempt with no retries and no circuit breaker.</p>
|
||||
<p class="text-xs text-gray-500 mt-1">How many times each delivery is attempted in all, the first attempt included. 0 means a single attempt with no retries and no circuit breaker.</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -251,7 +251,7 @@
|
||||
<div class="flex flex-wrap items-center justify-between gap-2 mb-1">
|
||||
<span class="text-sm font-medium text-gray-900">{{.Name}}</span>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<span class="badge-info">{{.Type}}</span>
|
||||
<span class="badge-info">{{if eq .Type "database"}}archive{{else}}{{.Type}}{{end}}</span>
|
||||
{{if .Active}}
|
||||
<span class="badge-success">Active</span>
|
||||
{{else}}
|
||||
@@ -275,7 +275,7 @@
|
||||
</div>
|
||||
{{with .Paused}}
|
||||
<div class="text-xs text-yellow-600 mt-1">
|
||||
<span class="font-medium">Deliveries Paused:</span>
|
||||
<span class="font-medium">Deliveries paused:</span>
|
||||
<span>{{if .Until}}after repeated failures, until {{.Until}} ({{.Relative}}), then one waiting delivery is sent to test the target while the others wait at least one more cooldown{{else}}held while one delivery tests whether the target has recovered{{end}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -287,17 +287,17 @@
|
||||
{{end}}
|
||||
{{with .Archive}}
|
||||
<div class="text-xs text-gray-500 mt-1">
|
||||
<span class="font-medium text-gray-700">Archive File:</span>
|
||||
<span class="font-medium text-gray-700">Archive file:</span>
|
||||
<span class="break-all">{{.Name}}</span>
|
||||
{{with .Note}}<span>({{.}})</span>{{end}}
|
||||
</div>
|
||||
{{if .Files}}
|
||||
<div class="text-xs text-gray-500 mt-1">
|
||||
<span class="font-medium text-gray-700">Archive Size:</span>
|
||||
<span class="font-medium text-gray-700">Archive size:</span>
|
||||
<span>{{.Size}}{{if gt .Files 1}} in {{.Files}} files{{end}}</span>
|
||||
</div>
|
||||
<div class="text-xs text-gray-500 mt-1">
|
||||
<span class="font-medium text-gray-700">Last Written:</span>
|
||||
<span class="font-medium text-gray-700">Last written:</span>
|
||||
<span title="{{.WrittenUTC}}">{{.Written}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
<input type="checkbox" name="archive" value="on"{{if .Form.Archive}} checked{{end}} autocomplete="off" @change="toggle" class="h-4 w-4">
|
||||
Archive
|
||||
</label>
|
||||
<p class="text-xs text-gray-500 mt-1">When checked, the webhook is created with a database target that keeps a copy of every event.</p>
|
||||
<p class="text-xs text-gray-500 mt-1">When checked, the webhook is created with an archive target that keeps a copy of every event.</p>
|
||||
<div x-show="open" x-cloak class="mt-3">
|
||||
<label for="archive_expiry" class="label">Archive pruning</label>
|
||||
<label for="archive_expiry" class="label">Archive expiry</label>
|
||||
<select id="archive_expiry" name="archive_expiry" class="input">
|
||||
{{range .ArchiveExpiryChoices}}
|
||||
<option value="{{.Value}}"{{if .Selected}} selected{{end}}>{{.Label}}</option>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="mb-6">
|
||||
<a href="/hook/{{.Webhook.ID}}" class="btn-small">← Back to {{.Webhook.Name}}</a>
|
||||
<h1 class="text-2xl font-medium text-gray-900 mt-2">Edit Target</h1>
|
||||
<p class="text-sm text-gray-500 mt-1">Type: {{.Target.Type}}. A target's type cannot be changed; create a new target to deliver a different way.</p>
|
||||
<p class="text-sm text-gray-500 mt-1">Type: {{if eq .Target.Type "database"}}archive{{else}}{{.Target.Type}}{{end}}. A target's type cannot be changed; create a new target to deliver a different way.</p>
|
||||
</div>
|
||||
|
||||
<div class="card p-6">
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
{{if eq .Target.Type "database"}}
|
||||
<div class="form-group">
|
||||
<label for="expiry" class="label">Archive Expiry</label>
|
||||
<label for="expiry" class="label">Archive expiry</label>
|
||||
<select id="expiry" name="expiry" class="input">
|
||||
{{range .ArchiveExpiryChoices}}
|
||||
<option value="{{.Value}}"{{if .Selected}} selected{{end}}>{{.Label}}</option>
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="rotation" class="label">Archive Rotation</label>
|
||||
<label for="rotation" class="label">Archive rotation</label>
|
||||
<select id="rotation" name="rotation" class="input">
|
||||
{{range .ArchiveRotationChoices}}
|
||||
<option value="{{.Value}}"{{if .Selected}} selected{{end}}>{{.Label}}</option>
|
||||
@@ -81,9 +81,9 @@
|
||||
|
||||
{{if or (eq .Target.Type "http") (eq .Target.Type "slack")}}
|
||||
<div class="form-group">
|
||||
<label for="max_retries" class="label">Max retries</label>
|
||||
<label for="max_retries" class="label">Delivery attempts</label>
|
||||
<input type="number" id="max_retries" name="max_retries" value="{{.TargetForm.MaxRetries}}" min="0" max="20" class="input">
|
||||
<p class="text-xs text-gray-500 mt-1">This is the total number of delivery attempts, not retries on top of the first: a value of 3 makes three attempts in all. 0 means a single attempt with no retries and no circuit breaker.</p>
|
||||
<p class="text-xs text-gray-500 mt-1">How many times each delivery is attempted in all, the first attempt included. 0 means a single attempt with no retries and no circuit breaker.</p>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user