diff --git a/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailsMonitorView.tsx b/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailsMonitorView.tsx index 7214b0642b6..a53375bc389 100644 --- a/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailsMonitorView.tsx +++ b/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailsMonitorView.tsx @@ -1,3 +1,4 @@ +// eslint-disable-next-line litellm-ui/no-banned-ui-imports import type { DateRangePickerValue } from "@tremor/react"; import React, { useCallback, useMemo, useState } from "react"; import { formatDate } from "@/components/networking"; diff --git a/ui/litellm-dashboard/src/components/guardrails/guardrail_garden.tsx b/ui/litellm-dashboard/src/components/guardrails/guardrail_garden.tsx index d95ae07e7f3..8aeccc97aa6 100644 --- a/ui/litellm-dashboard/src/components/guardrails/guardrail_garden.tsx +++ b/ui/litellm-dashboard/src/components/guardrails/guardrail_garden.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; -import { Input } from "antd"; -import { SearchOutlined, ArrowRightOutlined } from "@ant-design/icons"; +import { Input } from "@/components/ui/input"; +import { ArrowRight, Search } from "lucide-react"; import { GuardrailCardInfo, ALL_CARDS } from "./guardrail_garden_data"; import GuardrailCard from "./guardrail_garden_card"; import GuardrailDetailView from "./guardrail_garden_detail"; @@ -10,9 +10,14 @@ interface GuardrailGardenProps { onGuardrailCreated: () => void; } -const GuardrailGarden: React.FC = ({ accessToken, onGuardrailCreated }) => { +const GuardrailGarden: React.FC = ({ + accessToken, + onGuardrailCreated, +}) => { const [searchQuery, setSearchQuery] = useState(""); - const [selectedCard, setSelectedCard] = useState(null); + const [selectedCard, setSelectedCard] = useState( + null, + ); const [showAllLitellm, setShowAllLitellm] = useState(false); const CARDS_PER_ROW = 5; const VISIBLE_ROWS = 2; @@ -43,63 +48,83 @@ const GuardrailGarden: React.FC = ({ accessToken, onGuardr return (
- {/* Search Bar */} -
- } - value={searchQuery} - onChange={(e) => setSearchQuery(e.target.value)} - style={{ borderRadius: 8 }} - /> +
+
+ + setSearchQuery(e.target.value)} + className="pl-9 h-11 rounded-lg" + /> +
- {/* LiteLLM Content Filter Section */} -
-
-

LiteLLM Content Filter

- +
+

+ LiteLLM Content Filter +

+
-

- Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost. +

+ Built-in guardrails powered by LiteLLM. Zero latency, no external + dependencies, no additional cost.

-
- {(showAllLitellm ? litellmCards : litellmCards.slice(0, CARDS_PER_ROW * VISIBLE_ROWS)).map((card) => ( - setSelectedCard(card)} /> +
+ {(showAllLitellm + ? litellmCards + : litellmCards.slice(0, CARDS_PER_ROW * VISIBLE_ROWS) + ).map((card) => ( + setSelectedCard(card)} + /> ))}
- {/* Partner Guardrails Section */} -
-

Partner Guardrails

-

- Third-party guardrail integrations from leading AI security providers. +

+

+ Partner Guardrails +

+

+ Third-party guardrail integrations from leading AI security + providers.

-
+
{partnerCards.map((card) => ( - setSelectedCard(card)} /> + setSelectedCard(card)} + /> ))}
diff --git a/ui/litellm-dashboard/src/components/guardrails/pii_configuration.tsx b/ui/litellm-dashboard/src/components/guardrails/pii_configuration.tsx index b47f6b12f9d..6789dc7df23 100644 --- a/ui/litellm-dashboard/src/components/guardrails/pii_configuration.tsx +++ b/ui/litellm-dashboard/src/components/guardrails/pii_configuration.tsx @@ -1,10 +1,7 @@ -import { Typography } from "antd"; import React, { useState } from "react"; import { CategoryFilter, PiiEntityList, QuickActions } from "./pii_components"; import { PiiConfigurationProps } from "./types"; -const { Title, Text } = Typography; - /** * A reusable component for rendering PII entity selection and action configuration * Used in both add and edit guardrail forms @@ -57,11 +54,13 @@ const PiiConfiguration: React.FC = ({
- + <h4 className="m-0 font-semibold text-foreground text-base"> Configure PII Protection - +
- {selectedEntities.length} items selected + + {selectedEntities.length} items selected +