Skip to content
Open
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 internal/apirouter/log_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func toAPIAttempt(ar *logstore.AttemptRecord, opts IncludeOptions) APIAttempt {
}

// ListAttempts handles GET /attempts
// Query params: tenant_id, event_id, destination_id, status, topic[], start, end, limit, next, prev, expand[], sort_order
// Query params: tenant_id, event_id, destination_id, status, topic[], time[gte], time[lte], time[gt], time[lt], limit, next, prev, include, order_by, dir
func (h *LogHandlers) ListAttempts(c *gin.Context) {
// Authz: JWT users can only query their own tenant's attempts
tenantID, ok := resolveTenantIDFilter(c)
Expand Down Expand Up @@ -359,7 +359,7 @@ func (h *LogHandlers) RetrieveAttempt(c *gin.Context) {
}

// ListEvents handles GET /events
// Query params: tenant_id, destination_id, topic[], start, end, limit, next, prev, sort_order
// Query params: tenant_id, destination_id, topic[], time[gte], time[lte], time[gt], time[lt], limit, next, prev, include, order_by, dir
func (h *LogHandlers) ListEvents(c *gin.Context) {
// Authz: JWT users can only query their own tenant's events
tenantID, ok := resolveTenantIDFilter(c)
Expand Down
6 changes: 3 additions & 3 deletions internal/portal/src/scenes/Destination/Events/Attempts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ const Attempts: React.FC<AttemptsProps> = ({
switch (timeRange) {
case "7d":
searchParams.set(
"start",
"time[gte]",
new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000).toISOString(),
);
break;
case "30d":
searchParams.set(
"start",
"time[gte]",
new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000).toISOString(),
);
break;
default: // 24h
searchParams.set(
"start",
"time[gte]",
new Date(now.getTime() - 24 * 60 * 60 * 1000).toISOString(),
);
}
Expand Down
Loading