diff --git a/ui/litellm-dashboard/src/components/common_components/KeyLifecycleSettings.tsx b/ui/litellm-dashboard/src/components/common_components/KeyLifecycleSettings.tsx index 8e286574da4..ca0d8f67b72 100644 --- a/ui/litellm-dashboard/src/components/common_components/KeyLifecycleSettings.tsx +++ b/ui/litellm-dashboard/src/components/common_components/KeyLifecycleSettings.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React from "react"; import { Select, Tooltip, Divider, Switch } from "antd"; import { InfoCircleOutlined } from "@ant-design/icons"; import { TextInput } from "@tremor/react"; @@ -20,31 +20,6 @@ const KeyLifecycleSettings: React.FC = ({ rotationInterval, onRotationIntervalChange, }) => { - // Predefined intervals - const predefinedIntervals = ["7d", "30d", "90d", "180d", "365d"]; - - // Check if current interval is custom - const isCustomInterval = rotationInterval && !predefinedIntervals.includes(rotationInterval); - - const [showCustomInput, setShowCustomInput] = useState(isCustomInterval); - const [customInterval, setCustomInterval] = useState(isCustomInterval ? rotationInterval : ""); - - const handleIntervalChange = (value: string) => { - if (value === "custom") { - setShowCustomInput(true); - // Don't change the actual interval yet, wait for custom input - } else { - setShowCustomInput(false); - setCustomInterval(""); - onRotationIntervalChange(value); - } - }; - - const handleCustomIntervalChange = (e: React.ChangeEvent) => { - const value = e.target.value; - setCustomInterval(value); - onRotationIntervalChange(value); - }; return (
{/* Key Expiry Section */} @@ -96,34 +71,18 @@ const KeyLifecycleSettings: React.FC = ({ -
- - - {showCustomInput && ( -
- -
- Supported formats: seconds (s), minutes (m), hours (h), days (d) -
-
- )} -
+
)}