You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/09/16 18:26:21 UTC

[brooklyn-ui] branch master updated (d5ddaa9 -> ed90962)

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git.


    from d5ddaa9  This closes #289
     new f31f709  WIP moved config entries row data generation back to config-sensor table, passing map with unsafe flags
     new 8de45c7  scope variable naming correction, removed debugging statements
     new cf57013  Merge branch 'master' into enhancement/sensitive-field-warning-icon
     new f1823bd  This closes #290
     new ed90962  tidies following PR 290

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../config-sensor-table/config-sensor-table.directive.js | 13 +++++++++++++
 .../config-sensor-table.template.html                    |  4 ++--
 .../app/views/main/inspect/summary/summary.controller.js | 16 ++++++----------
 .../app/views/main/inspect/summary/summary.template.html |  5 ++++-
 4 files changed, 25 insertions(+), 13 deletions(-)

[brooklyn-ui] 01/05: WIP moved config entries row data generation back to config-sensor table, passing map with unsafe flags

Posted by he...@apache.org.
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

commit f31f7091bdf9a91533aa537fcbfc210ef45c7e0d
Author: John Athanasiou <ja...@users.noreply.github.com>
AuthorDate: Thu Sep 16 18:59:26 2021 +0300

    WIP moved config entries row data generation back to config-sensor table, passing map with unsafe flags
---
 .../config-sensor-table.directive.js               | 19 +++++++++++++++
 .../config-sensor-table.template.html              |  4 +++-
 .../main/inspect/summary/summary.controller.js     | 28 ++++++++++++++--------
 .../main/inspect/summary/summary.template.html     |  6 ++++-
 4 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
index 00ba0dd..76355bd 100644
--- a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
+++ b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
@@ -37,6 +37,7 @@ export function configSensorTableDirective(brSnackbar) {
         scope: {
             data: '=',
             info: '=',
+            configItemsUnsafeMap: '=',
         },
         link,
     };
@@ -49,6 +50,23 @@ export function configSensorTableDirective(brSnackbar) {
             'external provider should be used to store this value with a DSL expression supplied in the blueprint to ' +
             'retrieve the value.';
 
+        scope.$watchGroup(['data','configItemsUnsafeMap'], (changes)=> {
+            if (angular.isObject(scope.data)) {
+                console.log('scope',scope)
+                console.log('scope.configItemsUnsafeMap',scope.configItemsUnsafeMap)
+                scope.items = Object.entries(scope.data)
+                    .map(([key, value]) => ({
+                        key,
+                        value,
+                        isUnsafe: (scope.configItemsUnsafeMap || {})[key],
+                    }));
+            }
+        });
+
+        scope.$watch('configItemsUnsafeMap', () => {
+            console.log('scope.configItemsUnsafeMap 222',scope.configItemsUnsafeMap)
+        });
+
         scope.$watch('info', () => {
             if (angular.isArray(scope.info)) {
                 scope.mapInfo = scope.info.reduce((pool, infoItem) => {
@@ -57,6 +75,7 @@ export function configSensorTableDirective(brSnackbar) {
                 }, {});
             }
         });
+
         scope.onClipboardSuccess = (e)=> {
             angular.element(e.trigger).triggerHandler('copied');
             e.clearSelection();
diff --git a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
index c31bb1f..59bc391 100644
--- a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
+++ b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
@@ -16,6 +16,8 @@
   specific language governing permissions and limitations
   under the License.
 -->
+configItemsUnsafeMap inner
+{{configItemsUnsafeMap}}
 <div class="form-group">
     <input type="text" class="form-control" placeholder="Filter by name or value" ng-model="filterValue">
 </div>
@@ -30,7 +32,7 @@
         </tr>
         </thead>
         <tbody>
-        <tr ng-repeat="item in data | orderBy:'key':sortReverse | filter:filterValue as filterResult track by item.key">
+        <tr ng-repeat="item in items | orderBy:'key':sortReverse | filter:filterValue as filterResult track by item.key">
             <td>
                 <span>{{item.key}}</span>
                 <i ng-if="mapInfo[item.key].description" class="fa fa-info-circle pull-right" uib-popover="{{mapInfo[item.key].description}}" popover-trigger="'mouseenter'" popover-title="Description" popover-animation="true"></i>
diff --git a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
index e2eecb3..4549a66 100644
--- a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
+++ b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 import angular from "angular";
-import map from "lodash/map";
+import { map, mapValues } from "lodash";
 import {HIDE_INTERSTITIAL_SPINNER_EVENT} from 'brooklyn-ui-utils/interstitial-spinner/interstitial-spinner';
 import template from "./summary.template.html";
 import { SENSITIVE_FIELD_REGEX } from 'brooklyn-ui-utils/sensitive-field/sensitive-field';
@@ -50,6 +50,7 @@ export function summaryController($scope, $state, $stateParams, $q, $http, $http
     };
     // the eventual entries to share with the sensor table component
     vm.configItems = null;
+    vm.configItemsUnsafeMap = null;
     vm.configItemsInfo = null;
 
     let observers = [];
@@ -100,15 +101,20 @@ 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: SENSITIVE_FIELD_REGEX.test(key.trim()) &&
-                            !vm.config[key].toString().startsWith('$brooklyn:'),
-                    }));
+                vm.configItems = vm.showResolvedConfig ? vm.configResolved : vm.config;
+                vm.configItemsUnsafeMap = mapValues(vm.configItems, (value, key) =>
+                    SENSITIVE_FIELD_REGEX.test(key.trim()) && !vm.config[key].toString().startsWith('$brooklyn:')
+                );
+
+                // 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: SENSITIVE_FIELD_REGEX.test(key.trim()) &&
+                //             !vm.config[key].toString().startsWith('$brooklyn:'),
+                //     }));
             }
         }
 
@@ -133,6 +139,8 @@ export function summaryController($scope, $state, $stateParams, $q, $http, $http
                     configInfoHandler(configInfoResult.value);
 
                     // making sure that changes are propagated to table.
+                    console.log('vm.configItems',vm.configItems)
+                    console.log('vm.configItemsUnsafeMap',vm.configItemsUnsafeMap)
                     $scope.$apply();
                 }
             });
diff --git a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
index 02662fb..f4c3804 100644
--- a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
+++ b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
@@ -187,7 +187,11 @@
 
         <div>
             <loading-state error="vm.error.configItems" ng-if="!vm.configItems"></loading-state>
-            <config-sensor-table data="vm.configItems" info="vm.configInfo" ng-if="vm.configItems"></config-sensor-table>
+            configItemsUnsafeMap outer {{vm.configItemsUnsafeMap}}
+            <config-sensor-table ng-if="vm.configItems"
+                data="vm.configItems" info="vm.configInfo"
+                configItemsUnsafeMap="vm.configItemsUnsafeMap"
+            ></config-sensor-table>
         </div>
         <div class="table-option-footer">
             <button ng-click="vm.toggleConfigResolved()" ng-class="{ 'btn-outline': !vm.showResolvedConfig, 'btn-accent': vm.showResolvedConfig }">

[brooklyn-ui] 02/05: scope variable naming correction, removed debugging statements

Posted by he...@apache.org.
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

commit 8de45c771b715cea071c68096b702f402ce2378f
Author: John Athanasiou <ja...@users.noreply.github.com>
AuthorDate: Thu Sep 16 19:13:49 2021 +0300

    scope variable naming correction, removed debugging statements
---
 .../config-sensor-table/config-sensor-table.directive.js     | 12 +++---------
 .../config-sensor-table/config-sensor-table.template.html    |  2 --
 .../app/views/main/inspect/summary/summary.controller.js     | 12 ------------
 .../app/views/main/inspect/summary/summary.template.html     |  3 +--
 4 files changed, 4 insertions(+), 25 deletions(-)

