|
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, |
@@ -1567,17 +1569,42 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) { |
1567 | 1569 | ); |
1568 | 1570 | }} |
1569 | 1571 | /> |
1570 | | - {isLocalDashboard && ( |
1571 | | - <Paper my="lg" p="md" data-testid="temporary-dashboard-banner"> |
1572 | | - <Flex justify="space-between" align="center"> |
1573 | | - <Text size="sm"> |
1574 | | - This is a temporary dashboard and can not be saved. |
| 1572 | + |
| 1573 | + {isLocalDashboard ? ( |
| 1574 | + <> |
| 1575 | + <Breadcrumbs mb="xs" mt="xs" fz="sm"> |
| 1576 | + <Anchor component={Link} href="/dashboards/list" fz="sm" c="dimmed"> |
| 1577 | + Dashboards |
| 1578 | + </Anchor> |
| 1579 | + <Text fz="sm" c="dimmed"> |
| 1580 | + Temporary Dashboard |
1575 | 1581 | </Text> |
1576 | | - <Button variant="primary" fw={400} onClick={onCreateDashboard}> |
1577 | | - Create New Saved Dashboard |
1578 | | - </Button> |
1579 | | - </Flex> |
1580 | | - </Paper> |
| 1582 | + </Breadcrumbs> |
| 1583 | + <Paper my="lg" p="md" data-testid="temporary-dashboard-banner"> |
| 1584 | + <Flex justify="space-between" align="center"> |
| 1585 | + <Text size="sm"> |
| 1586 | + This is a temporary dashboard and can not be saved. |
| 1587 | + </Text> |
| 1588 | + <Button |
| 1589 | + variant="primary" |
| 1590 | + fw={400} |
| 1591 | + onClick={onCreateDashboard} |
| 1592 | + data-testid="create-dashboard-button" |
| 1593 | + > |
| 1594 | + Create New Saved Dashboard |
| 1595 | + </Button> |
| 1596 | + </Flex> |
| 1597 | + </Paper> |
| 1598 | + </> |
| 1599 | + ) : ( |
| 1600 | + <Breadcrumbs mb="xs" mt="xs" fz="sm"> |
| 1601 | + <Anchor component={Link} href="/dashboards/list" fz="sm" c="dimmed"> |
| 1602 | + Dashboards |
| 1603 | + </Anchor> |
| 1604 | + <Text fz="sm" c="dimmed"> |
| 1605 | + {dashboard?.name ?? 'Untitled'} |
| 1606 | + </Text> |
| 1607 | + </Breadcrumbs> |
1581 | 1608 | )} |
1582 | 1609 | <Flex mt="xs" mb="md" justify="space-between" align="center"> |
1583 | 1610 | <DashboardName |
|
0 commit comments