Skip to content

Commit

Permalink
Fix calendar view scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
bbovenzi committed Jul 1, 2024
1 parent 07e6eb8 commit 178d2e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit 178d2e2

Please sign in to comment.