diff --git a/airflow/ui/src/components/DagRunInfo.tsx b/airflow/ui/src/components/DagRunInfo.tsx
index dd5569dd45a2a..dca0c3e2f3fbe 100644
--- a/airflow/ui/src/components/DagRunInfo.tsx
+++ b/airflow/ui/src/components/DagRunInfo.tsx
@@ -74,7 +74,7 @@ const DagRunInfo = ({
>
- {state === undefined ? undefined : {state}}
+ {state === undefined ? undefined : }
) : undefined;
diff --git a/airflow/ui/src/components/MetricsBadge.tsx b/airflow/ui/src/components/MetricsBadge.tsx
index d744d2f6eb2e7..f763a9510b2a8 100644
--- a/airflow/ui/src/components/MetricsBadge.tsx
+++ b/airflow/ui/src/components/MetricsBadge.tsx
@@ -17,15 +17,16 @@
* under the License.
*/
import { Badge, type BadgeProps } from "@chakra-ui/react";
+import type { ReactNode } from "react";
type MetricBadgeProps = {
- readonly backgroundColor: string;
- readonly color?: string;
+ readonly icon?: ReactNode;
readonly runs?: number;
} & BadgeProps;
-export const MetricsBadge = ({ backgroundColor, color = "fg.inverted", runs }: MetricBadgeProps) => (
-
+export const MetricsBadge = ({ icon, runs, ...rest }: MetricBadgeProps) => (
+
+ {icon}
{runs}
);
diff --git a/airflow/ui/src/components/StateIcon.tsx b/airflow/ui/src/components/StateIcon.tsx
new file mode 100644
index 0000000000000..4102cae75df21
--- /dev/null
+++ b/airflow/ui/src/components/StateIcon.tsx
@@ -0,0 +1,70 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import type { IconBaseProps } from "react-icons";
+import {
+ FiActivity,
+ FiAlertCircle,
+ FiAlertOctagon,
+ FiCalendar,
+ FiCheckCircle,
+ FiCircle,
+ FiRepeat,
+ FiSkipForward,
+ FiSlash,
+ FiWatch,
+} from "react-icons/fi";
+import { LuCalendarSync, LuRedo2 } from "react-icons/lu";
+import { PiQueue } from "react-icons/pi";
+
+import type { TaskInstanceState } from "openapi/requests/types.gen";
+
+type Props = {
+ readonly state?: TaskInstanceState | null;
+} & IconBaseProps;
+
+export const StateIcon = ({ state, ...rest }: Props) => {
+ switch (state) {
+ case "deferred":
+ return ;
+ case "failed":
+ return ;
+ case "queued":
+ return ;
+ case "removed":
+ return ;
+ case "restarting":
+ return ;
+ case "running":
+ return ;
+ case "scheduled":
+ return ;
+ case "skipped":
+ return ;
+ case "success":
+ return ;
+ case "up_for_reschedule":
+ return ;
+ case "up_for_retry":
+ return ;
+ case "upstream_failed":
+ return ;
+ default:
+ return ;
+ }
+};
diff --git a/airflow/ui/src/components/TaskInstanceTooltip.tsx b/airflow/ui/src/components/TaskInstanceTooltip.tsx
index bc44a23856ffd..ed09f9a9f93d3 100644
--- a/airflow/ui/src/components/TaskInstanceTooltip.tsx
+++ b/airflow/ui/src/components/TaskInstanceTooltip.tsx
@@ -38,6 +38,7 @@ const TaskInstanceTooltip = ({ children, positioning, taskInstance, ...rest }: P
{...rest}
content={
+ State: {taskInstance.state}
{"dag_run_id" in taskInstance ? Run ID: {taskInstance.dag_run_id} : undefined}
Start Date:
diff --git a/airflow/ui/src/components/ui/Status.tsx b/airflow/ui/src/components/ui/Status.tsx
index 91ef7e153096c..bd887ba7c5939 100644
--- a/airflow/ui/src/components/ui/Status.tsx
+++ b/airflow/ui/src/components/ui/Status.tsx
@@ -16,26 +16,24 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { Status as ChakraStatus } from "@chakra-ui/react";
+import { Status as ChakraStatus, chakra } from "@chakra-ui/react";
import * as React from "react";
import type { DagRunState, TaskInstanceState } from "openapi/requests/types.gen";
-import { stateColor } from "src/utils/stateColor";
+
+import { StateIcon } from "../StateIcon";
type StatusValue = DagRunState | TaskInstanceState | null;
export type StatusProps = {
- state: StatusValue;
+ state?: StatusValue;
} & ChakraStatus.RootProps;
-export const Status = React.forwardRef(({ children, state, ...rest }, ref) => {
- // "null" is actually a string on stateColor
- const colorPalette = stateColor[state ?? "null"];
-
- return (
-
-
- {children}
-
- );
-});
+export const Status = React.forwardRef(({ children, state, ...rest }, ref) => (
+
+
+
+
+ {children}
+
+));
diff --git a/airflow/ui/src/layouts/Details/Graph/Graph.tsx b/airflow/ui/src/layouts/Details/Graph/Graph.tsx
index f6972255f61c4..ee2c270dd6ed9 100644
--- a/airflow/ui/src/layouts/Details/Graph/Graph.tsx
+++ b/airflow/ui/src/layouts/Details/Graph/Graph.tsx
@@ -24,7 +24,6 @@ import { useParams } from "react-router-dom";
import { useGridServiceGridData, useStructureServiceStructureData } from "openapi/queries";
import { useColorMode } from "src/context/colorMode";
import { useOpenGroups } from "src/context/openGroups";
-import { stateColor } from "src/utils/stateColor";
import Edge from "./Edge";
import { JoinNode } from "./JoinNode";
@@ -42,7 +41,7 @@ const nodeColor = (
}
if (taskInstance?.state !== undefined && !isOpen) {
- return stateColor[taskInstance.state ?? "null"];
+ return `var(--chakra-colors-${taskInstance.state}-solid)`;
}
if (isOpen && depth !== undefined && depth % 2 === 0) {
diff --git a/airflow/ui/src/layouts/Details/Graph/TaskNode.tsx b/airflow/ui/src/layouts/Details/Graph/TaskNode.tsx
index 1372e824a0c35..f6ba9b69bad71 100644
--- a/airflow/ui/src/layouts/Details/Graph/TaskNode.tsx
+++ b/airflow/ui/src/layouts/Details/Graph/TaskNode.tsx
@@ -24,7 +24,6 @@ import TaskInstanceTooltip from "src/components/TaskInstanceTooltip";
import { Status } from "src/components/ui";
import { useOpenGroups } from "src/context/openGroups";
import { pluralize } from "src/utils";
-import { stateColor } from "src/utils/stateColor";
import { NodeWrapper } from "./NodeWrapper";
import { TaskName } from "./TaskName";
@@ -67,9 +66,7 @@ export const TaskNode = ({
-
+
{isGroup ? "Task Group" : operator}
{taskInstance === undefined ? undefined : (
-
+
{taskInstance.state}
{taskInstance.try_number > 1 ? : undefined}
diff --git a/airflow/ui/src/main.tsx b/airflow/ui/src/main.tsx
index a89f0f11cbbd3..a5f6a35cfc155 100644
--- a/airflow/ui/src/main.tsx
+++ b/airflow/ui/src/main.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { ChakraProvider, defaultSystem } from "@chakra-ui/react";
+import { ChakraProvider } from "@chakra-ui/react";
import { QueryClientProvider } from "@tanstack/react-query";
import axios, { type AxiosError } from "axios";
import { StrictMode } from "react";
@@ -28,6 +28,7 @@ import { TimezoneProvider } from "src/context/timezone";
import { router } from "src/router";
import { queryClient } from "./queryClient";
+import { system } from "./theme";
// redirect to login page if the API responds with unauthorized or forbidden errors
axios.interceptors.response.use(
@@ -46,7 +47,7 @@ axios.interceptors.response.use(
createRoot(document.querySelector("#root") as HTMLDivElement).render(
-
+
diff --git a/airflow/ui/src/pages/Dag/Overview/Overview.tsx b/airflow/ui/src/pages/Dag/Overview/Overview.tsx
index a79ebfb4019b6..d89db680f746f 100644
--- a/airflow/ui/src/pages/Dag/Overview/Overview.tsx
+++ b/airflow/ui/src/pages/Dag/Overview/Overview.tsx
@@ -24,7 +24,6 @@ import { useParams } from "react-router-dom";
import { useDagRunServiceGetDagRuns, useTaskInstanceServiceGetTaskInstances } from "openapi/queries";
import TimeRangeSelector from "src/components/TimeRangeSelector";
import { TrendCountButton } from "src/components/TrendCountButton";
-import { stateColor } from "src/utils/stateColor";
const defaultHour = "168";
@@ -64,7 +63,7 @@ export const Overview = () => {
({
@@ -79,7 +78,7 @@ export const Overview = () => {
startDate={startDate}
/>
({
diff --git a/airflow/ui/src/pages/Dag/Tasks/TaskCard.tsx b/airflow/ui/src/pages/Dag/Tasks/TaskCard.tsx
index 2d517dd4e5798..db8c01c1d77c4 100644
--- a/airflow/ui/src/pages/Dag/Tasks/TaskCard.tsx
+++ b/airflow/ui/src/pages/Dag/Tasks/TaskCard.tsx
@@ -63,9 +63,7 @@ export const TaskCard = ({ dagId, task, taskInstances }: Props) => (
- {taskInstances[0].state === null ? undefined : (
- {taskInstances[0].state}
- )}
+ {taskInstances[0].state === null ? undefined : }
diff --git a/airflow/ui/src/pages/Dag/Tasks/TaskRecentRuns.tsx b/airflow/ui/src/pages/Dag/Tasks/TaskRecentRuns.tsx
index fee2b943582d0..3a7fc13d44949 100644
--- a/airflow/ui/src/pages/Dag/Tasks/TaskRecentRuns.tsx
+++ b/airflow/ui/src/pages/Dag/Tasks/TaskRecentRuns.tsx
@@ -24,7 +24,6 @@ import { Link } from "react-router-dom";
import type { TaskInstanceResponse } from "openapi/requests/types.gen";
import TaskInstanceTooltip from "src/components/TaskInstanceTooltip";
import { getTaskInstanceLink } from "src/utils/links";
-import { stateColor } from "src/utils/stateColor";
dayjs.extend(duration);
@@ -58,7 +57,7 @@ export const TaskRecentRuns = ({
;
}
+ const state = status === "healthy" ? "success" : "failed";
+
return (
-
- {title}
+
+
+
+ {title}
+
);
diff --git a/airflow/ui/src/pages/Dashboard/HistoricalMetrics/AssetEvents.tsx b/airflow/ui/src/pages/Dashboard/HistoricalMetrics/AssetEvents.tsx
index 21c425f0c5a76..2021a6add8fc7 100644
--- a/airflow/ui/src/pages/Dashboard/HistoricalMetrics/AssetEvents.tsx
+++ b/airflow/ui/src/pages/Dashboard/HistoricalMetrics/AssetEvents.tsx
@@ -51,7 +51,7 @@ export const AssetEvents = ({ assetSortBy, endDate, setAssetSortBy, startDate }:
-
+
Asset Events
diff --git a/airflow/ui/src/pages/Dashboard/HistoricalMetrics/DagRunMetrics.tsx b/airflow/ui/src/pages/Dashboard/HistoricalMetrics/DagRunMetrics.tsx
index 75b18c85fe64a..c298ee92aa2fe 100644
--- a/airflow/ui/src/pages/Dashboard/HistoricalMetrics/DagRunMetrics.tsx
+++ b/airflow/ui/src/pages/Dashboard/HistoricalMetrics/DagRunMetrics.tsx
@@ -33,7 +33,7 @@ const DAGRUN_STATES: Array = ["queued", "running", "success"
export const DagRunMetrics = ({ dagRunStates, total }: DagRunMetricsProps) => (
-
+
Dag Runs
{DAGRUN_STATES.map((state) => (
diff --git a/airflow/ui/src/pages/Dashboard/HistoricalMetrics/MetricSection.tsx b/airflow/ui/src/pages/Dashboard/HistoricalMetrics/MetricSection.tsx
index c2455a8c96161..736943afd6771 100644
--- a/airflow/ui/src/pages/Dashboard/HistoricalMetrics/MetricSection.tsx
+++ b/airflow/ui/src/pages/Dashboard/HistoricalMetrics/MetricSection.tsx
@@ -20,7 +20,6 @@ import { Box, Flex, HStack, VStack, Text } from "@chakra-ui/react";
import { MetricsBadge } from "src/components/MetricsBadge";
import { capitalize } from "src/utils";
-import { stateColor } from "src/utils/stateColor";
const BAR_WIDTH = 100;
const BAR_HEIGHT = 5;
@@ -42,14 +41,14 @@ export const MetricSection = ({ runs, state, total }: MetricSectionProps) => {
-
+
{capitalize(state)}
{statePercent}%
= [
export const TaskInstanceMetrics = ({ taskInstanceStates, total }: TaskInstanceMetricsProps) => (
-
+
Task Instances
diff --git a/airflow/ui/src/pages/Dashboard/Stats/DAGImportErrors.tsx b/airflow/ui/src/pages/Dashboard/Stats/DAGImportErrors.tsx
index e28efa0f9e05a..9b6723ae849e5 100644
--- a/airflow/ui/src/pages/Dashboard/Stats/DAGImportErrors.tsx
+++ b/airflow/ui/src/pages/Dashboard/Stats/DAGImportErrors.tsx
@@ -22,7 +22,6 @@ import { FiChevronRight } from "react-icons/fi";
import { useImportErrorServiceGetImportErrors } from "openapi/queries";
import { ErrorAlert } from "src/components/ErrorAlert";
import { MetricsBadge } from "src/components/MetricsBadge";
-import { stateColor } from "src/utils/stateColor";
import { DAGImportErrorsModal } from "./DAGImportErrorsModal";
@@ -49,7 +48,7 @@ export const DAGImportErrors = () => {
onClick={onOpen}
variant="outline"
>
-
+
Dag Import Errors
diff --git a/airflow/ui/src/pages/Dashboard/Stats/DagFilterButton.tsx b/airflow/ui/src/pages/Dashboard/Stats/DagFilterButton.tsx
index b9498566fe85a..f5cdaf49f6014 100644
--- a/airflow/ui/src/pages/Dashboard/Stats/DagFilterButton.tsx
+++ b/airflow/ui/src/pages/Dashboard/Stats/DagFilterButton.tsx
@@ -17,6 +17,7 @@
* under the License.
*/
import { Box, Text, Button } from "@chakra-ui/react";
+import type { ReactNode } from "react";
import { FiChevronRight } from "react-icons/fi";
import { Link as RouterLink } from "react-router-dom";
@@ -26,18 +27,20 @@ import { capitalize } from "src/utils";
// TODO: Add badge count once API is available
export const DagFilterButton = ({
- badgeColor,
+ colorPalette,
filter,
+ icon,
link,
}: {
- readonly badgeColor: string;
+ readonly colorPalette: string;
readonly filter: string;
+ readonly icon?: ReactNode;
readonly link: string;
}) => (
-
+ }
+ link="dags?last_dag_run_state=failed"
+ />
}
link="dags?last_dag_run_state=running"
/>
-
+
);
diff --git a/airflow/ui/src/pages/Pools/PoolBar.tsx b/airflow/ui/src/pages/Pools/PoolBar.tsx
index 1fead035016c9..0cc8a1a1c47c7 100644
--- a/airflow/ui/src/pages/Pools/PoolBar.tsx
+++ b/airflow/ui/src/pages/Pools/PoolBar.tsx
@@ -19,21 +19,20 @@
* under the License.
*/
import { Box, Flex, HStack, Text, VStack } from "@chakra-ui/react";
-import React from "react";
-import { FiActivity, FiCalendar, FiCheckCircle, FiClock, FiList, FiXCircle } from "react-icons/fi";
+import { FiXCircle } from "react-icons/fi";
import type { PoolResponse } from "openapi/requests/types.gen";
+import { StateIcon } from "src/components/StateIcon";
import { Tooltip } from "src/components/ui";
import { capitalize } from "src/utils";
-import { stateColor } from "src/utils/stateColor";
const slots = {
- open_slots: { color: stateColor.success, icon: FiCheckCircle },
- occupied_slots: { color: stateColor.up_for_retry, icon: FiXCircle },
- running_slots: { color: stateColor.running, icon: FiActivity },
- queued_slots: { color: stateColor.queued, icon: FiList },
- scheduled_slots: { color: stateColor.scheduled, icon: FiCalendar },
- deferred_slots: { color: stateColor.deferred, icon: FiClock },
+ open_slots: { color: "success", icon: },
+ occupied_slots: { color: "up_for_retry", icon: },
+ running_slots: { color: "running", icon: },
+ queued_slots: { color: "queued", icon: },
+ scheduled_slots: { color: "scheduled", icon: },
+ deferred_slots: { color: "deferred", icon: },
};
type PoolBarProps = {
@@ -50,7 +49,7 @@ const PoolBar = ({ pool }: PoolBarProps) => (
{pool.include_deferred ? (
-
+
) : undefined}
@@ -77,13 +76,13 @@ const PoolBar = ({ pool }: PoolBarProps) => (
- {React.createElement(icon, { size: 16, color: "white" })}
+ {icon}
);
diff --git a/airflow/ui/src/theme.ts b/airflow/ui/src/theme.ts
new file mode 100644
index 0000000000000..706ae0ed57e41
--- /dev/null
+++ b/airflow/ui/src/theme.ts
@@ -0,0 +1,176 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* eslint-disable perfectionist/sort-objects */
+import { createSystem, defaultConfig, defineConfig } from "@chakra-ui/react";
+
+const generateSemanticTokens = (color: string, darkContrast: string = "white") => ({
+ solid: { value: `{colors.${color}.600}` },
+ contrast: { value: { _light: "white", _dark: darkContrast } },
+ fg: { value: { _light: `{colors.${color}.800}`, _dark: `{colors.${color}.200}` } },
+ muted: { value: { _light: `{colors.${color}.200}`, _dark: `{colors.${color}.800}` } },
+ subtle: { value: { _light: `{colors.${color}.100}`, _dark: `{colors.${color}.900}` } },
+ emphasized: { value: { _light: `{colors.${color}.300}`, _dark: `{colors.${color}.700}` } },
+ focusRing: { value: { _light: `{colors.${color}.800}`, _dark: `{colors.${color}.200}` } },
+});
+
+const customConfig = defineConfig({
+ theme: {
+ tokens: {
+ colors: {
+ // Default green was too light
+ success: {
+ "50": { value: "#E0FFE0" },
+ "100": { value: "#C2FFC2" },
+ "200": { value: "#80FF80" },
+ "300": { value: "#42FF42" },
+ "400": { value: "#00FF00" },
+ "500": { value: "#00C200" },
+ "600": { value: "#008000" },
+ "700": { value: "#006100" },
+ "800": { value: "#004200" },
+ "900": { value: "#001F00" },
+ "950": { value: "#000F00" },
+ },
+ failed: defaultConfig.theme?.tokens?.colors?.red ?? {},
+ // Default gray was too dark
+ queued: {
+ "50": { value: "#F5F5F5" },
+ "100": { value: "#EBEBEB" },
+ "200": { value: "#D4D4D4" },
+ "300": { value: "#BFBFBF" },
+ "400": { value: "#ABABAB" },
+ "500": { value: "#969696" },
+ "600": { value: "#808080" },
+ "700": { value: "#616161" },
+ "800": { value: "#404040" },
+ "900": { value: "#212121" },
+ "950": { value: "#0F0F0F" },
+ },
+ skipped: defaultConfig.theme?.tokens?.colors?.pink ?? {},
+ up_for_reschedule: defaultConfig.theme?.tokens?.colors?.cyan ?? {},
+ up_for_retry: defaultConfig.theme?.tokens?.colors?.yellow ?? {},
+ upstream_failed: defaultConfig.theme?.tokens?.colors?.orange ?? {},
+ // lime
+ running: {
+ "50": { value: "#EFFBEF" },
+ "100": { value: "#DEF7DE" },
+ "200": { value: "#B9EEB9" },
+ "300": { value: "#98E698" },
+ "400": { value: "#78DE78" },
+ "500": { value: "#53D553" },
+ "600": { value: "#32CD32" },
+ "700": { value: "#269C26" },
+ "800": { value: "#196719" },
+ "900": { value: "#0D350D" },
+ "950": { value: "#061906" },
+ },
+ // violet
+ restarting: {
+ "50": { value: "#F6EBFF" },
+ "100": { value: "#EDD6FF" },
+ "200": { value: "#D9A8FF" },
+ "300": { value: "#C880FF" },
+ "400": { value: "#B657FF" },
+ "500": { value: "#A229FF" },
+ "600": { value: "#8F00FF" },
+ "700": { value: "#6E00C2" },
+ "800": { value: "#480080" },
+ "900": { value: "#260042" },
+ "950": { value: "#11001F" },
+ },
+ // mediumpurple
+ deferred: {
+ "50": { value: "#F6F3FC" },
+ "100": { value: "#EDE7F9" },
+ "200": { value: "#DACEF3" },
+ "300": { value: "#C8B6ED" },
+ "400": { value: "#B9A1E7" },
+ "500": { value: "#A689E1" },
+ "600": { value: "#9370DB" },
+ "700": { value: "#6432C8" },
+ "800": { value: "#412182" },
+ "900": { value: "#211041" },
+ "950": { value: "#100821" },
+ },
+ // tan
+ scheduled: {
+ "50": { value: "#FBF8F4" },
+ "100": { value: "#F8F3ED" },
+ "200": { value: "#F1E7DA" },
+ "300": { value: "#E8D9C4" },
+ "400": { value: "#E1CDB2" },
+ "500": { value: "#DAC1A0" },
+ "600": { value: "#D2B48C" },
+ "700": { value: "#B9894B" },
+ "800": { value: "#7D5C31" },
+ "900": { value: "#3E2E18" },
+ "950": { value: "#21180D" },
+ },
+ // lightblue
+ none: {
+ "50": { value: "#F7FBFD" },
+ "100": { value: "#F3F9FB" },
+ "200": { value: "#E4F2F7" },
+ "300": { value: "#D8ECF3" },
+ "400": { value: "#C8E5EE" },
+ "500": { value: "#BDDFEB" },
+ "600": { value: "#ADD8E6" },
+ "700": { value: "#5FB2CE" },
+ "800": { value: "#30819C" },
+ "900": { value: "#18414E" },
+ "950": { value: "#0C2027" },
+ },
+ // lightgrey
+ removed: {
+ "50": { value: "#FCFCFC" },
+ "100": { value: "#F7F7F7" },
+ "200": { value: "#F0F0F0" },
+ "300": { value: "#E8E8E8" },
+ "400": { value: "#E0E0E0" },
+ "500": { value: "#DBDBDB" },
+ "600": { value: "#D3D3D3" },
+ "700": { value: "#9E9E9E" },
+ "800": { value: "#696969" },
+ "900": { value: "#363636" },
+ "950": { value: "#1A1A1A" },
+ },
+ },
+ },
+ semanticTokens: {
+ colors: {
+ success: generateSemanticTokens("success"),
+ failed: defaultConfig.theme?.semanticTokens?.colors?.red ?? {},
+ queued: generateSemanticTokens("queued"),
+ skipped: defaultConfig.theme?.semanticTokens?.colors?.pink ?? {},
+ up_for_reschedule: defaultConfig.theme?.semanticTokens?.colors?.cyan ?? {},
+ up_for_retry: defaultConfig.theme?.semanticTokens?.colors?.yellow ?? {},
+ upstream_failed: defaultConfig.theme?.semanticTokens?.colors?.orange ?? {},
+ running: generateSemanticTokens("running"),
+ restarting: generateSemanticTokens("restarting"),
+ deferred: generateSemanticTokens("deferred"),
+ scheduled: generateSemanticTokens("scheduled"),
+ none: generateSemanticTokens("none", "black"),
+ removed: generateSemanticTokens("removed", "black"),
+ },
+ },
+ },
+});
+
+export const system = createSystem(defaultConfig, customConfig);
diff --git a/airflow/ui/src/utils/stateColor.ts b/airflow/ui/src/utils/stateColor.ts
deleted file mode 100644
index 555cd0fbdfdda..0000000000000
--- a/airflow/ui/src/utils/stateColor.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/*!
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-// TODO: replace this with Airflow config values
-
-export const stateColor = {
- deferred: "mediumpurple",
- failed: "red",
- none: "lightblue",
- null: "lightblue",
- queued: "gray",
- removed: "lightgrey",
- restarting: "violet",
- running: "lime",
- scheduled: "tan",
- skipped: "hotpink",
- success: "green",
- up_for_reschedule: "turquoise",
- up_for_retry: "gold",
- upstream_failed: "orange",
-};