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

UI: Alert details markdown links navigation issue #4289

Open
Arunkumarlnr opened this issue Mar 3, 2025 · 4 comments · May be fixed by #4290
Open

UI: Alert details markdown links navigation issue #4289

Arunkumarlnr opened this issue Mar 3, 2025 · 4 comments · May be fixed by #4290
Assignees
Labels
bug Something isn't working

Comments

@Arunkumarlnr
Copy link

Describe the Bug:
This issue occurs for some URLs that are added as markdown in the alert details page with special char like &, the URL is encoded into & causing the link to point to an incorrect or non-functional URL, this resulting in broken links when clicked.

Steps to Reproduce:

  1. Create an alert with links that has special chars or if one has integrated with grafana, whenever the panel goes to alerting state, the details will have the link to panel which will have & in it.
  2. Click on that url for navigating
  3. You can notice the special characters getting appended because of which we will land in the incorrect URL.

Expected Behavior:
The URL should be rendered and decoded properly without the encoded symbol allowing the link to navigate to the correct URL

URL in the details page
Link in details page: https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36
Link while navigating: https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36

@Arunkumarlnr Arunkumarlnr added the bug Something isn't working label Mar 3, 2025
@Arunkumarlnr Arunkumarlnr linked a pull request Mar 3, 2025 that will close this issue
7 tasks
@mastercactapus mastercactapus self-assigned this Mar 4, 2025
@mastercactapus
Copy link
Member

Having trouble reproducing this (I'm on master)

I created an alert with these exact details:

- link: https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36
- [named](https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36)

And the rendered link addresses are (respectively):

  • https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36
  • https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36

which seem correct.


  • Are you seeing this on a different version? (I tested commit 412dde0)
  • Specific browser?
  • Different details markdown I can try?

@Arunkumarlnr
Copy link
Author

@mastercactapus I assume you created the alert directly from the UI in this case, when you create from Grafana or from the generic API integration key, we are getting this issue.

@mastercactapus
Copy link
Member

I tested via Generic API this AM with same results:

Multipart Form:
- https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36
- https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36

URL-Encoded Form:
- https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36
- https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36

JSON:
- https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36
- https://monitoring.temp.com/tlmy/d/bc5bf82d-5c95-4c2a-aa28-e3b5e807220d/test-payload?tab=alert&viewPanel=2&orgId=36

Can you validate that the URL isn't incorrectly encoded/escaped before reaching GoAlert?

@Arunkumarlnr
Copy link
Author

Thanks for your time. We are using v0.32.0 and we faced markdown related issues and we noticed this fix fix: alert detail markdown link bug #3683, upon adding also we faced this navigation issue so I reported, I will compare with the latest changes and update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants