Skip to content

Commit

Permalink
Add name and group to tooltip.
Browse files Browse the repository at this point in the history
  • Loading branch information
tirkarthi committed Jan 6, 2025
1 parent 58ce1b2 commit f40f7e3
Show file tree
Hide file tree
Showing 16 changed files with 4,293 additions and 10,399 deletions.
2 changes: 2 additions & 0 deletions airflow/api_fastapi/core_api/datamodels/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class AssetEventResponse(BaseModel):
id: int
asset_id: int
uri: str | None = Field(alias="uri", default=None)
name: str | None = Field(alias="name", default=None)
group: str | None = Field(alias="group", default=None)
extra: dict | None = None
source_task_id: str | None = None
source_dag_id: str | None = None
Expand Down
10 changes: 10 additions & 0 deletions airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6311,6 +6311,16 @@ components:
- type: string
- type: 'null'
title: Uri
name:
anyOf:
- type: string
- type: 'null'
title: Name
group:
anyOf:
- type: string
- type: 'null'
title: Group
extra:
anyOf:
- type: object
Expand Down
8 changes: 8 additions & 0 deletions airflow/models/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,14 @@ class AssetEvent(Base):
def uri(self):
return self.asset.uri

@property
def group(self):
return self.asset.group

@property
def name(self):
return self.asset.name

def __repr__(self) -> str:
args = []
for attr in [
Expand Down
Loading

0 comments on commit f40f7e3

Please sign in to comment.