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

Job Subsytem Added #170

Merged
merged 5 commits into from
Nov 26, 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
6 changes: 3 additions & 3 deletions BLAZAM.Tests/BLAZAM.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -10,8 +10,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
14 changes: 14 additions & 0 deletions BLAZAM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BLAZAMStatic", "BLAZAMStati
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BLAZAMThemes", "BLAZAMThemes\BLAZAMThemes.csproj", "{DB29B0EB-D78C-4554-8512-FF4E54451D14}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLAZAMJobs", "BLAZAMJobs\BLAZAMJobs.csproj", "{83C7C740-2ADD-4D51-BF66-2A74A191A53B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -270,6 +272,18 @@ Global
{DB29B0EB-D78C-4554-8512-FF4E54451D14}.Release|x64.Build.0 = Release|Any CPU
{DB29B0EB-D78C-4554-8512-FF4E54451D14}.Release|x86.ActiveCfg = Release|Any CPU
{DB29B0EB-D78C-4554-8512-FF4E54451D14}.Release|x86.Build.0 = Release|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Debug|x64.ActiveCfg = Debug|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Debug|x64.Build.0 = Debug|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Debug|x86.ActiveCfg = Debug|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Debug|x86.Build.0 = Debug|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Release|Any CPU.Build.0 = Release|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Release|x64.ActiveCfg = Release|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Release|x64.Build.0 = Release|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Release|x86.ActiveCfg = Release|Any CPU
{83C7C740-2ADD-4D51-BF66-2A74A191A53B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
27 changes: 18 additions & 9 deletions 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>0.8.5</AssemblyVersion>
<Version>2023.11.22.1330</Version>
<Version>2023.11.26.2319</Version>

<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand All @@ -24,6 +24,8 @@
<None Remove="nssm.exe" />
<None Remove="static\img\default_logo.png" />
<None Remove="static\img\default_logo2.png" />
<None Remove="static\img\default_logo3.png" />
<None Remove="static\img\default_logo4.png" />
</ItemGroup>


Expand All @@ -40,22 +42,28 @@
<Content Include="static\img\default_logo2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="static\img\default_logo3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="static\img\default_logo4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="BlazorTemplater" Version="1.5.1" />
<PackageReference Include="Cassia" Version="2.0.0.60" />
<PackageReference Include="Core.System.Configuration.Install" Version="1.1.0" />
<PackageReference Include="DuoUniversal" Version="1.2.1" />
<PackageReference Include="Google.Apis.Auth" Version="1.63.0" />
<PackageReference Include="Google.Apis.Auth" Version="1.64.0" />
<PackageReference Include="MailKit" Version="4.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.25" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.13" />
Expand All @@ -66,10 +74,10 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.13" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.14" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="7.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.16" />
<PackageReference Include="MudBlazor" Version="6.11.0" />
<PackageReference Include="MudBlazor" Version="6.11.1" />
<PackageReference Include="MudBlazor.Markdown" Version="0.1.2" />
<PackageReference Include="MudBlazor.ThemeManager" Version="1.0.8" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand All @@ -94,6 +102,7 @@
<ProjectReference Include="..\BLAZAMEmail\BLAZAMEmail.csproj" />
<ProjectReference Include="..\BLAZAMFileSystem\BLAZAMFileSystem.csproj" />
<ProjectReference Include="..\BLAZAMGui\BLAZAMGui.csproj" />
<ProjectReference Include="..\BLAZAMJobs\BLAZAMJobs.csproj" />
<ProjectReference Include="..\BLAZAMLocalization\BLAZAMLocalization.csproj" />
<ProjectReference Include="..\BLAZAMLoggers\BLAZAMLogger.csproj" />
<ProjectReference Include="..\BLAZAMNotifications\BLAZAMNotifications.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions BLAZAM/Pages/Computers/ViewComputer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
try
{
Computer.Delete();
SnackBarService.Success(Computer.CanonicalName + " has been deleted.", "Computer Deleted");
SnackBarService.Success(Computer.CanonicalName + " has been deleted.");

Nav.NavigateTo("/users/search");

Expand All @@ -210,11 +210,11 @@
}
async void SaveChanges()
{
if (await MessageService.Confirm("Are you sure you want to save the changes?", "Save Changes"))
if (await MessageService.Confirm("Are you sure you want to save the changes?"))
{
await Computer.CommitChangesAsync();
EditMode = false;
SnackBarService.Success("The changes made to this computer have been saved.", "Changes Saved");
SnackBarService.Success("The changes made to this computer have been saved.");
await RefreshEntryComponents();

}
Expand Down
2 changes: 1 addition & 1 deletion BLAZAM/Pages/Groups/ConfirmNewGroup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{
if (await MessageService.Confirm("Are you sure you want to create this OU?", "Create OU"))
{
Group.CommitChanges();
await Group.CommitChangesAsync();
SnackBarService.Success("Group created");
await Confirmed.InvokeAsync(Group);
Nav.NavigateTo("/groups/create",true);
Expand Down
12 changes: 8 additions & 4 deletions BLAZAM/Pages/Groups/ViewGroup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,19 @@
{
var changes = Group.Changes;

var dcr = Group.CommitChanges();
if (dcr.AssignedMembers.Count > 0)
var dcr = await Group.CommitChangesAsync();
if (dcr.FailedSteps.Count > 0)
{
foreach(var failedStep in dcr.FailedSteps)
{

SnackBarService.Error(failedStep.Name+": "+ failedStep.Exception.Message + " " + failedStep.Exception.InnerException.Message);
}
}
await AuditLogger.Group.Changed(Group, changes);

EditMode = false;
SnackBarService.Success("The changes made to this group have been saved.", "Changes Saved");
SnackBarService.Success("The changes made to this group have been saved.");
await InvokeAsync(StateHasChanged);

}
Expand All @@ -126,7 +130,7 @@
try
{
Group.Delete();
SnackBarService.Success(Group.CanonicalName + " has been deleted.", "Group Deleted");
SnackBarService.Success(Group.CanonicalName + " has been deleted.");

//Group = null;
Nav.NavigateTo("/groups/search");
Expand Down
2 changes: 1 addition & 1 deletion BLAZAM/Pages/OU/ConfirmNewOU.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{
if (await MessageService.Confirm("Are you sure you want to create this OU?", "Create OU"))
{
OU.CommitChanges();
await OU.CommitChangesAsync();
SnackBarService.Success("OU created");
await Confirmed.InvokeAsync(OU);
Nav.NavigateTo("/ou/create",true);
Expand Down
6 changes: 3 additions & 3 deletions BLAZAM/Pages/OU/ViewOU.razor
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
{
if (await MessageService.Confirm("Are you sure you want to save the changes?", "Save Changes"))
{
OU.CommitChanges();
await OU.CommitChangesAsync();
EditMode = false;
SnackBarService.Success("The changes made to this ou have been saved.", "Changes Saved");
SnackBarService.Success("The changes made to this ou have been saved.");
await InvokeAsync(StateHasChanged);

}
Expand All @@ -70,7 +70,7 @@
try
{
OU.Delete();
SnackBarService.Success(OU.CanonicalName + " has been deleted.", "OU Deleted");
SnackBarService.Success(OU.CanonicalName + " has been deleted.");


Nav.NavigateTo("/ou/search");
Expand Down
4 changes: 2 additions & 2 deletions BLAZAM/Pages/Printers/ViewPrinter.razor
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
try
{
Printer.Delete();
SnackBarService.Success(Printer.CanonicalName + " has been deleted.", "Printer Deleted");
SnackBarService.Success(Printer.CanonicalName + " has been deleted.");

Nav.NavigateTo("/search");

Expand All @@ -177,7 +177,7 @@
{
await Printer.CommitChangesAsync();
EditMode = false;
SnackBarService.Success("The changes made to this computer have been saved.", "Changes Saved");
SnackBarService.Success("The changes made to this printer have been saved.");
await RefreshEntryComponents();

}
Expand Down
Loading
Loading