File tree Expand file tree Collapse file tree
src/custom/ResourceDetailFormatters Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import {
3535 StyledEnvironmentVariablesCode ,
3636 StyledEnvironmentVariablesPre ,
3737 StyledTitle ,
38+ TextValue ,
3839 Wrap
3940} from './styles' ;
4041import {
@@ -201,7 +202,7 @@ export const OperatorDynamicFormatter: React.FC<OperatorDynamicFormatterProps> =
201202 return (
202203 < >
203204 < ElementData >
204- { data }
205+ < TextValue > { data } </ TextValue >
205206 { regex . test ( data ) && < CopyToClipboard data = { data } /> }
206207 </ ElementData >
207208 </ >
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export const Title = styled('span')({
5252 fontFamily : 'Qanelas Soft, sans-serif'
5353} ) ;
5454
55- export const ElementData = styled ( 'span ' ) ( {
55+ export const ElementData = styled ( 'div ' ) ( {
5656 display : 'flex' ,
5757 alignItems : 'center' ,
5858 justifyContent : 'space-between' ,
@@ -184,14 +184,21 @@ export const EnvironmentVariableValue = styled('span')({
184184export const CodeFormatterPre = styled ( 'pre' ) ( ( { theme } ) => ( {
185185 backgroundColor : theme . palette . mode === 'light' ? '#e9eff1' : '#212121' ,
186186 color : theme . palette . text . primary ,
187- width : '100%' ,
188187 wordWrap : 'break-word' ,
189188 overflowWrap : 'break-word' ,
190189 wordBreak : 'break-all' ,
191190 margin : 0 ,
192- padding : '0.5rem'
191+ padding : '0.5rem' ,
192+ maxWidth : '-moz-available'
193193} ) ) ;
194194
195+ export const TextValue = styled ( Box ) ( {
196+ whiteSpace : 'nowrap' ,
197+ textOverflow : 'ellipsis' ,
198+ width : 'inherit' ,
199+ overflow : 'hidden'
200+ } ) ;
201+
195202export const CodeFormatterCode = styled ( 'code' ) ( ( { theme } ) => ( {
196203 backgroundColor : theme . palette . mode === 'light' ? '#e9eff1' : '#212121' ,
197204 color : theme . palette . text . primary ,
Original file line number Diff line number Diff line change @@ -264,4 +264,5 @@ export interface GetResourceCleanDataProps {
264264 dispatchMsgToEditor ?: ( msg : any ) => void ;
265265 activeLabels ?: string [ ] ;
266266 showStatus ?: boolean ;
267+ container ?: any ;
267268}
Original file line number Diff line number Diff line change @@ -67,13 +67,15 @@ export const useResourceCleanData = () => {
6767 resource,
6868 activeLabels,
6969 dispatchMsgToEditor,
70- showStatus = true
70+ showStatus = true ,
71+ container
7172 } : GetResourceCleanDataProps ) => {
7273 const parsedStatus = resource ?. status ?. attribute && JSON . parse ( resource ?. status ?. attribute ) ;
7374 const parsedSpec = resource ?. spec ?. attribute && JSON . parse ( resource ?. spec . attribute ) ;
7475 const numberStates = structureNumberStates ( parsedStatus , parsedSpec ) ;
7576 const kind = resource ?. kind ?? resource ?. component ?. kind ;
7677 const cleanData = {
78+ container : container ,
7779 age : getAge ( resource ?. metadata ?. creationTimestamp ) ,
7880 kind : kind ,
7981 status : showStatus && getStatus ( parsedStatus ) ,
You can’t perform that action at this time.
0 commit comments