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:23 UTC
[brooklyn-ui] 02/05: scope variable naming correction,
removed debugging statements
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">