mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: new bugs after master merging (with conflicts!), looks like breaking change if those apis where exported
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
4c44b76f24
commit
5f843259dd
1
.idea/inspectionProfiles/Project_Default.xml
generated
1
.idea/inspectionProfiles/Project_Default.xml
generated
@ -2,6 +2,5 @@
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="ES6PreferShortImport" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
6
.idea/jsLinters/eslint.xml
generated
6
.idea/jsLinters/eslint.xml
generated
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EslintConfiguration">
|
||||
<option name="fix-on-save" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
@ -3,19 +3,24 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import isAllowedResourceInjectable from "../../../../../utils/is-allowed-resource.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 isAllowedResource = di.inject(isAllowedResourceInjectable, "ingressclasses");
|
||||
const isEnabled = di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "ingresses",
|
||||
group: "networking.k8s.io",
|
||||
});
|
||||
|
||||
return {
|
||||
path: "/ingress-classes",
|
||||
clusterFrame: true,
|
||||
isEnabled: isAllowedResource,
|
||||
isEnabled,
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { KubeObject, KubeObjectMetadata, KubeObjectScope } from "../kube-object";
|
||||
import type { KubeObjectMetadata, KubeObjectScope } from "../kube-object";
|
||||
import { KubeObject } from "../kube-object";
|
||||
import { KubeApi } from "../kube-api";
|
||||
|
||||
export class IngressClassApi extends KubeApi<IngressClass> {
|
||||
@ -19,25 +20,25 @@ export type IngressClassMetadata = KubeObjectMetadata<KubeObjectScope.Namespace>
|
||||
"name": string;
|
||||
"labels"?: {
|
||||
[name: string]: string | undefined;
|
||||
"app.kubernetes.io/component"?: "controller"
|
||||
}
|
||||
"app.kubernetes.io/component"?: "controller";
|
||||
};
|
||||
"annotations"?: {
|
||||
[name: string]: string | undefined;
|
||||
"ingressclass.kubernetes.io/is-default-class"?: "true",
|
||||
}
|
||||
"ingressclass.kubernetes.io/is-default-class"?: "true";
|
||||
};
|
||||
};
|
||||
|
||||
export interface IngressClassParametersReference {
|
||||
"apiGroup": string; // k8s.example.net
|
||||
"scope": "Namespace" | "Cluster"
|
||||
"kind": "ClusterIngressParameter" | "IngressParameter"
|
||||
"scope": "Namespace" | "Cluster";
|
||||
"kind": "ClusterIngressParameter" | "IngressParameter";
|
||||
"name": string; // external-config-1
|
||||
"namespace"?: string; // namespaced for IngressClass must be defined in `spec.parameters.namespace` instead of `metadata.namespace` (!)
|
||||
}
|
||||
|
||||
export interface IngressClassSpec {
|
||||
controller: string; // example.com/ingress-controller
|
||||
parameters?: IngressClassParametersReference,
|
||||
parameters?: IngressClassParametersReference;
|
||||
}
|
||||
|
||||
export interface IngressClassStatus {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
export type KubeResource =
|
||||
"namespaces" | "nodes" | "events" | "resourcequotas" | "services" | "limitranges" | "leases" |
|
||||
"secrets" | "configmaps" | "ingresses" | "networkpolicies" | "persistentvolumeclaims" | "persistentvolumes" | "storageclasses" |
|
||||
"secrets" | "configmaps" | "ingresses" | "ingressclasses" | "networkpolicies" | "persistentvolumeclaims" | "persistentvolumes" | "storageclasses" |
|
||||
"pods" | "daemonsets" | "deployments" | "statefulsets" | "replicasets" | "jobs" | "cronjobs" |
|
||||
"endpoints" | "customresourcedefinitions" | "horizontalpodautoscalers" | "podsecuritypolicies" | "poddisruptionbudgets" |
|
||||
"priorityclasses" | "runtimeclasses" |
|
||||
@ -91,7 +91,7 @@ export const apiResourceRecord: Record<KubeResource, KubeApiResourceData> = {
|
||||
kind: "IngressClass",
|
||||
group: "networking.k8s.io",
|
||||
namespaced: true,
|
||||
}
|
||||
},
|
||||
jobs: {
|
||||
kind: "Job",
|
||||
group: "batch",
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import {
|
||||
routeSpecificComponentInjectionToken
|
||||
routeSpecificComponentInjectionToken,
|
||||
} from "../../routes/route-specific-component-injection-token";
|
||||
import ingressClassesesRouteInjectable
|
||||
from "../../../common/front-end-routing/routes/cluster/network/ingress-class/ingress-classeses-route.injectable";
|
||||
|
||||
@ -4,18 +4,23 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import {
|
||||
kubeObjectStoreInjectionToken
|
||||
kubeObjectStoreInjectionToken,
|
||||
} from "../../../common/k8s-api/api-manager/manager.injectable";
|
||||
import ingressClassApiInjectable
|
||||
from "../../../common/k8s-api/endpoints/ingress-class.api.injectable";
|
||||
import { IngressClassStore } from "./ingress-class-store";
|
||||
import clusterFrameContextForNamespacedResourcesInjectable
|
||||
from "../../cluster-frame-context/for-namespaced-resources.injectable";
|
||||
|
||||
const ingressClassStoreInjectable = getInjectable({
|
||||
id: "ingress-class-store",
|
||||
|
||||
instantiate: (di) => {
|
||||
return new IngressClassStore(
|
||||
di.inject(ingressClassApiInjectable),
|
||||
);
|
||||
const api = di.inject(ingressClassApiInjectable);
|
||||
|
||||
return new IngressClassStore({
|
||||
context: di.inject(clusterFrameContextForNamespacedResourcesInjectable),
|
||||
}, api);
|
||||
},
|
||||
injectionToken: kubeObjectStoreInjectionToken,
|
||||
});
|
||||
|
||||
@ -71,8 +71,8 @@ const NonInjectedIngressClasses = observer((props: Dependencies) => {
|
||||
sortBy: columnId.apiGroup,
|
||||
id: columnId.apiGroup,
|
||||
},
|
||||
{ title: "Scope", className: styles.scope, sortBy: columnId.scope, id: columnId.scope, },
|
||||
{ title: "Kind", className: styles.kind, sortBy: columnId.kind, id: columnId.kind, },
|
||||
{ title: "Scope", className: styles.scope, sortBy: columnId.scope, id: columnId.scope },
|
||||
{ title: "Kind", className: styles.kind, sortBy: columnId.kind, id: columnId.kind },
|
||||
]}
|
||||
renderTableContents={(ingressClass: IngressClass) => [
|
||||
// TODO: add "is-default" icon/marker + some actions how to "set as default" for each IngressClass
|
||||
|
||||
@ -3,12 +3,14 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed, IComputedValue } from "mobx";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import { computed } from "mobx";
|
||||
import ingressesRouteInjectable
|
||||
from "../../../common/front-end-routing/routes/cluster/network/ingresses/ingresses-route.injectable";
|
||||
import type {
|
||||
SidebarItemRegistration } from "../layout/sidebar-items.injectable";
|
||||
import {
|
||||
SidebarItemRegistration,
|
||||
sidebarItemsInjectionToken
|
||||
sidebarItemsInjectionToken,
|
||||
} from "../layout/sidebar-items.injectable";
|
||||
import { networkSidebarItemId } from "../+network/network-sidebar-items.injectable";
|
||||
import routeIsActiveInjectable from "../../routes/route-is-active.injectable";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user