Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calendar view scroll #40458

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions airflow/www/static/js/dag/details/dag/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ const Calendar = () => {

// We need to split the data into multiple years of calendars
if (startYear !== endYear) {
for (let y = startYear; y <= endYear; y += 1) {
const index = y - startYear;
for (let y = endYear; y >= startYear; y -= 1) {
const index = endYear - y;
const yearStartDate = y === startYear ? startDate : `${y}-01-01`;
const yearEndDate = `${y}-12-31`;
calendarOption.push({
Expand Down Expand Up @@ -182,6 +182,7 @@ const Calendar = () => {
color: "gray",
opacity: 0.6,
},
show: false,
},
],
calendar: calendarOption,
Expand All @@ -195,10 +196,10 @@ const Calendar = () => {
};

return (
<Box height="100%">
<Box height={`${calendarOption.length * 165}px`} width="900px">
<Flex>
<InfoTooltip
label=" Only showing the next year of planned DAG runs or the next 2000 runs,
label="Only showing the next year of planned DAG runs or the next 2000 runs,
whichever comes first."
size={16}
/>
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/static/js/dag/details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ const Details = ({
</TabPanel>
)}
{isDag && (
<TabPanel height="100%" width="100%">
<TabPanel height="100%" width="100%" overflow="auto">
<Calendar />
</TabPanel>
)}
Expand Down