mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Explicitly initialize registries
- Helps moves towards turning on banning CyclicImports Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
c18df6bcae
commit
6d10f011e5
101 files changed
+1178
-1087
No files matched your search
@@ -35,7 +35,7 @@ import { CustomResources } from "../+custom-resources/custom-resources";
|
||||
import { isActiveRoute } from "../../navigation";
|
||||
import { isAllowedResource } from "../../../common/rbac";
|
||||
import { Spinner } from "../spinner";
|
||||
import { ClusterPageMenuRegistration, clusterPageMenuRegistry, clusterPageRegistry, getExtensionPageUrl } from "../../../extensions/registries";
|
||||
import { ClusterPageMenuRegistration, ClusterPageMenuRegistry, ClusterPageRegistry, getExtensionPageUrl } from "../../../extensions/registries";
|
||||
import { SidebarItem } from "./sidebar-item";
|
||||
import { Apps } from "../+apps";
|
||||
import * as routes from "../../../common/routes";
|
||||
@@ -108,8 +108,8 @@ export class Sidebar extends React.Component<Props> {
|
||||
return routes;
|
||||
}
|
||||
|
||||
clusterPageMenuRegistry.getSubItems(menu).forEach((subMenu) => {
|
||||
const subPage = clusterPageRegistry.getByPageTarget(subMenu.target);
|
||||
ClusterPageMenuRegistry.getInstance().getSubItems(menu).forEach((subMenu) => {
|
||||
const subPage = ClusterPageRegistry.getInstance().getByPageTarget(subMenu.target);
|
||||
|
||||
if (subPage) {
|
||||
const { extensionId, id: pageId } = subPage;
|
||||
@@ -127,8 +127,8 @@ export class Sidebar extends React.Component<Props> {
|
||||
}
|
||||
|
||||
renderRegisteredMenus() {
|
||||
return clusterPageMenuRegistry.getRootItems().map((menuItem, index) => {
|
||||
const registeredPage = clusterPageRegistry.getByPageTarget(menuItem.target);
|
||||
return ClusterPageMenuRegistry.getInstance().getRootItems().map((menuItem, index) => {
|
||||
const registeredPage = ClusterPageRegistry.getInstance().getByPageTarget(menuItem.target);
|
||||
const tabRoutes = this.getTabLayoutRoutes(menuItem);
|
||||
const id = `registered-item-${index}`;
|
||||
let pageUrl: string;
|
||||
|
||||
Reference in new issue
Block a user