Prepare Dashboard Storage

  • 2 minutes to read

The Web Dashboard requires creating a special storage used to keep dashboards. End users can save new dashboards to this storage and open existing dashboards.

The following storage types are available:

Storage Type

Class

Description

In-Memory Storage

DashboardInMemoryStorage

In-memory dashboard storage is a default storage used to keep dashboards. The Web Dashboard uses the DashboardInMemoryStorage if you do not specify storage.

File Storage

DashboardFileStorage

File dashboard storage is used to store dashboards in a file system.

Custom Storage

Implementation of IDashboardStorage or IEditableDashboardStorage

You can specify your logic to manage dashboards. To do this, implement the IDashboardStorage or IEditableDashboardStorage interfaces with the following methods:

More information: Manage Multi-Tenancy.

Dashboard Type Storage

DashboardTypeStorage

Dashboard storage created at design time within Visual Studio. You can use DashboardTypeStorage in the Viewer mode only. The ASP.NET Core dashboard control does not allow to edit these dashboards at design time.

To create storage that contains dashboards, pass the selected storage instance to the DashboardConfigurator.SetDashboardStorage method as a parameter. The following code snippet shows how to set in-memory storage when you configure backend settings for the ASP.NET Core Dashboard control:

public void ConfigureServices(IServiceCollection services) {
    services.AddScoped<DashboardConfigurator>((IServiceProvider serviceProvider) => {
        DashboardConfigurator configurator = new DashboardConfigurator();
        // ...
        configurator.SetDataSourceStorage(new DataSourceInMemoryStorage());

        return configurator;
    });
    // ...
}

See the following topics for information about access rights: