1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(kube): configmaps and secrets from envFrom in the app detail screen [EE-6282] (#10742)

* fix configmaps and secrets from envFrom

* adress review comments
This commit is contained in:
Prabhat Khera 2023-12-06 16:02:26 +13:00 committed by GitHub
parent 1d279428a7
commit bd5ba7b5d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 113 additions and 66 deletions

View file

@ -233,7 +233,12 @@ async function getApplicationsByKind<T extends ApplicationList>(
const { data } = await axios.get<T>(
buildUrl(environmentId, namespace, `${appKind}s`)
);
return data.items as T['items'];
const items = (data.items || []).map((app) => ({
...app,
kind: appKind,
apiVersion: data.apiVersion,
}));
return items as T['items'];
} catch (e) {
throw parseKubernetesAxiosError(
e,