This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
The following commit(s) were added to refs/heads/master by this push:
new 9ca2d7fd Improve handling of config value
9ca2d7fd is described below
commit 9ca2d7fdb656e96e1994334851c93159e32fe3cb
Author: Mykola Mandra <[email protected]>
AuthorDate: Mon Jun 27 10:44:43 2022 +0100
Improve handling of config value
Signed-off-by: Mykola Mandra <[email protected]>
---
ui-modules/utils/quick-launch/quick-launch.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ui-modules/utils/quick-launch/quick-launch.js
b/ui-modules/utils/quick-launch/quick-launch.js
index a0003573..a486bddd 100644
--- a/ui-modules/utils/quick-launch/quick-launch.js
+++ b/ui-modules/utils/quick-launch/quick-launch.js
@@ -123,9 +123,10 @@ export function quickLaunchDirective() {
$scope.configMap = $scope.app.config.reduce((result, config)
=> {
result[config.name] = config;
- const planConfigValue =
parseConfigValue((parsedPlan[BROOKLYN_CONFIG] || {})[config.name]);
- const catalogItemConfigValue =
parseConfigValue((parsedPlan.services[0] &&
parsedPlan.services[0][BROOKLYN_CONFIG] || {})[config.name]);
- const configValue = planConfigValue ||
catalogItemConfigValue;
+ let configValue =
parseConfigValue((parsedPlan[BROOKLYN_CONFIG] || {})[config.name]);
+ if (typeof configValue == 'undefined') {
+ configValue = parseConfigValue((parsedPlan.services[0]
&& parsedPlan.services[0][BROOKLYN_CONFIG] || {})[config.name]);
+ }
if (typeof configValue !== 'undefined') {
$scope.entityToDeploy[BROOKLYN_CONFIG][config.name] =
configValue;