@dsincl12 proposed a feature to improve the HangFire Dashboard experience with a textual descriptions for background jobs:

This feature can be implemented in a very easy way – the HtmlHelper.DisplayJob method can look for a System.ComponentModel.DisplayNameAttribute that is applied to a job and return the formatted value. The usage is very simple:
[DisplayName("Send order #{0} to warehouse")]
public void CopyOrderToLevel4(int orderId)
{
// Processing
}
The display name string can use positional arguments, and their values can be automatically substituted with real job arguments:
String.Format(attribute.DisplayName, job.Arguments);
Maybe someone wants to implement this feature?
I'll have a go at it since I really have a need for this. I guess you meant HtmlHelper.DisplayMethod?
Where is HangFire.Web?
Hangfire 1.0.0-alpha1 comes with OWIN integration (please see #128). Since OWIN dependencies are light-weighty don't use the System.Web namespace, the Dashboard was merged into the HangFire.Core assembly.
OK I'm almost done, but I'm having trouble changing the text on the pages under HangFire.Core/Dashboard/Pages. The changes I make doesn't reflect even though I rebuild and reinstall.
On the JobDetailsPage.cshtml page for example I want to change the the following code:
if (job != null)
{
title = ...
}
I also found JobDetailsPage1.generated.cs - What tool generates this?
These files generated by Razor Generator extension for Visual Studio. You can check it by viewing properties of *.cshtml files (see the CustomTool property). After installing, files will be regenerated each time you save the changes.
OK thanks alot. I've found a couple of spelling errors and a bug, I will fix them as well.
I've found a couple of spelling errors and a bug, I will fix them as well.
This would be really awesome! Thanks in advance!
I would like to leave something documented here.
If you are using an interface to decouple server and dashboard, this attribute should be added to the interface instead. The reason as far as I can see is because the dashboard knows only the interface.
I added the DisplayName and I still see the job displayed as the original, ScanEngine,RunScan instead of Scan Path \ddddd\ddd
Am I missing something?
Public class ScanEngine
{
[DisplayName("Scan Path {0}")]
public void RunScan(string path, int pathId)
I added the DisplayName and I still see the job displayed as the original, ScanEngine,RunScan instead of Scan Path \ddddd\ddd
Am I missing something?
Public class ScanEngine { [DisplayName("Scan Path {0}")] public void RunScan(string path, int pathId)
Make sure that the display name is set on the method signature that is getting called by the hangfire job server. That was my issue, I had an abstraction on the job scheduling part and I was setting the name on them, after I did it on the actual interface being run by hangfire everything worked great.
Most helpful comment
I added the DisplayName and I still see the job displayed as the original, ScanEngine,RunScan instead of Scan Path \ddddd\ddd
Am I missing something?