Skip to content

Commit

Permalink
Merge pull request #484 from Blazam-App/v1-Nightly
Browse files Browse the repository at this point in the history
V1 Release
  • Loading branch information
jacobsen9026 authored Aug 9, 2024
2 parents 84050fa + e6e5d27 commit 7a7e5ef
Show file tree
Hide file tree
Showing 238 changed files with 15,763 additions and 1,864 deletions.
3 changes: 3 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ changelog:
- title: Exciting New Features 🎉
labels:
- enhancement
- title: Security Updates 🔐
labels:
- security
- title: Fixes 🏗
labels:
- bug
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build v1 Dev
name: Build Dev v1

on:
workflow_dispatch:
Expand All @@ -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 8
uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -68,10 +61,10 @@ jobs:
- name: Update dev release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'Dev1'
name: 'Dev1'
name: 'v1-Dev'
prerelease: true
body: This release is highly unstable. Expect bugs and crashes on this branch. Developers Only!
files: |
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build v1 Nightly
name: Build Nightly

on:
workflow_dispatch:
Expand All @@ -10,22 +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:
dotnet-version: 6.x
- name: Setup .NET Core SDK 8
uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -70,10 +60,10 @@ jobs:
- name: Update nightly release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'Nightly1'
name: 'Nightly1'
name: 'v1-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.
files: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ name: Build and deploy ASP.Net Core app to Azure Web App - blazam
on:
push:
branches:
- Beta-Nightly
- v1-Nightly
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
permissions: write-all

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.x
- name: Setup .NET Core SDK 8
uses: actions/setup-dotnet@v1
with:
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 }}
7 changes: 4 additions & 3 deletions .github/workflows/release-stable.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish and Release v1 Stable
name: Publish and Release Stable

on:
workflow_dispatch:
Expand All @@ -10,6 +10,7 @@ on:
jobs:
build:
runs-on: windows-latest
permissions: write-all


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

with:
tag_name: Release-v${{ env.ASSEMBLY_VERSION }}
Expand All @@ -60,7 +61,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
8 changes: 2 additions & 6 deletions BLAZAM.Tests/BLAZAM.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
1 change: 1 addition & 0 deletions BLAZAM/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

<MudThemeProvider IsDarkMode="@darkMode" Theme="@activeTheme.Theme" />
<MudDialogProvider />
<MudPopoverProvider />
<MudSnackbarProvider />

<SessionExpirationWarningProvider />
Expand Down
52 changes: 27 additions & 25 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>1.0.0</AssemblyVersion>
<Version>2024.06.14.2332</Version>
<Version>2024.08.09.1713</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,35 +56,31 @@
<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="MailKit" Version="4.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
<PackageReference Include="DuoUniversal" Version="1.2.5" />
<PackageReference Include="MailKit" Version="4.7.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.6" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.7" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.2" />
<PackageReference Include="MudBlazor.Markdown" Version="0.1.3" />
<PackageReference Include="MudBlazor.ThemeManager" Version="1.0.9" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.3" />
<PackageReference Include="MudBlazor" Version="7.6.0" />
<PackageReference Include="MudBlazor.Markdown" Version="1.0.2" />
<PackageReference Include="MudBlazor.ThemeManager" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Octokit" Version="11.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Octokit" Version="13.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.2" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0" />

<PackageReference Include="System.DirectoryServices.AccountManagement" Version="8.0.0" />
Expand All @@ -110,9 +106,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 +152,4 @@
<Exec Condition="'$(Configuration)' == 'Debug'" Command="powershell -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\IncrementBuildNumber.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
</Target>
</Project>

3 changes: 2 additions & 1 deletion BLAZAM/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
global using BLAZAM.Logger;
global using BLAZAM.FileSystem;
global using BLAZAM.Helpers;
global using BLAZAM.Common.Exceptions;
global using BLAZAM.Services.Background;


43 changes: 25 additions & 18 deletions BLAZAM/Middleware/HttpsRedirectionMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using BLAZAM.Database.Context;
using BLAZAM.Common.Data;
using BLAZAM.Database.Context;
using BLAZAM.Services.Background;

namespace BLAZAM.Server.Middleware
Expand All @@ -7,41 +8,47 @@ public class HttpsRedirectionMiddleware
{
private readonly RequestDelegate _next;
private readonly ConnMonitor _monitor;
private readonly ApplicationInfo _applicationInfo;

public HttpsRedirectionMiddleware(
RequestDelegate next,
ConnMonitor monitor)
ConnMonitor monitor,
ApplicationInfo applicationInfo)
{
_next = next;
_monitor = monitor;
_applicationInfo = applicationInfo;
}

public async Task InvokeAsync(HttpContext context)
{
bool forceHttps;
// If the value is not cached, retrieve it from the database.

try
{
forceHttps = DatabaseCache.ApplicationSettings.ForceHTTPS;
}catch (NullReferenceException ex)
if (_applicationInfo.InstallationCompleted)
{
Loggers.SystemLogger.Warning("Error while checking database cache for Force HTTPS {@Error}", ex);
forceHttps = false;
}
try
{
forceHttps = DatabaseCache.ApplicationSettings.ForceHTTPS;
}
catch (NullReferenceException ex)
{
Loggers.SystemLogger.Warning("Error while checking database cache for Force HTTPS {@Error}", ex);
forceHttps = false;
}




// If the ForceHttps flag is set to true, redirect to HTTPS.
if (forceHttps
&& !context.Request.IsHttps)
{
string httpsUrl = "https://" + context.Request.Host + context.Request.Path;
context.Response.Redirect(httpsUrl);
return;
}
// If the ForceHttps flag is set to true, redirect to HTTPS.
if (forceHttps
&& !context.Request.IsHttps)
{
string httpsUrl = "https://" + context.Request.Host + context.Request.Path;
context.Response.Redirect(httpsUrl);
return;
}

}
// If the ForceHttps flag is not set or if the request is already HTTPS, proceed with the request.
await _next(context);
}
Expand Down
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
Loading

0 comments on commit 7a7e5ef

Please sign in to comment.