1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 08:48:05 +00:00

add tooltip for bgp table when AS path lenght is 0

This commit is contained in:
thatmattlove 2024-02-28 22:56:34 -05:00
parent f0028a3df6
commit cfd8f0d670
2 changed files with 100 additions and 94 deletions

View file

@ -1,12 +1,12 @@
import { forwardRef } from 'react';
import { Text, Box, Tooltip, Menu, MenuButton, MenuList, Link, Flex } from '@chakra-ui/react';
import { Box, Flex, Link, Menu, MenuButton, MenuList, Text, Tooltip } from '@chakra-ui/react';
import dayjs from 'dayjs';
import relativeTimePlugin from 'dayjs/plugin/relativeTime';
import utcPlugin from 'dayjs/plugin/utc';
import { If, Then, Else } from 'react-if';
import { forwardRef } from 'react';
import { Else, If, Then } from 'react-if';
import { useConfig } from '~/context';
import { DynamicIcon } from '~/elements';
import { useOpposingColor, useColorValue } from '~/hooks';
import { useColorValue, useOpposingColor } from '~/hooks';
import type { TextProps } from '@chakra-ui/react';
@ -108,7 +108,13 @@ export const ASPath = (props: ASPathProps): JSX.Element => {
);
if (path.length === 0) {
return <DynamicIcon icon={{ ri: 'RiHome2Fill' }} />;
return (
<Tooltip hasArrow label="Internal" placement="right">
<Link>
<DynamicIcon icon={{ ri: 'RiHome2Fill' }} />
</Link>
</Tooltip>
);
}
const paths = [] as JSX.Element[];

View file

@ -12,7 +12,7 @@
"typecheck": "tsc --noEmit",
"format": "biome format --write .",
"format:check": "biome format .",
"build": "export NODE_OPTIONS=--openssl-legacy-provider; next build && next export -o ../hyperglass/static/ui",
"build": "export NODE_OPTIONS=--openssl-legacy-provider; next build && next export --no-lint -o ../hyperglass/static/ui",
"test": "vitest --run"
},
"browserslist": "> 0.25%, not dead",