From f9bc289c4663b505a6b45af18d471d1a8a6c786b Mon Sep 17 00:00:00 2001 From: Oleksandr Dubenko Date: Tue, 24 Dec 2024 10:16:26 +0100 Subject: [PATCH] frontend: Put apiVersion for individual items from list when fetching Signed-off-by: Oleksandr Dubenko --- frontend/src/lib/k8s/api/v2/useKubeObjectList.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/k8s/api/v2/useKubeObjectList.ts b/frontend/src/lib/k8s/api/v2/useKubeObjectList.ts index 9de0a6f737..9d8e203340 100644 --- a/frontend/src/lib/k8s/api/v2/useKubeObjectList.ts +++ b/frontend/src/lib/k8s/api/v2/useKubeObjectList.ts @@ -73,7 +73,11 @@ export function kubeObjectListQuery( } ).then(it => it.json()); list.items = list.items.map(item => { - const itm = new kubeObjectClass({ ...item, kind: list.kind.replace('List', '') }); + const itm = new kubeObjectClass({ + ...item, + kind: list.kind.replace('List', ''), + apiVersion: list.apiVersion, + }); itm.cluster = cluster; return itm; });