style: card style

This commit is contained in:
jialin
2026-04-22 13:16:48 +08:00
committed by jialin
parent daa3d74500
commit c92f56ec8f
19 changed files with 532 additions and 222 deletions
@@ -0,0 +1,35 @@
import { BreakdownItem } from '../config/types';
export const getBreakdownRowKey = (record: BreakdownItem): string => {
const identity = record?.identity;
const current = identity?.current;
const value = identity?.value;
const key = [
current?.model_id,
current?.user_id,
current?.api_key_id,
value?.model_name,
value?.user_name,
value?.api_key_name,
value?.cluster_name,
value?.provider_name,
value?.provider_type,
record?.label,
record?.cluster_name,
record?.model_name,
record?.user_name,
record?.api_key_name,
record?.last_active,
record?.input_tokens,
record?.output_tokens,
record?.total_tokens,
record?.api_requests
]
.filter((item) => item !== null && item !== undefined && item !== '')
.join('__');
return key || JSON.stringify(record);
};
export default getBreakdownRowKey;