mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* 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>
28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
/**
|
|
* 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 assert from "assert";
|
|
import { kubeObjectStoreInjectionToken } from "../../../common/k8s-api/api-manager/manager.injectable";
|
|
import ingressApiInjectable from "../../../common/k8s-api/endpoints/ingress.api.injectable";
|
|
import clusterFrameContextForNamespacedResourcesInjectable from "../../cluster-frame-context/for-namespaced-resources.injectable";
|
|
import storesAndApisCanBeCreatedInjectable from "../../stores-apis-can-be-created.injectable";
|
|
import { IngressStore } from "./ingress-store";
|
|
|
|
const ingressStoreInjectable = getInjectable({
|
|
id: "ingress-store",
|
|
instantiate: (di) => {
|
|
assert(di.inject(storesAndApisCanBeCreatedInjectable), "ingressStore is only available in certain environments");
|
|
|
|
const api = di.inject(ingressApiInjectable);
|
|
|
|
return new IngressStore({
|
|
context: di.inject(clusterFrameContextForNamespacedResourcesInjectable),
|
|
}, api);
|
|
},
|
|
injectionToken: kubeObjectStoreInjectionToken,
|
|
});
|
|
|
|
export default ingressStoreInjectable;
|