From d7dcae479580b32db69fa47e8a051e99899dfc6f Mon Sep 17 00:00:00 2001 From: Dipanshu Gupta Date: Thu, 23 Jan 2025 16:06:48 +0530 Subject: [PATCH] Name, resource label, tolerations and Node selector fields - Unlimited size string --- .../hardwareProfiles/HardwareProfilesTableRow.tsx | 13 +++++++++++-- .../nodeResource/NodeResourceTableRow.tsx | 10 +++++++--- .../nodeSelector/NodeSelectorTableRow.tsx | 10 +++++++--- .../toleration/TolerationTableRow.tsx | 10 +++++++--- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/frontend/src/pages/hardwareProfiles/HardwareProfilesTableRow.tsx b/frontend/src/pages/hardwareProfiles/HardwareProfilesTableRow.tsx index 9db3aecd0f..af58480ba6 100644 --- a/frontend/src/pages/hardwareProfiles/HardwareProfilesTableRow.tsx +++ b/frontend/src/pages/hardwareProfiles/HardwareProfilesTableRow.tsx @@ -6,7 +6,14 @@ import { Timestamp, TimestampTooltipVariant, } from '@patternfly/react-core'; -import { ActionsColumn, ExpandableRowContent, Tbody, Td, Tr } from '@patternfly/react-table'; +import { + ActionsColumn, + ExpandableRowContent, + TableText, + Tbody, + Td, + Tr, +} from '@patternfly/react-table'; import { useNavigate } from 'react-router-dom'; import { relativeTime } from '~/utilities/time'; import { TableRowTitleDescription } from '~/components/table'; @@ -47,7 +54,9 @@ const HardwareProfilesTableRow: React.FC = ({ /> {hardwareProfile.spec.displayName} + } description={hardwareProfile.spec.description} truncateDescriptionLines={2} /> diff --git a/frontend/src/pages/hardwareProfiles/nodeResource/NodeResourceTableRow.tsx b/frontend/src/pages/hardwareProfiles/nodeResource/NodeResourceTableRow.tsx index 85c296658b..c4abde8d76 100644 --- a/frontend/src/pages/hardwareProfiles/nodeResource/NodeResourceTableRow.tsx +++ b/frontend/src/pages/hardwareProfiles/nodeResource/NodeResourceTableRow.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Td, Tr } from '@patternfly/react-table'; -import { ActionList, ActionListItem, Button } from '@patternfly/react-core'; +import { ActionList, ActionListItem, Button, Truncate } from '@patternfly/react-core'; import { MinusCircleIcon, PencilAltIcon } from '@patternfly/react-icons'; import { Identifier } from '~/types'; @@ -18,8 +18,12 @@ const NodeResourceTableRow: React.FC = ({ showActions, }) => ( - {identifier.displayName} - {identifier.identifier} + + + + + + {identifier.resourceType ?? 'Other'} {identifier.defaultCount} {identifier.minCount} diff --git a/frontend/src/pages/hardwareProfiles/nodeSelector/NodeSelectorTableRow.tsx b/frontend/src/pages/hardwareProfiles/nodeSelector/NodeSelectorTableRow.tsx index 418fd21fc4..8a70736a72 100644 --- a/frontend/src/pages/hardwareProfiles/nodeSelector/NodeSelectorTableRow.tsx +++ b/frontend/src/pages/hardwareProfiles/nodeSelector/NodeSelectorTableRow.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Td, Tr } from '@patternfly/react-table'; -import { ActionList, ActionListItem, Button } from '@patternfly/react-core'; +import { ActionList, ActionListItem, Button, Truncate } from '@patternfly/react-core'; import { MinusCircleIcon, PencilAltIcon } from '@patternfly/react-icons'; import { NodeSelector } from '~/types'; @@ -18,8 +18,12 @@ const NodeSelectorTableRow: React.FC = ({ onDelete, }) => ( - {nodeSelector.key} - {nodeSelector.value} + + + + + + {showActions && ( diff --git a/frontend/src/pages/hardwareProfiles/toleration/TolerationTableRow.tsx b/frontend/src/pages/hardwareProfiles/toleration/TolerationTableRow.tsx index 03a3708a2a..8ecb21d134 100644 --- a/frontend/src/pages/hardwareProfiles/toleration/TolerationTableRow.tsx +++ b/frontend/src/pages/hardwareProfiles/toleration/TolerationTableRow.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Td, Tr } from '@patternfly/react-table'; -import { ActionList, ActionListItem, Button } from '@patternfly/react-core'; +import { ActionList, ActionListItem, Button, Truncate } from '@patternfly/react-core'; import { MinusCircleIcon, PencilAltIcon } from '@patternfly/react-icons'; import { Toleration } from '~/types'; @@ -19,8 +19,12 @@ const TolerationTableRow: React.FC = ({ }) => ( {toleration.operator ?? '-'} - {toleration.key} - {toleration.value ?? '-'} + + + + + + {toleration.effect ?? '-'} {toleration.tolerationSeconds === undefined