We have been enjoying using Hangfire for adding Data Import Jobs. It would be also great to extend the user interface, in order to add additional functionality. Is there a way to extend the existing User Interface? For instance adding new tabs, pages, include additional JS files etc.
A cheap solution would be to add it as an iframe to your existing site. As far as I know, it's not easy to extend the current dashboard, unless you fork Hangfire and modify it locally.
I see. Thanks for the info :)
Actually, it can be extended, and there are following extension points:
DashboardRoutes.RoutesRazorGenerator extension for Visual Studio, and RazorPage base class.NavigationMenu classJobsSidebarMenu class.So you can add pages, new routes, menu items, etc. without recompiling Hangfire. Please see the source code for this classes for examples.
Thanks odinserj, You got me on the right path. I used this code in my startup class to add a custom menu item, but it can be called everywhere since navigationMenu is static:
NavigationMenu.Items.Add(page => new MenuItem("Title of my menu item", "/url/to/mypage"));
And how to extend existing Dashboard pages? Let's say I want to add another button into Recurring Jobs page.
Most helpful comment
Actually, it can be extended, and there are following extension points:
DashboardRoutes.RoutesRazorGeneratorextension for Visual Studio, andRazorPagebase class.NavigationMenuclassJobsSidebarMenuclass.So you can add pages, new routes, menu items, etc. without recompiling Hangfire. Please see the source code for this classes for examples.