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

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

commit ec480fd5bec0fdef4791be0d0353beb97849b30c
Author: Alex Heneveld <g...@alex.heneveld.org>
AuthorDate: Fri Jun 28 09:11:15 2024 +0100

    tidy up - use constant, darken color, remove debug line
---
 .../app/components/task-sunburst/task-sunburst.directive.js         | 6 ++++--
 .../app/components/task-sunburst/task-sunburst.util.js              | 2 +-
 .../app/views/main/inspect/activities/activities.controller.js      | 3 ++-
 .../app/views/main/inspect/activities/kilt.modal.template.html      | 2 +-
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/ui-modules/app-inspector/app/components/task-sunburst/task-sunburst.directive.js
 
b/ui-modules/app-inspector/app/components/task-sunburst/task-sunburst.directive.js
index 336a6d8c..578348eb 100644
--- 
a/ui-modules/app-inspector/app/components/task-sunburst/task-sunburst.directive.js
+++ 
b/ui-modules/app-inspector/app/components/task-sunburst/task-sunburst.directive.js
@@ -29,6 +29,8 @@ angular.module(MODULE_NAME, [])
 
 export default MODULE_NAME;
 
+export const STORAGE_KEY_COLOR_MODE = 'brooklyn.'+MODULE_NAME+'.toggle_colors';
+
 export function taskSunburstDirective() {
     return {
         template: template,
@@ -43,7 +45,7 @@ export function taskSunburstDirective() {
     };
 
     function controller($scope, $element, $state, $window, $timeout) {
-        const simpleColors = $window.localStorage.getItem('simpleColors') || 
false;
+        const simpleColors = 
$window.localStorage.getItem(STORAGE_KEY_COLOR_MODE) || false;
         $scope.colorScheme = simpleColors ? "simple" : "normal";
         var viz = initVisualization($scope, $element, $state);
 
@@ -52,7 +54,7 @@ export function taskSunburstDirective() {
 
         $scope.$on('toggleColorScheme', (event, args) => {
             $scope.colorScheme = args.simpleColors ? "simple" : "normal";
-            $window.localStorage.setItem('simpleColors', args.simpleColors);
+            $window.localStorage.setItem(STORAGE_KEY_COLOR_MODE, 
args.simpleColors);
         });
 
         $scope.$on('$destroy', function() {
diff --git 
a/ui-modules/app-inspector/app/components/task-sunburst/task-sunburst.util.js 
b/ui-modules/app-inspector/app/components/task-sunburst/task-sunburst.util.js
index 80800f74..1fd8d620 100644
--- 
a/ui-modules/app-inspector/app/components/task-sunburst/task-sunburst.util.js
+++ 
b/ui-modules/app-inspector/app/components/task-sunburst/task-sunburst.util.js
@@ -69,7 +69,7 @@ export function orderFn(d1, d2) {
 var colors;
 colors = {
   ERROR: d3.color(__BRAND_DANGER__ || "#B43"),
-  NORMAL_COMPLETE: d3.color(__BRAND_COMPLETE__ || "#007600"),
+  NORMAL_COMPLETE: d3.color(__BRAND_COMPLETE__ || "#007600").darker(1),
   ACTIVE_NORMAL: d3.color(__BRAND_SUCCESS__ || "#090"),
   PALETTES: {}
 };
diff --git 
a/ui-modules/app-inspector/app/views/main/inspect/activities/activities.controller.js
 
b/ui-modules/app-inspector/app/views/main/inspect/activities/activities.controller.js
index ff2cd788..1a375aad 100644
--- 
a/ui-modules/app-inspector/app/views/main/inspect/activities/activities.controller.js
+++ 
b/ui-modules/app-inspector/app/views/main/inspect/activities/activities.controller.js
@@ -19,6 +19,7 @@
 import {HIDE_INTERSTITIAL_SPINNER_EVENT} from 
'brooklyn-ui-utils/interstitial-spinner/interstitial-spinner';
 import template from "./activities.template.html";
 import modalTemplate from './kilt.modal.template.html';
+import {STORAGE_KEY_COLOR_MODE} from 
"../../../../components/task-sunburst/task-sunburst.directive";
 
 export const activitiesState = {
     name: 'main.inspect.activities',
@@ -56,7 +57,7 @@ function ActivitiesController($scope, $state, $stateParams, 
$log, $timeout, enti
         $timeout(function() { $scope.$broadcast('resize') }, 100);
     };
 
-    vm.simpleColors = window.localStorage.getItem('simpleColors') || false;
+    vm.simpleColors = window.localStorage.getItem(STORAGE_KEY_COLOR_MODE) || 
false;
     vm.toggleColorScheme = function () {
         vm.simpleColors = !vm.simpleColors;
         $timeout(function() { $scope.$broadcast('toggleColorScheme', 
{simpleColors: vm.simpleColors}) }, 100);
diff --git 
a/ui-modules/app-inspector/app/views/main/inspect/activities/kilt.modal.template.html
 
b/ui-modules/app-inspector/app/views/main/inspect/activities/kilt.modal.template.html
index d7aff16d..649fa7fa 100644
--- 
a/ui-modules/app-inspector/app/views/main/inspect/activities/kilt.modal.template.html
+++ 
b/ui-modules/app-inspector/app/views/main/inspect/activities/kilt.modal.template.html
@@ -17,7 +17,7 @@
   under the License.
 -->
 <div class="modal-header">
-    <br-svg type="close" class="pull-right" ng-click="$dismiss('Close modal 
DJG!!!!')"></br-svg>
+    <br-svg type="close" class="pull-right" ng-click="$dismiss('Close 
modal')"></br-svg>
     <h3 class="modal-title">Progress Map</h3>
 </div>
 <div class="modal-body">

Reply via email to