diff --git a/.drone.yml b/.drone.yml index 53d61fd..fa3c0bf 100755 --- a/.drone.yml +++ b/.drone.yml @@ -19,10 +19,7 @@ steps: commands: - cd Blazor/ - dotnet restore Blazor.sln - - dotnet sonarscanner begin /k:MuscuMaths /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN} - - dotnet test Blazor.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - - reportgenerator -reports:"/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" -verbosity:Verbose - + - dotnet test Blazor.sln --no-restore depends_on: [build] - name: code-analysis @@ -30,8 +27,11 @@ steps: commands: - cd Blazor/ - dotnet restore Blazor.sln + - dotnet sonarscanner begin /k:MuscuMaths /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" - dotnet sonarscanner begin /k:MuscuMaths /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN} - dotnet build Blazor.sln -c Release --no-restore + - dotnet test Blazor.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" -verbosity:Verbose - dotnet publish Blazor.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} secrets: [ PLUGIN_SONAR_TOKEN ] diff --git a/Blazor/Blazor.sln b/Blazor/Blazor.sln index 2c17fbd..6b4e33c 100644 --- a/Blazor/Blazor.sln +++ b/Blazor/Blazor.sln @@ -1,25 +1,31 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.8.34330.188 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor", "Blazor\Blazor.csproj", "{F9B19564-ED8F-49F7-97D7-2132F92DE3C2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F9B19564-ED8F-49F7-97D7-2132F92DE3C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F9B19564-ED8F-49F7-97D7-2132F92DE3C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F9B19564-ED8F-49F7-97D7-2132F92DE3C2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F9B19564-ED8F-49F7-97D7-2132F92DE3C2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {75BB0A32-C002-4B33-88B3-421A9369D9CB} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor", "Blazor\Blazor.csproj", "{F9B19564-ED8F-49F7-97D7-2132F92DE3C2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{FC6D090C-6922-4F72-8DD2-AE8FEDD773A5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9B19564-ED8F-49F7-97D7-2132F92DE3C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9B19564-ED8F-49F7-97D7-2132F92DE3C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9B19564-ED8F-49F7-97D7-2132F92DE3C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9B19564-ED8F-49F7-97D7-2132F92DE3C2}.Release|Any CPU.Build.0 = Release|Any CPU + {FC6D090C-6922-4F72-8DD2-AE8FEDD773A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC6D090C-6922-4F72-8DD2-AE8FEDD773A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC6D090C-6922-4F72-8DD2-AE8FEDD773A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC6D090C-6922-4F72-8DD2-AE8FEDD773A5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {75BB0A32-C002-4B33-88B3-421A9369D9CB} + EndGlobalSection +EndGlobal diff --git a/Blazor/Blazor/Components/BackButton.razor b/Blazor/Blazor/Components/BackButton.razor new file mode 100644 index 0000000..6339d42 --- /dev/null +++ b/Blazor/Blazor/Components/BackButton.razor @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Blazor/Blazor/Components/BackButton.razor.cs b/Blazor/Blazor/Components/BackButton.razor.cs new file mode 100644 index 0000000..b2ade6a --- /dev/null +++ b/Blazor/Blazor/Components/BackButton.razor.cs @@ -0,0 +1,18 @@ +using Microsoft.AspNetCore.Components; + +namespace Blazor.Components +{ + public partial class BackButton + { + + [Parameter] + public string RedirectionPage { get; set; } + + [Inject] + public required NavigationManager NavigationManager { get; set; } + private void Back() + { + NavigationManager.NavigateTo(RedirectionPage, true); + } + } +} diff --git a/Blazor/Blazor/Components/CardViewQuestion.razor b/Blazor/Blazor/Components/CardViewQuestion.razor new file mode 100644 index 0000000..0574549 --- /dev/null +++ b/Blazor/Blazor/Components/CardViewQuestion.razor @@ -0,0 +1,6 @@ + +
@answer.Content
- } - else - { -@answer.Content
- } -Question not found
-} diff --git a/Blazor/Blazor/Pages/Admins/EditAdministrator.razor b/Blazor/Blazor/Pages/Admins/EditAdministrator.razor index 3c83798..672a5dc 100644 --- a/Blazor/Blazor/Pages/Admins/EditAdministrator.razor +++ b/Blazor/Blazor/Pages/Admins/EditAdministrator.razor @@ -1,21 +1,31 @@ @page "/editAdministrator/{Id:int}" -- - -
+- -
- - -+ +
+ + +- - -
+@answer.Content
+ } + else + { +@answer.Content
+ } +