|
9 | 9 | } from 'react'; |
10 | 10 | import dynamic from 'next/dynamic'; |
11 | 11 | import Head from 'next/head'; |
| 12 | +import Link from 'next/link'; |
12 | 13 | import { useRouter } from 'next/router'; |
13 | 14 | import { formatRelative } from 'date-fns'; |
14 | 15 | import produce from 'immer'; |
@@ -38,11 +39,12 @@ import { |
38 | 39 | SearchConditionLanguage, |
39 | 40 | SourceKind, |
40 | 41 | SQLInterval, |
41 | | - TSource, |
42 | 42 | } from '@hyperdx/common-utils/dist/types'; |
43 | 43 | import { |
44 | 44 | ActionIcon, |
| 45 | + Anchor, |
45 | 46 | Box, |
| 47 | + Breadcrumbs, |
46 | 48 | Button, |
47 | 49 | Flex, |
48 | 50 | Group, |
@@ -1495,17 +1497,42 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) { |
1495 | 1497 | ); |
1496 | 1498 | }} |
1497 | 1499 | /> |
1498 | | - {isLocalDashboard && ( |
1499 | | - <Paper my="lg" p="md" data-testid="temporary-dashboard-banner"> |
1500 | | - <Flex justify="space-between" align="center"> |
1501 | | - <Text size="sm"> |
1502 | | - This is a temporary dashboard and can not be saved. |
| 1500 | + |
| 1501 | + {isLocalDashboard ? ( |
| 1502 | + <> |
| 1503 | + <Breadcrumbs mb="xs" mt="xs" fz="sm"> |
| 1504 | + <Anchor component={Link} href="/dashboards/list" fz="sm" c="dimmed"> |
| 1505 | + Dashboards |
| 1506 | + </Anchor> |
| 1507 | + <Text fz="sm" c="dimmed"> |
| 1508 | + Temporary Dashboard |
1503 | 1509 | </Text> |
1504 | | - <Button variant="primary" fw={400} onClick={onCreateDashboard}> |
1505 | | - Create New Saved Dashboard |
1506 | | - </Button> |
1507 | | - </Flex> |
1508 | | - </Paper> |
| 1510 | + </Breadcrumbs> |
| 1511 | + <Paper my="lg" p="md" data-testid="temporary-dashboard-banner"> |
| 1512 | + <Flex justify="space-between" align="center"> |
| 1513 | + <Text size="sm"> |
| 1514 | + This is a temporary dashboard and can not be saved. |
| 1515 | + </Text> |
| 1516 | + <Button |
| 1517 | + variant="primary" |
| 1518 | + fw={400} |
| 1519 | + onClick={onCreateDashboard} |
| 1520 | + data-testid="create-dashboard-button" |
| 1521 | + > |
| 1522 | + Create New Saved Dashboard |
| 1523 | + </Button> |
| 1524 | + </Flex> |
| 1525 | + </Paper> |
| 1526 | + </> |
| 1527 | + ) : ( |
| 1528 | + <Breadcrumbs mb="xs" mt="xs" fz="sm"> |
| 1529 | + <Anchor component={Link} href="/dashboards/list" fz="sm" c="dimmed"> |
| 1530 | + Dashboards |
| 1531 | + </Anchor> |
| 1532 | + <Text fz="sm" c="dimmed"> |
| 1533 | + {dashboard?.name ?? 'Untitled'} |
| 1534 | + </Text> |
| 1535 | + </Breadcrumbs> |
1509 | 1536 | )} |
1510 | 1537 | <Flex mt="xs" mb="md" justify="space-between" align="center"> |
1511 | 1538 | <DashboardName |
|
0 commit comments