mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove legacy store of CronJobs
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
1f78c66cc2
commit
72f199f6c2
1 file changed
+4
-12
@@ -13,11 +13,9 @@ import moment from "moment";
|
||||
import { SiblingsInTabLayout } from "../layout/siblings-in-tab-layout";
|
||||
import { KubeObjectAge } from "../kube-object/age";
|
||||
import type { CronJobStore } from "./store";
|
||||
import type { JobStore } from "../+workloads-jobs/store";
|
||||
import type { EventStore } from "../+events/store";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import cronJobStoreInjectable from "./store.injectable";
|
||||
import jobStoreInjectable from "../+workloads-jobs/store.injectable";
|
||||
import eventStoreInjectable from "../+events/store.injectable";
|
||||
import { prevDefault } from "../../utils";
|
||||
import type { FilterByNamespace } from "../+namespaces/namespace-select-filter-model/filter-by-namespace.injectable";
|
||||
@@ -35,20 +33,16 @@ enum columnId {
|
||||
|
||||
interface Dependencies {
|
||||
cronJobStore: CronJobStore;
|
||||
jobStore: JobStore;
|
||||
eventStore: EventStore;
|
||||
filterByNamespace: FilterByNamespace;
|
||||
}
|
||||
|
||||
@observer
|
||||
class NonInjectedCronJobs extends React.Component<Dependencies>{
|
||||
render() {
|
||||
const NonInjectedCronJobs = observer((props: Dependencies) => {
|
||||
const {
|
||||
cronJobStore,
|
||||
eventStore,
|
||||
jobStore,
|
||||
filterByNamespace,
|
||||
} = this.props;
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<SiblingsInTabLayout>
|
||||
@@ -57,7 +51,7 @@ class NonInjectedCronJobs extends React.Component<Dependencies>{
|
||||
tableId="workload_cronjobs"
|
||||
className="CronJobs"
|
||||
store={cronJobStore}
|
||||
dependentStores={[jobStore, eventStore]}
|
||||
dependentStores={[eventStore]}
|
||||
sortingCallbacks={{
|
||||
[columnId.name]: cronJob => cronJob.getName(),
|
||||
[columnId.namespace]: cronJob => cronJob.getNs(),
|
||||
@@ -104,15 +98,13 @@ class NonInjectedCronJobs extends React.Component<Dependencies>{
|
||||
/>
|
||||
</SiblingsInTabLayout>
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export const CronJobs = withInjectables<Dependencies>(NonInjectedCronJobs, {
|
||||
getProps: (di, props) => ({
|
||||
...props,
|
||||
cronJobStore: di.inject(cronJobStoreInjectable),
|
||||
eventStore: di.inject(eventStoreInjectable),
|
||||
jobStore: di.inject(jobStoreInjectable),
|
||||
filterByNamespace: di.inject(filterByNamespaceInjectable),
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user