pierrejeambrun commented on code in PR #53510:
URL: https://github.com/apache/airflow/pull/53510#discussion_r2219610481
##########
airflow-core/src/airflow/ui/src/pages/DagRuns.tsx:
##########
@@ -187,6 +195,16 @@ export const DagRuns = () => {
},
);
+ // Client-side filtering for triggering_user_name (backend doesn't support
this filter yet)
+ const filteredDagRuns =
+ data?.dag_runs.filter((run) => {
+ if (filteredTriggeringUserName === null || filteredTriggeringUserName
=== "") {
+ return true;
+ }
+
+ return
run.triggering_user_name?.toLowerCase().includes(filteredTriggeringUserName.toLowerCase());
+ }) ?? [];
Review Comment:
Remove this please, this will be plain wrong because of backend pagination.
It would be better to not add the filtering for now, and add the backend
feature in a separate PR.
##########
airflow-core/src/airflow/ui/src/pages/DagRuns.tsx:
##########
@@ -251,6 +285,15 @@ export const DagRuns = () => {
placeHolder={translate("dags:filters.runIdPatternFilter")}
/>
</Box>
+ <Box>
+ <SearchBar
+ defaultValue={filteredTriggeringUserName ?? ""}
+ hideAdvanced
+ hotkeyDisabled={true}
+ onChange={handleTriggeringUserNameChange}
+ placeHolder="Filter by triggering user..."
Review Comment:
`"Filter by triggering user..."` use translations, no hard coded literal.
--
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]