webhook queue items panel

This commit is contained in:
Yuri Kuznetsov
2025-05-16 15:33:27 +03:00
parent 75c71d4b28
commit 72794768af
7 changed files with 40 additions and 5 deletions

View File

@@ -31,11 +31,10 @@ namespace Espo\Controllers;
use Espo\Core\Api\Request;
use Espo\Core\Api\Response;
use Espo\Core\Controllers\RecordBase;
use Espo\Core\Controllers\Record;
use stdClass;
class Webhook extends RecordBase
class Webhook extends Record
{
protected function checkAccess(): bool
{

View File

@@ -12,6 +12,7 @@
"secretKey": "Secret Key"
},
"links": {
"user": "User"
"user": "User",
"queueItems": "Queue Items"
}
}

View File

@@ -0,0 +1,3 @@
[
"queueItems"
]

View File

@@ -0,0 +1,17 @@
[
{
"name": "target"
},
{
"name": "status",
"width": 20
},
{
"name": "createdAt",
"width": 20
},
{
"name": "processedAt",
"width": 20
}
]

View File

@@ -14,5 +14,13 @@
}
]
}
},
"relationshipPanels": {
"queueItems": {
"unlinkDisabled": true,
"createDisabled": true,
"selectDisabled": true,
"layout": "listForWebhook"
}
}
}

View File

@@ -69,6 +69,12 @@
"type": "belongsTo",
"entity": "User"
},
"queueItems": {
"type": "hasMany",
"entity": "WebhookQueueItem",
"foreign": "webhook",
"readOnly": true
},
"createdBy": {
"type": "belongsTo",
"entity": "User"

View File

@@ -51,7 +51,8 @@
"webhook": {
"type": "belongsTo",
"entity": "Webhook",
"foreignName": "id"
"foreignName": "id",
"foreign": "queueItems"
}
},
"collection": {