diff --git a/ui/litellm-dashboard/src/components/guardrails/GuardrailTestPlayground.tsx b/ui/litellm-dashboard/src/components/guardrails/GuardrailTestPlayground.tsx index 462e6a5f684..751602079ca 100644 --- a/ui/litellm-dashboard/src/components/guardrails/GuardrailTestPlayground.tsx +++ b/ui/litellm-dashboard/src/components/guardrails/GuardrailTestPlayground.tsx @@ -1,6 +1,5 @@ import React, { useState } from "react"; -import { Card, Title, Text, TextInput } from "@tremor/react"; -import { List, Empty, Spin, Checkbox } from "antd"; +import { Card, List, Empty, Spin, Input } from "antd"; import { ExperimentOutlined, SearchOutlined } from "@ant-design/icons"; import GuardrailTestPanel from "./GuardrailTestPanel"; import { applyGuardrail } from "../networking"; @@ -117,18 +116,18 @@ const GuardrailTestPlayground: React.FC = ({ return (
- +
{/* Left Sidebar - Guardrails List */}
- Guardrails - Guardrails + } placeholder="Search guardrails..." value={searchQuery} - onValueChange={setSearchQuery} + onChange={(e) => setSearchQuery(e.target.value)} />
@@ -156,24 +155,14 @@ const GuardrailTestPlayground: React.FC = ({ toggleGuardrailSelection(guardrail.guardrail_name); } }} - className={`cursor-pointer hover:bg-gray-50 transition-colors px-4 ${ + style={{ paddingLeft: 24, paddingRight: 16 }} + className={`cursor-pointer hover:bg-gray-50 transition-colors ${ selectedGuardrails.has(guardrail.guardrail_name || "") ? "bg-blue-50 border-l-4 border-l-blue-500" : "border-l-4 border-l-transparent" }`} > { - e.stopPropagation(); - if (guardrail.guardrail_name) { - toggleGuardrailSelection(guardrail.guardrail_name); - } - }} - /> - } title={
@@ -206,29 +195,29 @@ const GuardrailTestPlayground: React.FC = ({
- + {selectedGuardrails.size} of {filteredGuardrails.length} selected - +
{/* Right Panel - Test Area */}
- Guardrail Testing Playground +

Guardrail Testing Playground

{selectedGuardrails.size === 0 ? (
- +

Select Guardrails to Test - - +

+

Choose one or more guardrails from the left sidebar to start testing and comparing results. - +

) : (