Skip to content

Commit

Permalink
frontend: KubeObject: Set apiVersion in constructor
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
skoeva committed Dec 11, 2024
1 parent 950b977 commit f86d8b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/lib/k8s/KubeObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,13 +529,13 @@ export class KubeObject<T extends KubeObjectInterface | KubeEvent = any> {
// 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;
}

Expand Down

0 comments on commit f86d8b4

Please sign in to comment.