mirror of
https://github.com/discourse/discourse.git
synced 2024-12-09 13:03:43 +08:00
784c04ea81
Background: In order to redrive failed webhook events, an operator has to go through and click on each. This PR is adding a mechanism to retry all failed events to help resolve issues quickly once the underlying failure has been resolved. What is the change?: Previously, we had to redeliver each webhook event. This merge is adding a 'Redeliver Failed' button next to the webhook event filter to redeliver all failed events. If there is no failed webhook events to redeliver, 'Redeliver Failed' gets disabled. If you click it, a window pops up to confirm the operator. Failed webhook events will be added to the queue and webhook event list will show the redelivering progress. Every minute, a job will be ran to go through 20 events to redeliver. Every hour, a job will cleanup the redelivering events which have been stored more than 8 hours.
79 lines
2.2 KiB
Handlebars
79 lines
2.2 KiB
Handlebars
<div
|
|
class="web-hook-events-listing"
|
|
{{did-insert this.subscribe}}
|
|
{{did-update this.reloadEvents @status}}
|
|
{{will-destroy this.unsubscribe}}
|
|
>
|
|
<div class="web-hook-events-actions">
|
|
<ComboBox
|
|
@value={{@status}}
|
|
@content={{this.statuses}}
|
|
@onChange={{fn (mut @status)}}
|
|
@options={{hash none="admin.web_hooks.events.filter_status.all"}}
|
|
class="delivery-status-filters"
|
|
/>
|
|
|
|
<DButton
|
|
@icon="sync"
|
|
@label="admin.web_hooks.events.redeliver_failed"
|
|
@action={{this.redeliverFailed}}
|
|
@disabled={{not this.redeliverEnabled}}
|
|
/>
|
|
|
|
<DButton
|
|
@icon="paper-plane"
|
|
@label="admin.web_hooks.events.ping"
|
|
@action={{this.ping}}
|
|
@disabled={{not this.pingEnabled}}
|
|
class="webhook-events__ping-button"
|
|
/>
|
|
</div>
|
|
|
|
{{#if this.events}}
|
|
<LoadMore @selector=".web-hook-events li" @action={{this.loadMore}}>
|
|
<div class="web-hook-events content-list">
|
|
<div class="heading-container">
|
|
<div class="col heading first status">
|
|
{{i18n "admin.web_hooks.events.status"}}
|
|
</div>
|
|
<div class="col heading event-id">
|
|
{{i18n "admin.web_hooks.events.event_id"}}
|
|
</div>
|
|
<div class="col heading timestamp">
|
|
{{i18n "admin.web_hooks.events.timestamp"}}
|
|
</div>
|
|
<div class="col heading completion">
|
|
{{i18n "admin.web_hooks.events.completion"}}
|
|
</div>
|
|
<div class="col heading actions">
|
|
{{i18n "admin.web_hooks.events.actions"}}
|
|
</div>
|
|
</div>
|
|
|
|
{{#if this.hasIncoming}}
|
|
<a
|
|
href
|
|
tabindex="0"
|
|
{{on "click" this.showInserted}}
|
|
class="alert alert-info clickable"
|
|
>
|
|
<CountI18n
|
|
@key="admin.web_hooks.events.incoming"
|
|
@count={{this.incomingCount}}
|
|
/>
|
|
</a>
|
|
{{/if}}
|
|
|
|
<ul>
|
|
{{#each this.events as |event|}}
|
|
<WebhookEvent @event={{event}} />
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
|
|
<ConditionalLoadingSpinner @condition={{this.events.loadingMore}} />
|
|
</LoadMore>
|
|
{{else}}
|
|
<p>{{i18n "admin.web_hooks.events.none"}}</p>
|
|
{{/if}}
|
|
</div> |