warmfusion / mosaic

Mosaic is a sensu dashboard interface based on tiles creating a picture of your infrastructure
10 stars 2 forks source link

problem with url parameter #6

Open ghost opened 9 years ago

ghost commented 9 years ago

i can't seem to load with optional URL param, i see this in URL: http://localhost:9090/?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu

if i go to http://uchiwa.something.com/get_sensu i get the file (which put under the test.json works fine)

logs:

$ ruby -run -e httpd . -p 9090
[2015-06-02 20:58:46] INFO  WEBrick 1.3.1
[2015-06-02 20:58:46] INFO  ruby 2.2.2 (2015-04-13) [x86_64-darwin14]
[2015-06-02 20:58:46] INFO  WEBrick::HTTPServer#start: pid=49333 port=9090
localhost - - [02/Jun/2015:20:58:48 EDT] "GET /?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu HTTP/1.1" 304 0
- -> /?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu
localhost - - [02/Jun/2015:20:58:48 EDT] "GET /assets/demo.css HTTP/1.1" 304 0
http://localhost:9090/?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu -> /assets/demo.css
localhost - - [02/Jun/2015:20:58:48 EDT] "GET /bower_components/isotope/dist/isotope.pkgd.min.js HTTP/1.1" 304 0
localhost - - [02/Jun/2015:20:58:48 EDT] "GET /bower_components/angular/angular.min.js HTTP/1.1" 304 0
http://localhost:9090/?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu -> /bower_components/angular/angular.min.js
http://localhost:9090/?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu -> /bower_components/isotope/dist/isotope.pkgd.min.js
localhost - - [02/Jun/2015:20:58:48 EDT] "GET /src/mosaic.js HTTP/1.1" 200 5776
http://localhost:9090/?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu -> /src/mosaic.js
localhost - - [02/Jun/2015:20:58:48 EDT] "GET /bower_components/jquery/dist/jquery.min.js HTTP/1.1" 304 0
http://localhost:9090/?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu -> /bower_components/jquery/dist/jquery.min.js
localhost - - [02/Jun/2015:20:58:48 EDT] "GET /boxtemplate.html HTTP/1.1" 304 0
http://localhost:9090/?url=http:%2F%2Fuchiwa.something.com%2Fget_sensu -> /boxtemplate.html
warmfusion commented 9 years ago

Ok, it'll likely be a javascript client side issue - the codebase changed considerably in recent commits so its possibly an issue there.

What browser are you using, and do you have any errors shown in the javascript console?

ghost commented 9 years ago

firefox on osx, didn't check the javascript console, but will later...

On Wed, Jun 3, 2015 at 5:24 AM, Toby Jackson notifications@github.com wrote:

Ok, it'll likely be a javascript client side issue - the codebase changed considerably in recent commits so its possibly an issue there.

What browser are you using, and do you have any errors shown in the javascript console?

— Reply to this email directly or view it on GitHub.

warmfusion commented 9 years ago

Curiously, after having an initial CORS issue, firefox is now working again...

I've updated the README.md with a HAproxy configuration for automatic addition of CORs headers to incoming requests - this is needed if you want to point at a different domain name as otherwise the AJAX calls will fail.

ghost commented 9 years ago

cool - i'll either use Chrome or fix it :P

On Thu, Jun 4, 2015 at 7:27 AM, Toby Jackson notifications@github.com wrote:

Looks like a CORS problem:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://sensu...../get_sensu. (Reason: CORS request failed).

(The url i used here worked on Chrome, but not Firefox on a Mac OSX yosemite box)

— Reply to this email directly or view it on GitHub https://github.com/warmfusion/mosaic/issues/6#issuecomment-108848449.