mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
New resource view: Network -> Ingress Classes (#6808)
* added backbone for k8s-api/endpoints/ingress-class.api Signed-off-by: Roman <ixrock@gmail.com> * added ingress-class store, naming clean up Signed-off-by: Roman <ixrock@gmail.com> * navigate to ingress-classses injectable Signed-off-by: Roman <ixrock@gmail.com> * added new sidebar item: "Network -> Ingress Classes" Signed-off-by: Roman <ixrock@gmail.com> * added explicit returning type for `ingresses-sidebar-items.injectable` Signed-off-by: Roman <ixrock@gmail.com> * added initial ingress-class table-view + magic route-component.injectable Signed-off-by: Roman <ixrock@gmail.com> * fix: show loaded items from api into IngressClasses view Signed-off-by: Roman <ixrock@gmail.com> * fix: new bugs after master merging (with conflicts!), looks like breaking change if those apis where exported Signed-off-by: Roman <ixrock@gmail.com> * fix lint Signed-off-by: Roman <ixrock@gmail.com> * added icon-marker to see default ingress class in the list Signed-off-by: Roman <ixrock@gmail.com> * Page refresh is broken in development mode #6818 (upcoming fix) Signed-off-by: Roman <ixrock@gmail.com> * added "set as default" menu action for ingress classes Signed-off-by: Roman <ixrock@gmail.com> * fix: consistent sidebar items order by janne's request Signed-off-by: Roman <ixrock@gmail.com> * chore, fix lint Signed-off-by: Roman <ixrock@gmail.com> * fix: incorrect icons layout in ingress-class details Signed-off-by: Roman <ixrock@gmail.com> * some fixes, improved items search by values from `spec.parameters.*` Signed-off-by: Roman <ixrock@gmail.com> * fix: duplicating/overcaching items with each page visiting (Nnetwork -> Ingress classes) Signed-off-by: Roman <ixrock@gmail.com> * handling IngressClass drawer details Signed-off-by: Roman <ixrock@gmail.com> * fixes: remove duplicating / allow editing IngressClass items (due api's "namespaced=true") Signed-off-by: Roman <ixrock@gmail.com> * fix: incorrect `apiName` for `front-end-routing/cluster/network/ingress-class` Signed-off-by: Roman <ixrock@gmail.com> * fix: IngressClass proper metadata typing Signed-off-by: Roman <ixrock@gmail.com> * allow to mark as default IngressClass from menu item Signed-off-by: Roman <ixrock@gmail.com> * fix lint Signed-off-by: Roman <ixrock@gmail.com> * fixes & responding to comments Signed-off-by: Roman <ixrock@gmail.com> Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
e5a67d535f
commit
1456e1e597
25 files changed
+651
-23
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
|
||||
import {
|
||||
shouldShowResourceInjectionToken,
|
||||
} from "../../../../../cluster-store/allowed-resources-injection-token";
|
||||
|
||||
const ingressClassesesRouteInjectable = getInjectable({
|
||||
id: "ingress-classes-route",
|
||||
|
||||
instantiate: (di) => {
|
||||
const isEnabled = di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "ingressclasses",
|
||||
group: "networking.k8s.io",
|
||||
});
|
||||
|
||||
return {
|
||||
path: "/ingress-classes",
|
||||
clusterFrame: true,
|
||||
isEnabled,
|
||||
};
|
||||
},
|
||||
|
||||
injectionToken: frontEndRouteInjectionToken,
|
||||
});
|
||||
|
||||
export default ingressClassesesRouteInjectable;
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
|
||||
import ingressClassesesRouteInjectable from "./ingress-classeses-route.injectable";
|
||||
|
||||
const navigateToIngressesInjectable = getInjectable({
|
||||
id: "navigate-to-ingress-classes",
|
||||
|
||||
instantiate: (di) => {
|
||||
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
|
||||
const route = di.inject(ingressClassesesRouteInjectable);
|
||||
|
||||
return () => navigateToRoute(route);
|
||||
},
|
||||
});
|
||||
|
||||
export default navigateToIngressesInjectable;
|
||||
Reference in new issue
Block a user