Skip to content
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
5 changes: 3 additions & 2 deletions airflow/www/static/js/grid/dagRuns/Bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ const DagRunBar = ({
};

// show the tick on the 4th DagRun and then every 10th tick afterwards
const shouldShowTick = index === totalRuns - 4
|| (index < totalRuns - 4 && (index + 4) % 10 === 0);
const inverseIndex = totalRuns - index;
const shouldShowTick = inverseIndex === 4
|| (inverseIndex > 4 && (inverseIndex - 4) % 10 === 0);

return (
<Box
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/static/js/grid/dagRuns/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('Test DagRuns', () => {
test('Show 1 date tick when there are less than 14 runs', () => {
const data = {
groups: {},
dagRuns: generateRuns(8),
dagRuns: generateRuns(11),
};
const spy = jest.spyOn(useGridDataModule, 'default').mockImplementation(() => ({
data,
Expand Down