fix: queries for webhooks + improve tests
This commit is contained in:
@@ -179,6 +179,7 @@ export const envSubViews = {
|
||||
|
||||
export enum WebhookInputDataFields {
|
||||
ID = 'id',
|
||||
EVENT_DESCRIPTION = 'event_description',
|
||||
EVENT_NAME = 'event_name',
|
||||
ENDPOINT = 'endpoint',
|
||||
ENABLED = 'enabled',
|
||||
|
@@ -118,6 +118,8 @@ export const WebhooksDataQuery = `
|
||||
_webhooks(params: $params){
|
||||
webhooks{
|
||||
id
|
||||
event
|
||||
event_description
|
||||
event_name
|
||||
endpoint
|
||||
enabled
|
||||
|
@@ -56,6 +56,7 @@ interface paginationPropTypes {
|
||||
interface webhookDataTypes {
|
||||
[WebhookInputDataFields.ID]: string;
|
||||
[WebhookInputDataFields.EVENT_NAME]: string;
|
||||
[WebhookInputDataFields.EVENT_DESCRIPTION]: string;
|
||||
[WebhookInputDataFields.ENDPOINT]: string;
|
||||
[WebhookInputDataFields.ENABLED]: boolean;
|
||||
[WebhookInputDataFields.HEADERS]?: Record<string, string>;
|
||||
@@ -134,6 +135,7 @@ const Webhooks = () => {
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>Event Name</Th>
|
||||
<Th>Event Description</Th>
|
||||
<Th>Endpoint</Th>
|
||||
<Th>Enabled</Th>
|
||||
<Th>Headers</Th>
|
||||
@@ -147,7 +149,10 @@ const Webhooks = () => {
|
||||
style={{ fontSize: 14 }}
|
||||
>
|
||||
<Td maxW="300">
|
||||
{webhook[WebhookInputDataFields.EVENT_NAME]}
|
||||
{webhook[WebhookInputDataFields.EVENT_NAME].split('-')[0]}
|
||||
</Td>
|
||||
<Td maxW="300">
|
||||
{webhook[WebhookInputDataFields.EVENT_DESCRIPTION]}
|
||||
</Td>
|
||||
<Td>{webhook[WebhookInputDataFields.ENDPOINT]}</Td>
|
||||
<Td>
|
||||
@@ -264,7 +269,7 @@ const Webhooks = () => {
|
||||
</Text>
|
||||
</Text>
|
||||
<Flex alignItems="center">
|
||||
<Text flexShrink="0">Go to page:</Text>{' '}
|
||||
<Text>Go to page:</Text>{' '}
|
||||
<NumberInput
|
||||
ml={2}
|
||||
mr={8}
|
||||
|
Reference in New Issue
Block a user