Skip to content

Commit af042a8

Browse files
committed
linter
1 parent 876d01a commit af042a8

File tree

7 files changed

+13
-43
lines changed

7 files changed

+13
-43
lines changed

dashboard/ai-analytics/src/app/api/extract-cost-parameters/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export async function POST(req: Request) {
110110
console.log('Available dimensions:', availableDimensions);
111111

112112
// Extract dimension values for the system prompt
113-
let dimensionValues: Record<string, { type: string, values: string[] }> = {};
113+
const dimensionValues: Record<string, { type: string, values: string[] }> = {};
114114

115115
// Map meta with data for a more structured representation
116116
if (availableDimensions && availableDimensions.meta && availableDimensions.data && availableDimensions.data.length > 0) {

dashboard/ai-analytics/src/app/components/BarList.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { useState } from 'react';
44
import { RiSearchLine } from '@remixicon/react';
55
import { BarList as TremorBarList, Card, Dialog, DialogPanel, TextInput } from '@tremor/react';
6-
import { LucideIcon } from 'lucide-react';
76

87
interface BarListItem {
98
name: string;
@@ -28,8 +27,7 @@ const defaultFormatter = (number: number) =>
2827
export default function BarList({
2928
data,
3029
valueFormatter = defaultFormatter,
31-
onSelectionChange,
32-
categoryType
30+
onSelectionChange
3331
}: BarListProps) {
3432
const [isOpen, setIsOpen] = useState(false);
3533
const [searchQuery, setSearchQuery] = useState('');

dashboard/ai-analytics/src/app/components/CostPredictionModal.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,6 @@ import { AreaChart, BarChart } from '@tremor/react';
77
import { useTinybirdToken } from '@/providers/TinybirdProvider';
88
import { fetchLLMUsage } from '@/services/tinybird';
99

10-
// Define the type for chart tooltip payload
11-
interface ChartTooltipPayload {
12-
color: string;
13-
dataKey: string;
14-
fill: string;
15-
name: string;
16-
stroke: string;
17-
value: number;
18-
payload: {
19-
date: string;
20-
actualCost: number;
21-
predictedCost: number;
22-
};
23-
}
24-
2510
interface CostPredictionModalProps {
2611
isOpen: boolean;
2712
onClose: () => void;

dashboard/ai-analytics/src/app/components/CustomBarList.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default function CustomBarList({
6262
key={item.name}
6363
className={`flex flex-col cursor-pointer p-2 rounded-lg transition-all duration-200 ${
6464
isSelected
65-
? 'bg-indigo-50 dark:bg-indigo-900/30 border-l-4 border-indigo-500'
65+
? 'bg-indigo-50 dark:bg-indigo-900/30 border-l-4 border-indigo-600'
6666
: 'hover:bg-gray-50 dark:hover:bg-gray-800 border-l-4 border-transparent'
6767
}`}
6868
onClick={() => handleBarClick(item.name)}
@@ -75,21 +75,21 @@ export default function CustomBarList({
7575
</div>
7676
)}
7777
<p className={`truncate text-sm font-medium ${
78-
isSelected ? 'text-indigo-700 dark:text-indigo-300' : 'text-gray-700 dark:text-gray-300'
78+
isSelected ? 'text-indigo-600 dark:text-indigo-400' : 'text-gray-700 dark:text-gray-300'
7979
}`}>
8080
{item.name}
8181
</p>
8282
</div>
8383
<p className={`ml-2 flex-shrink-0 text-right text-sm font-semibold ${
84-
isSelected ? 'text-indigo-700 dark:text-indigo-300' : 'text-gray-900 dark:text-gray-100'
84+
isSelected ? 'text-indigo-600 dark:text-indigo-400' : 'text-gray-900 dark:text-gray-100'
8585
}`}>
8686
{valueFormatter(item.value)}
8787
</p>
8888
</div>
8989
<div className="w-full h-1.5 bg-gray-100 dark:bg-gray-800 rounded-full overflow-hidden">
9090
<div
9191
className={`h-full rounded-full ${
92-
isSelected ? 'bg-indigo-500' : 'bg-indigo-400'
92+
isSelected ? 'bg-indigo-600' : 'bg-indigo-400'
9393
}`}
9494
style={{ width: `${percentage}%` }}
9595
/>
@@ -102,7 +102,10 @@ export default function CustomBarList({
102102

103103
return (
104104
<>
105-
<Card className="h-full w-full rounded-lg border border-gray-200 dark:border-gray-800 shadow-sm">
105+
<Card
106+
className="h-full w-full rounded-lg shadow-none"
107+
style={{ boxShadow: 'none' }}
108+
>
106109
<div className="flex items-center justify-between mb-4">
107110
<h3 className="text-lg font-semibold text-gray-900 dark:text-white">Cost Breakdown</h3>
108111
<p className="text-2xl font-bold text-indigo-600 dark:text-indigo-400">
@@ -115,7 +118,7 @@ export default function CustomBarList({
115118
{hasMoreItems && (
116119
<div className="mt-4 pt-3 border-t border-gray-100 dark:border-gray-800 flex justify-center">
117120
<button
118-
className="px-4 py-2 text-sm font-medium text-indigo-600 bg-indigo-50 rounded-md hover:bg-indigo-100 dark:text-indigo-400 dark:bg-indigo-900/20 dark:hover:bg-indigo-900/30 transition-colors"
121+
className="px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700 transition-colors"
119122
onClick={() => setIsOpen(true)}
120123
>
121124
View All ({data.length})
@@ -160,7 +163,7 @@ export default function CustomBarList({
160163
<svg xmlns="http://www.w3.org/2000/svg" className="h-12 w-12 text-gray-300 dark:text-gray-600 mb-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
161164
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
162165
</svg>
163-
<p className="text-gray-500 dark:text-gray-400">No results found for "{searchQuery}"</p>
166+
<p className="text-gray-500 dark:text-gray-400">No results found for &quot;{searchQuery}&quot;</p>
164167
<button
165168
onClick={() => setSearchQuery('')}
166169
className="mt-3 text-sm text-indigo-600 dark:text-indigo-400 hover:underline"

dashboard/ai-analytics/src/app/components/DateRangeSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default function DateRangeSelector({ onDateRangeChange }: DateRangeSelect
157157
updateUrlParams(start, end);
158158
}
159159
}
160-
}, [searchParams]);
160+
});
161161

162162
// Helper function to parse date strings
163163
const parseDate = (dateStr: string): Date | null => {

dashboard/ai-analytics/src/app/components/TabbedPane.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,6 @@ const GoogleAIIcon = () => (
3636
</svg>
3737
);
3838

39-
// Custom GPT-4 Icon
40-
const GPT4Icon = () => (
41-
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" xmlns="http://www.w3.org/2000/svg" className="text-green-600">
42-
<path d="M18.5 3h-13A2.5 2.5 0 0 0 3 5.5v13A2.5 2.5 0 0 0 5.5 21h13a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 0 18.5 3zM8 17.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v11zm5 0a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v11zm5 0a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v11z" fill="currentColor"/>
43-
</svg>
44-
);
45-
46-
// Custom Claude Icon
47-
const ClaudeIcon = () => (
48-
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" xmlns="http://www.w3.org/2000/svg" className="text-purple-600">
49-
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-4-8c0-2.21 1.79-4 4-4s4 1.79 4 4-1.79 4-4 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z" fill="currentColor"/>
50-
<path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z" fill="currentColor"/>
51-
</svg>
52-
);
53-
5439
// Helper function to get icon for provider
5540
const getProviderIcon = (provider: string) => {
5641
const lowerProvider = provider.toLowerCase();

dashboard/ai-analytics/src/app/containers/SparkChartContainer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ interface SparkChartData {
1515
}
1616

1717
interface SparkChartContainerProps {
18-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1918
data: SparkChartData;
2019
isLoading: boolean;
2120
// eslint-disable-next-line @typescript-eslint/no-explicit-any

0 commit comments

Comments
 (0)