mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
[UI QA Fixes] Stable release (#13231)
* qa - user agent view * fixes for usage time selector
This commit is contained in:
parent
cd9c388a3f
commit
b297dffba5
2 changed files with 9 additions and 20 deletions
|
|
@ -198,19 +198,7 @@ const AdvancedDatePicker: React.FC<AdvancedDatePickerProps> = ({
|
|||
const { from, to } = option.getValue()
|
||||
const newValue = { from, to }
|
||||
|
||||
// Immediately apply the selected option
|
||||
onValueChange(newValue)
|
||||
|
||||
// Apply the same background adjustment logic as the original component
|
||||
requestIdleCallback(
|
||||
() => {
|
||||
const adjustedValue = adjustDateRange(newValue)
|
||||
onValueChange(adjustedValue)
|
||||
},
|
||||
{ timeout: 100 },
|
||||
)
|
||||
|
||||
// Update local state to reflect the selection
|
||||
// Update local state to reflect the selection (don't apply immediately)
|
||||
setTempValue(newValue)
|
||||
setSelectedOption(option.shortLabel)
|
||||
|
||||
|
|
@ -218,8 +206,7 @@ const AdvancedDatePicker: React.FC<AdvancedDatePickerProps> = ({
|
|||
setStartDate(moment(from).format("YYYY-MM-DD"))
|
||||
setEndDate(moment(to).format("YYYY-MM-DD"))
|
||||
|
||||
// Close the dropdown
|
||||
setIsOpen(false)
|
||||
// Don't close the dropdown - let user click Apply to confirm
|
||||
}
|
||||
|
||||
const updateTempValueFromInputs = useCallback(() => {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import {
|
|||
TabPanel,
|
||||
TabPanels,
|
||||
} from "@tremor/react";
|
||||
import { Select } from "antd";
|
||||
import { Select, Tooltip } from "antd";
|
||||
import { formatNumberWithCommas } from "@/utils/dataUtils";
|
||||
import { userAgentSummaryCall, tagDauCall, tagWauCall, tagMauCall, tagDistinctCall } from "./networking";
|
||||
import AdvancedDatePicker from "./shared/advanced_date_picker";
|
||||
|
|
@ -241,7 +241,7 @@ const UserAgentActivity: React.FC<UserAgentActivityProps> = ({
|
|||
return tag;
|
||||
};
|
||||
|
||||
// Helper function to truncate user agent name with tooltip
|
||||
// Helper function to truncate user agent name (used with Ant Design Tooltip)
|
||||
const truncateUserAgent = (userAgent: string): string => {
|
||||
if (userAgent.length > 15) {
|
||||
return userAgent.substring(0, 15) + "...";
|
||||
|
|
@ -450,9 +450,11 @@ const UserAgentActivity: React.FC<UserAgentActivityProps> = ({
|
|||
const displayName = truncateUserAgent(userAgent);
|
||||
return (
|
||||
<Card key={index}>
|
||||
<Title className="truncate" title={userAgent}>
|
||||
{displayName}
|
||||
</Title>
|
||||
<Tooltip title={userAgent} placement="top">
|
||||
<Title className="truncate">
|
||||
{displayName}
|
||||
</Title>
|
||||
</Tooltip>
|
||||
<div className="mt-4 space-y-3">
|
||||
<div>
|
||||
<Text className="text-sm text-gray-600">Success Requests</Text>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue