From b2cf3ce6c3b85a96fc6953d1a6751dffaef8af35 Mon Sep 17 00:00:00 2001 From: Evangelos Skopelitis Date: Tue, 10 Dec 2024 10:32:32 -0500 Subject: [PATCH] frontend: KubeObject: Set apiVersion in constructor Previously, the apiVersion was not being provided in the jsonData object in the resource table, and apiVersion is necessary for authenticating and displaying valid row actions. This change ensures that resource, group, and version are always provided to ensure that valid row actions for the given KubeObject are visible. Fixes: #2633 Signed-off-by: Evangelos Skopelitis --- frontend/src/lib/k8s/KubeObject.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/k8s/KubeObject.ts b/frontend/src/lib/k8s/KubeObject.ts index 383870b6cb..b0d084688f 100644 --- a/frontend/src/lib/k8s/KubeObject.ts +++ b/frontend/src/lib/k8s/KubeObject.ts @@ -529,13 +529,13 @@ export class KubeObject { // it may already have the details from the instance's API version. const attrs = { ...resourceAttrs }; - if (!!attrs.resource) { + if (!attrs.resource) { attrs.resource = resource; } - if (!!attrs.group) { + if (!attrs.group) { attrs.group = group; } - if (!!attrs.version) { + if (!attrs.version) { attrs.version = version; }