2022-12-13 08:53:08 +08:00
|
|
|
<div class="web-hooks-listing">
|
|
|
|
<p>{{i18n "admin.web_hooks.instruction"}}</p>
|
|
|
|
|
|
|
|
<div class="new-webhook">
|
|
|
|
<LinkTo
|
|
|
|
@route="adminWebHooks.edit"
|
|
|
|
@model="new"
|
|
|
|
class="btn btn-default admin-webhooks__new-button"
|
|
|
|
>
|
|
|
|
{{d-icon "plus"}}
|
|
|
|
{{i18n "admin.web_hooks.new"}}
|
|
|
|
</LinkTo>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if this.model}}
|
|
|
|
<LoadMore @selector=".web-hooks tr" @action={{this.loadMore}}>
|
|
|
|
<table class="web-hooks grid">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>{{i18n "admin.web_hooks.delivery_status.title"}}</th>
|
|
|
|
<th>{{i18n "admin.web_hooks.payload_url"}}</th>
|
|
|
|
<th>{{i18n "admin.web_hooks.description_label"}}</th>
|
|
|
|
<th>{{i18n "admin.web_hooks.controls"}}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-12-13 20:32:34 +08:00
|
|
|
{{#each this.model as |webhook|}}
|
2022-12-13 08:53:08 +08:00
|
|
|
<tr>
|
|
|
|
<td class="delivery-status">
|
2022-12-13 20:32:34 +08:00
|
|
|
<LinkTo @route="adminWebHooks.show" @model={{webhook}}>
|
|
|
|
<WebhookStatus
|
2022-12-13 08:53:08 +08:00
|
|
|
@deliveryStatuses={{this.deliveryStatuses}}
|
2022-12-13 20:32:34 +08:00
|
|
|
@webhook={{webhook}}
|
2022-12-13 08:53:08 +08:00
|
|
|
/>
|
|
|
|
</LinkTo>
|
|
|
|
</td>
|
|
|
|
<td class="payload-url">
|
2022-12-13 20:32:34 +08:00
|
|
|
<LinkTo @route="adminWebHooks.edit" @model={{webhook}}>
|
|
|
|
{{webhook.payload_url}}
|
|
|
|
</LinkTo>
|
2022-12-13 08:53:08 +08:00
|
|
|
</td>
|
2022-12-13 20:32:34 +08:00
|
|
|
<td class="description">{{webhook.description}}</td>
|
2022-12-13 08:53:08 +08:00
|
|
|
<td class="controls">
|
|
|
|
<LinkTo
|
|
|
|
@route="adminWebHooks.edit"
|
2022-12-13 20:32:34 +08:00
|
|
|
@model={{webhook}}
|
2022-12-13 08:53:08 +08:00
|
|
|
class="btn btn-default no-text"
|
|
|
|
title={{i18n "admin.web_hooks.edit"}}
|
|
|
|
>
|
|
|
|
{{d-icon "far-edit"}}
|
|
|
|
</LinkTo>
|
|
|
|
|
|
|
|
<DButton
|
2023-10-26 20:24:47 +08:00
|
|
|
@action={{fn this.destroyWebhook webhook}}
|
2022-12-13 08:53:08 +08:00
|
|
|
@icon="times"
|
|
|
|
@title="delete"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="destroy btn-danger"
|
2022-12-13 08:53:08 +08:00
|
|
|
/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
|
|
|
|
</LoadMore>
|
|
|
|
{{else}}
|
|
|
|
<p>{{i18n "admin.web_hooks.none"}}</p>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|