Skip to content

Commit

Permalink
Merge pull request #441 from Blazam-App/Beta-Nightly
Browse files Browse the repository at this point in the history
v0.9.4 Update
  • Loading branch information
jacobsen9026 authored Jul 23, 2024
2 parents 3fd3ae6 + a387318 commit f721e98
Show file tree
Hide file tree
Showing 123 changed files with 14,328 additions and 677 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,11 @@ on:
jobs:
build:
runs-on: windows-latest

permissions: write-all

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache Nuget Packages
uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core SDK 6
uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -72,9 +65,9 @@ jobs:
- name: Update dev release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: Dev
tag_name: 'Dev'
name: 'Dev'
prerelease: true
body: This release is highly unstable. Expect bugs and crashes on this branch. Developers Only!
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ on:
jobs:
build:
runs-on: windows-latest
permissions: write-all


steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache Nuget Packages
uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core SDK 6
uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -70,9 +64,9 @@ jobs:
- name: Update nightly release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: Nightly
tag_name: 'Nightly'
name: 'Nightly'
prerelease: true
body: This release is always the latest nightly release. These versions are unstable and may break your application. You've been warned.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
jobs:
build:
runs-on: windows-latest
permissions: write-all

steps:
- uses: actions/checkout@v2
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/mark-stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Close inactive issues
on:
workflow_dispatch:
schedule:
- cron: "30 1 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 14
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 14 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/release-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
build:
runs-on: windows-latest
permissions: write-all


steps:
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

with:
tag_name: Stable-v${{ env.ASSEMBLY_VERSION }}
Expand All @@ -64,7 +65,7 @@ jobs:
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: blazam-stable-v${{ env.ASSEMBLY_VERSION }}.zip
Expand Down
68 changes: 34 additions & 34 deletions BLAZAM.Tests/Updates/UpdateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,44 @@ namespace BLAZAM.Tests.Updates
public class UpdateTests
{
readonly Mock_UpdateService _updateService = new();
[Fact]
public async void Update_Returns_Data()
{
var latest = await _updateService.GetUpdates();
Assert.NotNull(latest);
}
[Fact]
public async void Updat_Returns_ValidVersion()
{
var latest = await _updateService.GetUpdates();
//[Fact]
//public async void Update_Returns_Data()
//{
// var latest = await _updateService.GetUpdates();
// Assert.NotNull(latest);
//}
//[Fact]
//public async void Updat_Returns_ValidVersion()
//{
// var latest = await _updateService.GetUpdates();

Assert.NotNull(latest?.Version);
}
[Fact]
public async void Update_Returns_ValidDownload()
{
var latest = await _updateService.GetUpdates();
if (latest != null)
await latest.Download(null);
// Assert.NotNull(latest?.Version);
//}
//[Fact]
//public async void Update_Returns_ValidDownload()
//{
// var latest = await _updateService.GetUpdates();
// if (latest != null)
// await latest.Download(null);

Assert.True(latest?.UpdateFile.Exists);
await Update_Stages_OK(latest);
await Update_Cleanup_OK(latest);
}
private async Task Update_Stages_OK(ApplicationUpdate latest)
{
// Assert.True(latest?.UpdateFile.Exists);
// await Update_Stages_OK(latest);
// await Update_Cleanup_OK(latest);
//}
//private async Task Update_Stages_OK(ApplicationUpdate latest)
//{

await latest.ExtractFiles(null);
Assert.True(latest.UpdateStagingDirectory.Files.Count > 2);
// await latest.ExtractFiles(null);
// Assert.True(latest.UpdateStagingDirectory.Files.Count > 2);

}
private async Task Update_Cleanup_OK(ApplicationUpdate latest)
{
//}
//private async Task Update_Cleanup_OK(ApplicationUpdate latest)
//{

await latest.CleanStaging(null);
latest.UpdateFile.Delete();
Assert.True(!latest.UpdateFile.Exists);
Assert.True(latest.UpdateStagingDirectory.Files.Count == 0);
}
// await latest.CleanStaging(null);
// latest.UpdateFile.Delete();
// Assert.True(!latest.UpdateFile.Exists);
// Assert.True(latest.UpdateStagingDirectory.Files.Count == 0);
//}
}
}
34 changes: 20 additions & 14 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>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>0.9.3</AssemblyVersion>
<Version>2024.06.09.1748</Version>
<AssemblyVersion>0.9.4</AssemblyVersion>
<Version>2024.07.23.0006</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand All @@ -29,7 +29,7 @@
<None Remove="static\img\default_logo5.png" />
</ItemGroup>





