Skip to content

Commit

Permalink
Cherry-Picked from "Merge pull request #396 from RecursosOnline/master".
Browse files Browse the repository at this point in the history
  • Loading branch information
Киршин Максим committed Jun 3, 2024
1 parent 4f84d77 commit 2827314
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OrleansDashboard/Dashboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Orleans;
using Orleans.Runtime;
using OrleansDashboard.Implementation.Assets;

namespace OrleansDashboard
{
Expand All @@ -17,6 +19,7 @@ public sealed class Dashboard : IStartupTask, IDisposable
private readonly ILogger<Dashboard> logger;
private readonly ILocalSiloDetails localSiloDetails;
private readonly IGrainFactory grainFactory;
private readonly IAssetProvider assetProvider;
private readonly DashboardOptions dashboardOptions;

public static int HistoryLength => 100;
Expand All @@ -25,11 +28,13 @@ public Dashboard(
ILogger<Dashboard> logger,
ILocalSiloDetails localSiloDetails,
IGrainFactory grainFactory,
IOptions<DashboardOptions> dashboardOptions)
IOptions<DashboardOptions> dashboardOptions,
IAssetProvider assetProvider)
{
this.logger = logger;
this.grainFactory = grainFactory;
this.localSiloDetails = localSiloDetails;
this.assetProvider = assetProvider;
this.dashboardOptions = dashboardOptions.Value;
}

Expand All @@ -43,6 +48,8 @@ public async Task Execute(CancellationToken cancellationToken)
new WebHostBuilder()
.ConfigureServices(services =>
{
//Add IAssetProvider [EmbeddedAssetProvider]
services.AddSingleton(assetProvider);
services.AddServicesForHostedDashboard(grainFactory, dashboardOptions);
})
.Configure(app =>
Expand Down

0 comments on commit 2827314

Please sign in to comment.