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

Improve display of job result and properties (followup) #2396

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Apr 19, 2024

This is a followup to #1509 which was closed on the ground that the new UseJobDetailsRenderer method could be used.

While technically possible to achieve (see https://github.com/0xced/Hangfire.TidyDashboard) it's a lot of work: reimplement the Hangfire.Dashboard.JobHistoryRenderer.SucceededRenderer method in order to prettify the JSON and the newlines and wrap a JobStorageMonitor in order to prettify the parameters.

It think this makes much more sense to have this prettifying of strings built-in to the Hangfire dashboard.

Note

I have also fixed a bug compared to the original pull request where non-string job parameters would be double html escaped.

Original description

It's quite common that job properties and/or result are strings. Since everything is serialized as JSON in the database, a string becomes quoted and has escaped characters. For displaying in the dashboard, it's nicer without the quotes and escaped characters.

Before this pull request:
HangFire-ugly

After this pull request:
HangFire-pretty

It's quite common that job properties and/or result are strings. Since everything is serialized as JSON in the database, a string becomes quoted and has escaped characters. For displaying in the dashboard, it's nicer without the quotes and escaped characters.
@0xced 0xced force-pushed the pretty-result-and-properties branch from 5c95a78 to 556ef2e Compare May 22, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant