Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Phase 2] Usage of "Generation URL" should be made clear by UI #17920

Closed
elasticmachine opened this issue Feb 10, 2017 · 29 comments
Closed

[Phase 2] Usage of "Generation URL" should be made clear by UI #17920

elasticmachine opened this issue Feb 10, 2017 · 29 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Feature:Reporting:Framework Reporting issues pertaining to the overall framework impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort needs-team Issues missing a team label

Comments

@elasticmachine
Copy link
Contributor

Original comment by @Rasroh:

Build: 5.0.0-rc1-795f98e2
Installed x-plugins on both ES and Kibana .
I copied the Reporting URL to the clipboard and when I paste the same URL in another browser am hitting {"statusCode":404,"error":"Not Found"}
Encountered this issue on Dashboard , Discover tabs.

screen shot 2016-10-06 at 12 55 44 pm

screen shot 2016-10-06 at 12 58 36 pm

@lee.dr: too saw the same issue on his machine.

Edit by @epixa:
The UI should make it clear how to use the "Generation" URL by explaining it must be used in a POST request with proper authentication and a kbn-xsrf: reporting header. Alternatively, we can give a brief overview that this is to be used for automation and link to the docs, but we must do something. The current implementation does not at all add any clarity around that the purpose is, and if you copy it into your browser, you just get an error.

Also, we should update GET requests to that route to return a 405 Method Not Allowed error with a useful error message instead of the current 404 behavior. The error message should suggest that the user use POST instead.

@elasticmachine
Copy link
Contributor Author

Original comment by @LeeDr:

Here's a kibana log line from when I tried it which shows the 404 response. Security in x-pack is enabled so when I paste the "Generation URL" into another tab I get the login screen, but then the 404.

