File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -271,10 +271,14 @@ function inventoryNameLink(item): JSX.Element {
271271 const pluralName = PluralName ( kind ) ;
272272
273273 // Flux types
274- if ( groupName . endsWith ( 'toolkit.fluxcd.io' ) ) {
274+ const allowedDomain = 'toolkit.fluxcd.io' ;
275+ if ( groupName === allowedDomain || groupName . endswith ( `.${ allowedDomain } ` ) ) {
276+ const routeName =
277+ groupName === allowedDomain ? 'toolkit' : groupName . substring ( 0 , groupName . indexOf ( '.' ) ) ;
278+
275279 return (
276280 < Link
277- routeName = { groupName . substring ( 0 , groupName . indexOf ( '.' ) ) }
281+ routeName = { routeName }
278282 params = { {
279283 pluralName : pluralName ,
280284 name : item . metadata . name ,
Original file line number Diff line number Diff line change @@ -131,10 +131,14 @@ function inventoryNameLink(item: KubeObject) {
131131 const pluralName = PluralName ( kind ) ;
132132
133133 // Flux types
134- if ( groupName . endsWith ( 'toolkit.fluxcd.io' ) ) {
134+ const allowedDomain = 'toolkit.fluxcd.io' ;
135+ if ( groupName === allowedDomain || groupName . endswith ( `.${ allowedDomain } ` ) ) {
136+ const routeName =
137+ groupName === allowedDomain ? 'toolkit' : groupName . substring ( 0 , groupName . indexOf ( '.' ) ) ;
138+
135139 return (
136140 < Link
137- routeName = { groupName . substr ( 0 , groupName . indexOf ( '.' ) ) }
141+ routeName = { routeName }
138142 params = { {
139143 pluralName : pluralName ,
140144 name : item . metadata . name ,
You can’t perform that action at this time.
0 commit comments