Improve display of job result and properties (followup)#2396
Improve display of job result and properties (followup)#23960xced wants to merge 3 commits intoHangfireIO:mainfrom
Conversation
5c95a78 to
556ef2e
Compare
556ef2e to
095df4f
Compare
|
Hi @0xced! I'd still like to stand with the solution posted in this comment – #1509 (comment). The main reason for this is to have both parameters and return value formatted as JSON string by default to avoid confusion and present the value as is. Otherwise it might be not clear which type is behind the value, especially for numbers encoded as strings. Currently they will be displayed as I don't like the solution to special-case strings and forgetting other types, because it's not consistent. General solution to this problem would be possible by converting all such values from JSON to their actual type first ( |
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.
095df4f to
c25e3a5
Compare
This is a followup to #1509 which was closed on the ground that the new
UseJobDetailsRenderermethod 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.SucceededRenderermethod 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:

After this pull request:
