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

[23945] Icons in grid view for different dag types #23970

Merged
merged 2 commits into from
May 27, 2022
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
2 changes: 2 additions & 0 deletions airflow/www/static/js/grid/dagRuns/Bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
useTheme,
} from '@chakra-ui/react';
import { MdPlayArrow } from 'react-icons/md';
import { RiArrowGoBackFill } from 'react-icons/ri';

import DagRunTooltip from './Tooltip';
import { useContainerRef } from '../context/containerRef';
Expand Down Expand Up @@ -101,6 +102,7 @@ const DagRunBar = ({
data-testid="run"
>
{run.runType === 'manual' && <MdPlayArrow size="8px" color="white" data-testid="manual-run" />}
{run.runType === 'backfill' && <RiArrowGoBackFill size="8px" color="white" data-testid="backfill-run" />}
</Flex>
</Tooltip>
</Flex>
Expand Down
7 changes: 6 additions & 1 deletion airflow/www/static/js/grid/dagRuns/Tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Time from '../components/Time';

const DagRunTooltip = ({
dagRun: {
state, duration, dataIntervalStart, executionDate,
state, duration, dataIntervalStart, executionDate, runType,
},
}) => (
<Box py="2px">
Expand All @@ -44,6 +44,11 @@ const DagRunTooltip = ({
{' '}
{formatDuration(duration)}
</Text>
<Text>
Type:
{' '}
{runType}
</Text>
</Box>
);

Expand Down
17 changes: 16 additions & 1 deletion airflow/www/static/js/grid/details/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import {
Heading,
Text,
} from '@chakra-ui/react';
import { MdPlayArrow } from 'react-icons/md';
import { MdPlayArrow, MdOutlineSchedule } from 'react-icons/md';
import { RiArrowGoBackFill } from 'react-icons/ri';

import { getMetaValue } from '../../utils';
import useSelection from '../utils/useSelection';
Expand Down Expand Up @@ -71,6 +72,20 @@ const Header = () => {
{runLabel}
</>
);
} else if (dagRun.runType === 'backfill') {
runLabel = (
<>
<RiArrowGoBackFill style={{ display: 'inline' }} />
{runLabel}
</>
);
} else if (dagRun.runType === 'scheduled') {
runLabel = (
<>
<MdOutlineSchedule style={{ display: 'inline' }} />
{runLabel}
</>
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import {
Link,
Divider,
} from '@chakra-ui/react';
import { MdPlayArrow, MdOutlineAccountTree } from 'react-icons/md';

import { MdPlayArrow, MdOutlineSchedule, MdOutlineAccountTree } from 'react-icons/md';
import { RiArrowGoBackFill } from 'react-icons/ri';

import { SimpleStatus } from '../../../components/StatusBox';
import { ClipboardText } from '../../../components/Clipboard';
Expand Down Expand Up @@ -97,6 +99,8 @@ const DagRun = ({ runId }) => {
Run Type:
{' '}
{runType === 'manual' && <MdPlayArrow style={{ display: 'inline' }} />}
{runType === 'backfill' && <RiArrowGoBackFill style={{ display: 'inline' }} />}
{runType === 'scheduled' && <MdOutlineSchedule style={{ display: 'inline' }} />}
{runType}
</Text>
<Text>
Expand Down