|
1 | 1 | import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; |
2 | 2 | import Head from 'next/head'; |
3 | 3 | import { sub } from 'date-fns'; |
4 | | -import { |
5 | | - parseAsString, |
6 | | - parseAsStringEnum, |
7 | | - useQueryState, |
8 | | - useQueryStates, |
9 | | -} from 'nuqs'; |
| 4 | +import { parseAsString, parseAsStringEnum, useQueryStates } from 'nuqs'; |
10 | 5 | import { useForm, useWatch } from 'react-hook-form'; |
11 | 6 | import { NumberParam } from 'serialize-query-params'; |
12 | | -import { |
13 | | - StringParam, |
14 | | - useQueryParam, |
15 | | - useQueryParams, |
16 | | - withDefault, |
17 | | -} from 'use-query-params'; |
| 7 | +import { StringParam, useQueryParams, withDefault } from 'use-query-params'; |
18 | 8 | import { tcFromSource } from '@hyperdx/common-utils/dist/core/metadata'; |
19 | 9 | import { |
20 | | - DateRange, |
21 | 10 | SearchCondition, |
22 | 11 | SearchConditionLanguage, |
23 | 12 | SourceKind, |
24 | | - TSource, |
25 | 13 | } from '@hyperdx/common-utils/dist/types'; |
26 | 14 | import { |
27 | 15 | Alert, |
28 | 16 | Box, |
29 | 17 | Button, |
| 18 | + Center, |
30 | 19 | Flex, |
31 | | - Grid, |
32 | 20 | Group, |
33 | | - SegmentedControl, |
34 | 21 | Stack, |
35 | | - Tabs, |
36 | 22 | Text, |
37 | 23 | } from '@mantine/core'; |
38 | | -import { notifications } from '@mantine/notifications'; |
39 | 24 | import { |
40 | 25 | IconDeviceLaptop, |
41 | 26 | IconInfoCircleFilled, |
42 | 27 | IconPlayerPlay, |
| 28 | + IconRefresh, |
43 | 29 | } from '@tabler/icons-react'; |
44 | 30 | import { useVirtualizer } from '@tanstack/react-virtual'; |
45 | 31 |
|
46 | 32 | import { SourceSelectControlled } from '@/components/SourceSelect'; |
47 | 33 | import { TimePicker } from '@/components/TimePicker'; |
48 | | -import { getMetadata } from '@/metadata'; |
49 | 34 | import { parseTimeQuery, useNewTimeQuery } from '@/timeQuery'; |
50 | 35 |
|
51 | 36 | import { SQLInlineEditorControlled } from './components/SQLInlineEditor'; |
@@ -137,14 +122,10 @@ function SessionCardList({ |
137 | 122 | return ( |
138 | 123 | <> |
139 | 124 | {isSessionLoading === true && ( |
140 | | - <div className="text-center mt-8"> |
141 | | - <div |
142 | | - className="spinner-border me-2" |
143 | | - role="status" |
144 | | - style={{ width: 14, height: 14 }} |
145 | | - /> |
| 125 | + <Group mt="md" align="center" justify="center" gap="xs"> |
| 126 | + <IconRefresh className="spin-animate" size={14} /> |
146 | 127 | Searching sessions... |
147 | | - </div> |
| 128 | + </Group> |
148 | 129 | )} |
149 | 130 | {!isSessionLoading && sessions.length === 0 && ( |
150 | 131 | <div className="text-center align-items-center justify-content-center my-3"> |
@@ -503,14 +484,10 @@ export default function SessionsPage() { |
503 | 484 | </form> |
504 | 485 |
|
505 | 486 | {isSessionsLoading || isSessionSourceLoading ? ( |
506 | | - <div className="text-center mt-8"> |
507 | | - <div |
508 | | - className="spinner-border me-2" |
509 | | - role="status" |
510 | | - style={{ width: 14, height: 14 }} |
511 | | - /> |
| 487 | + <Group mt="md" align="center" justify="center" gap="xs"> |
| 488 | + <IconRefresh className="spin-animate" size={14} /> |
512 | 489 | {isSessionSourceLoading ? 'Loading...' : 'Searching sessions...'} |
513 | | - </div> |
| 490 | + </Group> |
514 | 491 | ) : ( |
515 | 492 | <> |
516 | 493 | {sessionSource && sessionSource.kind !== SourceKind.Session && ( |
|
0 commit comments