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

Maggie update #701

Merged
merged 36 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e938180
Translation prep
jacobsen9026 Dec 3, 2024
762204b
More Translation prep
jacobsen9026 Dec 4, 2024
4240e15
Update Translations Dictionary
jacobsen9026 Dec 4, 2024
d61df97
Fix success color
jacobsen9026 Dec 5, 2024
5069cb2
Remove chinese
jacobsen9026 Dec 6, 2024
218ca58
Update README.md
jacobsen9026 Dec 6, 2024
cae2557
Merge pull request #693 from Blazam-App/v1-Dev
jacobsen9026 Dec 7, 2024
f9bf3ef
Split Group Membership notification type into Assign and Unassign types
jacobsen9026 Dec 7, 2024
5084d37
Merge branch 'v1-Dev' of https://github.com/Blazam-App/BLAZAM into v1…
jacobsen9026 Dec 7, 2024
aca28fe
Merge pull request #694 from Blazam-App/v1-Dev
jacobsen9026 Dec 8, 2024
2123a39
Bump Swashbuckle.AspNetCore.SwaggerUI and Swashbuckle.AspNetCore
dependabot[bot] Dec 9, 2024
16cbc81
Bump Microsoft.Extensions.Configuration.Binder, Microsoft.Extensions.…
dependabot[bot] Dec 9, 2024
5df94dc
Bump dotnet-ef from 7.0.1 to 9.0.0
dependabot[bot] Dec 9, 2024
4c8e35f
Merge pull request #695 from Blazam-App/dependabot/nuget/multi-b9255c…
jacobsen9026 Dec 9, 2024
6a56c2a
Bump SixLabors.ImageSharp from 3.1.5 to 3.1.6
dependabot[bot] Dec 9, 2024
e2a324a
Merge pull request #697 from Blazam-App/dependabot/nuget/SixLabors.Im…
jacobsen9026 Dec 11, 2024
461bb7c
Bump Microsoft.VisualStudio.Web.CodeGeneration.Design and Newtonsoft.…
dependabot[bot] Dec 11, 2024
f3247b7
Add Maggie photo
Dec 13, 2024
e00e086
Merge branch 'v1-Dev' of https://github.com/Blazam-App/BLAZAM into v1…
Dec 13, 2024
8b7639e
Update maggie
Dec 13, 2024
8f7a3fb
Create about modal
jacobsen9026 Dec 13, 2024
ed50bcd
Merge branch 'v1-Dev' of https://github.com/Blazam-App/BLAZAM into v1…
jacobsen9026 Dec 13, 2024
41b0376
Add About Modal
jacobsen9026 Dec 13, 2024
93fa36b
Add maggie2.png
Dec 13, 2024
73dba6c
Merge branch 'v1-Dev' of https://github.com/Blazam-App/BLAZAM into v1…
Dec 13, 2024
73698d7
maggie 3
Dec 13, 2024
23ab0e1
maggie4
Dec 13, 2024
1ce2b6d
Finalize maggie image
jacobsen9026 Dec 13, 2024
8b18e53
Merge pull request #696 from Blazam-App/dependabot/nuget/multi-64418d…
jacobsen9026 Dec 14, 2024
648e339
Merge pull request #698 from Blazam-App/dependabot/nuget/multi-8c73a4…
jacobsen9026 Dec 14, 2024
7e09668
Merge pull request #699 from Blazam-App/dependabot/nuget/dotnet-ef-9.0.0
jacobsen9026 Dec 14, 2024
c0ad212
Merge pull request #700 from Blazam-App/v1-Dev
jacobsen9026 Dec 14, 2024
28cc29c
Add link to website
jacobsen9026 Dec 14, 2024
cea83e8
Merge branch 'v1-Dev' of https://github.com/Blazam-App/BLAZAM into v1…
jacobsen9026 Dec 14, 2024
43a61ca
Improve display of about modal
jacobsen9026 Dec 14, 2024
fd6f7d3
Merge pull request #702 from Blazam-App/v1-Dev
jacobsen9026 Dec 14, 2024
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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "7.0.1",
"version": "9.0.0",
"commands": [
"dotnet-ef"
]
Expand Down
19 changes: 11 additions & 8 deletions BLAZAM/BLAZAM.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>1.2.1</AssemblyVersion>
<Version>2024.12.02.2252</Version>
<AssemblyVersion>1.2.2</AssemblyVersion>
<Version>2024.12.14.0307</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
Expand Down Expand Up @@ -64,19 +64,19 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.11" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="9.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.7" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" />
<PackageReference Include="MudBlazor" Version="7.15.0" />
<PackageReference Include="MudBlazor.Markdown" Version="7.14.0" />
<PackageReference Include="MudBlazor.ThemeManager" Version="2.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.1.0" />
<PackageReference Include="System.DirectoryServices" Version="9.0.0" />

