forked from mirrors/thatmattlove-hyperglass
add tooltip for bgp table when AS path lenght is 0
This commit is contained in:
parent
f0028a3df6
commit
cfd8f0d670
2 changed files with 100 additions and 94 deletions
|
|
@ -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[];
|
||||
|
|
|
|||
2
hyperglass/ui/package.json
vendored
2
hyperglass/ui/package.json
vendored
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue