From 2762c8ed0fd787173aa6062a0e867c21cc20d5ce Mon Sep 17 00:00:00 2001 From: Jan Jucca Patzelt Date: Mon, 15 Jul 2024 15:03:07 +0200 Subject: [PATCH] Fix envVars GUI for new apps This fixes a bug where environment variables for new apps weren't shown in the GUI. Signed-off-by: Jan Jucca Patzelt --- .../tabs/variables-tab/variables-tab.component.ts | 2 +- .../list-types/app-variables/cf-app-variables-data-source.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/packages/cloud-foundry/src/features/applications/application/application-tabs-base/tabs/variables-tab/variables-tab.component.ts b/src/frontend/packages/cloud-foundry/src/features/applications/application/application-tabs-base/tabs/variables-tab/variables-tab.component.ts index ff7c2f0fe3..ba5dd6de92 100644 --- a/src/frontend/packages/cloud-foundry/src/features/applications/application/application-tabs-base/tabs/variables-tab/variables-tab.component.ts +++ b/src/frontend/packages/cloud-foundry/src/features/applications/application/application-tabs-base/tabs/variables-tab/variables-tab.component.ts @@ -74,7 +74,7 @@ export class VariablesTabComponent implements OnInit { if (envVarType === 'cfGuid' || envVarType === stratosEndpointGuidKey) { return; } - const envVars = allEnvVars[0].entity[envVarType]; + const envVars = (allEnvVars[0].entity[envVarType]) ? allEnvVars[0].entity[envVarType] : {}; result.push({ section: true, name: envVarType.replace('_json', ''), diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-variables/cf-app-variables-data-source.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-variables/cf-app-variables-data-source.ts index c16c3fc0b4..29f181430f 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-variables/cf-app-variables-data-source.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-variables/cf-app-variables-data-source.ts @@ -44,7 +44,7 @@ export class CfAppVariablesDataSource extends ListDataSource ({ name, value: env[name] })); return rows; }),