EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
webhook queue items panel
Yuri Kuznetsov72794768afdb
diff --git a/application/Espo/Controllers/Webhook.php b/application/Espo/Controllers/Webhook.phpindex 06ac2e3e43..a38831c030 100644--- a/application/Espo/Controllers/Webhook.php+++ b/application/Espo/Controllers/Webhook.php@@ -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{diff --git a/application/Espo/Resources/i18n/en_US/Webhook.json b/application/Espo/Resources/i18n/en_US/Webhook.jsonindex b0a2b64c70..ac285e1799 100644--- a/application/Espo/Resources/i18n/en_US/Webhook.json+++ b/application/Espo/Resources/i18n/en_US/Webhook.json@@ -12,6 +12,7 @@"secretKey": "Secret Key"},"links": {- "user": "User"+ "user": "User",+ "queueItems": "Queue Items"}}diff --git a/application/Espo/Resources/layouts/Webhook/relationships.json b/application/Espo/Resources/layouts/Webhook/relationships.jsonnew file mode 100644index 0000000000..aecdfd1d42--- /dev/null+++ b/application/Espo/Resources/layouts/Webhook/relationships.json@@ -0,0 +1,3 @@+[+ "queueItems"+]diff --git a/application/Espo/Resources/layouts/WebhookQueueItem/listForWebhook.json b/application/Espo/Resources/layouts/WebhookQueueItem/listForWebhook.jsonnew file mode 100644index 0000000000..e007c69bbd--- /dev/null+++ b/application/Espo/Resources/layouts/WebhookQueueItem/listForWebhook.json@@ -0,0 +1,17 @@+[+ {+ "name": "target"+ },+ {+ "name": "status",+ "width": 20+ },+ {+ "name": "createdAt",+ "width": 20+ },+ {+ "name": "processedAt",+ "width": 20+ }+]diff --git a/application/Espo/Resources/metadata/clientDefs/Webhook.json b/application/Espo/Resources/metadata/clientDefs/Webhook.jsonindex 625b2b8ad2..b14e06c2eb 100644--- a/application/Espo/Resources/metadata/clientDefs/Webhook.json+++ b/application/Espo/Resources/metadata/clientDefs/Webhook.json@@ -14,5 +14,13 @@}]}+ },+ "relationshipPanels": {+ "queueItems": {+ "unlinkDisabled": true,+ "createDisabled": true,+ "selectDisabled": true,+ "layout": "listForWebhook"+ }}}diff --git a/application/Espo/Resources/metadata/entityDefs/Webhook.json b/application/Espo/Resources/metadata/entityDefs/Webhook.jsonindex 00335a6e02..397b3d6649 100644--- a/application/Espo/Resources/metadata/entityDefs/Webhook.json+++ b/application/Espo/Resources/metadata/entityDefs/Webhook.json@@ -69,6 +69,12 @@"type": "belongsTo","entity": "User"},+ "queueItems": {+ "type": "hasMany",+ "entity": "WebhookQueueItem",+ "foreign": "webhook",+ "readOnly": true+ },"createdBy": {"type": "belongsTo","entity": "User"diff --git a/application/Espo/Resources/metadata/entityDefs/WebhookQueueItem.json b/application/Espo/Resources/metadata/entityDefs/WebhookQueueItem.jsonindex 2dfa653f2a..0da2b3062d 100644--- a/application/Espo/Resources/metadata/entityDefs/WebhookQueueItem.json+++ b/application/Espo/Resources/metadata/entityDefs/WebhookQueueItem.json@@ -51,7 +51,8 @@"webhook": {"type": "belongsTo","entity": "Webhook",- "foreignName": "id"+ "foreignName": "id",+ "foreign": "queueItems"}},"collection": {