mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
* Refactor confirm view: separate modal * Add delete confirmation modals for apps and FIDO2 * Add delete confirmation modals for 2FA actions * Add delete confirmation modals for api keys and webhooks * Add delete confirmation modals for stores and store users * Add delete confirmation modals for LND seed and SSH * Add delete confirmation modals for rate rule scripting * Test fixes and improvements * Add delete confirmation modals for dynamic DNS * Add delete confirmation modals for store access tokens * Add confirmation modals for pull payment archiving * Refactor confirm modal code * Add confirmation input, update wording * Update modal styles * Upgrade ChromeDriver * Simplify and unify confirmation input * Test fixes * Fix wording * Add modals for wallet replace and removal
72 lines
2.9 KiB
Text
72 lines
2.9 KiB
Text
@model WebhooksViewModel
|
|
@{
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
ViewData.SetActivePageAndTitle(StoreNavPages.Webhooks, "Webhooks", Context.GetStoreData().StoreName);
|
|
}
|
|
|
|
<div class="d-flex align-items-center justify-content-between mb-3">
|
|
<h4 class="mb-0">@ViewData["PageTitle"]</h4>
|
|
<a id="CreateWebhook" asp-action="NewWebhook" class="btn btn-primary" role="button" asp-route-storeId="@Context.GetRouteValue("storeId")">
|
|
<span class="fa fa-plus"></span>
|
|
Create a new webhook
|
|
</a>
|
|
</div>
|
|
<p>Webhooks allow BTCPay Server to send HTTP events related to your store to another server.</p>
|
|
|
|
@if (Model.Webhooks.Any())
|
|
{
|
|
<table class="table table-hover table-responsive-md">
|
|
<thead>
|
|
<tr>
|
|
<th>Status</th>
|
|
<th>Url</th>
|
|
<th class="text-end">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var wh in Model.Webhooks)
|
|
{
|
|
<tr>
|
|
<td class="align-baseline">
|
|
@if (wh.LastDeliverySuccessful)
|
|
{
|
|
<span
|
|
class="fa fa-check text-success"
|
|
id="delivery-status-icon"
|
|
data-bs-toggle="tooltip"
|
|
title="@(wh.LastDeliveryTimeStamp == null ? "No deliveries for this webhook yet" : "Last delivery " + @wh.LastDeliveryTimeStamp?.ToTimeAgo())"></span>
|
|
}
|
|
else
|
|
{
|
|
<span
|
|
class="fa fa-times text-danger"
|
|
id="delivery-status-icon"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-html="true"
|
|
title="Error: @wh.LastDeliveryErrorMessage. <br/> Delivery last attempted <span id='last-delivery-time'>@wh.LastDeliveryTimeStamp?.ToTimeAgo()</span>"></span>
|
|
}
|
|
</td>
|
|
<td class="d-block text-break">@wh.Url</td>
|
|
<td class="text-end text-md-nowrap">
|
|
<a asp-action="TestWebhook" asp-route-storeId="@Context.GetRouteValue("storeId")" asp-route-webhookId="@wh.Id">Test</a> -
|
|
<a asp-action="ModifyWebhook" asp-route-storeId="@Context.GetRouteValue("storeId")" asp-route-webhookId="@wh.Id">Modify</a> -
|
|
<a asp-action="DeleteWebhook" asp-route-storeId="@Context.GetRouteValue("storeId")" asp-route-webhookId="@wh.Id" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-confirm-input="DELETE">Delete</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
<partial name="_Confirm" model="@(new ConfirmModel("Delete webhook", "This webhook will be removed from this store.", "Delete"))" />
|
|
}
|
|
else
|
|
{
|
|
<p class="text-secondary mt-3">
|
|
There are no webhooks yet.
|
|
</p>
|
|
}
|
|
|
|
@section PageFootContent {
|
|
<partial name="_ValidationScriptsPartial" />
|
|
}
|
|
|