Added deliveries workspace view to the webhook details workspace (#18175)
* Added deliveries workspace view to the webhook details workspace. * Front-end linting fixes. * rename to unique * update filter value * make delivery feature folder * move delivery workspace view for delivery feature folder * correct details workspace view label and pathname to match name * remove unused alias * use singular form to align naming * remove pagination as the default collection kind already includes this * show icon * remove double registration * add observables for webhook data, add get methods + add jsdocs * align UX with languages * remove hardcoded fake name + make url the link * remove redundant url in table * render status code as tag * use tags for enabled/disabled webhook state to align with users * make the name more explicit * move webhook root to a feature folder * export consts * fix webhook collection pagination * move menu item manifests into root folder * move webhook delivery filering responsibility from repo to workspace view * reorganize * move workspace * fix import * move entity actions * export delivery consts * dot not export const * rename folder * update name * make event feature folder * export consts * move repository files * more clean up * split types * add deprecation warning for a temp method * bring back url to deliveries table --------- Co-authored-by: Mads Rasmussen <madsr@hey.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Umbraco.Cms.Core.Models;
|
||||
using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Persistence.Repositories;
|
||||
|
||||
@@ -8,6 +8,17 @@ public interface IWebhookLogRepository
|
||||
|
||||
Task<PagedModel<WebhookLog>> GetPagedAsync(int skip, int take);
|
||||
|
||||
// TODO (V16): Remove the default implementation on this method.
|
||||
async Task<PagedModel<WebhookLog>> GetPagedAsync(Guid webhookKey, int skip, int take)
|
||||
{
|
||||
// This is very inefficient as the filter/skip/take is in-memory, but it will return the correct data.
|
||||
// As it's only here to avoid a breaking change on the interface that is unlikely to have a custom
|
||||
// implementation, this seems reasonable.
|
||||
PagedModel<WebhookLog> allLogs = await GetPagedAsync(0, int.MaxValue);
|
||||
var logsForId = allLogs.Items.Where(x => x.WebhookKey == webhookKey).ToList();
|
||||
return new PagedModel<WebhookLog>(logsForId.Count, logsForId.Skip(skip).Take(take));
|
||||
}
|
||||
|
||||
Task<IEnumerable<WebhookLog>> GetOlderThanDate(DateTime date);
|
||||
|
||||
Task DeleteByIds(int[] ids);
|
||||
|
||||
Reference in New Issue
Block a user