Skip to content

Commit cefffb2

Browse files
github-actions[bot]haseebmalik18
authored andcommitted
[v3-2-test] Fix Gantt view still visible when time range is outside dagrun window #64147 (#64179) (#64549)
(cherry picked from commit f6b9c02) Co-authored-by: Haseeb Malik <[email protected]>
1 parent 091ef3a commit cefffb2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ export const DetailsLayout = ({ children, error, isLoading, tabs }: Props) => {
201201
<Gantt
202202
dagRunState={dagRunStateFilter}
203203
limit={limit}
204+
runAfterGte={runAfterGte}
205+
runAfterLte={runAfterLte}
204206
runType={runTypeFilter}
205207
triggeringUser={triggeringUserFilter}
206208
/>

‎airflow-core/src/airflow/ui/src/layouts/Details/Gantt/Gantt.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ ChartJS.register(
7171
type Props = {
7272
readonly dagRunState?: DagRunState | undefined;
7373
readonly limit: number;
74+
readonly runAfterGte?: string | undefined;
75+
readonly runAfterLte?: string | undefined;
7476
readonly runType?: DagRunType | undefined;
7577
readonly triggeringUser?: string | undefined;
7678
};
@@ -79,7 +81,7 @@ const CHART_PADDING = 36;
7981
const CHART_ROW_HEIGHT = 20;
8082
const MIN_BAR_WIDTH = 10;
8183

82-
export const Gantt = ({ dagRunState, limit, runType, triggeringUser }: Props) => {
84+
export const Gantt = ({ dagRunState, limit, runAfterGte, runAfterLte, runType, triggeringUser }: Props) => {
8385
const { dagId = "", groupId: selectedGroupId, runId = "", taskId: selectedTaskId } = useParams();
8486
const [searchParams] = useSearchParams();
8587
const { openGroupIds } = useOpenGroups();
@@ -114,6 +116,8 @@ export const Gantt = ({ dagRunState, limit, runType, triggeringUser }: Props) =>
114116
const { data: gridRuns, isLoading: runsLoading } = useGridRuns({
115117
dagRunState,
116118
limit,
119+
runAfterGte,
120+
runAfterLte,
117121
runType,
118122
triggeringUser,
119123
});
@@ -208,7 +212,7 @@ export const Gantt = ({ dagRunState, limit, runType, triggeringUser }: Props) =>
208212
translate,
209213
});
210214

211-
if (runId === "") {
215+
if (runId === "" || (!isLoading && !selectedRun)) {
212216
return undefined;
213217
}
214218

0 commit comments

Comments
 (0)