EMAIL REDACTED (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8","accept-encoding":"gzip, deflate, sdch","accept-language":"en-US,en;q=0.8,fr-FR;q=0.6,fr;q=0.4,de-DE;q=0.2,de;q=0.2"},"remoteAddress":"10.0.2.2","userAgent":"10.0.2.2"},"res":{"statusCode":404,"responseTime":31,"contentLength":9},"message":"GET /api/reporting/generate/dashboard/Query-1-dashboard?_g=()&_a=(filters%3A!()%2Coptions%3A(darkTheme%3A!f)%2Cpanels%3A!((col%3A1%2Ccolumns%3A!(_source)%2Cid%3AQuery-%23-1%2CpanelIndex%3A1%2Crow%3A1%2Csize_x%3A11%2Csize_y%3A4%2Csort%3A!('%40timestamp'%2Cdesc)%2Ctype%3Asearch))%2Cquery%3A(query_string%3A(analyze_wildcard%3A!t%2Cquery%3A'*'))%2Ctitle%3A'Query%201%20dashboard'%2CuiState%3A())&sync= 404 31ms - 9.0B"}

@elasticmachine
Copy link
Contributor Author

Original comment by @epixa:

I updated the title/description of this issue to offer proposed solutions to this ambiguity.

@elasticmachine
Copy link
Contributor Author

Original comment by @cjcenizal:

I was about to create an issue around this. Just to add my own experience, it's really confusing when you visit the URL in the browser and just get this:

!LINK REDACTED

This message could be made much clearer by explaining what happened and giving suggestions on what to do next:

"Looks like you're trying to access a report generation URL through your browser. This URL can only be used with a POST request, not a GET request, and is meant to be used in an automated system, and not visited in the browser. If you'd like to generate a report manually, please click the "Generate Printable PDF" button in the Kibana UI. For more information on the report generation URL, please see the documentation."

We could also put a link the Reporting UI that provides more context on how to use this URL.

Users have been confused by this too: https://discuss.elastic.co/t/kibana-report-api-405-error/67771

@elasticmachine elasticmachine added :Sharing (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead bug Fixes for quality problems that affect the customer experience labels Apr 24, 2018
@stacey-gammon
Copy link
Contributor

I agree this is pretty confusing. Not sure if there are any new designs for this reporting pane? cc @elastic/kibana-design. If not, maybe @gchaps could help us come up with some better text (lmk if you want to sync to go over the issue).

@cchaos
Copy link
Contributor

cchaos commented May 30, 2018

There are no new designs for reporting yet, as far as I know.

@cchaos
Copy link
Contributor

cchaos commented Jun 8, 2018

@stacey-gammon I actually did find some old designs for this, that I still think are viable today (I updated it slightly). The idea is that is would be housed in the Dashboard's overall "Options" context menu when all those top menu items get combined. The language could still be tweaked with @gchaps' help.

screen shot 2018-06-08 at 14 29 46 pm

I think the main things this shows are:

  1. Call it a "POST" url outright and mention it's for use outside of Kibana (as an API) or with watcher.
  2. Remove the input that shows the url since it can't be manipulated anyway, it makes no sense to show them an almost nonsensical url and just give them a way to get it to their clipboard.

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed :Sharing labels Sep 13, 2018
@timroes
Copy link
Contributor

timroes commented Apr 3, 2019

@joelgriffith @tsullivan I think the only thing missing from that dialog right now, is that the user still need to set the kbn-xsrf header (if that's still true for reporting?). Do you think we could get this still in there (maybe behind an additional help tooltip?)

@tsullivan
Copy link
Member

Yes, it is still applicable to reporting and I agree it should be made clear. A tooltip might not be the best approach though. I'd be ideal if there's something that could be copy/pasted into code. Maybe a collapsible container?

Maybe have a curl usage example that can be copy/pasted?

curl -k -XPOST -H "kbn-xsrf: reporting" http://localhost:5601/

I don't want to get too hung up on the details of what it should look like. The way it looks currently has a vague look to it, unless you know what Watcher is. Hopefully by putting in the right amount of additional needed detail, we can make it not vague.

@antoniocascais
Copy link

Hi all.

I'm also trying to use the "Copy POST Url" feature, but also having lots of problems with it.

In the beginning was getting a 405 and only then realized it was a POST request, not a GET.
Now I'm getting a 408 error code, no idea why (tried to add the reporting header, no success).

Can you had an example or something to the feature? It is really not intuitive :(

@brow17
Copy link

brow17 commented Jul 2, 2019

Is there any update on this issue? Does anyone have a working example of a curl command using the "Copy POST URL" output?

@tsullivan
Copy link
Member

Working example:

 curl -u [username:password] -H 'kbn-version: 8.0.0' -XPOST [copied URL]

I am not aware that the Kibana server can send a 408 code response. Is the address to Kibana an address to a proxy?

@tsullivan tsullivan self-assigned this Jul 8, 2019
@antoniocascais
Copy link

Thank you @tsullivan , that works ! :)

So I guess the kbn-version header was missing in my attempt... Solved now

@tsullivan
Copy link
Member

@antoniocascais Glad to hear that it worked! Without the kbn-version header supplied, Kibana will reply with a 400 error code. Unfortunately, that doesn't help explain where your 408 came from.

@antoniocascais
Copy link

I don't remember which request I executed to get the 408 and can't reproduce it now. Maybe I did something really weird and that was the reason 🤔

@tsullivan
Copy link
Member

I have no reason to question you, but I would make sense if it was actually a 400 instead of a 408

@tsullivan
Copy link
Member

@joelgriffith @tsullivan I think the only thing missing from that dialog right now, is that the user still need to set the kbn-xsrf header (if that's still true for reporting?). Do you think we could get this still in there (maybe behind an additional help tooltip?)

This seems pretty technical to include in a tooltip. I'm working on making it more clear in the documentation with:

Would it make sense to link to the docs from the UI? I can't think of other examples in Kibana where we do that.

@LeeDr
Copy link

LeeDr commented Jul 15, 2019

@tsullivan we do include links to docs in a few places.

image

@LeeDr
Copy link

LeeDr commented Jul 15, 2019

and another;
image

@tsullivan
Copy link
Member

Thanks @LeeDr I'll take a look at those to see how the links get connected to the correct docs version

@elasticmachine
Copy link
Contributor Author

Pinging @elastic/kibana-stack-services

@tsullivan
Copy link
Member

@antoniocascais

I don't remember which request I executed to get the 408 and can't reproduce it now. Maybe I did something really weird and that was the reason 🤔

I've now heard that this has come up in internal testing, so it wasn't something that you did.

Filed #41594

@antoniocascais
Copy link

Then I'm not going crazy!
Thank you for letting me know @tsullivan 👍

@tsullivan
Copy link
Member

Proposal text for adding a link to the documentation:

Alternatively, use this POST URL to call generation of reports from outside of Kibana. See the Reporting documentation for info about automating report generation.

@bmcconaghy
Copy link
Contributor

Makes sense to me @tsullivan

@gchaps
Copy link
Contributor

gchaps commented Aug 26, 2019

@tsullivan The text is fine as is, but I wonder if we might tighten it a bit. Here are some options.

Alternatively, use this POST URL to generate reports outside Kibana. Learn about automatic report generation.

Alternatively, use this POST URL to generate reports outside Kibana. See Reporting for how to automate report generation.

@bmcconaghy bmcconaghy added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed Team:Stack Services labels Dec 12, 2019
@bmcconaghy bmcconaghy added Team:Reporting Services and removed Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Dec 20, 2019
@elasticmachine
Copy link
Contributor Author

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@elasticmachine
Copy link
Contributor Author

Pinging @elastic/kibana-app-services (Team:AppServices)

@tsullivan tsullivan added Team:Reporting Services impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort labels Feb 25, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels May 13, 2021
@exalate-issue-sync exalate-issue-sync bot changed the title Reporting: Usage of "Generation URL" should be made clear by UI [Phase 2] Usage of "Generation URL" should be made clear by UI Nov 30, 2021
@ppisljar
Copy link
Member

ppisljar commented Aug 9, 2022

Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment.

@ppisljar ppisljar closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2022
@sophiec20 sophiec20 added the Feature:Reporting:Framework Reporting issues pertaining to the overall framework label Aug 21, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Feature:Reporting:Framework Reporting issues pertaining to the overall framework impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort needs-team Issues missing a team label
Projects
None yet
Development

No branches or pull requests