From e03d37f52a0aeecbae562a0ee11494bd6be3e182 Mon Sep 17 00:00:00 2001 From: alfonsomthd Date: Wed, 30 Jan 2019 15:27:47 +0100 Subject: [PATCH] mgr/dashboard: Updated colors in PG Status chart MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * For consistency: Set 'Clean' status color to 'HEALTH_OK' color (Cluster Status card). Set 'Warning' status color to 'HEALTH_WARN' color. 'Working' (blue) & 'Unknown' (red) are kept due to previous consensus about these complementary colors in doughnut/pie charts. * Renamed Health Pie colors for the sake of clarity. Signed-off-by: Alfonso Martínez --- .../dashboard/health-pie/health-pie-color.enum.ts | 11 +++++------ .../ceph/dashboard/health-pie/health-pie.component.ts | 10 +++++----- .../ceph/dashboard/health/health.component.spec.ts | 8 ++++---- .../src/app/ceph/dashboard/health/health.component.ts | 8 ++++---- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie-color.enum.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie-color.enum.ts index ce6e931c5a19..fbeadcc2d3f8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie-color.enum.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie-color.enum.ts @@ -1,8 +1,7 @@ export enum HealthPieColor { - // Names inspired by https://encycolorpedia.com - MEDIUM_LIGHT_SHADE_PINK_RED = '#ff7592', - MEDIUM_DARK_SHADE_CYAN_BLUE = '#1d699d', - LIGHT_SHADE_BROWN = '#fcd0a1', - MEDIUM_DARK_SHADE_BLUE_MAGENTA = '#564d65', - SHADE_GREEN_CYAN = '#2cda9d' + DEFAULT_RED = '#ff7592', + DEFAULT_BLUE = '#1d699d', + DEFAULT_ORANGE = '#ffa500', + DEFAULT_MAGENTA = '#564d65', + DEFAULT_GREEN = '#00bb00' } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts index e346e3933ccb..94daabbb8e74 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts @@ -126,11 +126,11 @@ export class HealthPieComponent implements OnChanges, OnInit { this.chartConfig.colors = [ { backgroundColor: [ - HealthPieColor.MEDIUM_LIGHT_SHADE_PINK_RED, - HealthPieColor.MEDIUM_DARK_SHADE_CYAN_BLUE, - HealthPieColor.LIGHT_SHADE_BROWN, - HealthPieColor.SHADE_GREEN_CYAN, - HealthPieColor.MEDIUM_DARK_SHADE_BLUE_MAGENTA + HealthPieColor.DEFAULT_RED, + HealthPieColor.DEFAULT_BLUE, + HealthPieColor.DEFAULT_ORANGE, + HealthPieColor.DEFAULT_GREEN, + HealthPieColor.DEFAULT_MAGENTA ] } ]; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts index 150aa22fa235..aee287159ec8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts @@ -214,10 +214,10 @@ describe('HealthComponent', () => { colors: [ { backgroundColor: [ - HealthPieColor.SHADE_GREEN_CYAN, - HealthPieColor.MEDIUM_DARK_SHADE_CYAN_BLUE, - HealthPieColor.LIGHT_SHADE_BROWN, - HealthPieColor.MEDIUM_LIGHT_SHADE_PINK_RED + HealthPieColor.DEFAULT_GREEN, + HealthPieColor.DEFAULT_BLUE, + HealthPieColor.DEFAULT_ORANGE, + HealthPieColor.DEFAULT_RED ] } ], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts index dbdeeb669eb7..9d42bc90f5a5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts @@ -90,10 +90,10 @@ export class HealthComponent implements OnInit, OnDestroy { chart.colors = [ { backgroundColor: [ - HealthPieColor.SHADE_GREEN_CYAN, - HealthPieColor.MEDIUM_DARK_SHADE_CYAN_BLUE, - HealthPieColor.LIGHT_SHADE_BROWN, - HealthPieColor.MEDIUM_LIGHT_SHADE_PINK_RED + HealthPieColor.DEFAULT_GREEN, + HealthPieColor.DEFAULT_BLUE, + HealthPieColor.DEFAULT_ORANGE, + HealthPieColor.DEFAULT_RED ] } ]; -- 2.47.3