Skip to content

Commit

Permalink
Merge branch 'develop' into nb/deleteresfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikApption authored Nov 28, 2024
2 parents 5901585 + a888eef commit 0723793
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 71 deletions.
11 changes: 9 additions & 2 deletions Datahub.sln
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Datahub.Functions.UnitTests
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Datahub.Functions.Domain", "ServerlessOperations\src\Datahub.Functions.Domain\Datahub.Functions.Domain.csproj", "{DB462B58-CFC4-4AEE-920E-AA308F14029C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Pipelines", "Pipelines", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
ProjectSection(SolutionItems) = preProject
pipelines\ado-dsd-fsdh-dev-ci-linux.yml = pipelines\ado-dsd-fsdh-dev-ci-linux.yml
pipelines\fsdh-portal-tests.yml = pipelines\fsdh-portal-tests.yml
pipelines\fsdh-resource-provisioner-tests.yml = pipelines\fsdh-resource-provisioner-tests.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -348,9 +355,9 @@ Global
{DB462B58-CFC4-4AEE-920E-AA308F14029C} = {8620F501-1D36-439E-9BF0-3BBEFB84DC56}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9DC4B901-16FF-4FF2-9ED6-B286EA17048E}
RESX_AutoCreateNewLanguageFiles = True
RESX_ConfirmAddLanguageFile = True
RESX_AutoCreateNewLanguageFiles = True
SolutionGuid = {9DC4B901-16FF-4FF2-9ED6-B286EA17048E}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Shared\src\Datahub.Shared\Datahub.Shared.projitems*{57703cec-08b9-40b8-b5e2-064a196b1587}*SharedItemsImports = 5
Expand Down
25 changes: 21 additions & 4 deletions Portal/src/Datahub.Portal/Pages/Public/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,26 @@
</strong>
</MudText>
<div class="form-group" style="width: 100%">
<MudTextField Class="form-control" InputId="Email" For="() => loginModel.Email" Variant="Variant.Outlined" @bind-Value="loginModel.Email" Label="@Localizer["Email"]" Required="true" RequiredError="@Localizer["Email is required"]" FullWidth="true" />
<MudTextField Class="form-control" InputId="Email" For="() => loginModel.Email" Variant="Variant.Outlined"
@bind-Value="loginModel.Email" Label="@Localizer["Email"]" Required="true"
RequiredError="@Localizer["Email is required"]" FullWidth="true"/>
</div>
<MudButton Class="px-16 my-2" ButtonType="ButtonType.Submit" Variant="Variant.Filled" Color="Color.Primary" Disabled="_loggingIn">
<div class="form-group">
<MudCheckBox T="bool"
@bind-Value="loginModel.Agreement"
Required
RequiredError=@Localizer["Agreement with the Terms and conditions is required"]>
<MudText Typo="Typo.body1">
@Localizer["I agree to the "]
<MudLink Href="@Localizer[PageRoutes.TermsAndConditions]" Typo="Typo.body1" Target="_blank">
@Localizer["Terms and conditions"]
</MudLink>
@Localizer[" of use for FSDH"]
</MudText>
</MudCheckBox>
</div>
<MudButton Class="px-16 my-2" ButtonType="ButtonType.Submit" Variant="Variant.Filled" Color="Color.Primary"
Disabled="@(_loggingIn || String.IsNullOrWhiteSpace(loginModel.Email) || !loginModel.Agreement)">
<MudText>
@(_loggingIn ? Localizer["Logging in..."] : Localizer["Login"])
</MudText>
Expand All @@ -31,7 +48,7 @@
</EditForm>

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

private LoginModel loginModel = new LoginModel();
private bool _loggingIn;
Expand Down Expand Up @@ -60,7 +77,6 @@

var url = $"{_navigationManager.BaseUri}MicrosoftIdentity/Account/Challenge?redirectUri={redirectUri}&scope=user.read%20openid%20offline_access%20profile&loginHint={loginHint}&domainHint=&claims=&policy=";
_navigationManager.NavigateTo(url, true);

}

protected override async Task OnInitializedAsync()
Expand All @@ -81,6 +97,7 @@
public class LoginModel
{
public string Email { get; set; }
public bool Agreement { get; set; }
}

}
2 changes: 1 addition & 1 deletion Portal/src/Datahub.Portal/Pages/Public/RegisterPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<MudLink Href="@Localizer[PageRoutes.TermsAndConditions]" Typo="Typo.body1" Target="_blank">
@Localizer["Terms and conditions"]
</MudLink>
@Localizer[" of use for the FSDH Trial"]
@Localizer[" of use for the FSDH"]
</MudText>

</MudCheckBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
base.OnParametersSet();

if (PercentBudgetSpent <= 100) return;

_logger.LogWarning("PercentBudgetSpent is greater than 100. Setting to 100.");
PercentBudgetSpent = 100;
}
Expand Down
18 changes: 3 additions & 15 deletions Portal/src/Datahub.Portal/i18n/localization.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
" is the default role and has only read access to all resources within your project.": " est le rôle par défaut et n'a qu'un accès en lecture à toutes les ressources de votre projet.",
" is the role that you will want to give to most of your colleagues. It gives them read/write access to most of your resources.": " est le rôle que vous voudrez donner à la plupart de vos collègues. Il leur donne un accès en lecture/écriture à la plupart de vos ressources.",
" must always be the first YAML statement in the file.": " doit toujours être la première déclaration YAML dans le fichier.",
" of use for FSDH": " d'utilisation pour le DHSF",
" of use for the FSDH Proof-of-Concept Phase 2": " d'utilisation pour la phase 2 de la démonstration de concept du DHSF",
" of use for the FSDH Trial": " d'utilisation pour l'essai DHSF",
" other than 80 and 8080 will be ignored.": " autre que 80 et 8080 seront ignoré.",
Expand Down Expand Up @@ -1907,7 +1908,6 @@
"Please complete the following information to create a new workspace": "Veuillez remplir les informations suivantes pour créer un nouvel espace de travail",
"Please confirm the following. If you see any errors, use the Previous button to change them. Otherwise, click Submit to submit your ticket.": "Veuillez confirmer le contenu suivant. Si vous voyez des erreurs, utilisez le bouton Précédent pour les modifier. Sinon, cliquez sur Soumettre pour soumettre votre demande.",
"Please contact [email protected] to unlock your account.": "Veuillez contacter [email protected] pour déverrouiller votre compte.",
"Account Locked - Federal Science DataHub": "Compte verrouillé - DataHub scientifique fédéral",
"Please contact [email protected] if you have questions or require additional information.": "Veuillez contacter [email protected] si vous avez des questions ou si vous avez besoin d'informations supplémentaires.",
"Please contact the Datahub Admins to change Workspace Leads.": "Veuillez contacter les administrateurs de Datahub pour changer le responsable de l'espace de travail.",
"Please contact the workspace administrators for access or to share repositories.": "Veuillez contacter les administrateurs de l'espace de travail pour accéder à l'espace de travail ou pour partager des dépôts.",
Expand Down Expand Up @@ -2499,7 +2499,7 @@
"Terms &amp; Conditions": "Conditions générales",
"Terms and Conditions": "Conditions générales",
"Terms and Conditions - Federal Science DataHub": "Conditions générales - DataHub scientifique fédéral",
"Terms and conditions": "modalités et conditions",
"Terms and conditions": "Conditions générales",
"TermsAndConditions": "Conditions générales",
"TermsOfUse": "Modalités d’utilisation",
"Test": "Test",
Expand Down Expand Up @@ -2974,17 +2974,5 @@
"{0} credits consumed yesterday": "{0} crédits consommés hier",
"{0} is already added to your workspace": "{0} est déjà ajouté à votre espace de travail",
"{0} remaining credits of {1}": "{0} crédits restant de {1}",
"{0} successfully added to your workspace": "{0} ajouté avec succès à votre espace de travail",
"Changes to workspace have been saved": "Les modifications apportées à l'espace de travail ont été enregistrées",
"Queued Terraform update for workspace changes": "Mise à jour Terraform enfiler pour les modifications de l'espace de travail",
"Prevent auto-delete": "Empêcher la suppression automatique",
"This setting will prevent the workspace from being automatically deleted after a period of inactivity or from going over budget": "Ce paramètre empêchera l'espace de travail d'être automatiquement supprimé après une période d'inactivité ou lors du dépassement du budget",
"Email is required": "L'adresse courriel est requise",
"Invalid email": "Courriel invalide",
"Logging in...": "Connexion...",
"filename": "Nom de fichier",
"lastmodifiedts": "Dernière modification",
"filesize": "Taille du fichier",
"fileformat": "Format de fichier",
"folderpath": "Chemin du dossier"
"{0} successfully added to your workspace": "{0} ajouté avec succès à votre espace de travail"
}
39 changes: 2 additions & 37 deletions Portal/src/Datahub.Portal/i18n/localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
" is the default role and has only read access to all resources within your project.": " is the default role and has only read access to all resources within your project.",
" is the role that you will want to give to most of your colleagues. It gives them read/write access to most of your resources.": " is the role that you will want to give to most of your colleagues. It gives them read/write access to most of your resources.",
" must always be the first YAML statement in the file.": " must always be the first YAML statement in the file.",
" of use for FSDH": " of use for FSDH",
" of use for the FSDH Trial": " of use for the FSDH Trial",
" other than 80 and 8080 will be ignored.": " other than 80 and 8080 will be ignored.",
" section of the resources.": " section of the resources.",
Expand Down Expand Up @@ -1211,7 +1212,6 @@
"Please complete the following information to create a new workspace": "Please complete the following information to create a new workspace",
"Please confirm the following. If you see any errors, use the Previous button to change them. Otherwise, click Submit to submit your ticket.": "Please confirm the following. If you see any errors, use the Previous button to change them. Otherwise, click Submit to submit your ticket.",
"Please contact [email protected] to unlock your account.": "Please contact [email protected] to unlock your account.",
"Account Locked - Federal Science DataHub": "Account Locked - Federal Science DataHub",
"Please contact [email protected] if you have questions or require additional information.": "Please contact [email protected] if you have questions or require additional information.",
"Please contact the Datahub Admins to change Workspace Leads.": "Please contact the Datahub Admins to change Workspace Leads.",
"Please contact the workspace administrators for access or to share repositories.": "Please contact the workspace administrators for access or to share repositories.",
Expand Down Expand Up @@ -2037,40 +2037,5 @@
"{0} credits consumed yesterday": "{0} credits consumed yesterday",
"{0} is already added to your workspace": "{0} is already added to your workspace",
"{0} remaining credits of {1}": "{0} remaining credits of {1}",
"{0} successfully added to your workspace": "{0} successfully added to your workspace",
"About this site": "About this site",
"Toggle sidebar open or closed.": "Toggle sidebar open or closed.",
"Clicking this will reduce or increase the sidebar.": "Clicking this will reduce or increase the sidebar.",
"Quality Control | Unclassified": "Quality Control | Unclassified",
"Sign out": "Sign out",
"Create a new workspace": "Create a new workspace",
"Create workspace": "Create workspace",
"Open workspace": "Open workspace",
"View resources": "View resources",
"Quick links": "Quick links",
"Initializing profile...": "Initializing profile...",
"Profile of": "Profile of",
"View all achievements": "View all achievements",
"Click here once the form is complete to register": "Click here once the form is complete to register",
"View reports": "View reports",
"View storage": "View storage",
"You must acknowledge and check all \u003Cstrong\u003EMandatory Release Criteria\u003C/strong\u003E boxes before submitting.": "You must acknowledge and check all \u003Cstrong\u003EMandatory Release Criteria\u003C/strong\u003E boxes before submitting.",
"Workspace Details": "Workspace Details",
"Post definition to Service Bus": "Post definition to Service Bus",
"Upgrade Workspace to Latest": "Upgrade Workspace to Latest",
"Definition sent to Service Bus": "Definition sent to Service Bus",
"Upgrade request sent to Service Bus": "Upgrade request sent to Service Bus",
"Changes to workspace have been saved": "Changes to workspace have been saved",
"Queued Terraform update for workspace changes": "Queued Terraform update for workspace changes",
"Prevent auto-delete": "Prevent auto-delete",
"This setting will prevent the workspace from being automatically deleted after a period of inactivity or from going over budget": "This setting will prevent the workspace from being automatically deleted after a period of inactivity or from going over budget",
"Email is required": "Email is required",
"Invalid email": "Invalid email",
"Logging in...": "Logging in...",
"{0} successfully added to your workspace": "{0} successfully added to your workspace",
"filename": "File Name",
"lastmodifiedts": "Last Modified",
"filesize": "File Size",
"fileformat": "File Format",
"folderpath": "Folder Path"
"{0} successfully added to your workspace": "{0} successfully added to your workspace"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion Portal/test/Datahub.Specs/Datahub.Specs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>cce3a628-1e77-4f9d-9d6e-247ef30bfaf7</UserSecretsId>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.*" />
<PackageReference Include="Microsoft.Playwright.NUnit" Version="1.44.0" />
<PackageReference Include="Microsoft.Playwright.NUnit" Version="1.49.0" />
<PackageReference Include="Playwright.Axe" Version="1.3.0" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
Expand Down
8 changes: 8 additions & 0 deletions Portal/test/Datahub.Specs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Playwright project

