jathanasiou commented on a change in pull request #290:
URL: https://github.com/apache/brooklyn-ui/pull/290#discussion_r710353893
##########
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:
the lodash `mapValues` (like most of its functions) is very resistant to
"bad" values, so worse scenario we'll have an empty object for the
config-sensor table, meaning no warning icons at all but everything else should
be fine.

--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]