mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-05-08 19:29:23 -05:00
Feat: Events Frontend, Redux (#1859)
* feat: add params to events api * feat: add more filters to event query * fix: count query * feat: start wiring up events queries * feat: overwrites for queries * feat: query for event keys * feat: wire up event key api * feat: wire up two queries on fe * feat: fix more wiring * feat: display event data * fix: styling * feat: sidebar * fix: types + default viz * feat: scope filter * feat: index * fix: queries * fix: queries, deduping, popover * fix: lint * feat: add filter id col to the event to run table * feat: add filter id to copy * feat: wire filter through to the db * feat: send back triggered run ids over the api * fix: query * feat: json obj for triggered runs on the event * fix: cast trick to rm overwrite * fix: migration * fix: rm search * fix: don't show counts on runs modal * fix: key * chore: gen ts * chore: python * fix: changelog
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
V1EventTriggeredRun:
|
||||
type: object
|
||||
properties:
|
||||
workflowRunId:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The external ID of the triggered run.
|
||||
minLength: 36
|
||||
maxLength: 36
|
||||
filterId:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The ID of the filter that triggered the run, if applicable.
|
||||
required:
|
||||
- workflowRunId
|
||||
|
||||
V1Event:
|
||||
properties:
|
||||
metadata:
|
||||
@@ -17,6 +33,22 @@ V1Event:
|
||||
additionalMetadata:
|
||||
type: object
|
||||
description: Additional metadata for the event.
|
||||
payload:
|
||||
type: object
|
||||
description: The payload of the event, which can be any JSON-serializable object.
|
||||
scope:
|
||||
type: string
|
||||
description: The scope of the event, which can be used to filter or categorize events.
|
||||
seenAt:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The timestamp when the event was seen.
|
||||
triggeredRuns:
|
||||
description: The external IDs of the runs that were triggered by this event.
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/V1EventTriggeredRun"
|
||||
|
||||
required:
|
||||
- metadata
|
||||
- key
|
||||
|
||||
@@ -52,6 +52,8 @@ paths:
|
||||
$ref: "./paths/v1/tasks/tasks.yaml#/getTaskPointMetrics"
|
||||
/api/v1/stable/tenants/{tenant}/events:
|
||||
$ref: "./paths/v1/events/event.yaml#/V1EventList"
|
||||
/api/v1/stable/tenants/{tenant}/events/keys:
|
||||
$ref: "./paths/v1/events/event.yaml#/keys"
|
||||
/api/v1/stable/tenants/{tenant}/filters:
|
||||
$ref: "./paths/v1/filters/filter.yaml#/V1FilterListCreate"
|
||||
/api/v1/stable/tenants/{tenant}/filters/{v1-filter}:
|
||||
|
||||
@@ -47,6 +47,51 @@ V1EventList:
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
- description: Filter to events that are associated with a specific workflow run
|
||||
in: query
|
||||
name: workflowIds
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
minLength: 36
|
||||
maxLength: 36
|
||||
- description: Filter to events that are associated with workflow runs matching a certain status
|
||||
in: query
|
||||
name: workflowRunStatuses
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "../../../components/schemas/_index.yaml#/V1TaskStatus"
|
||||
- description: Filter to specific events by their ids
|
||||
in: query
|
||||
name: eventIds
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
minLength: 36
|
||||
maxLength: 36
|
||||
- description: Filter by additional metadata on the events
|
||||
in: query
|
||||
name: additionalMetadata
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: The metadata key-value pairs (delimited by a `:`) to filter by
|
||||
minLength: 1
|
||||
- description: The scopes to filter by
|
||||
in: query
|
||||
name: scopes
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: The scope to filter by
|
||||
minLength: 1
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
@@ -69,3 +114,41 @@ V1EventList:
|
||||
summary: List events
|
||||
tags:
|
||||
- Event
|
||||
|
||||
keys:
|
||||
get:
|
||||
x-resources: ["tenant"]
|
||||
description: Lists all event keys for a tenant.
|
||||
operationId: v1:event-key:list
|
||||
parameters:
|
||||
- description: The tenant id
|
||||
in: path
|
||||
name: tenant
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
minLength: 36
|
||||
maxLength: 36
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../../components/schemas/_index.yaml#/EventKeyList"
|
||||
description: Successfully listed the event keys
|
||||
"400":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
|
||||
description: A malformed or bad request
|
||||
"403":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
|
||||
description: Forbidden
|
||||
summary: List event keys
|
||||
tags:
|
||||
- Event
|
||||
|
||||
Reference in New Issue
Block a user