Skip to content

Commit 0920836

Browse files
committed
add dashboard
1 parent 09635fd commit 0920836

File tree

9 files changed

+9
-64
lines changed

9 files changed

+9
-64
lines changed

apps/web/src/components/tools/vercel_logs/cache-stats-chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LineChart, Line, XAxis, YAxis } from 'recharts'
2-
import { ChartContainer, ChartTooltip, ChartConfig, ChartTooltipContent } from '@/components/ui/chart'
2+
import { ChartContainer, ChartTooltip, ChartConfig } from '@/components/ui/chart'
33
import { format } from 'date-fns'
44

55
interface CacheData {

apps/web/src/components/tools/vercel_logs/dashboard.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useQueryState } from 'nuqs'
44
import { useEffect, useState } from 'react'
55
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
66
import { pipe } from '@/lib/tinybird'
7-
import { StatusDistributionChart } from './status-distribution-chart'
87
import { ErrorsChart } from './errors-chart'
98
import { CacheStatsChart } from './cache-stats-chart'
109
import { ResponseTimesChart } from './response-times-chart'
@@ -19,10 +18,15 @@ export default function VercelLogsDashboard() {
1918
const [eventType, setEventType] = useState('')
2019
const [source, setSource] = useState('')
2120
const [isLoading, setIsLoading] = useState(true)
21+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2222
const [requestsData, setRequestsData] = useState<any[]>([])
23+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2324
const [errorsData, setErrorsData] = useState<any[]>([])
25+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2426
const [responseTimesData, setResponseTimesData] = useState<any[]>([])
27+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2528
const [topPathsData, setTopPathsData] = useState<any[]>([])
29+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2630
const [cacheStatsData, setCacheStatsData] = useState<any[]>([])
2731
const [topPathsPage, setTopPathsPage] = useState(0)
2832
const [topPathsLoading, setTopPathsLoading] = useState(false)

apps/web/src/components/tools/vercel_logs/errors-chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LineChart, Line, XAxis, YAxis } from 'recharts'
2-
import { ChartContainer, ChartTooltip, ChartConfig, ChartTooltipContent } from '@/components/ui/chart'
2+
import { ChartContainer, ChartTooltip, ChartConfig } from '@/components/ui/chart'
33
import { format } from 'date-fns'
44

55
interface ErrorData {

apps/web/src/components/tools/vercel_logs/filters.tsx

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,9 @@ export function VercelFilters({
101101
token,
102102
className,
103103
environment,
104-
host,
105104
project,
106-
eventType,
107-
source,
108105
onEnvironmentChange,
109-
onHostChange,
110-
onProjectChange,
111-
onEventTypeChange,
112-
onSourceChange
106+
onProjectChange
113107
}: VercelFiltersProps) {
114108
return (
115109
<div className={cn("flex flex-wrap gap-2", className)}>
@@ -120,34 +114,13 @@ export function VercelFilters({
120114
value={environment}
121115
onChange={onEnvironmentChange}
122116
/>
123-
{/* <Filter
124-
token={token}
125-
pipeName="vercel_hosts"
126-
label="Host"
127-
value={host}
128-
onChange={onHostChange}
129-
/> */}
130117
<Filter
131118
token={token}
132119
pipeName="vercel_projects"
133120
label="Project"
134121
value={project}
135122
onChange={onProjectChange}
136123
/>
137-
{/* <Filter
138-
token={token}
139-
pipeName="vercel_event_types"
140-
label="Event Type"
141-
value={eventType}
142-
onChange={onEventTypeChange}
143-
/>
144-
<Filter
145-
token={token}
146-
pipeName="vercel_sources"
147-
label="Source"
148-
value={source}
149-
onChange={onSourceChange}
150-
/> */}
151124
</div>
152125
)
153126
}

apps/web/src/components/tools/vercel_logs/response-times-chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LineChart, Line, XAxis, YAxis } from 'recharts'
2-
import { ChartContainer, ChartTooltip, ChartConfig, ChartTooltipContent } from '@/components/ui/chart'
2+
import { ChartContainer, ChartTooltip, ChartConfig } from '@/components/ui/chart'
33
import { format } from 'date-fns'
44

55
interface ResponseTimeData {

apps/web/src/components/tools/vercel_logs/top-paths-table.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useState } from 'react'
21
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
32
import { Button } from '@/components/ui/button'
43
import { ChevronLeft, ChevronRight } from 'lucide-react'

tinybird/pipes/vercel_event_types.pipe

Lines changed: 0 additions & 10 deletions
This file was deleted.

tinybird/pipes/vercel_hosts.pipe

Lines changed: 0 additions & 11 deletions
This file was deleted.

tinybird/pipes/vercel_sources.pipe

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)