feat: hardcode Grafana credentials, always-on health endpoint

- Health endpoint always enabled when plugin is installed
- Grafana URL and API key hardcoded as constants
- Removed enable_health_endpoint, grafana_url, grafana_api_key from config UI
- Token still auto-generated and shown as read-only

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-21 21:20:44 -05:00
parent ec847a5eed
commit 34df31b086
3 changed files with 62 additions and 103 deletions
+3 -13
View File
@@ -767,11 +767,6 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface
$params = new \Joomla\Registry\Registry($rawParams);
$changed = false;
if (!(int) $params->get('enable_health_endpoint', 0))
{
return;
}
// Auto-generate token if missing
if (empty($params->get('health_api_token', '')))
{
@@ -797,14 +792,9 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface
$db->execute();
}
// Trigger Grafana provisioning if credentials are set
$grafanaUrl = rtrim($params->get('grafana_url', ''), '/');
$grafanaKey = $params->get('grafana_api_key', '');
if (empty($grafanaUrl) || empty($grafanaKey))
{
return;
}
// Grafana provisioning — hardcoded credentials
$grafanaUrl = 'https://bench.mokoconsulting.tech';
$grafanaKey = 'glsa_qtoNf1KRS3Ot8cifNGG5taop5NlkJ1o2_b8ca5f4e';
$siteUrl = rtrim(\Joomla\CMS\Uri\Uri::root(), '/');
$siteName = Factory::getConfig()->get('sitename', 'Joomla');