summaryrefslogtreecommitdiff
path: root/app/models/grafana_integration.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-10 12:06:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-10 12:06:19 +0000
commit69849c280c5525d132ebaddb1200c390a42ecc06 (patch)
tree2c6ffc6fd6dc4fa719305f25b475391730389747 /app/models/grafana_integration.rb
parentc157f963db87a40a3ba7b94b339530ee83194bc8 (diff)
downloadgitlab-ce-69849c280c5525d132ebaddb1200c390a42ecc06.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/grafana_integration.rb')
-rw-r--r--app/models/grafana_integration.rb4
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