Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion .github/workflows/CodeQuality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'

- name: add Github nuget feed
run: dotnet nuget add source https://nuget.pkg.github.com/STARIONGROUP/index.json -n StarionGithubFeed -u STARIONGROUP -p ${{ secrets.PACKAGE_TOKEN }} --store-password-in-clear-text
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nuget-reference-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup .NET Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: add Starion GitHub nuget feed
run: dotnet nuget add source https://nuget.pkg.github.com/STARIONGROUP/index.json -n StarionGithubFeed -u STARIONGROUP -p ${{ secrets.PACKAGE_TOKEN }} --store-password-in-clear-text
Expand Down
10 changes: 5 additions & 5 deletions COMET.Web.Common.Test/COMET.Web.Common.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>Latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Title>CDP4 WEB Common Test</Title>
Expand Down Expand Up @@ -29,14 +29,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="bunit.web" Version="1.36.0" />
<PackageReference Include="DevExpress.Blazor" Version="23.2.9" />
<PackageReference Include="bunit.web" Version="1.38.5" />
<PackageReference Include="DevExpress.Blazor" Version="23.2.11" />
<PackageReference Include="Moq" Version="4.20.72" />
</ItemGroup>

<ItemGroup Label="override transitive vulnerable dependency">
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Include="System.Text.Json" Version="9.0.2" />
<PackageReference Include="System.Formats.Asn1" Version="9.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions COMET.Web.Common.Tests/COMET.Web.Common.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Description>Unit tests for the COMET Web Common Library</Description>
<Company>Starion Group S.A.</Company>
Expand Down Expand Up @@ -46,25 +46,25 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="bunit" Version="1.36.0" />
<PackageReference Include="bunit" Version="1.38.5" />
<PackageReference Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="RichardSzalay.MockHttp" Version="7.0.0" />
</ItemGroup>

