pierrejeambrun commented on code in PR #68657:
URL: https://github.com/apache/airflow/pull/68657#discussion_r3466254653
##########
airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx:
##########
@@ -63,7 +66,7 @@ export const DagsFilters = () => {
const showPaused = searchParams.get(PAUSED_PARAM);
const showFavorites = searchParams.get(FAVORITE_PARAM);
const needsReview = searchParams.get(NEEDS_REVIEW_PARAM);
- const state = searchParams.get(LAST_DAG_RUN_STATE_PARAM);
+ const state = searchParams.get(DAG_RUN_STATE_PARAM) ??
searchParams.get(LAST_DAG_RUN_STATE_PARAM);
Review Comment:
Why re-using the same variable? If we want to filter by `latest_run_state in
'success' & has a running run? `
##########
airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx:
##########
@@ -108,10 +111,13 @@ export const DagsFilters = () => {
};
const handleStateChange = (value: StateValue) => {
- if (value === "all") {
- searchParams.delete(LAST_DAG_RUN_STATE_PARAM);
- } else {
- searchParams.set(LAST_DAG_RUN_STATE_PARAM, value);
+ searchParams.delete(LAST_DAG_RUN_STATE_PARAM);
+ searchParams.delete(DAG_RUN_STATE_PARAM);
+ if (value !== "all") {
+ searchParams.set(
+ anyRunStateValues.includes(value) ? DAG_RUN_STATE_PARAM :
LAST_DAG_RUN_STATE_PARAM,
+ value,
Review Comment:
Does that mean that we can't filter by `latest_run is running/queued`
anymore?
I think we should have two disctincts filters like any other filters in the
filter bars.
This makes things harder to understand for users, why everything here is
operating on latest run, but some state.
--
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]