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:
parent
1f78c66cc2
commit
72f199f6c2
@ -13,11 +13,9 @@ import moment from "moment";
|
|||||||
import { SiblingsInTabLayout } from "../layout/siblings-in-tab-layout";
|
import { SiblingsInTabLayout } from "../layout/siblings-in-tab-layout";
|
||||||
import { KubeObjectAge } from "../kube-object/age";
|
import { KubeObjectAge } from "../kube-object/age";
|
||||||
import type { CronJobStore } from "./store";
|
import type { CronJobStore } from "./store";
|
||||||
import type { JobStore } from "../+workloads-jobs/store";
|
|
||||||
import type { EventStore } from "../+events/store";
|
import type { EventStore } from "../+events/store";
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
import cronJobStoreInjectable from "./store.injectable";
|
import cronJobStoreInjectable from "./store.injectable";
|
||||||
import jobStoreInjectable from "../+workloads-jobs/store.injectable";
|
|
||||||
import eventStoreInjectable from "../+events/store.injectable";
|
import eventStoreInjectable from "../+events/store.injectable";
|
||||||
import { prevDefault } from "../../utils";
|
import { prevDefault } from "../../utils";
|
||||||
import type { FilterByNamespace } from "../+namespaces/namespace-select-filter-model/filter-by-namespace.injectable";
|
import type { FilterByNamespace } from "../+namespaces/namespace-select-filter-model/filter-by-namespace.injectable";
|
||||||
@ -35,20 +33,16 @@ enum columnId {
|
|||||||
|
|
||||||
interface Dependencies {
|
interface Dependencies {
|
||||||
cronJobStore: CronJobStore;
|
cronJobStore: CronJobStore;
|
||||||
jobStore: JobStore;
|
|
||||||
eventStore: EventStore;
|
eventStore: EventStore;
|
||||||
filterByNamespace: FilterByNamespace;
|
filterByNamespace: FilterByNamespace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@observer
|
const NonInjectedCronJobs = observer((props: Dependencies) => {
|
||||||
class NonInjectedCronJobs extends React.Component<Dependencies>{
|
|
||||||
render() {
|
|
||||||
const {
|
const {
|
||||||
cronJobStore,
|
cronJobStore,
|
||||||
eventStore,
|
eventStore,
|
||||||
jobStore,
|
|
||||||
filterByNamespace,
|
filterByNamespace,
|
||||||
} = this.props;
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SiblingsInTabLayout>
|
<SiblingsInTabLayout>
|
||||||
@ -57,7 +51,7 @@ class NonInjectedCronJobs extends React.Component<Dependencies>{
|
|||||||
tableId="workload_cronjobs"
|
tableId="workload_cronjobs"
|
||||||
className="CronJobs"
|
className="CronJobs"
|
||||||
store={cronJobStore}
|
store={cronJobStore}
|
||||||
dependentStores={[jobStore, eventStore]}
|
dependentStores={[eventStore]}
|
||||||
sortingCallbacks={{
|
sortingCallbacks={{
|
||||||
[columnId.name]: cronJob => cronJob.getName(),
|
[columnId.name]: cronJob => cronJob.getName(),
|
||||||
[columnId.namespace]: cronJob => cronJob.getNs(),
|
[columnId.namespace]: cronJob => cronJob.getNs(),
|
||||||
@ -104,15 +98,13 @@ class NonInjectedCronJobs extends React.Component<Dependencies>{
|
|||||||
/>
|
/>
|
||||||
</SiblingsInTabLayout>
|
</SiblingsInTabLayout>
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
}
|
|
||||||
|
|
||||||
export const CronJobs = withInjectables<Dependencies>(NonInjectedCronJobs, {
|
export const CronJobs = withInjectables<Dependencies>(NonInjectedCronJobs, {
|
||||||
getProps: (di, props) => ({
|
getProps: (di, props) => ({
|
||||||
...props,
|
...props,
|
||||||
cronJobStore: di.inject(cronJobStoreInjectable),
|
cronJobStore: di.inject(cronJobStoreInjectable),
|
||||||
eventStore: di.inject(eventStoreInjectable),
|
eventStore: di.inject(eventStoreInjectable),
|
||||||
jobStore: di.inject(jobStoreInjectable),
|
|
||||||
filterByNamespace: di.inject(filterByNamespaceInjectable),
|
filterByNamespace: di.inject(filterByNamespaceInjectable),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user