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

Fix links to atom jobs in the atom state renderers #9

Merged
merged 3 commits into from
Dec 9, 2022

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Dec 2, 2022

Without using the UrlHelper, the link to Atom details could be wrong and lead to HTTP 404 errors.

For example, it would point to http://localhost:5000/jobs/atoms/10119 instead of http://localhost:5000/hangfire/jobs/atoms/10119 when using the default app.UseHangfireDashboard() method that maps the Hangfire dashboard on /hangfire.

Without using the UrlHelper, the link to _Atom details_ could be wrong and lead to HTTP 404 errors.

For example, it would point to http://localhost:5000/jobs/atoms/10119 instead of http://localhost:5000/hangfire/jobs/atoms/10119 when using the default `app.UseHangfireDashboard()` method that maps the Hangfire dashboard on `/hangfire`.
@ahydrax
Copy link
Owner

ahydrax commented Dec 4, 2022

Hi there, thanks for contribution!
Is there a safer way to extract razor page and get url? I'm worrying about using a reflection

@0xced
Copy link
Contributor Author

0xced commented Dec 4, 2022

I just found way, without using reflection, to get the UrlHelper: af17f6f

It should be much safer!

@ahydrax
Copy link
Owner

ahydrax commented Dec 5, 2022

Wow! Looks good to me, let me test it before pushing to live.

@ahydrax ahydrax self-requested a review December 5, 2022 04:33
@ahydrax ahydrax merged commit 7457433 into ahydrax:master Dec 9, 2022
@0xced 0xced deleted the fix-atoms-urls branch December 9, 2022 08:28
@0xced
Copy link
Contributor Author

0xced commented Dec 9, 2022

Thanks for merging. And I see that version 0.4.4 is already released, awesome! 🥳

@0xced
Copy link
Contributor Author

0xced commented Dec 16, 2022

For the record: the RazorPage will be exposed as a public property on HtmlHelper in the next version of Hangfire: HangfireIO/Hangfire@1ae167e

I'll open a new pull request to simplify the current implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants