obfuscurity / tasseo

Live dashboard for Graphite
Other
1.53k stars 127 forks source link

using jsonp to allow for crossdomain xhr requests #27

Closed captnswing closed 12 years ago

captnswing commented 12 years ago

Graphite seems to support jsonp as of late. I changed tasseo.js to use jsonp in the jQuery.ajax xhr call.

This allows tasseo to be used on another machine than the graphite machine.

obfuscurity commented 12 years ago

@captnswing - Tasseo used to do JSONP. Unfortunately, there is a significant memory leak condition when using JSONP.

https://github.com/obfuscurity/tasseo/issues/17 https://github.com/obfuscurity/tasseo/commit/262df59fedd9ec6934229e95ca4b06837bb5e34b

I'm surprised this diff works as submitted. IIRC you need to also set jsonp: 'jsonp' so it will recognize Graphite's callback name.

captnswing commented 12 years ago

ok, apologies for not scanning earlier PRs before submitting this. PS works on my machine, so far so good :-P

obfuscurity commented 12 years ago

@captnswing - No worries. FWIW I'd like to offer JSONP support again, but it will need to be raw javascript without jQuery (as it appears they have no intention on fixing this bug).