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

left param in Generator URL is not url encoded #15597

Closed
matthewhudsonedb opened this issue Jan 6, 2025 · 0 comments · Fixed by #15601
Closed

left param in Generator URL is not url encoded #15597

matthewhudsonedb opened this issue Jan 6, 2025 · 0 comments · Fixed by #15601
Labels
UI UI issues (only use during triage, issue will be migrated to Grafana)

Comments

@matthewhudsonedb
Copy link
Contributor

matthewhudsonedb commented Jan 6, 2025

Describe the bug
Left param in Generator URL is not url encoded.
This results in links like being generated on third party alerting tools where the hyperinks are broken i.e. pagerduty. slack...:
http://grafana.test/explore?left={"queries":[%7B%22expr%22%3A%22%28count_over_time%28%7Bjob%3D%5C%22fluent-bit%5C%22%2C+pod%3D~%5C%22.%2Afluent.%2A%5C%22%7D%5B2m%5D%29+%5Cu003e+0%29%22%2C%22queryType%22%3A%22range%22%7D]}

To Reproduce
Steps to reproduce the behavior:

  1. Generate and alert from loki-ruler
  2. Check the generater URL output of the above alert

Expected behavior
The left parametet in the generator URL should be url encoded correctly like so for the above example:
http://grafana.test/explore?left=%7B%22queries%22%3A%5B%7B%22expr%22%3A%22%28count_over_time%28%7Bjob%3D%5C%22fluent-bit%5C%22%2C+pod%3D~%5C%22.%2Afluent.%2A%5C%22%7D%5B2m%5D%29+%5Cu003e+0%29%22%2C%22queryType%22%3A%22range%22%7D%5D%7D

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: helm

Screenshots, Promtail config, or terminal output
Slack displays the link incorrectly:
Image

@JStickler JStickler added the UI UI issues (only use during triage, issue will be migrated to Grafana) label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI UI issues (only use during triage, issue will be migrated to Grafana)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants