mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Removing @observer decorator from <App/> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Add observer wrapper to <MainLayoutHeader/> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix eslint claim Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Moving extension route renderers to components Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Clean up Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Removing external observables out from App render() Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fetching hosted cluster inside Command Palette Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Setting route lists explicitly To avoid using observable data within tabRoutes arrays Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Review fixes Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import type { RouteProps } from "react-router";
|
|
import { buildURL, IURLParams } from "../../../common/utils/buildUrl";
|
|
|
|
// Routes
|
|
export const serviceAccountsRoute: RouteProps = {
|
|
path: "/service-accounts"
|
|
};
|
|
export const rolesRoute: RouteProps = {
|
|
path: "/roles"
|
|
};
|
|
export const roleBindingsRoute: RouteProps = {
|
|
path: "/role-bindings"
|
|
};
|
|
export const podSecurityPoliciesRoute: RouteProps = {
|
|
path: "/pod-security-policies"
|
|
};
|
|
|
|
export const usersManagementRoute: RouteProps = {
|
|
path: [
|
|
serviceAccountsRoute,
|
|
roleBindingsRoute,
|
|
rolesRoute,
|
|
podSecurityPoliciesRoute
|
|
].map(route => route.path.toString())
|
|
};
|
|
|
|
// Route params
|
|
export interface IServiceAccountsRouteParams {
|
|
}
|
|
|
|
export interface IRoleBindingsRouteParams {
|
|
}
|
|
|
|
export interface IRolesRouteParams {
|
|
}
|
|
|
|
// URL-builders
|
|
export const usersManagementURL = (params?: IURLParams) => serviceAccountsURL(params);
|
|
export const serviceAccountsURL = buildURL<IServiceAccountsRouteParams>(serviceAccountsRoute.path);
|
|
export const roleBindingsURL = buildURL<IRoleBindingsRouteParams>(roleBindingsRoute.path);
|
|
export const rolesURL = buildURL<IRoleBindingsRouteParams>(rolesRoute.path);
|
|
export const podSecurityPoliciesURL = buildURL(podSecurityPoliciesRoute.path);
|