/
githubmirror
/
traefik
Обзор
Документация
Войти
/
githubmirror
/
traefik
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
webui/src/components/resources/IpStrategyTable.tsx
45 строк
1 KB
Murat Aslan
Display server weight in service detail view
30 мар 2026, 17:58
Не верифицирован
30 мар 2026, 17:58
9a8ff96
Код
Авторство
О чём код?
import { AriaTable, AriaTbody, AriaTd, AriaTr, Badge, Flex, Text } from '@traefik-labs/faency' import Tooltip from 'components/Tooltip' export type IpStrategy = { depth: number excludedIPs: string[] } export default function IpStrategyTable({ ipStrategy }: { ipStrategy: IpStrategy }) { return ( <AriaTable css={{ wordBreak: 'break-word', boxShadow: 'none', border: '1px solid $tableRowBorder' }}> <AriaTbody> {ipStrategy.depth ? ( <AriaTr> <AriaTd css={{ width: '104px', p: '$2' }}> <Text variant="subtle">Depth</Text> </AriaTd> <AriaTd css={{ p: '$2' }}> <Tooltip label={ipStrategy.depth.toString()} action="copy"> <Text>{ipStrategy.depth}</Text> </Tooltip> </AriaTd> </AriaTr> ) : null} {ipStrategy.excludedIPs ? ( <AriaTr> <AriaTd css={{ width: '104px', p: '$2', verticalAlign: 'baseline' }}> <Text variant="subtle">Excluded IPs</Text> </AriaTd> <AriaTd css={{ p: '$2' }}> <Flex gap={1} css={{ flexWrap: 'wrap' }}> {ipStrategy.excludedIPs.map((ip, index) => ( <Tooltip key={index} label={ip} action="copy"> <Badge> {ip}</Badge> </Tooltip> ))} </Flex> </AriaTd> </AriaTr> ) : null} </AriaTbody> </AriaTable> ) }