diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-10 15:06:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-10 15:06:19 +0300 |
commit | 69849c280c5525d132ebaddb1200c390a42ecc06 (patch) | |
tree | 2c6ffc6fd6dc4fa719305f25b475391730389747 /app/models/grafana_integration.rb | |
parent | c157f963db87a40a3ba7b94b339530ee83194bc8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/grafana_integration.rb')
-rw-r--r-- | app/models/grafana_integration.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/grafana_integration.rb b/app/models/grafana_integration.rb index 668b9dafd7d..51cc398394d 100644 --- a/app/models/grafana_integration.rb +++ b/app/models/grafana_integration.rb @@ -13,4 +13,8 @@ class GrafanaIntegration < ApplicationRecord addressable_url: { enforce_sanitization: true, ascii_only: true } validates :token, :project, presence: true + + def client + @client ||= ::Grafana::Client.new(api_url: grafana_url.chomp('/'), token: token) + end end |