Expand All @@ -56,19 +56,19 @@
<ItemGroup>
<PackageReference Include="BlazorTemplater" Version="1.5.1" />
<PackageReference Include="Cassia" Version="2.0.0.60" />
<PackageReference Include="DuoUniversal" Version="1.2.4" />
<PackageReference Include="DuoUniversal" Version="1.2.5" />
<PackageReference Include="MailKit" Version="4.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.30" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.30" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.30" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.30" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.19">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.20">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down Expand Up @@ -110,9 +110,14 @@
</ItemGroup>

<ItemGroup>
<Content Include="static\img\default_logo5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="static\img\default_logo5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<None Include="..\BLAZAMGui\UI\Settings\JobsMonitor.razor" Link="JobsMonitor.razor" />
<None Include="..\BLAZAMGui\UI\Settings\Notifications\EditNotificationSubscriptionRow.razor" Link="EditNotificationSubscriptionRow.razor" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -151,3 +156,4 @@
<Exec Condition="'$(Configuration)' == 'Debug'" Command="powershell -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\IncrementBuildNumber.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
</Target>
</Project>

3 changes: 3 additions & 0 deletions BLAZAM/Pages/Browse/ViewDirectoryEntry.razor
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
case ActiveDirectoryObjectType.Printer:
<ViewPrinter DirectoryEntry="DirectoryEntry" />
break;
case ActiveDirectoryObjectType.BitLocker:
<ViewBitLocker DirectoryEntry="DirectoryEntry" />
break;
}
</CascadingValue>
<AppModal Title=@AppLocalization["Change History"] @ref=@ChangeHistoryModal Options=@(new DialogOptions(){FullWidth=true,MaxWidth=MaxWidth.ExtraExtraLarge})>
Expand Down
40 changes: 40 additions & 0 deletions BLAZAM/Pages/Computers/BitLockerViewer.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@inherits AppComponentBase
<Section Title=@AppLocalization["BitLocker"]>

<MudStack Row=true Class="@Class">
<MudDataGrid T=IADBitLockerRecovery Items="_recoveries">
<Columns>
<PropertyColumn Property="x=>x.RecoveryId" Title="@AppLocalization["Recovery Id"]" />
<PropertyColumn Property="x=>x.RecoveryPassword" Title="@AppLocalization["Recovery Password"]" />
</Columns>
</MudDataGrid>

</MudStack>
</Section>

@code{
[Parameter]
public string Class{ get; set; }

private IADComputer _computer;
[Parameter]
public IADComputer Computer{ get=>_computer; set
{
if (_computer == value) return;
_computer = value;
GetRecoveries();

} }

List<IADBitLockerRecovery> _recoveries = new();

protected override async Task OnInitializedAsync(){
await base.OnInitializedAsync();


}
private async void GetRecoveries(){
_recoveries = await Computer.GetBitLockerRecoveryAsync();
await InvokeAsync(StateHasChanged);
}
}
40 changes: 40 additions & 0 deletions BLAZAM/Pages/Computers/ViewBitLocker.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@using BLAZAM.Gui.UI.Computers
@inherits DirectoryEntryViewBase
@{
string _fieldMudStackClasses = "flex-wrap gap-10";
}


<BitLockerViewer Computer="_computer"/>
<MudOverlay Visible="LoadingData" DarkBackground="true" Absolute="true">
<MudProgressCircular Color="Color.Secondary" Indeterminate="true" />
</MudOverlay>









@code {
IADBitLockerRecovery? BitLocker=> DirectoryEntry as IADBitLockerRecovery;
List<IADBitLockerRecovery> _recoveries = new();
IADComputer _computer;
protected override async Task OnInitializedAsync()
{

await base.OnInitializedAsync();
await InvokeAsync(StateHasChanged);


_computer = (IADComputer)BitLocker.GetParent();

LoadingData = false;
await RefreshEntryComponents();
}



}
Loading

0 comments on commit f721e98

Please sign in to comment.