mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove last usages of legacy global showDetails
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
b7b1e97a7b
commit
b15c6a4dfc
3 files changed
+10
-16
No files matched your search
@@ -10,7 +10,6 @@ import { observer } from "mobx-react";
|
||||
import type { PersistentVolume } from "../../../common/k8s-api/endpoints/persistent-volume.api";
|
||||
import { TableRow } from "../table/table-row";
|
||||
import { cssNames, prevDefault } from "../../utils";
|
||||
import { showDetails } from "../kube-detail-params";
|
||||
import { TableCell } from "../table/table-cell";
|
||||
import { Spinner } from "../spinner/spinner";
|
||||
import { DrawerTitle } from "../drawer/drawer-title";
|
||||
@@ -20,6 +19,8 @@ import kebabCase from "lodash/kebabCase";
|
||||
import type { PersistentVolumeStore } from "./store";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import persistentVolumeStoreInjectable from "./store.injectable";
|
||||
import type { ShowDetails } from "../kube-detail-params/show-details.injectable";
|
||||
import showDetailsInjectable from "../kube-detail-params/show-details.injectable";
|
||||
|
||||
export interface VolumeDetailsListProps {
|
||||
persistentVolumes: PersistentVolume[];
|
||||
@@ -33,6 +34,7 @@ enum sortBy {
|
||||
|
||||
interface Dependencies {
|
||||
persistentVolumeStore: PersistentVolumeStore;
|
||||
showDetails: ShowDetails;
|
||||
}
|
||||
|
||||
@observer
|
||||
@@ -44,7 +46,7 @@ class NonInjectedVolumeDetailsList extends React.Component<VolumeDetailsListProp
|
||||
};
|
||||
|
||||
getTableRow = (uid: string) => {
|
||||
const { persistentVolumes } = this.props;
|
||||
const { persistentVolumes, showDetails } = this.props;
|
||||
const volume = persistentVolumes.find(volume => volume.getId() === uid);
|
||||
|
||||
if (!volume) {
|
||||
@@ -105,5 +107,6 @@ export const VolumeDetailsList = withInjectables<Dependencies, VolumeDetailsList
|
||||
getProps: (di, props) => ({
|
||||
...props,
|
||||
persistentVolumeStore: di.inject(persistentVolumeStoreInjectable),
|
||||
showDetails: di.inject(showDetailsInjectable),
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user