Merge pull request #54 from PRO-Robotech/feature/dev

fix use namespace nav
This commit is contained in:
typescreep
2025-07-16 23:33:42 +03:00
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -163,7 +163,7 @@ app.get(`${basePrefix ? basePrefix : ''}/env.js`, (_, res) => {
JSON.stringify(CUSTOMIZATION_NAVIGATION_RESOURCE_NAME) || '"check envs"'
},
CUSTOMIZATION_NAVIGATION_RESOURCE: ${JSON.stringify(CUSTOMIZATION_NAVIGATION_RESOURCE) || '"check envs"'},
USE_NAMESPACE_NAV: ${!!USE_NAMESPACE_NAV},
USE_NAMESPACE_NAV: ${!!USE_NAMESPACE_NAV ? '"true"' : '"false"'},
NAVIGATE_FROM_CLUSTERLIST: ${JSON.stringify(NAVIGATE_FROM_CLUSTERLIST) || '"check envs"'},
PROJECTS_API_GROUP: ${JSON.stringify(PROJECTS_API_GROUP) || '"check envs"'},
PROJECTS_VERSION: ${JSON.stringify(PROJECTS_VERSION) || '"check envs"'},

View File

@@ -21,15 +21,17 @@ export const HeaderSecond: FC<THeaderProps> = ({ inside }) => {
return (
<Styled.BackgroundContainer $bgColor={token.colorFillSecondary} $borderRadius={token.borderRadius}>
<Styled.PaddingContainer $height={HEAD_SECOND_ROW}>
{inside && !BASE_USE_NAMESPACE_NAV && <SelectorInside clusterName={clusterName} namespace={namespace} />}
{!inside && !BASE_USE_NAMESPACE_NAV && (
{inside && BASE_USE_NAMESPACE_NAV !== 'true' && (
<SelectorInside clusterName={clusterName} namespace={namespace} />
)}
{!inside && BASE_USE_NAMESPACE_NAV !== 'true' && (
<Selector
clusterName={clusterName}
projectName={projectName || possibleProject}
instanceName={instanceName || possibleInstance}
/>
)}
{BASE_USE_NAMESPACE_NAV && <SelectorNamespace clusterName={clusterName} namespace={namespace} />}
{BASE_USE_NAMESPACE_NAV === 'true' && <SelectorNamespace clusterName={clusterName} namespace={namespace} />}
</Styled.PaddingContainer>
</Styled.BackgroundContainer>
)