Skip to content

alexmachadodev/hangfire-dashboard-customize

 
 

Repository files navigation

Hangfire.Dashboard.Customize NuGet Version License

Customize the title of your Hangfire Dashboard.

Hangfire.Dashboard.Customize screenshot

Getting started

Install the Hangfire.Dashboard.Customize package from NuGet:

Install-Package Hangfire.Dashboard.Customize

Call the method UseHangfireDashboardCustomOptions just before calling Hangfire's UseHangfireDashboard, in the configuration of your app:

public class Startup
{
    // ...

    public void Configure(IApplicationBuilder app)
    {
        // ...

        app.UseHangfireDashboardCustomOptions(new HangfireDashboardCustomOptions
        {
            DashboardTitle = () => "My Dashboard Title :)",
        });

        // ...

        app.UseHangfireDashboard();

        // ...
    }
}

In your HangfireDashboardCustomOptions instance, you can define a function that returns the title you would like to display in your Hangfire Dashboard.

The string defined in the DashboardTitle will be written to the page as a raw string, allowing the use of images and other HTML elements.

app.UseHangfireDashboardCustomOptions(new HangfireDashboardCustomOptions
{
    DashboardTitle = () => "<img src=\"logo.png\" /> <b>Scheduled Jobs</b>",
});

Copyright © 2019 Caio Proiete & Contributors - Provided under the Apache License, Version 2.0.

About

Customize your Hangfire Dashboard (e.g. Change the Title of the Dashboard)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%