mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make DeploymentReplicaSets injectable to fix build error
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
72f199f6c2
commit
d359747ec0
@ -8,7 +8,6 @@ import "./deployment-replicasets.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { ReplicaSet } from "../../../common/k8s-api/endpoints";
|
||||
import type { KubeObjectMenuProps } from "../kube-object-menu";
|
||||
import { KubeObjectMenu } from "../kube-object-menu";
|
||||
import { Spinner } from "../spinner";
|
||||
import { prevDefault, stopPropagation } from "../../utils";
|
||||
@ -30,6 +29,11 @@ enum sortBy {
|
||||
age = "age",
|
||||
}
|
||||
|
||||
interface Dependencies {
|
||||
replicaSetStore: ReplicaSetStore;
|
||||
showDetails: ShowDetails;
|
||||
}
|
||||
|
||||
export interface DeploymentReplicaSetsProps {
|
||||
replicaSets: ReplicaSet[];
|
||||
}
|
||||
@ -96,7 +100,7 @@ class NonInjectedDeploymentReplicaSets extends React.Component<DeploymentReplica
|
||||
<TableCell className="pods">{this.getPodsLength(replica)}</TableCell>
|
||||
<TableCell className="age"><KubeObjectAge key="age" object={replica} /></TableCell>
|
||||
<TableCell className="actions" onClick={stopPropagation}>
|
||||
<ReplicaSetMenu object={replica} />
|
||||
<KubeObjectMenu object={replica} />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))
|
||||
@ -114,9 +118,3 @@ export const DeploymentReplicaSets = withInjectables<Dependencies, DeploymentRep
|
||||
showDetails: di.inject(showDetailsInjectable),
|
||||
}),
|
||||
});
|
||||
|
||||
export function ReplicaSetMenu(props: KubeObjectMenuProps<ReplicaSet>) {
|
||||
return (
|
||||
<KubeObjectMenu {...props}/>
|
||||
);
|
||||
}
|
||||
|
||||
@ -9,12 +9,12 @@ import { PodStatusPhase } from "../../../common/k8s-api/endpoints/pod.api";
|
||||
import type { KubeObjectStoreOptions } from "../../../common/k8s-api/kube-object.store";
|
||||
import { KubeObjectStore } from "../../../common/k8s-api/kube-object.store";
|
||||
|
||||
export interface ReplicaSetStoreDependencies {
|
||||
interface Dependencies {
|
||||
getPodsByOwnerId: GetPodsByOwnerId;
|
||||
}
|
||||
|
||||
export class ReplicaSetStore extends KubeObjectStore<ReplicaSet, ReplicaSetApi> {
|
||||
constructor(protected readonly dependencies: ReplicaSetStoreDependencies, api: ReplicaSetApi, opts?: KubeObjectStoreOptions) {
|
||||
constructor(protected readonly dependencies: Dependencies, api: ReplicaSetApi, opts?: KubeObjectStoreOptions) {
|
||||
super(api, opts);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user