This project is a Playwright project with C# and SpecFlow.
It features end to end tests that use the Playwright library to interact with the browser and validate assertions.

## Pipeline

The pipeline tests for this project are configured in `datahub-portal\pipelines\fsdh-portal-tests.yml` and are disabled because authentication in pipelines has not been resolved yet.
16 changes: 8 additions & 8 deletions pipelines/fsdh-portal-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ steps:
testRunTitle: 'Datahub Specflow Tests'
arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code Coverage"'

- task: DotNetCoreCLI@2
displayName: 'Datahub Specs Tests'
condition: succeededOrFailed()
inputs:
command: 'test'
projects: 'Portal/test/Datahub.Specs/Datahub.Specs.csproj'
testRunTitle: 'Datahub Specs Tests'
arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code Coverage"'
# - task: DotNetCoreCLI@2
# displayName: 'Datahub Specs Playwright Tests'
# condition: succeededOrFailed()
# inputs:
# command: 'test'
# projects: 'Portal/test/Datahub.Specs/Datahub.Specs.csproj'
# testRunTitle: 'Datahub Specs Tests'
# arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code Coverage"'

- task: DotNetCoreCLI@2
displayName: 'Datahub Unit Tests'
Expand Down

0 comments on commit 0723793

Please sign in to comment.