mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: environments route should be hidden from menu for open-source (#8397)
This commit is contained in:
parent
23b0401381
commit
178940ce7f
@ -28,6 +28,11 @@ export const filterByConfig =
|
|||||||
return Boolean(config[r.configFlag]);
|
return Boolean(config[r.configFlag]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isOss = !config?.versionInfo?.current?.enterprise;
|
||||||
|
if (isOss && r.enterprise) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -511,6 +511,7 @@ export const getCondensedRoutes = (routes: IRoute[]): INavigationMenuItem[] => {
|
|||||||
menu: route.menu,
|
menu: route.menu,
|
||||||
configFlag: route.configFlag,
|
configFlag: route.configFlag,
|
||||||
notFlag: route.notFlag,
|
notFlag: route.notFlag,
|
||||||
|
enterprise: route.enterprise,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -230,10 +230,14 @@ const ProjectEnvironmentList = () => {
|
|||||||
initialValue={globalFilter}
|
initialValue={globalFilter}
|
||||||
onChange={setGlobalFilter}
|
onChange={setGlobalFilter}
|
||||||
/>
|
/>
|
||||||
<PageHeader.Divider />
|
{!isOss() ? (
|
||||||
<Link component={RouterLink} to='/environments'>
|
<>
|
||||||
Configure environments
|
<PageHeader.Divider />
|
||||||
</Link>
|
<Link component={RouterLink} to='/environments'>
|
||||||
|
Configure environments
|
||||||
|
</Link>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -25,6 +25,7 @@ export interface INavigationMenuItem {
|
|||||||
notFlag?: keyof UiFlags;
|
notFlag?: keyof UiFlags;
|
||||||
configFlag?: keyof IUiConfig;
|
configFlag?: keyof IUiConfig;
|
||||||
group?: string;
|
group?: string;
|
||||||
|
enterprise?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IRouteMenu {
|
interface IRouteMenu {
|
||||||
|
Loading…
Reference in New Issue
Block a user