Permalink
Browse files

Merge pull request #34 from kickstarter/graphite_base_url

Support HTTPS, basic auth in graphite URL.
  • Loading branch information...
2 parents ceaae33 + 7986a82 commit c21752a0c361a6dd76944baa8fe0d7fadcd1a339 @quirkey quirkey committed Mar 19, 2012
Showing with 7 additions and 6 deletions.
  1. +2 −1 config/settings.yml.example
  2. +1 −1 lib/metric.rb
  3. +1 −1 public/js/default.js
  4. +1 −1 public/js/default.min.js
  5. +1 −1 public/js/graph.js
  6. +1 −1 views/index.haml
@@ -1,5 +1,6 @@
---
-graphite_host: graphite01.pp.local
+graphite_base_url: http://graphite01.pp.local
+#graphite_base_url: https://user:pass@graphite01.pp.local
redis_url: localhost:6379:1/graphiti
tmp_dir: /tmp
fonts:
View
@@ -25,7 +25,7 @@ def self.find(match, max = 100)
private
def self.get_metrics_list(prefix = Graphiti.settings.metric_prefix)
- url = "http://#{Graphiti.settings.graphite_host}/metrics/index.json"
+ url = "#{Graphiti.settings.graphite_base_url}/metrics/index.json"
puts "Getting #{url}"
response = Typhoeus::Request.get(url)
if response.success?
View
@@ -12566,7 +12566,7 @@ Graphiti.Graph = function(targetsAndOptions){
}
Graphiti.Graph.prototype = {
- urlBase: (function() { return "http://" + Graphiti.graphite_host + "/render/?"; })(),
+ urlBase: (function() { return Graphiti.graphite_base_url + "/render/?"; })(),
updateOptions: function(options) {
$.extend(true, this.options, options || {});
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -65,7 +65,7 @@ Graphiti.Graph = function(targetsAndOptions){
}
Graphiti.Graph.prototype = {
- urlBase: (function() { return "http://" + Graphiti.graphite_host + "/render/?"; })(),
+ urlBase: (function() { return Graphiti.graphite_base_url + "/render/?"; })(),
updateOptions: function(options) {
$.extend(true, this.options, options || {});
View
@@ -233,7 +233,7 @@
:javascript
Graphiti = window.Graphiti || {};
- Graphiti.graphite_host = "#{settings.graphite_host}";
+ Graphiti.graphite_base_url = "#{settings.graphite_base_url}";
Graphiti.defaultGraph = #{Yajl::Encoder.encode(default_graph)};
- if Graphiti.production?

0 comments on commit c21752a

Please sign in to comment.