@@ -17,6 +17,14 @@ function generateBreadcrumbs(path, additionalData = {}) {
1717 const isCatalogId = segments [ index - 1 ] === 'catalogs' && ! isNaN ( segment ) ;
1818 const catalogData = isCatalogId && additionalData . catalogData ? additionalData . catalogData : null ;
1919
20+ // Detect if it's a datasource ID and if we have data for it
21+ const isDatasourceId = segments [ index - 1 ] === 'datasources' && additionalData . datasource ;
22+ const datasourceData = isDatasourceId ? additionalData . datasource : null ;
23+
24+ // Detect if it's a linker ID and if we have data for it
25+ const isLinkerId = segments [ index - 1 ] === 'linkers' && additionalData . linker ;
26+ const linkerData = isLinkerId ? additionalData . linker : null ;
27+
2028 // Detect if we are in the control details view
2129 const isControlView = segments [ index - 1 ] === 'controls' && additionalData . control ;
2230
@@ -38,6 +46,10 @@ function generateBreadcrumbs(path, additionalData = {}) {
3846 name = 'Home' ;
3947 } else if ( catalogData && isCatalogId ) {
4048 name = catalogData . name || segment ;
49+ } else if ( datasourceData && isDatasourceId ) {
50+ name = datasourceData . name || segment ;
51+ } else if ( linkerData && isLinkerId ) {
52+ name = linkerData . name || 'Unnamed Linker' ;
4153 } else if ( segment === 'controls' ) {
4254 const catalogHref = '/' + segments . slice ( 0 , index ) . join ( '/' ) ;
4355 return { name : 'Controls' , href : catalogHref , isLast, state : additionalData } ;
@@ -66,7 +78,7 @@ function generateBreadcrumbs(path, additionalData = {}) {
6678 href,
6779 isLast,
6880 isClickable,
69- state : ( segments [ index - 1 ] === 'catalogs' || segments [ index ] === 'catalogs' || isFolder || isDashboard || isEditor ) ? additionalData : null ,
81+ state : ( segments [ index - 1 ] === 'catalogs' || segments [ index ] === 'catalogs' || segments [ index - 1 ] === 'datasources' || segments [ index ] === 'datasources' || segments [ index - 1 ] === 'linkers' || segments [ index ] === 'linkers' || isFolder || isDashboard || isEditor ) ? additionalData : null ,
7082 uniqueKey : segments . slice ( 0 , index + 1 ) . join ( '/' )
7183 } ;
7284 } ) . filter ( crumb => crumb . name !== 'Home' || crumb . isLast ) ;
@@ -80,6 +92,8 @@ export default function Page({ children, ...props }) {
8092 const controlData = props . control || location . state ?. control ;
8193 const folderData = props . folder || location . state ?. folder ;
8294 const dashboardData = props . dashboard || location . state ?. dashboard ;
95+ const datasourceData = props . datasource || location . state ?. datasource ;
96+ const linkerData = props . linker || location . state ?. linker ;
8397 const flowName = props . flowName || location . state ?. flowName ;
8498 const computationDate = props . computationDate || location . state ?. computationDate ;
8599
@@ -88,6 +102,8 @@ export default function Page({ children, ...props }) {
88102 control : controlData ,
89103 folderData,
90104 dashboardData,
105+ datasource : datasourceData ,
106+ linker : linkerData ,
91107 flowName,
92108 computationDate
93109 } ;
@@ -96,7 +112,7 @@ export default function Page({ children, ...props }) {
96112
97113 return (
98114 < div className = "h-full space-y-8" >
99- < header className = "group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 h- 16 flex shrink-0 items-center gap-2 transition-[width,height] ease-linear" >
115+ < header className = "h- 16 flex shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 " >
100116 < div className = "flex items-center gap-2" >
101117 < TooltipProvider >
102118 < Tooltip >
0 commit comments