Skip to content

Commit

Permalink
fix vertical scroll on cluster nodes list
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Feb 10, 2025
1 parent 56600e5 commit 46c4a0e
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions assets/src/components/cd/cluster/ClusterNodes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { EmptyState, Table, Tooltip } from '@pluralsh/design-system'
import { ColumnDef, createColumnHelper, Row } from '@tanstack/react-table'
import { filesize } from 'filesize'
import {
ClusterFragment,
ClusterNodeFragment,
Expand All @@ -11,9 +13,18 @@ import { isEmpty } from 'lodash'
import { useMemo } from 'react'
import { useNavigate, useOutletContext } from 'react-router-dom'
import { useTheme } from 'styled-components'

import { getNodeDetailsPath } from '../../../routes/cdRoutesConsts'
import { cpuParser, memoryParser } from '../../../utils/kubernetes.ts'
import { rounded } from '../../../utils/number.ts'
import {
nodeStatusToReadiness,
ReadinessT,
readinessToLabel,
} from '../../../utils/status.ts'
import { POLL_INTERVAL } from '../../cluster/constants.ts'
import { mapify } from '../../cluster/LabelsAnnotations.tsx'
import { ClusterMetrics } from '../../cluster/nodes/ClusterMetrics'

import {
numishSort,
StatusChip,
Expand All @@ -22,20 +33,8 @@ import {
UsageText,
} from '../../cluster/TableElements'
import { useMetricsEnabled } from '../../contexts/DeploymentSettingsContext'
import { cpuParser, memoryParser } from '../../../utils/kubernetes.ts'
import { mapify } from '../../cluster/LabelsAnnotations.tsx'
import {
nodeStatusToReadiness,
ReadinessT,
readinessToLabel,
} from '../../../utils/status.ts'
import { EmptyState, Table, Tooltip } from '@pluralsh/design-system'

import { rounded } from '../../../utils/number.ts'
import { UsageBar } from '../../utils/UsageBar.tsx'
import { filesize } from 'filesize'
import LoadingIndicator from '../../utils/LoadingIndicator.tsx'
import { POLL_INTERVAL } from '../../cluster/constants.ts'
import { UsageBar } from '../../utils/UsageBar.tsx'

export default function ClusterNodes() {
const theme = useTheme()
Expand Down Expand Up @@ -71,6 +70,8 @@ export default function ClusterNodes() {
display: 'flex',
flexDirection: 'column',
gap: theme.spacing.medium,
overflow: 'hidden',
height: '100%',
}}
>
{!isEmpty(data?.cluster?.nodes) && metricsEnabled && (
Expand Down Expand Up @@ -310,6 +311,7 @@ function NodesList({
return (
<Table
loose
fullHeightWrap
data={tableData}
columns={columns}
onRowClick={(_e, { original }: Row<TableData>) =>
Expand Down

0 comments on commit 46c4a0e

Please sign in to comment.