Skip to content

Commit

Permalink
Merge pull request #34 from kickstarter/graphite_base_url
Browse files Browse the repository at this point in the history
Support HTTPS, basic auth in graphite URL.
  • Loading branch information
quirkey committed Mar 19, 2012
2 parents ceaae33 + 7986a82 commit c21752a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion config/settings.yml.example
@@ -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 redis_url: localhost:6379:1/graphiti
tmp_dir: /tmp tmp_dir: /tmp
fonts: fonts:
Expand Down
2 changes: 1 addition & 1 deletion lib/metric.rb
Expand Up @@ -25,7 +25,7 @@ def self.find(match, max = 100)


private private
def self.get_metrics_list(prefix = Graphiti.settings.metric_prefix) 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}" puts "Getting #{url}"
response = Typhoeus::Request.get(url) response = Typhoeus::Request.get(url)
if response.success? if response.success?
Expand Down
2 changes: 1 addition & 1 deletion public/js/default.js
Expand Up @@ -12566,7 +12566,7 @@ Graphiti.Graph = function(targetsAndOptions){
} }


Graphiti.Graph.prototype = { Graphiti.Graph.prototype = {
urlBase: (function() { return "http://" + Graphiti.graphite_host + "/render/?"; })(), urlBase: (function() { return Graphiti.graphite_base_url + "/render/?"; })(),


updateOptions: function(options) { updateOptions: function(options) {
$.extend(true, this.options, options || {}); $.extend(true, this.options, options || {});
Expand Down
2 changes: 1 addition & 1 deletion public/js/default.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/js/graph.js
Expand Up @@ -65,7 +65,7 @@ Graphiti.Graph = function(targetsAndOptions){
} }


Graphiti.Graph.prototype = { Graphiti.Graph.prototype = {
urlBase: (function() { return "http://" + Graphiti.graphite_host + "/render/?"; })(), urlBase: (function() { return Graphiti.graphite_base_url + "/render/?"; })(),


updateOptions: function(options) { updateOptions: function(options) {
$.extend(true, this.options, options || {}); $.extend(true, this.options, options || {});
Expand Down
2 changes: 1 addition & 1 deletion views/index.haml
Expand Up @@ -233,7 +233,7 @@
:javascript :javascript
Graphiti = window.Graphiti || {}; Graphiti = window.Graphiti || {};
Graphiti.graphite_host = "#{settings.graphite_host}"; Graphiti.graphite_base_url = "#{settings.graphite_base_url}";
Graphiti.defaultGraph = #{Yajl::Encoder.encode(default_graph)}; Graphiti.defaultGraph = #{Yajl::Encoder.encode(default_graph)};


- if Graphiti.production? - if Graphiti.production?
Expand Down

0 comments on commit c21752a

Please sign in to comment.