1
- import { Fragment , ReactNode , useCallback , useEffect , useMemo , useRef , useState } from 'react' ;
2
- import { addDays , formatDate , formatISO , parse as parseDate } from 'date-fns' ;
1
+ import { Fragment , ReactNode , useCallback , useMemo , useRef , useState } from 'react' ;
2
+ import { formatDate , formatISO , parse as parseDate } from 'date-fns' ;
3
3
import { formatInTimeZone , toZonedTime } from 'date-fns-tz' ;
4
4
import {
5
5
AlertTriangle ,
6
6
ArrowUpDown ,
7
- CalendarIcon ,
8
- ChevronRight ,
9
7
Clock ,
10
8
ExternalLinkIcon ,
11
9
FilterIcon ,
@@ -17,27 +15,15 @@ import { GraphQLHighlight } from '@/components/common/GraphQLSDLBlock';
17
15
import { Page , TargetLayout } from '@/components/layouts/target' ;
18
16
import { Badge } from '@/components/ui/badge' ;
19
17
import { Button } from '@/components/ui/button' ;
20
- import { Calendar } from '@/components/ui/calendar' ;
21
18
import {
22
19
ChartConfig ,
23
20
ChartContainer ,
24
21
ChartTooltip ,
25
22
ChartTooltipContent ,
26
23
} from '@/components/ui/chart' ;
27
- import { Collapsible , CollapsibleContent , CollapsibleTrigger } from '@/components/ui/collapsible' ;
28
- import { Input } from '@/components/ui/input' ;
29
- import { Label } from '@/components/ui/label' ;
30
24
import { Meta } from '@/components/ui/meta' ;
31
- import { Popover , PopoverContent , PopoverTrigger } from '@/components/ui/popover' ;
32
25
import { ResizableHandle , ResizablePanel , ResizablePanelGroup } from '@/components/ui/resizable' ;
33
26
import { ScrollArea } from '@/components/ui/scroll-area' ;
34
- import {
35
- Select ,
36
- SelectContent ,
37
- SelectItem ,
38
- SelectTrigger ,
39
- SelectValue ,
40
- } from '@/components/ui/select' ;
41
27
import {
42
28
Sheet ,
43
29
SheetContent ,
@@ -48,13 +34,9 @@ import {
48
34
import {
49
35
Sidebar ,
50
36
SidebarContent ,
51
- SidebarGroup ,
52
- SidebarGroupContent ,
53
37
SidebarGroupLabel ,
54
38
SidebarInset ,
55
- SidebarMenu ,
56
39
SidebarProvider ,
57
- SidebarSeparator ,
58
40
} from '@/components/ui/sidebar' ;
59
41
import {
60
42
Table ,
@@ -67,7 +49,6 @@ import {
67
49
import { Tooltip , TooltipContent , TooltipProvider , TooltipTrigger } from '@/components/ui/tooltip' ;
68
50
import { formatDuration } from '@/lib/hooks' ;
69
51
import { cn } from '@/lib/utils' ;
70
- import * as SliderPrimitive from '@radix-ui/react-slider' ;
71
52
import { Link } from '@tanstack/react-router' ;
72
53
import {
73
54
ColumnDef ,
@@ -83,7 +64,6 @@ import {
83
64
} from '@tanstack/react-table' ;
84
65
import {
85
66
DurationFilter ,
86
- FilterInput ,
87
67
MultiInputFilter ,
88
68
MultiSelectFilter ,
89
69
TimelineFilter ,
@@ -268,17 +248,9 @@ const chartConfig = {
268
248
} satisfies ChartConfig ;
269
249
270
250
function Traffic ( ) {
271
- const total = useMemo (
272
- ( ) => ( {
273
- ok : chartData . reduce ( ( acc , curr ) => acc + curr . ok , 0 ) ,
274
- error : chartData . reduce ( ( acc , curr ) => acc + curr . error , 0 ) ,
275
- } ) ,
276
- [ ] ,
277
- ) ;
278
-
279
251
const [ refAreaLeft , setRefAreaLeft ] = useState < string | null > ( null ) ;
280
252
const [ refAreaRight , setRefAreaRight ] = useState < string | null > ( null ) ;
281
- const [ zoomedData , setZoomedData ] = useState < typeof data | null > ( null ) ;
253
+ const [ _ , setZoomedData ] = useState < typeof data | null > ( null ) ;
282
254
const [ isSelecting , setIsSelecting ] = useState ( false ) ;
283
255
const chartContainerRef = useRef < HTMLDivElement > ( null ) ;
284
256
@@ -1878,21 +1850,21 @@ function TraceSheet({ trace }: { trace: Trace | null }) {
1878
1850
function SearchBar ( props : { onFiltersOpenChange : ( ) => void } ) {
1879
1851
return null ;
1880
1852
1881
- return (
1882
- < div className = "flex gap-x-4" >
1883
- < Button
1884
- variant = "outline"
1885
- className = "bg-background size-10 p-0"
1886
- onClick = { props . onFiltersOpenChange }
1887
- >
1888
- < FilterIcon className = "size-4" />
1889
- </ Button >
1890
- < div className = "relative w-full" >
1891
- < SearchIcon className = "text-muted-foreground absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2" />
1892
- < Input type = "search" className = "pl-9" placeholder = "Search..." { ...props } />
1893
- </ div >
1894
- </ div >
1895
- ) ;
1853
+ // return (
1854
+ // <div className="flex gap-x-4">
1855
+ // <Button
1856
+ // variant="outline"
1857
+ // className="bg-background size-10 p-0"
1858
+ // onClick={props.onFiltersOpenChange}
1859
+ // >
1860
+ // <FilterIcon className="size-4" />
1861
+ // </Button>
1862
+ // <div className="relative w-full">
1863
+ // <SearchIcon className="text-muted-foreground absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2" />
1864
+ // <Input type="search" className="pl-9" placeholder="Search..." {...props} />
1865
+ // </div>
1866
+ // </div>
1867
+ // );
1896
1868
}
1897
1869
1898
1870
function TargetInsightsNewPageContent ( ) {
0 commit comments