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

Add Menu Grouping for Logs #112

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions src/Aspire.Dashboard/Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.AppGeneric())" Text="Projects" Href="/" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.BinFull())" Text="Containers" Href="/Containers" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.AppGeneric())" Text="Executables" Href="/Executables" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.SlideText())" Text="Project logs" Href="/ProjectLogs" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.SlideText())" Text="Container Logs" Href="/ContainerLogs" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.SlideText())" Text="Executable Logs" Href="/ExecutableLogs" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.SlideTextSparkle())" Text="Semantic Logs" Href="/SemanticLogs" />
<FluentNavMenuGroup Icon="@(new Icons.Regular.Size24.SlideText())" Text="Logs" Expanded="true" OnAction="OnMenuGroupClicked">
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.SlideText())" Text="Project" Href="/ProjectLogs" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.SlideText())" Text="Container" Href="/ContainerLogs" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.SlideText())" Text="Executable" Href="/ExecutableLogs" />
<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.SlideTextSparkle())" Text="Structured" Href="/SemanticLogs" />
</FluentNavMenuGroup>

<FluentNavMenuLink Icon="@(new Icons.Regular.Size24.GanttChart())" Text="Traces" Href="/Traces" />
</FluentNavMenu>

Expand All @@ -29,3 +32,11 @@
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>

@code {
// Workaround for bug in current NavMenu when clicking on menu groups
private void OnMenuGroupClicked(NavMenuActionArgs args)
{
args.SetHandled();
}
}
2 changes: 1 addition & 1 deletion src/Aspire.Dashboard/Components/Pages/SemanticLogs.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@inject IJSRuntime JS
@implements IDisposable

<h1>Semantic Logs</h1>
<h1>Structured Logs</h1>
<div>
<FluentStack Orientation="Orientation.Vertical">
<FluentToolbar Orientation="Orientation.Horizontal">
Expand Down