Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/dashboard/src/@/api/webhook-configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type WebhookConfigsResponse =
};

interface CreateWebhookConfigRequest {
topics: { id: string; filters: object | null }[];
topicIdsWithFilters: { id: string; filters: object | null }[];
destinationUrl: string;
description: string;
isPaused?: boolean;
Expand Down Expand Up @@ -76,7 +76,7 @@ type TopicsResponse =

interface UpdateWebhookConfigRequest {
destinationUrl?: string;
topics?: { id: string; filters: object | null }[];
topicIdsWithFilters?: { id: string; filters: object | null }[];
description?: string;
isPaused?: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function WebhookConfigModal(props: WebhookConfigModalProps) {
description: values.description,
destinationUrl: values.destinationUrl,
isPaused: values.isPaused,
topics: processedTopics,
topicIdsWithFilters: processedTopics,
},
projectIdOrSlug: props.projectSlug,
teamIdOrSlug: props.teamSlug,
Expand All @@ -115,7 +115,7 @@ export function WebhookConfigModal(props: WebhookConfigModalProps) {
description: values.description,
destinationUrl: values.destinationUrl,
isPaused: values.isPaused,
topics: processedTopics,
topicIdsWithFilters: processedTopics,
},
projectIdOrSlug: props.projectSlug,
teamIdOrSlug: props.teamSlug,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export function WebhookConfigsTable(props: {
<TableHead className="w-[150px]">Destination URL</TableHead>
<TableHead>Topics</TableHead>
<TableHead>Activity (24h)</TableHead>
<TableHead>Webhook Secret</TableHead>
<TableHead>Created</TableHead>
<TableHead className="w-[50px]"></TableHead>
</TableRow>
Expand Down Expand Up @@ -258,6 +259,22 @@ export function WebhookConfigsTable(props: {
metrics={props.metricsMap.get(config.id) || null}
/>
</TableCell>
<TableCell>
{config.webhookSecret ? (
<CopyTextButton
className="max-w-[120px] text-sm text-muted-foreground font-mono justify-start p-0 h-auto"
textToCopy={config.webhookSecret}
textToShow={`...${config.webhookSecret.slice(-4)}`}
variant="ghost"
copyIconPosition="right"
tooltip="Copy webhook secret"
/>
) : (
<span className="text-sm text-muted-foreground">
No secret
</span>
)}
</TableCell>
<TableCell className="text-muted-foreground">
{config.createdAt
? format(new Date(config.createdAt), "MMM d, yyyy")
Expand Down
Loading