Skip to content

Commit 9b26e4f

Browse files
bbovenziambika-garg
authored andcommitted
Update icons and various UI fixes (apache#46725)
1 parent 25a16c9 commit 9b26e4f

7 files changed

Lines changed: 20 additions & 17 deletions

File tree

airflow/ui/src/components/StateIcon.tsx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,8 @@
1717
* under the License.
1818
*/
1919
import type { IconBaseProps } from "react-icons";
20-
import {
21-
FiActivity,
22-
FiAlertOctagon,
23-
FiCalendar,
24-
FiCheckCircle,
25-
FiRepeat,
26-
FiSkipForward,
27-
FiSlash,
28-
FiWatch,
29-
} from "react-icons/fi";
30-
import { LuCalendarSync, LuCircleDashed, LuCircleFadingArrowUp, LuRedo2 } from "react-icons/lu";
20+
import { FiActivity, FiCalendar, FiRepeat, FiSkipForward, FiSlash, FiWatch, FiX } from "react-icons/fi";
21+
import { LuCalendarSync, LuCheck, LuCircleDashed, LuCircleFadingArrowUp, LuRedo2 } from "react-icons/lu";
3122
import { PiQueue } from "react-icons/pi";
3223

3324
import type { TaskInstanceState } from "openapi/requests/types.gen";
@@ -41,7 +32,7 @@ export const StateIcon = ({ state, ...rest }: Props) => {
4132
case "deferred":
4233
return <FiWatch {...rest} />;
4334
case "failed":
44-
return <FiAlertOctagon {...rest} />;
35+
return <FiX {...rest} />;
4536
case "queued":
4637
return <PiQueue {...rest} />;
4738
case "removed":
@@ -55,7 +46,7 @@ export const StateIcon = ({ state, ...rest }: Props) => {
5546
case "skipped":
5647
return <FiSkipForward {...rest} />;
5748
case "success":
58-
return <FiCheckCircle {...rest} />;
49+
return <LuCheck {...rest} />;
5950
case "up_for_reschedule":
6051
return <LuCalendarSync {...rest} />;
6152
case "up_for_retry":

airflow/ui/src/layouts/Nav/Nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const Nav = () => {
4343
py={3}
4444
top={0}
4545
width={20}
46-
zIndex={1}
46+
zIndex={2}
4747
>
4848
<Flex alignItems="center" flexDir="column" width="100%">
4949
<Box mb={3}>

airflow/ui/src/pages/Dashboard/HistoricalMetrics/AssetEvents.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
import { Box, Heading, Flex, HStack, VStack, StackSeparator, Skeleton } from "@chakra-ui/react";
2020
import { createListCollection } from "@chakra-ui/react/collection";
21+
import { FiDatabase } from "react-icons/fi";
2122

2223
import { useAssetServiceGetAssetEvents } from "openapi/queries";
2324
import { StateBadge } from "src/components/StateBadge";
@@ -52,6 +53,7 @@ export const AssetEvents = ({ assetSortBy, endDate, setAssetSortBy, startDate }:
5253
<Flex justify="space-between" mr={1} mt={0} pl={3} pt={1}>
5354
<HStack>
5455
<StateBadge colorPalette="blue" fontSize="md" variant="solid">
56+
<FiDatabase />
5557
{data?.total_entries ?? " "}
5658
</StateBadge>
5759
<Heading marginEnd="auto" size="md">

airflow/ui/src/pages/Dashboard/HistoricalMetrics/DagRunMetrics.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
import { Box, Heading, HStack } from "@chakra-ui/react";
2020
import type { DAGRunStates } from "openapi-gen/requests/types.gen";
21+
import { FiBarChart } from "react-icons/fi";
2122

2223
import { StateBadge } from "src/components/StateBadge";
2324

@@ -34,6 +35,7 @@ export const DagRunMetrics = ({ dagRunStates, total }: DagRunMetricsProps) => (
3435
<Box borderRadius={5} borderWidth={1} p={2}>
3536
<HStack mb={4}>
3637
<StateBadge colorPalette="blue" fontSize="md" variant="solid">
38+
<FiBarChart />
3739
{total}
3840
</StateBadge>
3941
<Heading size="md">Dag Runs</Heading>

airflow/ui/src/pages/Dashboard/HistoricalMetrics/HistoricalMetrics.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
import { Box, VStack, SimpleGrid, GridItem } from "@chakra-ui/react";
19+
import { Box, VStack, SimpleGrid, GridItem, Flex, Heading } from "@chakra-ui/react";
2020
import dayjs from "dayjs";
2121
import { useState } from "react";
22+
import { PiBooks } from "react-icons/pi";
2223

2324
import { useDashboardServiceHistoricalMetrics } from "openapi/queries";
2425
import { ErrorAlert } from "src/components/ErrorAlert";
@@ -52,6 +53,12 @@ export const HistoricalMetrics = () => {
5253

5354
return (
5455
<Box width="100%">
56+
<Flex color="fg.muted" my={2}>
57+
<PiBooks />
58+
<Heading ml={1} size="xs">
59+
History
60+
</Heading>
61+
</Flex>
5562
<ErrorAlert error={error} />
5663
<VStack alignItems="left" gap={2}>
5764
<TimeRangeSelector

airflow/ui/src/pages/Dashboard/HistoricalMetrics/TaskInstanceMetrics.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
import { Box, Heading, HStack } from "@chakra-ui/react";
2020
import type { TaskInstanceState, TaskInstanceStateCount } from "openapi-gen/requests/types.gen";
21+
import { MdOutlineTask } from "react-icons/md";
2122

2223
import { StateBadge } from "src/components/StateBadge";
2324

@@ -47,11 +48,11 @@ export const TaskInstanceMetrics = ({ taskInstanceStates, total }: TaskInstanceM
4748
<Box borderRadius={5} borderWidth={1} mt={2} p={2}>
4849
<HStack mb={4}>
4950
<StateBadge colorPalette="blue" fontSize="md" variant="solid">
51+
<MdOutlineTask />
5052
{total}
5153
</StateBadge>
5254
<Heading size="md">Task Instances</Heading>
5355
</HStack>
54-
5556
{TASK_STATES.sort((stateA, stateB) =>
5657
taskInstanceStates[stateA] > taskInstanceStates[stateB] ? -1 : 1,
5758
).map((state) =>

airflow/ui/src/pages/Dashboard/Stats/Stats.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const Stats = () => (
2929
<Flex color="fg.muted" my={2}>
3030
<FiClipboard />
3131
<Heading ml={1} size="xs">
32-
Stats
32+
Links
3333
</Heading>
3434
</Flex>
3535
<HStack>

0 commit comments

Comments
 (0)