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/05/03 08:27:19 UTC

[brooklyn-ui] 02/08: Dimm entity name on view mode change instead of background colour of the node

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 143eb615136268d0a8da36a0356588dafd7adb6e
Author: Mykola Mandra <my...@cloudsoftcorp.com>
AuthorDate: Mon Apr 26 14:44:05 2021 +0100

    Dimm entity name on view mode change instead of background colour of the node
    
    Signed-off-by: Mykola Mandra <my...@cloudsoftcorp.com>
---
 .../app-inspector/app/components/entity-tree/entity-node.html       | 4 ++--
 .../app-inspector/app/components/entity-tree/entity-node.less       | 6 +++---
 .../app/components/entity-tree/entity-tree.directive.js             | 4 ++--
 3 files changed, 7 insertions(+), 7 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 cbc417f..3f11c35 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,11 +17,11 @@
   under the License.
 -->
 <div class="entity-node">
-    <div ng-if="isOpen" class="entity-node-item" ng-class="{ 'active': isSelected(), 'secondary' : !isInSpotlight() }" 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() }" 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>
-            <span>{{entity.name}}</span>
+            <span ng-class="{ 'secondary' : isSecondary() }">{{entity.name}}</span>
             <span class="node-icon"><img ng-src="{{ iconUrl }}"/></span>
         </a>
         <div class="entity-node-toggle-wrapper">
diff --git a/ui-modules/app-inspector/app/components/entity-tree/entity-node.less b/ui-modules/app-inspector/app/components/entity-tree/entity-node.less
index a3fe401..f8ff200 100644
--- a/ui-modules/app-inspector/app/components/entity-tree/entity-node.less
+++ b/ui-modules/app-inspector/app/components/entity-tree/entity-node.less
@@ -47,9 +47,6 @@
     border-radius: @border-radius-base;
     box-shadow: 0 1px 2px rgba(0,0,0,0.1);
     transition: all .2s ease-in-out;
-    &.secondary {
-      background-color: lighten(@brand-primary, 55%);
-    }
     &:hover {
       background-color: @body-bg;
     }
@@ -76,6 +73,9 @@
         flex-grow: 1;
         padding-top: 3px;
         margin-left: 10px;
+        &.secondary {
+          color: @gray-lighter;
+        }
       }
     }
     .entity-node-toggle-wrapper {
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 43aad2c..5d4ebcd 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
@@ -361,8 +361,8 @@ export function entityNodeDirective() {
         };
 
         // TODO SMART-143
-        $scope.isInSpotlight = function() {
-            return $scope.entity.viewModesSpotLight.has($scope.viewMode);
+        $scope.isSecondary = function() {
+            return !$scope.entity.viewModesSpotLight.has($scope.viewMode);
         };
 
         // TODO SMART-143