mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
look for more v1 groups
Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
This commit is contained in:
parent
b2ea4ef3ec
commit
d34a13fad2
@ -13,7 +13,7 @@ const configMapsRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "configmaps",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
injectionToken: frontEndRouteInjectionToken,
|
||||
|
||||
@ -14,7 +14,7 @@ const limitRangesRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "limitranges",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const resourceQuotasRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "resourcequotas",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const secretsRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "secrets",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const eventsRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "events",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const namespacesRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "namespaces",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const endpointsRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "endpoints",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const servicesRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "services",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const nodesRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "nodes",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const clusterOverviewRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "nodes",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const persistentVolumeClaimsRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "persistentvolumeclaims",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const persistentVolumesRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "persistentvolumes",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const serviceAccountsRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "serviceaccounts",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ const podsRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "pods",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ describe("cluster/namespaces - edit namespace from new tab", () => {
|
||||
|
||||
builder.allowKubeResource({
|
||||
apiName: "namespaces",
|
||||
group: "v1",
|
||||
group: "",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ describe("cluster/namespaces - edit namespaces from previously opened tab", () =
|
||||
|
||||
builder.allowKubeResource({
|
||||
apiName: "namespaces",
|
||||
group: "v1",
|
||||
group: "",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ describe("cluster - visibility of sidebar items", () => {
|
||||
beforeEach(() => {
|
||||
builder.allowKubeResource({
|
||||
apiName: "namespaces",
|
||||
group: "v1",
|
||||
group: "",
|
||||
});
|
||||
});
|
||||
|
||||
@ -77,7 +77,7 @@ const testRouteInjectable = getInjectable({
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "namespaces",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ describe("workload overview", () => {
|
||||
applicationBuilder = getApplicationBuilder().setEnvironmentToClusterFrame();
|
||||
applicationBuilder.allowKubeResource({
|
||||
apiName: "pods",
|
||||
group: "v1",
|
||||
group: "",
|
||||
});
|
||||
rendered = await applicationBuilder.render();
|
||||
});
|
||||
|
||||
@ -21,7 +21,7 @@ const podsWorkloadInjectable = getInjectable({
|
||||
return {
|
||||
resource: {
|
||||
apiName: "pods",
|
||||
group: "v1",
|
||||
group: "",
|
||||
},
|
||||
open: navigate,
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ describe("<ClusterFrame />", () => {
|
||||
describe("given cluster with list nodes and namespaces permissions", () => {
|
||||
beforeEach(() => {
|
||||
// TODO: replace with not using private info
|
||||
(cluster as any).allowedResources.replace(["v1/nodes", "v1/namespaces"]);
|
||||
(cluster as any).allowedResources.replace(["/nodes", "/namespaces"]);
|
||||
});
|
||||
|
||||
it("renders", () => {
|
||||
@ -110,7 +110,7 @@ describe("<ClusterFrame />", () => {
|
||||
|
||||
describe("given cluster without list nodes, but with namespaces permissions", () => {
|
||||
beforeEach(() => {
|
||||
(cluster as any).allowedResources.replace(["v1/namespaces"]);
|
||||
(cluster as any).allowedResources.replace(["/namespaces"]);
|
||||
});
|
||||
|
||||
it("renders", () => {
|
||||
|
||||
@ -34,7 +34,7 @@ export const WorkloadEvents = withInjectables<Dependencies, WorkloadEventsProps>
|
||||
getProps: (di, props) => ({
|
||||
workloadEventsAreAllowed: di.inject(shouldShowResourceInjectionToken, {
|
||||
apiName: "events",
|
||||
group: "v1",
|
||||
group: "",
|
||||
}),
|
||||
...props,
|
||||
}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user