} />
{check.name}
diff --git a/src/components/HealthChecks/__tests__/CheckLink.unit.test.tsx b/src/components/HealthChecks/__tests__/CheckLink.unit.test.tsx
new file mode 100644
index 0000000000..16c43000a4
--- /dev/null
+++ b/src/components/HealthChecks/__tests__/CheckLink.unit.test.tsx
@@ -0,0 +1,48 @@
+import { render, screen } from "@testing-library/react";
+import { MemoryRouter } from "react-router-dom";
+import { CheckLink } from "./../CheckLink";
+import { ComponentHealthCheckView } from "../../../api/services/topology";
+
+describe("CheckLink", () => {
+ const check: ComponentHealthCheckView = {
+ id: "1",
+ name: "Example Check",
+ type: "example",
+ status: "healthy",
+ component_id: "1",
+ severity: "critical"
+ };
+
+ it("renders with healthy status", () => {
+ render(
+
+
+
+ );
+
+ const linkElement = screen.getByRole("link");
+ expect(linkElement).toHaveAttribute(
+ "href",
+ "/health?checkId=1&timeRange=1h"
+ );
+
+ const statusElement = screen.getByTestId("health-check-status");
+ expect(statusElement).toHaveClass("bg-green-400");
+
+ const nameElement = screen.getByText("Example Check");
+ expect(nameElement).toBeInTheDocument();
+ });
+
+ it("renders with unhealthy status", () => {
+ const unhealthyCheck = { ...check, status: "unhealthy" };
+
+ render(
+
+
+
+ );
+
+ const statusElement = screen.getByTestId("health-check-status");
+ expect(statusElement).toHaveClass("bg-red-400");
+ });
+});
diff --git a/src/components/Status/HealthCheckStatus.story.tsx b/src/components/Status/HealthCheckStatus.story.tsx
new file mode 100644
index 0000000000..c769945abb
--- /dev/null
+++ b/src/components/Status/HealthCheckStatus.story.tsx
@@ -0,0 +1,41 @@
+import { Meta, Story } from "@storybook/react";
+import { HealthCheckStatus } from "./HealthCheckStatus";
+
+type StatusProps = React.ComponentProps;
+
+export default {
+ title: "Components/HealthCheckStatus",
+ component: HealthCheckStatus
+} as Meta;
+
+export const Default: Story = (args) => (
+
+);
+
+export const Mixed: Story = (args) => (
+
+);
+
+Mixed.args = {
+ isMixed: true
+};
+
+export const Healthy: Story = (args) => (
+
+);
+
+Healthy.args = {
+ check: {
+ status: "healthy"
+ }
+};
+
+export const Unhealthy: Story = (args) => (
+
+);
+
+Unhealthy.args = {
+ check: {
+ status: "unhealthy"
+ }
+};
diff --git a/src/components/Status/HealthCheckStatus.tsx b/src/components/Status/HealthCheckStatus.tsx
new file mode 100644
index 0000000000..241a58fdf8
--- /dev/null
+++ b/src/components/Status/HealthCheckStatus.tsx
@@ -0,0 +1,27 @@
+import { HealthCheck } from "../../types/healthChecks";
+
+type StatusProps = {
+ check?: Pick;
+ isMixed?: boolean;
+ className?: string;
+};
+
+export function HealthCheckStatus({
+ check,
+ isMixed = false,
+ className = ""
+}: StatusProps) {
+ const color = isMixed
+ ? "bg-light-orange"
+ : check?.status === "healthy"
+ ? "bg-green-400"
+ : "bg-red-400";
+ return (
+
+ );
+}
diff --git a/src/components/Status/__tests__/HealthCheckStatus.unit.test.tsx b/src/components/Status/__tests__/HealthCheckStatus.unit.test.tsx
new file mode 100644
index 0000000000..466dd02243
--- /dev/null
+++ b/src/components/Status/__tests__/HealthCheckStatus.unit.test.tsx
@@ -0,0 +1,52 @@
+import { render, screen } from "@testing-library/react";
+import { HealthCheckStatus } from "./../HealthCheckStatus";
+
+describe("HealthCheckStatus", () => {
+ const testCases = [
+ {
+ check: {
+ status: "healthy"
+ },
+ isMixed: false,
+ className: "",
+ expectedColor: "bg-green-400"
+ },
+ {
+ check: {
+ status: "unhealthy"
+ },
+ isMixed: false,
+ className: "",
+ expectedColor: "bg-red-400"
+ },
+ {
+ check: {
+ status: "unhealthy"
+ },
+ isMixed: true,
+ className: "",
+ expectedColor: "bg-light-orange"
+ },
+ {
+ check: undefined,
+ isMixed: false,
+ className: "bg-red-400",
+ expectedColor: "bg-red-400"
+ }
+ ];
+
+ test.each(testCases)(
+ "renders with check=%o, isMixed=%p, className=%p",
+ ({ check, isMixed, className, expectedColor }) => {
+ render(
+
+ );
+ const statusElement = screen.getByTestId("health-check-status");
+ expect(statusElement).toHaveClass(`${expectedColor}`);
+ }
+ );
+});