diff --git a/src/Block/Inspector.php b/src/Block/Inspector.php
index d833aa5..4d502d8 100644
--- a/src/Block/Inspector.php
+++ b/src/Block/Inspector.php
@@ -139,6 +139,20 @@ public function getPosition(): string
return is_string($value) && $value !== '' ? $value : InspectorConfig::DEFAULT_POSITION;
}
+ /**
+ * Whether the health score gauge should be shown in the toolbar footer
+ *
+ * @return bool
+ */
+ public function getShowHealthScore(): bool
+ {
+ $value = $this->scopeConfig->getValue(
+ InspectorConfig::XML_PATH_SHOW_HEALTH_SCORE,
+ ScopeInterface::SCOPE_STORE
+ );
+ return !is_string($value) || $value !== '0';
+ }
+
/**
* Render block HTML
*
diff --git a/src/Model/Config/Inspector.php b/src/Model/Config/Inspector.php
index d1aab7d..955446f 100644
--- a/src/Model/Config/Inspector.php
+++ b/src/Model/Config/Inspector.php
@@ -10,6 +10,7 @@ class Inspector
public const XML_PATH_SHOW_BUTTON_LABELS = 'mageforge/inspector/show_button_labels';
public const XML_PATH_THEME = 'mageforge/inspector/theme';
public const XML_PATH_POSITION = 'mageforge/inspector/position';
+ public const XML_PATH_SHOW_HEALTH_SCORE = 'mageforge/inspector/show_health_score';
public const DEFAULT_THEME = 'dark';
public const DEFAULT_POSITION = 'bottom-left';
}
diff --git a/src/etc/adminhtml/system.xml b/src/etc/adminhtml/system.xml
index 697ba9d..ee2ee2a 100644
--- a/src/etc/adminhtml/system.xml
+++ b/src/etc/adminhtml/system.xml
@@ -34,6 +34,12 @@
mageforge/inspector/positionPosition of the MageForge Toolbar on the page. Default: Bottom Left.
+
+
+ Magento\Config\Model\Config\Source\Yesno
+ mageforge/inspector/show_health_score
+ Show the Overall Health Score gauge in the toolbar footer. The Run All Tests and Reset buttons remain visible regardless. Default: Yes.
+
diff --git a/src/etc/config.xml b/src/etc/config.xml
index 01c0a90..2e61b64 100644
--- a/src/etc/config.xml
+++ b/src/etc/config.xml
@@ -12,6 +12,7 @@
dark1bottom-left
+ 1
diff --git a/src/i18n/de_DE.csv b/src/i18n/de_DE.csv
index 3ab1875..dd1f9d8 100644
--- a/src/i18n/de_DE.csv
+++ b/src/i18n/de_DE.csv
@@ -9,6 +9,8 @@
"Show text labels on the Toolbar and Inspector buttons. Default: Yes.","Textbeschriftungen auf Toolbar- und Inspector-Schaltflächen anzeigen. Standard: Ja."
"Toolbar Position","Toolbar-Position"
"Position of the MageForge Toolbar on the page. Default: Bottom Left.","Position der MageForge Toolbar auf der Seite. Standard: Unten links."
+"Show Health Score","Health-Score anzeigen"
+"Show the Overall Health Score gauge in the toolbar footer. The Run All Tests and Reset buttons remain visible regardless. Default: Yes.","Health-Score-Tachometer im Toolbar-Footer anzeigen. Die Aktions-Schaltflächen bleiben stets sichtbar. Standard: Ja."
"Dark","Dunkel"
"Light","Hell"
"Auto (System Preference)","Auto (Systemeinstellung)"
diff --git a/src/i18n/en_US.csv b/src/i18n/en_US.csv
index 959513c..4d86904 100644
--- a/src/i18n/en_US.csv
+++ b/src/i18n/en_US.csv
@@ -9,6 +9,8 @@
"Show text labels on the Toolbar and Inspector buttons. Default: Yes.","Show text labels on the Toolbar and Inspector buttons. Default: Yes."
"Toolbar Position","Toolbar Position"
"Position of the MageForge Toolbar on the page. Default: Bottom Left.","Position of the MageForge Toolbar on the page. Default: Bottom Left."
+"Show Health Score","Show Health Score"
+"Show the Overall Health Score gauge in the toolbar footer. The Run All Tests and Reset buttons remain visible regardless. Default: Yes.","Show the Overall Health Score gauge in the toolbar footer. The Run All Tests and Reset buttons remain visible regardless. Default: Yes."
"Dark","Dark"
"Light","Light"
"Auto (System Preference)","Auto (System Preference)"
diff --git a/src/view/frontend/templates/inspector.phtml b/src/view/frontend/templates/inspector.phtml
index 07c93b8..e4862a1 100644
--- a/src/view/frontend/templates/inspector.phtml
+++ b/src/view/frontend/templates/inspector.phtml
@@ -69,7 +69,8 @@ JS;
x-data="mageforgeToolbar"
data-theme="= $escaper->escapeHtmlAttr($block->getTheme()) ?>"
data-position="= $escaper->escapeHtmlAttr($block->getPosition()) ?>"
- data-show-labels="= (int) $block->getShowButtonLabels() ?>">
+ data-show-labels="= (int) $block->getShowButtonLabels() ?>"
+ data-show-health-score="= (int) $block->getShowHealthScore() ?>">