<ItemGroup Label="override transitive vulnerable dependency">
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions COMET.Web.Common.Tests/Components/LoginTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public void Setup()
this.context = new TestContext();
this.viewModel = new LoginViewModel(this.authenticationService.Object, this.serverConnectionService.Object);
this.context.Services.AddSingleton(this.viewModel);
this.context.Services.AddSingleton(this.authenticationService.Object);
this.context.ConfigureDevExpressBlazor();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ namespace COMET.Web.Common.Tests.Extensions
{
using System.Reflection;

using Blazored.SessionStorage;

using COMET.Web.Common.Extensions;
using COMET.Web.Common.Services.SessionManagement;

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.JSInterop;

using Moq;

Expand All @@ -49,6 +52,8 @@ public void VerifyServerRegistration()
serviceCollection.AddScoped(_ => new HttpClient());
serviceCollection.AddLogging();
serviceCollection.RegisterCdp4CometCommonServices(globalOptions: _ => { });
serviceCollection.AddBlazoredSessionStorage();
serviceCollection.AddSingleton(new Mock<IJSRuntime>().Object);
var serviceProvider = serviceCollection.BuildServiceProvider();

foreach (var service in serviceCollection.Where(x => x.ServiceType.Assembly == Assembly.GetAssembly(typeof(ISessionService))))
Expand All @@ -64,6 +69,8 @@ public void VerifyWebAssemblyRegistration()
serviceCollection.AddScoped(_ => new HttpClient());
serviceCollection.AddLogging();
serviceCollection.RegisterCdp4CometCommonServices(false,globalOptions: _ => { });
serviceCollection.AddBlazoredSessionStorage();
serviceCollection.AddSingleton(new Mock<IJSRuntime>().Object);
var serviceProvider = serviceCollection.BuildServiceProvider();

foreach (var service in serviceCollection.Where(x => x.ServiceType.Assembly == Assembly.GetAssembly(typeof(ISessionService))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

namespace COMET.Web.Common.Tests.Services.SessionManagement
{
using Blazored.SessionStorage;

using CDP4Dal;
using CDP4Dal.DAL;

Expand All @@ -45,18 +47,20 @@ public class AuthenticationServiceTestFixture
private CometWebAuthStateProvider cometWebAuthStateProvider;
private AuthenticationService authenticationService;
private AuthenticationDto authenticationDto;
private Mock<ISessionStorageService> sessionStorageService;

[SetUp]
public void SetUp()
{
this.session = new Mock<ISession>();
this.sessionService = new Mock<ISessionService>();
this.sessionStorageService = new Mock<ISessionStorageService>();

this.sessionService.Setup(x => x.Session).Returns(this.session.Object);
this.sessionService.Setup(x => x.IsSessionOpen).Returns(false);

this.cometWebAuthStateProvider = new CometWebAuthStateProvider(this.sessionService.Object);
this.authenticationService = new AuthenticationService(this.sessionService.Object, this.cometWebAuthStateProvider);
this.authenticationService = new AuthenticationService(this.sessionService.Object, this.cometWebAuthStateProvider, this.sessionStorageService.Object);

this.authenticationDto = new AuthenticationDto
{
Expand Down
5 changes: 5 additions & 0 deletions COMET.Web.Common/App.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ private void RedirectToHomePage()
/// <param name="navigationContext">The <see cref="NavigationContext" /></param>
private async Task OnNavigate(NavigationContext navigationContext)
{
if (navigationContext.Path.StartsWith("callback") || navigationContext.Path.StartsWith("/callback"))
{
return;
}

switch (navigationContext.Path)
{
case "":
Expand Down
152 changes: 75 additions & 77 deletions COMET.Web.Common/COMET.Web.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,84 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>

<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>Latest</LangVersion>
<Version>5.2.0</Version>
<AssemblyVersion>5.2.0</AssemblyVersion>
<FileVersion>5.2.0</FileVersion>
<Title>CDP4 WEB Common</Title>
<Description>A Common Library for any Blazor based application related to ECSS-E-TM-10-25</Description>
<Company>Starion Group S.A.</Company>
<Copyright>Copyright 2023-2024 Starion Group S.A.</Copyright>
<PackageId>CDP4.WEB.Common</PackageId>
<AssemblyTitle>COMET.WEB.Common</AssemblyTitle>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<Authors>Justine, Sam, Alex, Alexander, Antoine, Jaime, Nabil, Joao</Authors>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/STARIONGROUP/COMET-WEB-Community-Edition.git</RepositoryUrl>
<ImplicitUsings>enable</ImplicitUsings>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>cdp4-icon.png</PackageIcon>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReleaseNotes>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>Latest</LangVersion>
<Version>5.2.0</Version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this version needs to be bumped i think

<AssemblyVersion>5.2.0</AssemblyVersion>
<FileVersion>5.2.0</FileVersion>
<Title>CDP4 WEB Common</Title>
<Description>A Common Library for any Blazor based application related to ECSS-E-TM-10-25</Description>
<Company>Starion Group S.A.</Company>
<Copyright>Copyright 2023-2024 Starion Group S.A.</Copyright>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make it 2024-2025

<PackageId>CDP4.WEB.Common</PackageId>
<AssemblyTitle>COMET.WEB.Common</AssemblyTitle>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<Authors>Justine, Sam, Alex, Alexander, Antoine, Jaime, Nabil, Joao</Authors>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/STARIONGROUP/COMET-WEB-Community-Edition.git</RepositoryUrl>
<ImplicitUsings>enable</ImplicitUsings>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>cdp4-icon.png</PackageIcon>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReleaseNotes>
[Update] to CDP4-SDK 27.4.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDK version 28?

[Add] CacheService to cache reusable data inside one session
[Update] Open viewmodel such that last selected EngineeringModel, Iteration and Domain is preselected
</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AsyncEnumerator" Version="4.0.2" />
<PackageReference Include="Blazored.FluentValidation" Version="2.2.0" />
<PackageReference Include="CDP4ServicesDal-CE" Version="27.4.1" />
<PackageReference Include="CDP4Web-CE" Version="27.4.1" />
<PackageReference Include="DevExpress.Blazor" Version="23.2.9" />
<PackageReference Include="FastMember" Version="1.5.0" />
<PackageReference Include="FluentResults" Version="3.16.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="ReactiveUI" Version="20.1.63" />
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup Label="override transitive vulnerable dependency">
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
</ItemGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="..\cdp4-icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="COMET.Web.Common.Tests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
</ItemGroup>
<ItemGroup>
<Content Update="Components\BookEditor\InputEditor.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Update="wwwroot\DefaultTextConfiguration.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\server_configuration.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Remove="Components\SingleThingApplicationTemplate.razor" />
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="Components\Applications\ApplicationTemplate.razor" />
<_ContentIncludedByDefault Remove="Components\SingleThingApplicationTemplate.razor" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Remove="Components\Applications\ApplicationTemplate.razor" />
</ItemGroup>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AsyncEnumerator" Version="4.0.2" />
<PackageReference Include="Blazored.FluentValidation" Version="2.2.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.4.0" />
<PackageReference Include="CDP4ServicesDal-CE" Version="28.0.0" />
<PackageReference Include="CDP4Web-CE" Version="28.0.0" />
<PackageReference Include="DevExpress.Blazor" Version="23.2.11" />
<PackageReference Include="FastMember" Version="1.5.0" />
<PackageReference Include="FluentResults" Version="3.16.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.2" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="9.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.2" />
<PackageReference Include="ReactiveUI" Version="20.1.63" />
<PackageReference Include="System.Drawing.Common" Version="9.0.2" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.0.2" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>
<ItemGroup Label="override transitive vulnerable dependency">
<PackageReference Include="System.Formats.Asn1" Version="9.0.2" />
</ItemGroup>
<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="..\cdp4-icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="COMET.Web.Common.Tests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
</ItemGroup>
<ItemGroup>
<Content Update="Components\BookEditor\InputEditor.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Update="wwwroot\DefaultTextConfiguration.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\server_configuration.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Remove="Components\SingleThingApplicationTemplate.razor" />
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="Components\Applications\ApplicationTemplate.razor" />
<_ContentIncludedByDefault Remove="Components\SingleThingApplicationTemplate.razor" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Remove="Components\Applications\ApplicationTemplate.razor" />
</ItemGroup>
</Project>
Loading
Loading