Integrate DevExpress Web Dashboard into API and Blazor
Added DevExpress Dashboard to ASP.NET Core API and both Blazor WASM/Server frontends. Configured dashboard storage, sample data source, and API endpoint. Updated Blazor projects with dashboard packages, styles, and a new dashboard page. Navigation and configuration updated to support dashboard integration.
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
• Der Router-Komponent in App.razor entscheidet, welche Blazor-Komponente basierend auf der URL geladen wird.
|
||||
kurz: Steuert die Navigation und das Rendering der Blazor-Komponenten.
|
||||
*@
|
||||
|
||||
@DxResourceManager.RegisterTheme(Themes.Fluent)
|
||||
@DxResourceManager.RegisterScripts()
|
||||
<Router AppAssembly="@typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
|
||||
@@ -7,9 +7,12 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DevExpress.Blazor" Version="25.2.3" />
|
||||
<PackageReference Include="DevExpress.Blazor.Dashboard" Version="25.2.3" />
|
||||
<PackageReference Include="DevExpress.Blazor.Themes" Version="25.2.3" />
|
||||
<PackageReference Include="DevExpress.Blazor.Themes.Fluent" Version="25.2.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.22" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.22" PrivateAssets="all" />
|
||||
<PackageReference Include="DevExpress.Blazor" Version="24.1.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
<span class="bi bi-collection-nav-menu" aria-hidden="true"></span> Catalogs
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="dashboard">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> Web Dashboard
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
12
DbFirst.BlazorWasm/Pages/Dashboard.razor
Normal file
12
DbFirst.BlazorWasm/Pages/Dashboard.razor
Normal file
@@ -0,0 +1,12 @@
|
||||
@page "/dashboard"
|
||||
@inject Microsoft.Extensions.Configuration.IConfiguration Configuration
|
||||
|
||||
<DxDashboard Endpoint="@DashboardEndpoint" style="width: 100%; height: 800px;">
|
||||
</DxDashboard>
|
||||
|
||||
@code {
|
||||
private string DashboardEndpoint => $"{Configuration["ApiBaseUrl"]?.TrimEnd('/')}/api/dashboard";
|
||||
}
|
||||
|
||||
@* <DxDashboard Endpoint="api/dashboard" WorkingMode="WorkingMode.ViewerOnly" style="width: 100%; height: 800px;">
|
||||
</DxDashboard> *@
|
||||
@@ -11,3 +11,5 @@
|
||||
@using DbFirst.BlazorWasm.Models
|
||||
@using DbFirst.BlazorWasm.Services
|
||||
@using DevExpress.Blazor
|
||||
@using DevExpress.DashboardBlazor
|
||||
@using DevExpress.DashboardWeb
|
||||
@@ -17,6 +17,16 @@
|
||||
<base href="/" />
|
||||
|
||||
<!-- Stylesheets für DevExpress und Bootstrap -->
|
||||
|
||||
<link href="_content/DevExpress.Blazor.Dashboard/ace.css" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Dashboard/ace-theme-dreamweaver.css" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Dashboard/ace-theme-ambiance.css" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Dashboard/dx.light.css" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Dashboard/dx-analytics.common.css" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Dashboard/dx-analytics.light.css" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Dashboard/dx-querybuilder.css" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Dashboard/dx-dashboard.light.min.css" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" href="_content/DevExpress.Blazor.Themes/bootstrap-external.bs5.min.css" />
|
||||
<link rel="stylesheet" href="_content/DevExpress.Blazor.Themes/icons.css" />
|
||||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
|
||||
|
||||
Reference in New Issue
Block a user