cloudfoundry-community / stratos

Stratos: Web-based Management UI for Cloud Foundry and Kubernetes
MIT License
3 stars 7 forks source link

Fix environment variables GUI for new apps #76

Closed patzeltj closed 3 months ago

patzeltj commented 3 months ago

Description

This pull request addresses a bug in the Stratos GUI that caused issues with displaying and managing environment variables for new applications in the GUI. The fix ensures that the environment variables object is not NULL and provides an empty object if necessary.

Motivation and Context

When a new app was created, the environment variables were not shown correctly. This was caused by a NULL entry. The entry prevented the GUI from displaying the environment variables correctly because it had nothing to iterate over. It also prevented the setting of new variables and prevented variables that were set manually from being shown. This was solved by inserting an empty object if the variable is currently set to NULL.

How Has This Been Tested?

This fix has been running on the STACKIT Stratos for two years. It was manually tested by creating a new application and testing that the env variables were shown correctly and were editable in the GUI.

Types of changes

Checklist:

wayneeseguin commented 3 months ago

Straightforward change, great PR!