mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +01:00
* UI: Move section navigation to sidebar * Scroll active nav link into view * Move CTAs to top right * Server Settings: Make Policies first page * Responsive table fixes * Spacing fixes * Add breadcrumb samples * store settings fixes * payment request fixes * updates pull payment title * adds invoice detail fix * updates server settings breadcrumbs + copy fix * Don't open Server Settings on Plugins page * Add breadcrumbs to pull payment views * adds breadcrumbs to account * server and store breadcrumb fixes * fixes access tokens * Fix payment processor breadcrumbs * fixes webhook 404 * Final touches * Fix test * Add breadcrumb for email rules page * Design system updates --------- Co-authored-by: dstrukt <gfxdsign@gmail.com>
79 lines
4 KiB
Text
79 lines
4 KiB
Text
@using BTCPayServer.Abstractions.Models
|
|
@using BTCPayServer.Client
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@model WebhooksViewModel
|
|
@{
|
|
ViewData.SetActivePage(StoreNavPages.Webhooks, "Webhooks", Context.GetStoreData().Id);
|
|
}
|
|
|
|
|
|
<div class="sticky-header">
|
|
<h2>@ViewData["Title"]</h2>
|
|
<a id="CreateWebhook" asp-action="NewWebhook" class="btn btn-primary" role="button" asp-route-storeId="@Context.GetRouteValue("storeId")" permission="@Policies.CanModifyStoreSettings">
|
|
Create Webhook
|
|
</a>
|
|
</div>
|
|
<partial name="_StatusMessage" />
|
|
<p>Webhooks allow BTCPay Server to send HTTP events related to your store to another server.</p>
|
|
|
|
<div class="row">
|
|
<div class="col-xl-8 col-xxl-constrain">
|
|
@if (Model.Webhooks.Any())
|
|
{
|
|
<div class="table-responsive-md">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Status</th>
|
|
<th>Url</th>
|
|
<th class="actions-col" permission="@Policies.CanModifyStoreSettings">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var wh in Model.Webhooks)
|
|
{
|
|
<tr>
|
|
<td class="align-baseline">
|
|
@if (wh.LastDeliverySuccessful)
|
|
{
|
|
<span id="delivery-status-icon"
|
|
data-bs-toggle="tooltip"
|
|
title="@(wh.LastDeliveryTimeStamp == null ? "No deliveries for this webhook yet" : "Last delivery " + @wh.LastDeliveryTimeStamp?.ToTimeAgo())">
|
|
<vc:icon symbol="checkmark" css-class="text-success" />
|
|
</span>
|
|
}
|
|
else
|
|
{
|
|
<span 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>">
|
|
<vc:icon symbol="cross" css-class="text-danger" />
|
|
</span>
|
|
}
|
|
</td>
|
|
<td class="d-block text-break">@wh.Url</td>
|
|
<td class="actions-col text-md-nowrap" permission="@Policies.CanModifyStoreSettings">
|
|
<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>
|
|
</div>
|
|
<partial name="_Confirm" model="@(new ConfirmModel("Delete Webhook", "This webhook will be removed from this store.", "Delete"))" permission="@Policies.CanModifyStoreSettings" />
|
|
}
|
|
else
|
|
{
|
|
<p class="text-secondary mt-3">
|
|
There are no webhooks yet.
|
|
</p>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
@section PageFootContent {
|
|
<partial name="_ValidationScriptsPartial" />
|
|
}
|