Skip to content

Commit

Permalink
Fixes for MudDataGrid changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsen9026 committed Oct 15, 2024
1 parent 4fd395d commit ef6e2d1
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 24 deletions.
2 changes: 1 addition & 1 deletion BLAZAM/BLAZAM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>1.0.4</AssemblyVersion>
<Version>2024.10.11.1647</Version>
<Version>2024.10.15.2129</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand Down
43 changes: 32 additions & 11 deletions BLAZAM/Pages/Configure/Audit.razor
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,23 @@
SortMode="@SortMode.Multiple"
Groupable="false">
<Columns>
<PropertyColumn Property="x => x.Timestamp.ToLocalTime()" Sortable="true" />
<PropertyColumn Property="x => x.Username" Filterable="true"/>
@* <PropertyColumn Property="x => x.Timestamp.ToLocalTime()" Sortable="true" /> *@
<TemplateColumn Title=@AppLocalization["Timestamp"] Sortable="true">
<CellTemplate>
<MudText>
@context.Item.Timestamp.ToLocalTime()
</MudText>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.Username" Filterable="true" />
<PropertyColumn Property="x => x.IpAddress" Filterable="true" />
<PropertyColumn Property="x => x.Action" Filterable="true" />
<TemplateColumn>
<CellTemplate>
<MudLink Href="@("/view/"+context.Item.Target)">@context.Item.Target</MudLink>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.BeforeAction" Filterable="true" />
<PropertyColumn Property="x => x.BeforeAction" Filterable="true" />
<PropertyColumn Property="x => x.AfterAction" Filterable="true" />

</Columns>
Expand All @@ -55,7 +62,7 @@
<MudTabPanel>
<ChildContent>
<LoginHistoryChart />


<MudDataGrid Virtualize=true
Height="600px"
Expand All @@ -67,7 +74,14 @@
SortMode="@SortMode.Multiple"
Groupable="false">
<Columns>
<PropertyColumn Property="x => x.Timestamp.ToLocalTime()" />
@* <PropertyColumn Property="x => x.Timestamp.ToLocalTime()" /> *@
<TemplateColumn Title=@AppLocalization["Timestamp"] Sortable="true">
<CellTemplate>
<MudText>
@context.Item.Timestamp.ToLocalTime()
</MudText>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.Username" />
<PropertyColumn Property="x => x.IpAddress" />
<PropertyColumn Property="x => x.Action" />
Expand All @@ -85,7 +99,7 @@
</MudTabPanel>
<MudTabPanel>
<ChildContent>
@if(ApplicationInfo.InDemoMode && CurrentUser.Username == "Demo")
@if (ApplicationInfo.InDemoMode && CurrentUser.Username == "Demo")
{
<MudText>Disabled in demo</MudText>
}
Expand All @@ -101,7 +115,14 @@
SortMode="@SortMode.Multiple"
Groupable="false">
<Columns>
<PropertyColumn Property="x => x.Timestamp.ToLocalTime()" />
@* <PropertyColumn Property="x => x.Timestamp.ToLocalTime()" /> *@
<TemplateColumn Title=@AppLocalization["Timestamp"] Sortable="true">
<CellTemplate>
<MudText>
@context.Item.Timestamp.ToLocalTime()
</MudText>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.Username" />
<PropertyColumn Property="x => x.IpAddress" />
<PropertyColumn Property="x => x.Target" />
Expand All @@ -113,7 +134,7 @@
</Columns>
</MudDataGrid>
}




Expand All @@ -128,7 +149,7 @@
</MudTabs>


@code {
@code {
List<LogonAuditLog> logonEntries = new();
List<DirectoryEntryAuditLog> auditEntries = new();
List<SystemAuditLog> systemAuditEntries = new();
Expand All @@ -146,10 +167,10 @@




}


}

}
21 changes: 14 additions & 7 deletions BLAZAMGui/Layouts/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@
@if (ApplicationInfo.inDebugMode)
{

<AuthorizeView Context="authorizedContext" Roles=@UserRoles.SuperAdmin>
<MudDrawer Width="450px" @bind-Open=@_devDrawerOpen Anchor=Anchor.End Elevation="2" Class="mud-theme-dark">
<AuthorizeView Context="authorizedContext"
Roles=@UserRoles.SuperAdmin>
<MudDrawer Width="450px"
@bind-Open=@_devDrawerOpen
Anchor=Anchor.End
Elevation="2"
Class="mud-theme-dark">
<MudDrawerContainer>
<DevTools />
</MudDrawerContainer>
Expand Down Expand Up @@ -71,7 +76,7 @@ await InvokeAsync(StateHasChanged);
<MudMainContent Class=" mud-height-full">



<MudContainer Style="@topMarginForContent"
MaxWidth="MaxWidth.ExtraExtraLarge"
Class="px-0 pb-10 mud-height-full">
Expand Down Expand Up @@ -165,7 +170,7 @@ await InvokeAsync(StateHasChanged);

Header.OnRefreshRequested += (async () => { await InvokeAsync(StateHasChanged); });


InvokeAsync(StateHasChanged);
}
SetSubHeader? SubHeader;
Expand Down Expand Up @@ -225,7 +230,7 @@ await InvokeAsync(StateHasChanged);
get

{
if(BrowseExpanded == false)
if (BrowseExpanded == false)
{
if (_mudBreakPoint?.Breakpoint == Breakpoint.Sm ||
_mudBreakPoint?.Breakpoint == Breakpoint.Xs)
Expand All @@ -236,9 +241,11 @@ await InvokeAsync(StateHasChanged);
{
return DrawerVariant.Responsive;
}
}else{
}
else
{
return DrawerVariant.Temporary;
}
}

}
}
Expand Down
25 changes: 20 additions & 5 deletions BLAZAMGui/UI/Dev/DevTools.razor
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,27 @@
<PropertyColumn Title="Session Expiration Time" Property="x => x.Ticket==null?null:(DateTimeOffset.UtcNow-x.Ticket.Properties.ExpiresUtc)" />




<PropertyColumn Title="Has User Priv" Property="x => x.HasUserPrivilege.ToString()" />
<PropertyColumn Title="Has Group Priv" Property="x => x.HasGroupPrivilege.ToString()" />
<PropertyColumn Title="Has OU Priv" Property="x => x.HasOUPrivilege.ToString()" />
<PropertyColumn Title="Has Computer Priv" Property="x => x.HasComputerPrivilege.ToString()" />
<TemplateColumn Title="Has User Priv">
<CellTemplate>
@context.Item.HasUserPrivilege
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="Has Group Priv">
<CellTemplate>
@context.Item.HasGroupPrivilege
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="Has OU Priv">
<CellTemplate>
@context.Item.HasOUPrivilege
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="Has Computer Priv">
<CellTemplate>
@context.Item.HasComputerPrivilege
</CellTemplate>
</TemplateColumn>
</Columns>
</MudDataGrid>

Expand Down

0 comments on commit ef6e2d1

Please sign in to comment.