vimeo / graph-explorer

A graphite dashboard powered by structured metrics
http://vimeo.github.io/graph-explorer/
Apache License 2.0
1.06k stars 93 forks source link

download_metrics_json in backend should use urljoin for /metrics/index.json #32

Closed adblockist closed 11 years ago

adblockist commented 11 years ago

Small issue but if you use urljoin, download_metrics_json would still work even if the user added a trailing slash to the end of the graphite_url

I had that in my URL and it failed in a non-obvious way.

Adding this made it work either way:

from urlparse import urljoin response = urllib2.urlopen(urljoin (self.config.graphite_url, "/metrics/index.json"))

zehome commented 11 years ago

This patch is wrong, there is an error in graphite_url_metrics

Dieterbe commented 11 years ago

can you file a PR that has 1 commit with a clear commit msg? i'll merge that

Dieterbe commented 11 years ago

@zehome can you file a PR that has 1 commit with a clear commit msg? i'll merge that

Dieterbe commented 11 years ago

fixed! thanks