amoghrajesh commented on code in PR #68395:
URL: https://github.com/apache/airflow/pull/68395#discussion_r3397579717
##########
airflow-core/src/airflow/ui/src/pages/Asset/AssetStore/AssetStore.tsx:
##########
@@ -56,6 +56,43 @@ const getColumns = ({ assetId, translate }: ColumnsProps):
Array<ColumnDef<Asset
cell: ({ row: { original } }) => <Time datetime={original.updated_at} />,
header: translate("common:table.updatedAt"),
},
+ {
+ accessorKey: "last_updated_by",
+ cell: ({ row: { original } }) => {
+ const writer = original.last_updated_by;
+
+ if (!writer) {
+ return <Text color="fg.muted">—</Text>;
+ }
+ if (
+ writer.kind === "task" &&
+ writer.dag_id !== null &&
+ writer.run_id !== null &&
+ writer.task_id !== null
+ ) {
+ const mapSuffix =
+ writer.map_index !== null && writer.map_index !== undefined &&
writer.map_index >= 0
+ ? `/mapped/${writer.map_index}`
+ : "";
+ const path =
`/dags/${writer.dag_id}/runs/${writer.run_id}/tasks/${writer.task_id}${mapSuffix}`;
Review Comment:
Used it and handled in 4d4b2a9712
##########
airflow-core/src/airflow/ui/src/pages/Asset/AssetStore/AssetStore.tsx:
##########
@@ -56,6 +56,43 @@ const getColumns = ({ assetId, translate }: ColumnsProps):
Array<ColumnDef<Asset
cell: ({ row: { original } }) => <Time datetime={original.updated_at} />,
header: translate("common:table.updatedAt"),
},
+ {
+ accessorKey: "last_updated_by",
+ cell: ({ row: { original } }) => {
+ const writer = original.last_updated_by;
+
+ if (!writer) {
+ return <Text color="fg.muted">—</Text>;
+ }
+ if (
+ writer.kind === "task" &&
+ writer.dag_id !== null &&
+ writer.run_id !== null &&
+ writer.task_id !== null
+ ) {
+ const mapSuffix =
+ writer.map_index !== null && writer.map_index !== undefined &&
writer.map_index >= 0
+ ? `/mapped/${writer.map_index}`
+ : "";
+ const path =
`/dags/${writer.dag_id}/runs/${writer.run_id}/tasks/${writer.task_id}${mapSuffix}`;
+
+ return (
+ <Flex direction="column">
+ <Link asChild color="fg.info">
+ <RouterLink to={path}>{writer.task_id}</RouterLink>
+ </Link>
+ <Text color="fg.muted" fontSize="xs">
+ {writer.dag_id}
+ </Text>
+ </Flex>
+ );
+ }
+
+ return <Text>{writer.kind === "api" ? "API" : "Watcher"}</Text>;
Review Comment:
Added in 4d4b2a9712
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]