diff --git a/application/forms/Config/BackendForm.php b/application/forms/Config/BackendForm.php index cdcedf6..6583691 100644 --- a/application/forms/Config/BackendForm.php +++ b/application/forms/Config/BackendForm.php @@ -18,7 +18,7 @@ class BackendForm extends ConfigForm $this->addElements([ [ 'text', - 'graphite_web_url', + 'graphite_url', [ 'required' => true, 'label' => $this->translate('Graphite Web URL'), @@ -28,7 +28,7 @@ class BackendForm extends ConfigForm ], [ 'text', - 'graphite_web_user', + 'graphite_user', [ 'label' => $this->translate('Graphite Web user'), 'description' => $this->translate( @@ -39,7 +39,7 @@ class BackendForm extends ConfigForm ], [ 'password', - 'graphite_web_password', + 'graphite_password', [ 'renderPassword' => true, 'label' => $this->translate('Graphite Web password'), diff --git a/library/Graphite/Graphing/GraphingTrait.php b/library/Graphite/Graphing/GraphingTrait.php index 0d74a9d..62e54df 100644 --- a/library/Graphite/Graphing/GraphingTrait.php +++ b/library/Graphite/Graphing/GraphingTrait.php @@ -61,14 +61,14 @@ trait GraphingTrait if (static::$metricsDataSource === null) { $config = Config::module('graphite'); $graphite = $config->getSection('graphite'); - if (! isset($graphite->web_url)) { - throw new ConfigurationError('Missing "graphite.web_url" in "%s"', $config->getConfigFile()); + if (! isset($graphite->url)) { + throw new ConfigurationError('Missing "graphite.url" in "%s"', $config->getConfigFile()); } static::$metricsDataSource = new MetricsDataSource( - (new GraphiteWebClient(Url::fromPath($graphite->web_url))) - ->setUser($graphite->web_user) - ->setPassword($graphite->web_password) + (new GraphiteWebClient(Url::fromPath($graphite->url))) + ->setUser($graphite->user) + ->setPassword($graphite->password) ); }