diff --git a/frontend/src/components/InlineTruncatedClipboardCopy.tsx b/frontend/src/components/InlineTruncatedClipboardCopy.tsx index 4b19fb448a..8e9de80e7a 100644 --- a/frontend/src/components/InlineTruncatedClipboardCopy.tsx +++ b/frontend/src/components/InlineTruncatedClipboardCopy.tsx @@ -3,6 +3,7 @@ import * as React from 'react'; type Props = { textToCopy: string; + truncatePosition?: 'start' | 'middle' | 'end'; testId?: string; maxWidth?: number; }; @@ -12,7 +13,12 @@ type Props = { * https://github.com/patternfly/patternfly-react/issues/10890 **/ -const InlineTruncatedClipboardCopy: React.FC = ({ textToCopy, testId, maxWidth }) => ( +const InlineTruncatedClipboardCopy: React.FC = ({ + textToCopy, + testId, + maxWidth, + truncatePosition, +}) => ( = ({ textToCopy, testId, max }} data-testid={testId} > - + ); diff --git a/frontend/src/pages/modelServing/screens/projects/ModelMeshSection/ServingRuntimeTokenDisplay.tsx b/frontend/src/pages/modelServing/screens/projects/ModelMeshSection/ServingRuntimeTokenDisplay.tsx index d1e6be2264..19271a1614 100644 --- a/frontend/src/pages/modelServing/screens/projects/ModelMeshSection/ServingRuntimeTokenDisplay.tsx +++ b/frontend/src/pages/modelServing/screens/projects/ModelMeshSection/ServingRuntimeTokenDisplay.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; -import { ClipboardCopy, HelperText, HelperTextItem, Skeleton } from '@patternfly/react-core'; +import { HelperText, HelperTextItem, Skeleton } from '@patternfly/react-core'; import { SecretKind } from '~/k8sTypes'; +import InlineTruncatedClipboardCopy from '~/components/InlineTruncatedClipboardCopy'; type ServingRuntimeTokenDisplayProps = { token: SecretKind; @@ -27,7 +28,13 @@ const ServingRuntimeTokenDisplay: React.FC = ({ ); } - return {atob(token.data.token)}; + return ( + + ); }; export default ServingRuntimeTokenDisplay;