@@ -15,6 +15,7 @@ import MobileSideMenu from '@/components/SideMenu/MobileSideMenu';
1515import { SearchBoxNavigate } from '@/components/SearchBoxNavigate' ;
1616import { treeListingCleanFullPaths } from '@/utils/constants/treeListing' ;
1717import { hwListingCleanFullPaths } from '@/utils/constants/hardwareListing' ;
18+ import { labsListingCleanFullPaths } from '@/utils/constants/labsListing' ;
1819
1920const OriginSelect = ( {
2021 isHardwarePath,
@@ -109,6 +110,8 @@ const TitleName = ({ basePath }: { basePath: string }): JSX.Element => {
109110 return < FormattedMessage id = "routes.issueDetails" /> ;
110111 case 'metrics' :
111112 return < FormattedMessage id = "routes.metricsMonitor" /> ;
113+ case 'labs' :
114+ return < FormattedMessage id = "routes.labsMonitor" /> ;
112115 default :
113116 return < FormattedMessage id = "routes.unknown" /> ;
114117 }
@@ -124,13 +127,18 @@ const TopBar = (): JSX.Element => {
124127 const cleanFullPath = lastMatch ?. fullPath . replace ( / \/ / g, '' ) ?? '' ;
125128 const isTreeListing = treeListingCleanFullPaths . includes ( cleanFullPath ) ;
126129 const isHardwareListing = hwListingCleanFullPaths . includes ( cleanFullPath ) ;
130+ const isLabsListing = labsListingCleanFullPaths . includes ( cleanFullPath ) ;
127131 const isListingPage =
128- isTreeListing || isHardwareListing || cleanFullPath . includes ( 'issues' ) ;
132+ isTreeListing ||
133+ isHardwareListing ||
134+ isLabsListing ||
135+ cleanFullPath . includes ( 'issues' ) ;
129136
130137 return {
131138 firstUrlLocation,
132139 isTreeListing : isTreeListing ,
133140 isHardwarePage : cleanFullPath . includes ( 'hardware' ) ,
141+ isLabsPage : isLabsListing ,
134142 isListingPage : isListingPage ,
135143 } ;
136144 } , [ matches ] ) ;
@@ -152,8 +160,14 @@ const TopBar = (): JSX.Element => {
152160 < span className = "mr-2 text-2xl sm:mr-10" >
153161 < TitleName basePath = { routeInfo . firstUrlLocation } />
154162 </ span >
155- { ( routeInfo . isTreeListing || routeInfo . isHardwarePage ) && (
156- < OriginSelect isHardwarePath = { routeInfo . isHardwarePage } />
163+ { ( routeInfo . isTreeListing ||
164+ routeInfo . isHardwarePage ||
165+ routeInfo . isLabsPage ) && (
166+ < OriginSelect
167+ isHardwarePath = {
168+ routeInfo . isHardwarePage || routeInfo . isLabsPage
169+ }
170+ />
157171 ) }
158172 < span className = "ml-0 flex w-full px-6 lg:ml-14" >
159173 { routeInfo . isListingPage && < SearchBoxNavigate /> }
0 commit comments