Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const ItemContainer = styled(Flex)`
gap: ${({ theme }) => theme.space[3]}px;
`;

const HealthStatusDot = styled.div<{
export const HealthStatusDot = styled.div<{
$status: BotInstanceServiceHealthStatus | undefined;
}>`
width: ${({ theme }) => theme.space[3] - theme.space[1]}px;
Expand Down
21 changes: 2 additions & 19 deletions web/packages/teleport/src/BotInstances/Details/InfoTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import {
GetBotInstanceResponseJoinAttrs,
} from 'teleport/services/bot/types';

import { HealthStatusDot } from './HealthTab';

export function InfoTab(props: {
data: GetBotInstanceResponse;
onGoToServicesClick: () => void;
Expand Down Expand Up @@ -251,25 +253,6 @@ const HealthLabelText = styled(Text).attrs({
white-space: nowrap;
`;

const HealthStatusDot = styled.div<{
$status: BotInstanceServiceHealthStatus | undefined;
}>`
width: ${props => props.theme.space[3] - props.theme.space[1]}px;
height: ${props => props.theme.space[3] - props.theme.space[1]}px;
border-radius: 999px;
background-color: ${({ theme, $status }) =>
$status ===
BotInstanceServiceHealthStatus.BOT_INSTANCE_HEALTH_STATUS_HEALTHY
? theme.colors.interactive.solid.success.default
: $status ===
BotInstanceServiceHealthStatus.BOT_INSTANCE_HEALTH_STATUS_UNHEALTHY
? theme.colors.interactive.solid.danger.default
: $status ===
BotInstanceServiceHealthStatus.BOT_INSTANCE_HEALTH_STATUS_UNSPECIFIED
? theme.colors.interactive.solid.alert.default
: theme.colors.interactive.tonal.neutral[1]};
`;

const AccentCountText = styled(Text)`
font-size: ${({ theme }) => theme.fontSizes[8]}px;
font-weight: ${({ theme }) => theme.fontWeights.light}px;
Expand Down
Loading