diff --git a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
index 76355bd..794f73c 100644
--- a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
+++ b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
@@ -37,7 +37,7 @@ export function configSensorTableDirective(brSnackbar) {
         scope: {
             data: '=',
             info: '=',
-            configItemsUnsafeMap: '=',
+            configitemsunsafemap: '=',
         },
         link,
     };
@@ -50,23 +50,17 @@ export function configSensorTableDirective(brSnackbar) {
             'external provider should be used to store this value with a DSL expression supplied in the blueprint to ' +
             'retrieve the value.';
 
-        scope.$watchGroup(['data','configItemsUnsafeMap'], (changes)=> {
+        scope.$watchGroup(['data','configitemsunsafemap'], (changes)=> {
             if (angular.isObject(scope.data)) {
-                console.log('scope',scope)
-                console.log('scope.configItemsUnsafeMap',scope.configItemsUnsafeMap)
                 scope.items = Object.entries(scope.data)
                     .map(([key, value]) => ({
                         key,
                         value,
-                        isUnsafe: (scope.configItemsUnsafeMap || {})[key],
+                        isUnsafe: (scope.configitemsunsafemap || {})[key],
                     }));
             }
         });
 
-        scope.$watch('configItemsUnsafeMap', () => {
-            console.log('scope.configItemsUnsafeMap 222',scope.configItemsUnsafeMap)
-        });
-
         scope.$watch('info', () => {
             if (angular.isArray(scope.info)) {
                 scope.mapInfo = scope.info.reduce((pool, infoItem) => {
diff --git a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
index 59bc391..549a30b 100644
--- a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
+++ b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
@@ -16,8 +16,6 @@
   specific language governing permissions and limitations
   under the License.
 -->
-configItemsUnsafeMap inner
-{{configItemsUnsafeMap}}
 <div class="form-group">
     <input type="text" class="form-control" placeholder="Filter by name or value" ng-model="filterValue">
 </div>
diff --git a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
index 4549a66..c3919ad 100644
--- a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
+++ b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
@@ -105,16 +105,6 @@ export function summaryController($scope, $state, $stateParams, $q, $http, $http
                 vm.configItemsUnsafeMap = mapValues(vm.configItems, (value, key) =>
                     SENSITIVE_FIELD_REGEX.test(key.trim()) && !vm.config[key].toString().startsWith('$brooklyn:')
                 );
-
-                // 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: SENSITIVE_FIELD_REGEX.test(key.trim()) &&
-                //             !vm.config[key].toString().startsWith('$brooklyn:'),
-                //     }));
             }
         }
 
@@ -139,8 +129,6 @@ export function summaryController($scope, $state, $stateParams, $q, $http, $http
                     configInfoHandler(configInfoResult.value);
 
                     // making sure that changes are propagated to table.
-                    console.log('vm.configItems',vm.configItems)
-                    console.log('vm.configItemsUnsafeMap',vm.configItemsUnsafeMap)
                     $scope.$apply();
                 }
             });
diff --git a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
index f4c3804..9427117 100644
--- a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
+++ b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
@@ -187,10 +187,9 @@
 
         <div>
             <loading-state error="vm.error.configItems" ng-if="!vm.configItems"></loading-state>
-            configItemsUnsafeMap outer {{vm.configItemsUnsafeMap}}
             <config-sensor-table ng-if="vm.configItems"
                 data="vm.configItems" info="vm.configInfo"
-                configItemsUnsafeMap="vm.configItemsUnsafeMap"
+                configitemsunsafemap="vm.configItemsUnsafeMap"
             ></config-sensor-table>
         </div>
         <div class="table-option-footer">

[brooklyn-ui] 05/05: tidies following PR 290

Posted by he...@apache.org.
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

commit ed9096273120f3d17f260b24c86fceb1f125a83c
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Thu Sep 16 19:25:49 2021 +0100

    tidies following PR 290
    
    guard against null value, pass fn rather than map, and tidy names of fields
---
 .../config-sensor-table/config-sensor-table.directive.js          | 6 +++---
 .../config-sensor-table/config-sensor-table.template.html         | 2 +-
 .../app/views/main/inspect/summary/summary.controller.js          | 8 ++++----
 .../app/views/main/inspect/summary/summary.template.html          | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
index 31948eb..fbec7c3 100644
--- a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
+++ b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.directive.js
@@ -37,7 +37,7 @@ export function configSensorTableDirective(brSnackbar) {
         scope: {
             data: '=',
             info: '=',
-            configitemsunsafemap: '=',
+            checkPlaintextSensitiveKeyValue: '<',
         },
         link,
     };
@@ -50,13 +50,13 @@ export function configSensorTableDirective(brSnackbar) {
             'external provider should be used to store this value with a DSL expression supplied in the blueprint to ' +
             'retrieve the value.';
 
-        scope.$watchGroup(['data','configitemsunsafemap'], (changes)=> {
+        scope.$watchGroup(['data'], (changes)=> {
             if (angular.isObject(scope.data)) {
                 scope.items = Object.entries(scope.data)
                     .map(([key, value]) => ({
                         key,
                         value,
-                        isUnsafe: (scope.configitemsunsafemap || {})[key],
+                        isPlaintextSensitiveValue: scope.checkPlaintextSensitiveKeyValue && scope.checkPlaintextSensitiveKeyValue(key, value),
                     }));
             }
         });
diff --git a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
index 549a30b..e236bb8 100644
--- a/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
+++ b/ui-modules/app-inspector/app/components/config-sensor-table/config-sensor-table.template.html
@@ -42,7 +42,7 @@
                     <span ng-if="item.value !== null" ng-bind-html="item.value | brLinky:mapInfo[item.key]"></span>
                 </span>
                 <span class="extras">
-                    <i class="fa fa-exclamation-triangle warning-icon" ng-class="{invisible: !item.isUnsafe}"
+                    <i class="fa fa-exclamation-triangle warning-icon" ng-class="{invisible: !item.isPlaintextSensitiveValue}"
                        uib-popover={{WARNING_TEXT}} popover-trigger="'mouseenter'" popover-animation="true"
                        popover-placement="left"
                     ></i>
diff --git a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
index 643f49d..501347e 100644
--- a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
+++ b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 import angular from "angular";
-import { map, mapValues } from "lodash";
+import map from "lodash";
 import {HIDE_INTERSTITIAL_SPINNER_EVENT} from 'brooklyn-ui-utils/interstitial-spinner/interstitial-spinner';
 import template from "./summary.template.html";
 import { isSensitiveFieldName } from 'brooklyn-ui-utils/sensitive-field/sensitive-field';
@@ -87,6 +87,9 @@ export function summaryController($scope, $state, $stateParams, $q, $http, $http
         return entityApi.entityConfigInfo(applicationId, entityId);
     }
 
+    vm.checkPlaintextSensitiveKeyValue = (key,value) =>
+        key && vm.config && vm.config[key] && isSensitiveFieldName(key) && !vm.config[key].toString().startsWith('$brooklyn:');
+
     // no return
     vm.refreshConfig = () => {
         const handleError = (message) => {
@@ -102,9 +105,6 @@ 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 = vm.showResolvedConfig ? vm.configResolved : vm.config;
-                vm.configItemsUnsafeMap = mapValues(vm.configItems, (value, key) =>
-                    isSensitiveFieldName(key.trim()) && !vm.config[key].toString().startsWith('$brooklyn:')
-                );
             }
         }
 
diff --git a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
index 9427117..3f218f7 100644
--- a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
+++ b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
@@ -189,7 +189,7 @@
             <loading-state error="vm.error.configItems" ng-if="!vm.configItems"></loading-state>
             <config-sensor-table ng-if="vm.configItems"
                 data="vm.configItems" info="vm.configInfo"
-                configitemsunsafemap="vm.configItemsUnsafeMap"
+                check-plaintext-sensitive-key-value="vm.checkPlaintextSensitiveKeyValue"
             ></config-sensor-table>
         </div>
         <div class="table-option-footer">

[brooklyn-ui] 04/05: This closes #290

Posted by he...@apache.org.
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

commit f1823bdd9dd5553554676579b081ea846bda6466
Merge: d5ddaa9 cf57013
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Thu Sep 16 18:36:03 2021 +0100

    This closes #290

 .../config-sensor-table/config-sensor-table.directive.js | 13 +++++++++++++
 .../config-sensor-table.template.html                    |  2 +-
 .../app/views/main/inspect/summary/summary.controller.js | 16 ++++++----------
 .../app/views/main/inspect/summary/summary.template.html |  5 ++++-
 4 files changed, 24 insertions(+), 12 deletions(-)

[brooklyn-ui] 03/05: Merge branch 'master' into enhancement/sensitive-field-warning-icon

Posted by he...@apache.org.
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

commit cf5701398be17842aafb8eb1a2ec4af352e1a9b5
Merge: 8de45c7 c8bea0c
Author: John Athanasiou <ja...@users.noreply.github.com>
AuthorDate: Thu Sep 16 19:32:23 2021 +0300

    Merge branch 'master' into enhancement/sensitive-field-warning-icon

 Jenkinsfile                                        |  1 +
 modularity-server/external-modules/pom.xml         |  3 +-
 .../brooklyn/ui/modularity/ExternalUiModule.java   |  4 ++-
 modularity-server/metadata-registry/pom.xml        |  1 +
 .../registry/impl/UiMetadataConfigListener.java    |  7 ++--
 .../config-sensor-table.directive.js               |  6 ++--
 .../main/inspect/summary/summary.controller.js     |  4 +--
 .../components/catalog-saver/catalog-saver.less    |  6 ++++
 .../catalog-saver.modal.template.html              |  4 +--
 .../providers/blueprint-service.provider.js        | 41 ++++++++++++++++++----
 .../spec-editor/spec-editor.directive.js           |  4 +--
 .../catalog/app/views/bundle/type/type.state.js    |  1 +
 ui-modules/utils/quick-launch/quick-launch.js      |  3 +-
 .../utils/sensitive-field/sensitive-field.js       | 23 ++++++++++--
 ui-modules/utils/server-status/server-status.js    |  6 ++++
 15 files changed, 91 insertions(+), 23 deletions(-)

diff --cc ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
index c3919ad,c7895af..643f49d
--- a/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
+++ b/ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
@@@ -17,10 -17,10 +17,10 @@@
   * under the License.
   */
  import angular from "angular";
 -import map from "lodash/map";
 +import { map, mapValues } from "lodash";
  import {HIDE_INTERSTITIAL_SPINNER_EVENT} from 'brooklyn-ui-utils/interstitial-spinner/interstitial-spinner';
  import template from "./summary.template.html";
- import { SENSITIVE_FIELD_REGEX } from 'brooklyn-ui-utils/sensitive-field/sensitive-field';
+ import { isSensitiveFieldName } from 'brooklyn-ui-utils/sensitive-field/sensitive-field';
  
  export const summaryState = {
      name: 'main.inspect.summary',
@@@ -101,10 -100,15 +101,10 @@@ export function summaryController($scop
  
              // 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) =>
-                     SENSITIVE_FIELD_REGEX.test(key.trim()) && !vm.config[key].toString().startsWith('$brooklyn:')
++                    isSensitiveFieldName(key.trim()) && !vm.config[key].toString().startsWith('$brooklyn:')
 +                );
              }
          }