mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix bug in computation of cronJob statuses
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
d9721bfc75
commit
f17acccda1
@ -4,16 +4,17 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import computeStatusCountsForOwnersInjectable from "../../utils/compute-status-counts.injectable";
|
||||
import cronJobStoreInjectable from "./store.injectable";
|
||||
|
||||
const totalStatusesForCronJobsInSelectedNamespacesInjectable = getInjectable({
|
||||
id: "total-statuses-for-cron-jobs-in-selected-namespaces",
|
||||
instantiate: (di) => {
|
||||
const cronJobStore = di.inject(cronJobStoreInjectable);
|
||||
const computeStatusCountsForOwners = di.inject(computeStatusCountsForOwnersInjectable);
|
||||
|
||||
return computed(() => computeStatusCountsForOwners(cronJobStore.contextItems));
|
||||
return computed(() => new Map(cronJobStore.contextItems.map(cronJob => [
|
||||
cronJob.getId(),
|
||||
[cronJob.getStatus()],
|
||||
])));
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user