mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
List webhook URLs (#3034)
Addresses #3000. I limited the width of the URL field and made the full URL visible with a tooltip. The UI could probably use some sprucing up.
This commit is contained in:
parent
6b96f9b446
commit
24b7705094
3 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,7 @@ namespace BTCPayServer.Models.StoreViewModels
|
|||
Time = s.Timestamp;
|
||||
Type = blob.ReadRequestAs<WebhookEvent>().Type;
|
||||
WebhookId = s.Id;
|
||||
PayloadUrl = s.Webhook?.GetBlob().Url;
|
||||
}
|
||||
public string Id { get; set; }
|
||||
public DateTimeOffset Time { get; set; }
|
||||
|
@ -31,6 +32,7 @@ namespace BTCPayServer.Models.StoreViewModels
|
|||
public string WebhookId { get; set; }
|
||||
public bool Success { get; set; }
|
||||
public string ErrorMessage { get; set; }
|
||||
public string PayloadUrl { get; set; }
|
||||
}
|
||||
public class EditWebhookViewModel
|
||||
{
|
||||
|
|
|
@ -102,6 +102,7 @@ namespace BTCPayServer.Services.Invoices
|
|||
{
|
||||
using var ctx = _applicationDbContextFactory.CreateContext();
|
||||
return await ctx.InvoiceWebhookDeliveries
|
||||
.Include(s => s.Delivery).ThenInclude(s => s.Webhook)
|
||||
.Where(s => s.InvoiceId == invoiceId)
|
||||
.Select(s => s.Delivery)
|
||||
.OrderByDescending(s => s.Timestamp)
|
||||
|
|
|
@ -338,9 +338,14 @@
|
|||
</a>
|
||||
<span class="text-light mx-2">|</span>
|
||||
<span class="small text-muted">@delivery.Type</span>
|
||||
<span class="text-light mx-2">|</span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="d-flex align-items-center">
|
||||
<span class="text-nowrap" data-bs-toggle="tooltip" title="@delivery.PayloadUrl" style="cursor: pointer;">
|
||||
<span class="small text-truncate d-inline-block" style="max-width: 250px;">@delivery.PayloadUrl</span>
|
||||
</span>
|
||||
<span class="text-light mx-2">|</span>
|
||||
<strong class="d-flex align-items-center text-muted small">
|
||||
@delivery.Time.ToBrowserDate()
|
||||
</strong>
|
||||
|
|
Loading…
Add table
Reference in a new issue