From 82d6a59fc0603be209e7972032cf9289d60d6ab5 Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:42:16 +0530 Subject: [PATCH 1/2] Refactor badge colors and severity color mapping for improved visibility --- .../src/apps/dashboard/pages/dashboard.css | 24 +++++++++---------- .../pages/dashboard/HomeDashboard.jsx | 8 +++---- .../web/polaris_web/web/src/util/func.js | 10 ++++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard.css b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard.css index a42c94cdc7..1ee12238ef 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard.css +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard.css @@ -199,25 +199,25 @@ } .badge-wrapper-CRITICAL .Polaris-Badge { - background-color: #E45357 !important; - color: white !important; - font-weight: 500 !important; + background-color: #E51C00 !important; + color: #FFFBFB !important; + font-weight: 550 !important; } .badge-wrapper-HIGH .Polaris-Badge { - background-color: #EF864C !important; - color: white !important; - font-weight: 500 !important; + background-color: #FFB800 !important; + color: #5E4200 !important; + font-weight: 550 !important; } .badge-wrapper-MEDIUM .Polaris-Badge { - background-color: #F6C564 !important; - color: white !important; - font-weight: 500 !important; + background-color: #FFE600 !important; + color: #332E00 !important; + font-weight: 550 !important; } .badge-wrapper-LOW .Polaris-Badge { - background-color: #6FD1A6; - color: white !important; - font-weight: 500 !important; + background-color: #0000000f; + color: #616161 !important; + font-weight: 550 !important; } \ No newline at end of file diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard/HomeDashboard.jsx b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard/HomeDashboard.jsx index 870d9d80a9..7759dd89bf 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard/HomeDashboard.jsx +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard/HomeDashboard.jsx @@ -465,22 +465,22 @@ function HomeDashboard() { const result = { "Critical": { "text": countMap.CRITICAL || 0, - "color": "#E45357", + "color": func.getHexColorForSeverity("CRITICAL"), "filterKey": "Critical" }, "High": { "text": countMap.HIGH || 0, - "color": "#EF864C", + "color": func.getHexColorForSeverity("HIGH"), "filterKey": "High" }, "Medium": { "text": countMap.MEDIUM || 0, - "color": "#F6C564", + "color": func.getHexColorForSeverity("MEDIUM"), "filterKey": "Medium" }, "Low": { "text": countMap.LOW || 0, - "color": "#6FD1A6", + "color": func.getHexColorForSeverity("LOW"), "filterKey": "Low" } }; diff --git a/apps/dashboard/web/polaris_web/web/src/util/func.js b/apps/dashboard/web/polaris_web/web/src/util/func.js index 65f2a5be25..df7df43cd0 100644 --- a/apps/dashboard/web/polaris_web/web/src/util/func.js +++ b/apps/dashboard/web/polaris_web/web/src/util/func.js @@ -1333,15 +1333,15 @@ mapCollectionIdToHostName(apiCollections){ getHexColorForSeverity(key){ switch(key){ case "CRITICAL": - return "#E45357" + return "#E51C00" case "HIGH": - return "#EF864C" + return "#FFB800" case "MEDIUM": - return "#F6C564" + return "#FFE600" case "LOW": - return "#6FD1A6" + return "#0000000f" default: - return "#2C6ECB" + return "#0000000f" } }, From 516a42a181cebee744c8f2b8d894153303d8f076 Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:49:52 +0530 Subject: [PATCH 2/2] Update medium badge color for consistency across styles --- .../web/polaris_web/web/src/apps/dashboard/pages/dashboard.css | 2 +- apps/dashboard/web/polaris_web/web/src/util/func.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard.css b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard.css index 1ee12238ef..ecf4673efc 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard.css +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard.css @@ -211,7 +211,7 @@ } .badge-wrapper-MEDIUM .Polaris-Badge { - background-color: #FFE600 !important; + background-color: #EDDB39 !important; color: #332E00 !important; font-weight: 550 !important; } diff --git a/apps/dashboard/web/polaris_web/web/src/util/func.js b/apps/dashboard/web/polaris_web/web/src/util/func.js index df7df43cd0..cbec2e4a84 100644 --- a/apps/dashboard/web/polaris_web/web/src/util/func.js +++ b/apps/dashboard/web/polaris_web/web/src/util/func.js @@ -1337,7 +1337,7 @@ mapCollectionIdToHostName(apiCollections){ case "HIGH": return "#FFB800" case "MEDIUM": - return "#FFE600" + return "#EDDB39" case "LOW": return "#0000000f" default: