@@ -21,6 +21,7 @@ import {
2121 removeLocalStorageRows ,
2222 toLocalStorageResources ,
2323} from '../../../shared/utils/datapanel' ;
24+ import { getResourceLabel } from '../../../shared/utils' ;
2425
2526export const MAX_DATA_SELECTED_SIZE__IN_BYTES = 1_073_741_824 ;
2627export const MAX_LOCAL_STORAGE_ALLOWED_SIZE = 4.5 ;
@@ -188,22 +189,22 @@ const MyDataTable: React.FC<TProps> = ({
188189 width : 250 ,
189190 ellipsis : true ,
190191 render : ( text , record ) => {
191- const showedText = isValidUrl ( text ) ? text . split ( '/' ) . pop ( ) : text ;
192+ const resourceId = record [ '@id' ] ?? record . _self ;
192193 if ( text && record . _project ) {
193194 const { org, project } = makeOrgProjectTuple ( record . _project ) ;
194195 return (
195- < Tooltip title = { text } >
196+ < Tooltip title = { resourceId } >
196197 < Button
197198 style = { { padding : 0 } }
198199 type = "link"
199- onClick = { ( ) => goToResource ( org , project , text ) }
200+ onClick = { ( ) => goToResource ( org , project , resourceId ) }
200201 >
201- { showedText }
202+ { text }
202203 </ Button >
203204 </ Tooltip >
204205 ) ;
205206 }
206- return < Tooltip title = { text } > { showedText } </ Tooltip > ;
207+ return < Tooltip title = { resourceId } > { text } </ Tooltip > ;
207208 } ,
208209 } ,
209210 {
@@ -281,7 +282,7 @@ const MyDataTable: React.FC<TProps> = ({
281282 resources ?. _results ?. map ( resource => {
282283 return {
283284 ...resource ,
284- name : resource [ '@id' ] ?? resource . _self ,
285+ name : getResourceLabel ( resource ) ,
285286 description : resource . discription ?? '' ,
286287 } ;
287288 } ) || [ ] ;
0 commit comments