Skip to content

Commit

Permalink
Merge pull request #28 from dnsmichi/fix/empty-config-view-error
Browse files Browse the repository at this point in the history
Fix view exception if Grafana host is not configured
  • Loading branch information
Mikesch-mp committed Apr 21, 2017
2 parents 6868f9d + 34b1214 commit b2fc894
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/Grafana/ProvidedHook/Grapher.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ protected function init()
$this->grafanaHost = $this->config->get('host', $this->grafanaHost);
if ( $this->grafanaHost == null)
{
return "<p>No Grafana host configured!</p>";
throw new ConfigurationError(
'No Grafana host configured!'
);
}
$this->password = $this->config->get('password', $this->password);
$this->protocol = $this->config->get('protocol', $this->protocol);
Expand Down

0 comments on commit b2fc894

Please sign in to comment.