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 0b7d4382083d9f787e807ed090cf93a78fc77fc9 Author: Mykola Mandra <[email protected]> AuthorDate: Tue Apr 27 16:32:06 2021 +0100 Do not highlight nodes in 'parent/child' view; tidy up docs Signed-off-by: Mykola Mandra <[email protected]> --- .../app/components/entity-tree/entity-node.html | 2 +- .../app/components/entity-tree/entity-tree.directive.js | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ui-modules/app-inspector/app/components/entity-tree/entity-node.html b/ui-modules/app-inspector/app/components/entity-tree/entity-node.html index 8227a3a..c7e854a 100644 --- a/ui-modules/app-inspector/app/components/entity-tree/entity-node.html +++ b/ui-modules/app-inspector/app/components/entity-tree/entity-node.html @@ -17,7 +17,7 @@ under the License. --> <div class="entity-node"> - <div ng-if="isOpen" class="entity-node-item" ng-class="{ 'active': isSelected(), 'highlight' : isChanged() && !isSelected() }" uib-popover-template="'EntityNodeInfoTemplate.html'" popover-trigger="'mouseenter'" popover-placement="right" popover-popup-delay="1000"> + <div ng-if="isOpen" class="entity-node-item" ng-class="{ 'active': isSelected(), 'highlight' : isHighlight() && !isSelected() }" uib-popover-template="'EntityNodeInfoTemplate.html'" popover-trigger="'mouseenter'" popover-placement="right" popover-popup-delay="1000"> <a ng-href="{{getHref()}}" class="entity-node-link"> <brooklyn-status-icon value="{{entity.serviceState}}" ng-if="entity.serviceState || entity.applicationId"></brooklyn-status-icon> <i class="fa fa-2x fa-external-link" ng-if="!entity.serviceState && !entity.applicationId"></i> diff --git a/ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js b/ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js index 0ea3b69..759f7e9 100644 --- a/ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js +++ b/ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js @@ -104,7 +104,7 @@ export function entityTreeDirective() { /** * Analyzes relationships of the entity tree and prepares mode views, e.g. 'parent/child' and 'host_for/hosted_on'. * - * @param {Array} entityTree The entity tree to process and prepare view modes for. + * @param {Array.<Object>} entityTree The entity tree to process and prepare view modes for. */ function analyzeRelationships(entityTree) { let entities = entityTreeToArray(entityTree); @@ -193,8 +193,8 @@ export function entityTreeDirective() { /** * Flips parent entity with its child. * - * @param parent The parent entity to flip with its child. - * @param child The child entity to flip with its parent. + * @param {Object} parent The parent entity to flip with its child. + * @param {Object} child The child entity to flip with its parent. * @param {Array.<Object>} entities The entity tree converted to array. * @param {string} viewMode The view mode to display copy of the entity in only. */ @@ -310,12 +310,11 @@ export function entityTreeDirective() { /** * Initializes entity tree with 'parent/child' view mode. This is a default view mode. * - * @param {Object} entities The entity tree to initialize with 'parent/child' view mode. + * @param {Array.<Object>} entities The entity tree to initialize with 'parent/child' view mode. */ function initParentChildView(entities) { entities.forEach(entity => { displayEntityInView(entity, VIEW_PARENT_CHILD); - highlightEntityInView(entity, VIEW_PARENT_CHILD); }); } @@ -469,10 +468,10 @@ export function entityNodeDirective() { }; /** - * @returns {boolean} True if entity is changed in a current view, false otherwise. + * @returns {boolean} True if to highlight entity in a current view, false otherwise. */ - $scope.isChanged = function() { - return $scope.entity.viewModesHighlight.has($scope.viewMode) && $scope.viewMode !== VIEW_PARENT_CHILD; + $scope.isHighlight = function() { + return $scope.entity.viewModesHighlight.has($scope.viewMode); }; /**
