You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/09/16 17:27:44 UTC

[GitHub] [brooklyn-ui] ahgittin commented on a change in pull request #290: Enhancement/sensitive field warning icon - regression fix

ahgittin commented on a change in pull request #290:
URL: https://github.com/apache/brooklyn-ui/pull/290#discussion_r710330404



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
##########
@@ -100,15 +101,10 @@ export function summaryController($scope, $state, $stateParams, $q, $http, $http
 
             // TODO: ideally move this to a $watch block
             if (vm.config && vm.configResolved && vm.configInfo) {
-                vm.configItems = Object.entries(vm.showResolvedConfig ? vm.configResolved : vm.config)
-                    .map(([key, value]) => ({
-                        key,
-                        value,
-                        // marking as unsafe if the field name looks sensitive
-                        // and the unresolved value does *not* come from a secure external source
-                        isUnsafe: isSensitiveFieldName(key.trim()) &&
-                            !vm.config[key].toString().startsWith('$brooklyn:'),
-                    }));
+                vm.configItems = vm.showResolvedConfig ? vm.configResolved : vm.config;
+                vm.configItemsUnsafeMap = mapValues(vm.configItems, (value, key) =>
+                    isSensitiveFieldName(key.trim()) && !vm.config[key].toString().startsWith('$brooklyn:')

Review comment:
       will this fail if not set?
   
   i will test and fix




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org