From fc8d99fbe8e56f94b45369d310ec142cac432291 Mon Sep 17 00:00:00 2001 From: Tim O'Keefe Date: Mon, 18 May 2026 17:57:43 -0400 Subject: [PATCH 1/7] RHIDP-12601: Scorecard supports custom key values and colors --- .../assembly-scorecard-metric-thresholds.adoc | 2 + ...configure-custom-scorecard-severities.adoc | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc diff --git a/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc b/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc index 99da2ff40eb..cdeec9b44eb 100644 --- a/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc +++ b/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc @@ -20,5 +20,7 @@ include::../modules/observability_evaluate-project-health-using-scorecards/ref-o include::../modules/observability_evaluate-project-health-using-scorecards/con-verify-logical-flow-in-scorecard-threshold-rules.adoc[leveloffset=+1] +include::../modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc[leveloffset=+1] + ifdef::parent-context[:context: {parent-context}] ifndef::parent-context[:!context:] diff --git a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc new file mode 100644 index 00000000000..965694c315a --- /dev/null +++ b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc @@ -0,0 +1,39 @@ +:_mod-docs-content-type: PROCEDURE + +[id="configure-custom-scorecard-severities_{context}"] += Configure custom severity levels and colors for Scorecard + +[role="_abstract"] +Customizing severity thresholds and color mappings in your Scorecard configuration allows you to visualize platform metrics using your organization's custom operational terminology. + +.Prerequisites +* You have administrative access to the {product} configuration files. +* An existing default Scorecard plugin configuration is deployed. + +.Procedure +1. Open your {product} YAML configuration file. + +2. Navigate to the `scorecard` backend plugin configuration section. + +3. Add your custom severity keys and user-defined hex color values under the threshold color mapping block. ++ +-- +[source,yaml] +---- +scorecard: + thresholds: + colors: + success: '#47A942' + warning: '#F0AB00' + error: '#C9190B' + critical: '#A30000' + info: '#0066CC' +---- +-- +4. Save the changes to the configuration file. + +5. Restart your {product} instance to apply the new thresholds. + +.Verification + +* Open the {product} UI, navigate to the Scorecard component, and verify that the custom severity levels display with their specified colors. \ No newline at end of file From d6d54ab740091b58e51e6c0d2c69c25b6e5669ba Mon Sep 17 00:00:00 2001 From: Tim O'Keefe Date: Mon, 18 May 2026 18:09:24 -0400 Subject: [PATCH 2/7] RHIDP-12601: revised file name and updated assembly --- .../assembly-scorecard-metric-thresholds.adoc | 2 +- ...figure-custom-severity-levels-and-colors-for-scorecard.adoc} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename modules/observability_evaluate-project-health-using-scorecards/{proc-configure-custom-scorecard-severities.adoc => proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc} (93%) diff --git a/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc b/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc index cdeec9b44eb..0475c270a0f 100644 --- a/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc +++ b/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc @@ -20,7 +20,7 @@ include::../modules/observability_evaluate-project-health-using-scorecards/ref-o include::../modules/observability_evaluate-project-health-using-scorecards/con-verify-logical-flow-in-scorecard-threshold-rules.adoc[leveloffset=+1] -include::../modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc[leveloffset=+1] +include::../modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc[leveloffset=+1] ifdef::parent-context[:context: {parent-context}] ifndef::parent-context[:!context:] diff --git a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc similarity index 93% rename from modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc rename to modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc index 965694c315a..93d96ccb4e5 100644 --- a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-scorecard-severities.adoc +++ b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc @@ -1,6 +1,6 @@ :_mod-docs-content-type: PROCEDURE -[id="configure-custom-scorecard-severities_{context}"] +[id="configure-custom-severity-levels-and-colors-for-scorecard_{context}"] = Configure custom severity levels and colors for Scorecard [role="_abstract"] From 8e02e9a1468a1261a4d30551e0753457818f13a8 Mon Sep 17 00:00:00 2001 From: Tim O'Keefe Date: Tue, 19 May 2026 14:21:02 -0400 Subject: [PATCH 3/7] RHIDP-12601: updated YAML example based on dev comments --- ...everity-levels-and-colors-for-scorecard.adoc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc index 93d96ccb4e5..85431158457 100644 --- a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc +++ b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc @@ -6,6 +6,11 @@ [role="_abstract"] Customizing severity thresholds and color mappings in your Scorecard configuration allows you to visualize platform metrics using your organization's custom operational terminology. +[NOTE] +==== +You must explicitly configure a corresponding icon component layout key for each custom severity color level you declare. Custom severity metrics will not render properly in the dashboard overview if the icon parameter is missing or invalid. +==== + .Prerequisites * You have administrative access to the {product} configuration files. * An existing default Scorecard plugin configuration is deployed. @@ -15,7 +20,7 @@ Customizing severity thresholds and color mappings in your Scorecard configurati 2. Navigate to the `scorecard` backend plugin configuration section. -3. Add your custom severity keys and user-defined hex color values under the threshold color mapping block. +3. Define your custom severity threshold keys by adding hex color parameters to the `colors` mapping object and valid UI icon names to the `icons` mapping object. + -- [source,yaml] @@ -28,12 +33,18 @@ scorecard: error: '#C9190B' critical: '#A30000' info: '#0066CC' + icons: + success: check + warning: warning + error: error + critical: dangerous + info: info ---- -- 4. Save the changes to the configuration file. -5. Restart your {product} instance to apply the new thresholds. +5. Restart your {product} instance to apply the new threshold rules. .Verification -* Open the {product} UI, navigate to the Scorecard component, and verify that the custom severity levels display with their specified colors. \ No newline at end of file +* Open the {product} UI, navigate to the Scorecard component, and verify that the custom severity levels display with the colors and icons you specified. \ No newline at end of file From d2e03cf22d9bf19fe098cad9f09f4ab49faea64e Mon Sep 17 00:00:00 2001 From: Tim O'Keefe Date: Tue, 19 May 2026 15:55:02 -0400 Subject: [PATCH 4/7] RHIDP-12601: pushing revised YAML example --- ...erity-levels-and-colors-for-scorecard.adoc | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc index 85431158457..2ea9fd33852 100644 --- a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc +++ b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc @@ -26,19 +26,27 @@ You must explicitly configure a corresponding icon component layout key for each [source,yaml] ---- scorecard: - thresholds: - colors: - success: '#47A942' - warning: '#F0AB00' - error: '#C9190B' - critical: '#A30000' - info: '#0066CC' - icons: - success: check - warning: warning - error: error - critical: dangerous - info: info + plugins: + myDatasource: + myMetric: + thresholds: + rules: + - key: success + expression: '<10' + color: 'success.main' + icon: check + - key: warning + expression: '10-50' + color: '#FFA500' + icon: warning + - key: error + expression: '>50' + color: 'rgb(255, 0, 0)' + icon: error + - key: critical + expression: '>90' + color: '#A30000' + icon: dangerous ---- -- 4. Save the changes to the configuration file. From fbeea6bb4003fe97a37195efa715edbc73a7bdd5 Mon Sep 17 00:00:00 2001 From: Tim O'Keefe Date: Wed, 20 May 2026 09:54:36 -0400 Subject: [PATCH 5/7] RHIDP-12601: updated PR based on review. added reference topic for scorecard color configuration --- .../assembly-scorecard-metric-thresholds.adoc | 2 + ...erity-levels-and-colors-for-scorecard.adoc | 43 ++++++++------- ...scorecard-color-configuration-formats.adoc | 55 +++++++++++++++++++ 3 files changed, 81 insertions(+), 19 deletions(-) create mode 100644 modules/observability_evaluate-project-health-using-scorecards/ref-scorecard-color-configuration-formats.adoc diff --git a/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc b/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc index 0475c270a0f..afcc5289307 100644 --- a/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc +++ b/assemblies/observability_evaluate-project-health-using-scorecards/assembly-scorecard-metric-thresholds.adoc @@ -22,5 +22,7 @@ include::../modules/observability_evaluate-project-health-using-scorecards/con-v include::../modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc[leveloffset=+1] +include::../modules/observability_evaluate-project-health-using-scorecards/ref-scorecard-color-configuration-formats.adoc[leveloffset=+1] + ifdef::parent-context[:context: {parent-context}] ifndef::parent-context[:!context:] diff --git a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc index 2ea9fd33852..ac67cf580d2 100644 --- a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc +++ b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc @@ -13,14 +13,16 @@ You must explicitly configure a corresponding icon component layout key for each .Prerequisites * You have administrative access to the {product} configuration files. -* An existing default Scorecard plugin configuration is deployed. +* You have added a custom application configuration file to your {product} deployment workspace. +* An existing configuration for the Scorecard backend plugin is deployed with at least one active Scorecard plugin module workspace. .Procedure -1. Open your {product} YAML configuration file. -2. Navigate to the `scorecard` backend plugin configuration section. +. Open the {product-very-short} `app-config.yaml` file. -3. Define your custom severity threshold keys by adding hex color parameters to the `colors` mapping object and valid UI icon names to the `icons` mapping object. +. Navigate to the `scorecard.plugins` backend threshold definition block. + +. Define your custom severity threshold keys by adding a structured rule entry containing your custom key string, your boundary expression, your preferred color parameter format, and a supported icon string variable. + -- [source,yaml] @@ -31,28 +33,31 @@ scorecard: myMetric: thresholds: rules: - - key: success + - key: ideal expression: '<10' - color: 'success.main' - icon: check + color: '#5CE65C' + icon: star - key: warning expression: '10-50' - color: '#FFA500' - icon: warning - - key: error - expression: '>50' - color: 'rgb(255, 0, 0)' - icon: error + color: 'rgb(233, 213, 2)' + icon: monitor - key: critical - expression: '>90' - color: '#A30000' - icon: dangerous + expression: '>50' + color: error.main + icon: scorecardErrorStatusIcon ---- -- -4. Save the changes to the configuration file. +. Save the changes to the configuration file. -5. Restart your {product} instance to apply the new threshold rules. +. Restart your {product} instance to apply the new threshold rules. .Verification -* Open the {product} UI, navigate to the Scorecard component, and verify that the custom severity levels display with the colors and icons you specified. \ No newline at end of file +* Open the {product} UI, navigate to the Scorecard component, and verify that the custom severity levels display with the colors and icons you specified. + +[role="_additional-resources"] +== Additional resources + +* {configuring-book-link}[Adding a custom application configuration] +* link:https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html-single/evaluate_project_health_using_scorecards/index#enable-scorecards_set-up-scorecards-to-monitor-your-project-health[Enabling Scorecards] +* link:https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html-single/evaluate_project_health_using_scorecards/index#install-and-configure-scorecards-to-view-metrics_evaluate-project-health-using-scorecards[Installing and configuring Scorecards to view metrics] \ No newline at end of file diff --git a/modules/observability_evaluate-project-health-using-scorecards/ref-scorecard-color-configuration-formats.adoc b/modules/observability_evaluate-project-health-using-scorecards/ref-scorecard-color-configuration-formats.adoc new file mode 100644 index 00000000000..108f4f8a34e --- /dev/null +++ b/modules/observability_evaluate-project-health-using-scorecards/ref-scorecard-color-configuration-formats.adoc @@ -0,0 +1,55 @@ +:_mod-docs-content-type: REFERENCE + +[id="scorecard-color-configuration-formats_{context}"] += Scorecard color configuration formats + +[role="_abstract"] +Learn the supported color string formats and syntax rules required to map custom severity threshold keys in the configuration parser. + +== Threshold color mapping values +[cols="1,2",options="header"] +|=== +|Color format type |Configuration examples +|Theme palette references +|`success.main`, `warning.main`, `error.main` +|HEX hexadecimal codes +|`'#5CE65C'`, `'#FFA500'` +|RGB or RGBA functional strings +|`'rgb(233, 213, 2)'`, `'rgba(255, 0, 0, 0.8)'` +|=== + +[NOTE] +==== +The default threshold rules use the built-in theme palette references: `success.main` for success states, `warning.main` for warning states, and `error.main` for error states. You can use these standard theme indicators for custom severity levels if desired. +==== + +[id="scorecard-icon-configuration-formats_{context}"] +== Supported threshold icon configuration formats + +To determine what graphic displays in the metrics matrix block, the Scorecard plugin uses standard frontend mapping components, allowing you to specify icons using any of the following parameters. + +[NOTE] +==== +When using Material Design strings, you must specify icons that are explicitly ingested and bundled inside your Red Hat Developer Hub layout package (such as `star` or `monitor`). Standard upstream values that are not ingested (such as `check`) will not appear in the user interface. +==== + +== Threshold icon component options +[cols="1,2",options="header"] +|=== +|Icon syntax layout |Value definition format examples +|Backstage system icons +|`'kind:component'`, `'kind:api'` +|Material Design icon strings +|`'settings'`, `'home'`, `'build'`, `'star'`, `'monitor'` +|Inline SVG strings +|Raw xml element blocks (for example, `'...'`) +|External URLs +|`'https://example.com/icon.png'`, `'/assets/icon.svg'` +|Data encoded URIs +|`'data:image/svg+xml;base64,...'` +|=== + +[NOTE] +==== +The standard threshold keys use pre-configured system definitions by default: `scorecardSuccess` for success rule matches, `scorecardWarningStatusIcon` for warning rule matches, and `scorecardErrorStatusIcon` for error rule matches. +==== \ No newline at end of file From 263a45a3e7e5623a047d4ec3c8fc5bc227d742bb Mon Sep 17 00:00:00 2001 From: Tim O'Keefe Date: Wed, 20 May 2026 10:10:47 -0400 Subject: [PATCH 6/7] RHIDP-12601: tshooting build --- ...gure-custom-severity-levels-and-colors-for-scorecard.adoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc index ac67cf580d2..94263bb4bb7 100644 --- a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc +++ b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc @@ -24,7 +24,6 @@ You must explicitly configure a corresponding icon component layout key for each . Define your custom severity threshold keys by adding a structured rule entry containing your custom key string, your boundary expression, your preferred color parameter format, and a supported icon string variable. + --- [source,yaml] ---- scorecard: @@ -46,7 +45,7 @@ scorecard: color: error.main icon: scorecardErrorStatusIcon ---- --- + . Save the changes to the configuration file. . Restart your {product} instance to apply the new threshold rules. @@ -56,7 +55,7 @@ scorecard: * Open the {product} UI, navigate to the Scorecard component, and verify that the custom severity levels display with the colors and icons you specified. [role="_additional-resources"] -== Additional resources +.Additional resources * {configuring-book-link}[Adding a custom application configuration] * link:https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html-single/evaluate_project_health_using_scorecards/index#enable-scorecards_set-up-scorecards-to-monitor-your-project-health[Enabling Scorecards] From 138f660fab577cb2e105190466f6fa06f15933d4 Mon Sep 17 00:00:00 2001 From: Tim O'Keefe Date: Wed, 20 May 2026 12:00:20 -0400 Subject: [PATCH 7/7] RHIDP-12601: minor edit --- ...igure-custom-severity-levels-and-colors-for-scorecard.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc index 94263bb4bb7..00acc96b73f 100644 --- a/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc +++ b/modules/observability_evaluate-project-health-using-scorecards/proc-configure-custom-severity-levels-and-colors-for-scorecard.adoc @@ -8,7 +8,7 @@ Customizing severity thresholds and color mappings in your Scorecard configurati [NOTE] ==== -You must explicitly configure a corresponding icon component layout key for each custom severity color level you declare. Custom severity metrics will not render properly in the dashboard overview if the icon parameter is missing or invalid. +Each custom severity threshold key requires both a corresponding icon configuration value and a color parameter configuration value. Because the portal validates the YAML configuration files during application startup, omitting either property or providing an invalid value causes an initialization failure, and the Scorecard plugin fails to function. ==== .Prerequisites @@ -57,6 +57,6 @@ scorecard: [role="_additional-resources"] .Additional resources -* {configuring-book-link}[Adding a custom application configuration] +* link:https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html/administration_guide_for_red_hat_developer_hub/assembly-add-custom-app-file-openshift_admin-rhdh[Adding a custom application configuration file to Red Hat OpenShift Container Platform] * link:https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html-single/evaluate_project_health_using_scorecards/index#enable-scorecards_set-up-scorecards-to-monitor-your-project-health[Enabling Scorecards] * link:https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html-single/evaluate_project_health_using_scorecards/index#install-and-configure-scorecards-to-view-metrics_evaluate-project-health-using-scorecards[Installing and configuring Scorecards to view metrics] \ No newline at end of file