Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr396 #397

Merged
merged 4 commits into from
May 15, 2023
Merged

Pr396 #397

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<PackageProjectUrl>https://github.com/OrleansContrib/OrleansDashboard</PackageProjectUrl>
<PackageTags>orleans dashboard metrics monitor</PackageTags>
<RepositoryUrl>https://github.com/OrleansContrib/OrleansDashboard</RepositoryUrl>
<Version>7.2.0</Version>
<Version>7.2.1</Version>
</PropertyGroup>
</Project>
8 changes: 7 additions & 1 deletion OrleansDashboard/Dashboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
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 OpenTelemetry;
using OpenTelemetry.Metrics;
using Orleans;
using Orleans.Runtime;
using OrleansDashboard.Implementation;
using OrleansDashboard.Implementation.Assets;

namespace OrleansDashboard
{
Expand All @@ -23,6 +25,7 @@ public sealed class Dashboard : IStartupTask, IDisposable
private readonly IGrainFactory grainFactory;
private readonly DashboardTelemetryExporter dashboardTelemetryExporter;
private readonly ISiloGrainClient siloGrainClient;
private readonly IAssetProvider assetProvider;
private readonly DashboardOptions dashboardOptions;

public Dashboard(
Expand All @@ -31,13 +34,14 @@ public sealed class Dashboard : IStartupTask, IDisposable
IGrainFactory grainFactory,
DashboardTelemetryExporter dashboardTelemetryExporter,
IOptions<DashboardOptions> dashboardOptions,
ISiloGrainClient siloGrainClient)
ISiloGrainClient siloGrainClient, IAssetProvider assetProvider)
{
this.logger = logger;
this.grainFactory = grainFactory;
this.localSiloDetails = localSiloDetails;
this.dashboardTelemetryExporter = dashboardTelemetryExporter;
this.siloGrainClient = siloGrainClient;
this.assetProvider = assetProvider;
this.dashboardOptions = dashboardOptions.Value;
}

Expand All @@ -51,6 +55,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
1 change: 1 addition & 0 deletions Tests/TestHosts/TestHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static void Main(string[] args)
{
options.HostSelf = true;
});

})
.ConfigureServices(services =>
{
Expand Down
12 changes: 12 additions & 0 deletions Tests/TestHosts/TestHostCohosted2/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"profiles": {
"TestHostCohosted2": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:55355;http://localhost:55356"
}
}
}