mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make sure that details are show for all versions
- Remove duplicate versioning checks since everything must go through the API anyway Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
714d4627a3
commit
192b486991
@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { kubeObjectDetailItemInjectionToken } from "../kube-object-detail-item-injection-token";
|
||||
import { computed } from "mobx";
|
||||
import { PodDisruptionBudgetDetails } from "../../../+config-pod-disruption-budgets";
|
||||
import { kubeObjectMatchesToKindAndApiVersion } from "../kube-object-matches-to-kind-and-api-version";
|
||||
import currentKubeObjectInDetailsInjectable from "../../current-kube-object-in-details.injectable";
|
||||
import { PodDisruptionBudget } from "../../../../../common/k8s-api/endpoints";
|
||||
|
||||
const podDisruptionBudgetDetailItemInjectable = getInjectable({
|
||||
id: "pod-disruption-budget-detail-item",
|
||||
@ -17,7 +17,7 @@ const podDisruptionBudgetDetailItemInjectable = getInjectable({
|
||||
|
||||
return {
|
||||
Component: PodDisruptionBudgetDetails,
|
||||
enabled: computed(() => isPodDisruptionBudget(kubeObject.value.get()?.object)),
|
||||
enabled: computed(() => kubeObject.value.get()?.object instanceof PodDisruptionBudget),
|
||||
orderNumber: 10,
|
||||
};
|
||||
},
|
||||
@ -25,9 +25,4 @@ const podDisruptionBudgetDetailItemInjectable = getInjectable({
|
||||
injectionToken: kubeObjectDetailItemInjectionToken,
|
||||
});
|
||||
|
||||
const isPodDisruptionBudget = kubeObjectMatchesToKindAndApiVersion(
|
||||
"PodDisruptionBudget",
|
||||
["policy/v1beta1"],
|
||||
);
|
||||
|
||||
export default podDisruptionBudgetDetailItemInjectable;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user