implydata / pivot

An interactive data exploration UI for Druid
https://docs.imply.io/latest/pivot-overview/
646 stars 40 forks source link

Issues with generating links into pivot #270

Closed eunice closed 6 months ago

eunice commented 8 years ago

Hi, I'm trying to generate links into pivot by posting to /mkurl according to here (https://github.com/implydata/pivot/blob/master/docs/generating-links-into-pivot.md)

Each time, it's responding with our configuration information instead of a url.

How can I troubleshoot this? Or can you let me know under which circumstances that this would happen?

vogievetsky commented 8 years ago

omg what?! that is so bizarre. what configuration info? Is it responding with the HTML page (that contains a __CONFIG__) variable? What version of Pivot are you running?

eunice commented 8 years ago

yes, I meant it's responding with the HTML page.

I'm currently running on 0.9.10

eunice commented 8 years ago

when its responding with the HTML page, what does it mean? am i inputting an incorrect JSON for the POST request?

vogievetsky commented 8 years ago

Ok there seems to be a bug that if you input invalid JSON it gives you pack the error HTML page instead of a json friendly page. I have also updated the example a little: https://github.com/implydata/pivot/blob/master/docs/generating-links-into-pivot.md

Can you post the specifics of what you are sending and what you are getting back?

eunice commented 8 years ago

Hi,

We tried to post to our host 'http://pivot.triplelift.net/mkurl' with the JSON object below. { "domain": "http://pivot.triplelift.net", "dataSource": "main_daily_prod_v2", "essence": { "visualization": "table", "timezone": "Etc/UTC", "filter": "$__time.in(\"2015-09-10Z\", \"2015-09-20Z\")", "splits": ["domain"], "singleMeasure": "clicks", "selectedMeasures": ["clicks", "total_imps", "sold_imps"], "pinnedDimensions": [], "multiMeasureMode": true } }

Instead of an error page, we still get back an html page with the CONFIG variable. See below.

`<!DOCTYPE html>

Pivot (0.9.10)

`

Are we missing anything in the body of the POST request? Do we need to make any modifications to our config.yaml file to get the result?

vogievetsky commented 8 years ago

Thank you for the detailed info. It looks like Pivot is getting a 404 on the /mkurl route and redirecting you to / the HTML you see is the Pivot page itself. I just went to http://pivot.triplelift.net/ and it appears to be behind a ngix proxy with basic auth - I wonder if that has something to do with it.

Were you posting to http://pivot.triplelift.net/mkurl or to the internal IP of that machine? did you include a basic auth header on your post?

eunice commented 8 years ago

I was posting to http://pivot.triplelift.net/mkurl and I did include a basic auth header.

Is there a way I can find out why the 404 happen?