Expand Down Expand Up @@ -126,6 +126,9 @@
<Content Update="wwwroot\favicon.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\jira\feature-request.html">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 10 additions & 1 deletion BLAZAM/Pages/API/v1/Templates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using BLAZAM.Services.Audit;
using BLAZAM.Session.Interfaces;
using System.Text.Json;
using BLAZAM.Common.Data.Database;

namespace BLAZAM.Pages.API.v1
{
Expand Down Expand Up @@ -173,8 +174,16 @@ public async Task<IActionResult> Execute(int templateId, [FromBody] NewUserDetai
{
newUser = (IADUser)Directory.GetDirectoryEntryByDN(newUser.DN);
await AuditLogger.User.Created(newUser);
if (DbFactory.DatabaseType == DatabaseType.SQLite)
{
await OUNotificationService.PostAsync(newUser, NotificationType.Create, CurrentUserState);

_ = OUNotificationService.PostAsync(newUser, NotificationType.Create, CurrentUserState);
}
else
{
_ = OUNotificationService.PostAsync(newUser, NotificationType.Create, CurrentUserState);

}

try
{
Expand Down
31 changes: 30 additions & 1 deletion BLAZAM/Pages/Computers/ViewComputer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -325,17 +325,46 @@
{
await AuditLogger.Computer.Assigned(assignment.Member, assignment.Group);
await AuditLogger.Group.MemberAdded(assignment.Group, assignment.Member);
if (DbFactory.DatabaseType == DatabaseType.SQLite)
{
await NotificationGenerationService.PostAsync(Computer, NotificationType.Assign, CurrentUser.State, assignment.Group);

}
else
{
_ = NotificationGenerationService.PostAsync(Computer, NotificationType.Assign, CurrentUser.State, assignment.Group);

}
}

foreach (var assignment in unassignFrom)
{
await AuditLogger.Computer.Unassigned(assignment.Member, assignment.Group);
await AuditLogger.Group.MemberRemoved(assignment.Group, assignment.Member);
if (DbFactory.DatabaseType == DatabaseType.SQLite)
{
await NotificationGenerationService.PostAsync(Computer, NotificationType.Unassign, CurrentUser.State, assignment.Group);

}
else
{
_ = NotificationGenerationService.PostAsync(Computer, NotificationType.Unassign, CurrentUser.State, assignment.Group);

}
}
if (changes.Any(c => c.Field != ActiveDirectoryFields.MemberOf.FieldName))
{
_ = NotificationGenerationService.PostAsync(Computer, NotificationType.Modify, CurrentUser.State);
await AuditLogger.User.Changed(Computer, changes.Where(c => c.Field != ActiveDirectoryFields.MemberOf.FieldName).ToList());
if (DbFactory.DatabaseType == DatabaseType.SQLite)
{
await NotificationGenerationService.PostAsync(Computer, NotificationType.Modify, CurrentUser.State);

}
else
{
_ = NotificationGenerationService.PostAsync(Computer, NotificationType.Modify, CurrentUser.State);

}
}


Expand Down
11 changes: 5 additions & 6 deletions BLAZAM/Pages/Configure/Audit.razor
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,12 @@
</MudText>
</CellTemplate>
</TemplateColumn>
<PropertyColumn Property="x => x.Username" />
<PropertyColumn Property="x => x.IpAddress" />
<PropertyColumn Property="x => x.Target" />
<PropertyColumn Property="x => x.Username" Title="@AppLocalization["Username"]"/>
<PropertyColumn Property="x => x.IpAddress" Title="@AppLocalization["IP Address"]" />
<PropertyColumn Property="x => x.Target" Title="@AppLocalization["Target"]" />

<PropertyColumn Property="x => x.Target" />
<PropertyColumn Property="x => x.BeforeAction" />
<PropertyColumn Property="x => x.AfterAction" />
<PropertyColumn Property="x => x.BeforeAction" Title="@AppLocalization["Before Action"]" />
<PropertyColumn Property="x => x.AfterAction" Title="@AppLocalization["After Action"]" />

</Columns>
</MudDataGrid>
Expand Down
23 changes: 17 additions & 6 deletions BLAZAM/Pages/Configure/Fields.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,22 @@
EditTrigger="DataGridEditTrigger.Manual">
<ToolBarContent>
<MudSpacer />
<MudIconButton Icon="@Icons.Material.Filled.Add" Color=@Color.Success OnClick="@(()=>{addFieldModal?.ShowAsync();})" />
<MudIconButton Icon="@Icons.Material.Filled.Add"
Color=@Color.Success
OnClick="@(()=>{addFieldModal?.ShowAsync();})" />

</ToolBarContent>

<Columns>

<TemplateColumn Context="cellContext" CellClass="d-flex justify-end" Title="Edit" Sortable="false">
<TemplateColumn Context="cellContext"
CellClass="d-flex justify-end"
Title=@AppLocalization["Edit"]
Sortable="false">
<CellTemplate>
<MudIconButton Size="@Size.Small" Icon="@Icons.Material.Outlined.Edit" OnClick="@cellContext.Actions.StartEditingItemAsync" />
<MudIconButton Size="@Size.Small"
Icon="@Icons.Material.Outlined.Edit"
OnClick="@cellContext.Actions.StartEditingItemAsync" />
</CellTemplate>
</TemplateColumn>

Expand All @@ -38,7 +45,8 @@
<TemplateColumn Title=@AppLocalization["Field Type"]
Sortable="true">
<EditTemplate>
<FieldTypeSelect Variant="@Variant.Outlined" @bind-Value=context.Item.FieldType />
<FieldTypeSelect Variant="@Variant.Outlined"
@bind-Value=context.Item.FieldType />

</EditTemplate>
<CellTemplate>
Expand Down Expand Up @@ -66,7 +74,9 @@
</CellTemplate>
</TemplateColumn>
}
<TemplateColumn CellClass="d-flex justify-end" Title=@AppLocalization["Delete"] Sortable="false">
<TemplateColumn CellClass="d-flex justify-end"
Title=@AppLocalization["Delete"]
Sortable="false">
<CellTemplate>
<MudIconButton Disabled=@(context.Item.Id>100000)
Size="@Size.Small"
Expand All @@ -77,7 +87,8 @@
</Columns>
</MudDataGrid>

<AppModal @ref=addFieldModal Title="Add Field">
<AppModal @ref=addFieldModal
Title="Add Field">
<AddFieldModalContent FieldCreated="FieldCreated" />
</AppModal>
@code {
Expand Down
18 changes: 12 additions & 6 deletions BLAZAM/Pages/Configure/LoginHistoryChart.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@
ChartOptions="@ChartOptions"></MudChart>
@*
<MudFab Icon="@Icons.Material.Filled.ShowChart" OnClick="ToggleLineMode" />*@
@code{
@code {



[Parameter]
public ChartOptions ChartOptions { get; set; } = new() { InterpolationOption=InterpolationOption.Straight };
public ChartOptions ChartOptions { get; set; } = new()
{
InterpolationOption = InterpolationOption.Straight
};


[Parameter]
public DateTime EndDate { get; set; } = DateTime.Today;

Expand Down Expand Up @@ -40,13 +45,14 @@
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();

var startDate = EndDate.AddDays(-1*Days);
loginChart = new() { Name = AppLocalization["Daily Logins"] };
uniqueUsersChart = new() { Name = AppLocalization["Daily Users"] };
var startDate = EndDate.AddDays(-1 * Days);
allDates = Enumerable.Range(0, (int)(EndDate - startDate).TotalDays + 1)
.Select(d => startDate.AddDays(d));
using (var context = await DbFactory.CreateDbContextAsync())
{

logonEntries = await context.LogonAuditLog.ToListAsync();


Expand Down
28 changes: 19 additions & 9 deletions BLAZAM/Pages/Groups/ConfirmNewGroup.razor
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
@inherits AppComponentBase
@inject NotificationGenerationService OUNotificationService
@inject NotificationGenerationService NotificationGenerationService

<AppPageTitle>Confirm Group Creation</AppPageTitle>
<AppPageTitle>@AppLocalization["Confirm Group Creation"]</AppPageTitle>

@if (Group != null)
{
<MudCard>
@Group.ADSPath

</MudCard>
<MudButton Disabled=@disableCreateGroupButton Color=Color.Success OnClick="CommitChanges">Create...</MudButton>
<MudButton Disabled=@disableCreateGroupButton Color=Color.Success OnClick="CommitChanges">
@AppLocalization["Create"]
</MudButton>
}
@code {

#nullable disable warnings
#nullable disable warnings

private bool disableCreateGroupButton = false;

Expand All @@ -33,20 +35,28 @@
createGroupJob.StopOnFailedStep = true;
createGroupJob.ShowJobDetailsDialog(MessageService);
var result = await Group.CommitChangesAsync(createGroupJob);

disableCreateGroupButton = false;
await InvokeAsync(StateHasChanged);
if (result.FailedSteps.Count == 0)
{
Group = (IADGroup)Directory.GetDirectoryEntryByDN(Group.DN);

SnackBarService.Success("Group created");
SnackBarService.Success(AppLocalization["Group created"]);
await AuditLogger.Group.Created(Group);
_ = OUNotificationService.PostAsync(Group, NotificationType.Create, CurrentUser.State);
if (DbFactory.DatabaseType == DatabaseType.SQLite)
{
await NotificationGenerationService.PostAsync(Group, NotificationType.Create, CurrentUser.State);

}
else
{
_= NotificationGenerationService.PostAsync(Group, NotificationType.Create, CurrentUser.State);

}
await Confirmed.InvokeAsync(Group);
}

}
}
}
Loading
Loading