-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add asset events to dashboard #44961
base: main
Are you sure you want to change the base?
Conversation
c2076ee
to
f69cf68
Compare
@@ -102,6 +102,7 @@ class AssetEventResponse(BaseModel): | |||
|
|||
id: int | |||
asset_id: int | |||
uri: str | None = Field(alias="uri", default=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we're to add uri
here, we'll probably need to add name
(and maybe group
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure we should add uri
here. If we need it in the UI, it’d be better to include the entire asset object instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is as per the initial UI design for dashboard. I am okay with changing this as per consensus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The designs were quite preliminary so I am happy with adding everything suggested
airflow/ui/src/pages/Dashboard/HistoricalMetrics/AssetEvents.tsx
Outdated
Show resolved
Hide resolved
Note: As PR #45312 has been merged, the code formatting rules have changed for new UI. Please rebase and re-run pre-commit checks to ensure that formatting in folder airflow/ui is adjusted. |
airflow/ui/src/pages/Dashboard/HistoricalMetrics/AssetEvent.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool.
Code looks good. No more suggestions than what's already been highlighted.
f69cf68
to
f40f7e3
Compare
f40f7e3
to
d7c9e6f
Compare
Add asset events to dashboard to display the top 6 events sorted by default newest first (latest) asset events. The source links to the task instance the created the event. The selected time from filter is applied to the API to get only events in last 12 hours, past week etc. The triggered dagruns links to the dagruns triggered due to the asset event.
Notes to reviewer and self
from_rest_api
it's usually from API and source is displayed as API. Similar can be done for asset events from trigger. Opened Add from_trigger field to AssetEvent extra for events from Trigger #44944 for discussion.asset.uri
for the card. Do we need to displayasset.name
orasset.uri
?Related #42700