Compare commits
33 Commits
@ -0,0 +1,81 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: HeartTrack-Admin-CI
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||
commands:
|
||||
- cd Sources/HeartTrack/
|
||||
- dotnet restore HeartTrack.sln
|
||||
- dotnet build HeartTrack.sln -c Release --no-restore
|
||||
- dotnet publish HeartTrack.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
|
||||
|
||||
- name: tests
|
||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||
commands:
|
||||
- cd Sources/HeartTrack/
|
||||
- dotnet restore HeartTrack.sln
|
||||
- dotnet test HeartTrack.sln --no-restore
|
||||
depends_on: [build]
|
||||
|
||||
- name: code-analysis
|
||||
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
|
||||
secrets: [ SECRET_SONAR_LOGIN ]
|
||||
settings:
|
||||
sonar_host: https://codefirst.iut.uca.fr/sonar/
|
||||
sonar_token:
|
||||
from_secret: SECRET_SONAR_LOGIN
|
||||
project_key: HeartTrack-API
|
||||
coverage_exclusions: Tests/**, StubbedContextLib/**, StubAPI/**
|
||||
duplication_exclusions: Tests/**, StubbedContextLib/**
|
||||
commands:
|
||||
- cd Sources/HeartTrack/
|
||||
- dotnet restore HeartTrack.sln
|
||||
- dotnet sonarscanner begin /k:HeartTrack-API /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN} /d:sonar.coverage.exclusions="Tests/**, StubbedContextLib/**, StubAPI/**, HeartTrackAPI/Utils/**" /d:sonar.cpd.exclusions="Tests/**, StubbedContextLib/**, StubAPI/**" /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml"
|
||||
- dotnet build HeartTrack.sln -c Release --no-restore
|
||||
- dotnet test HeartTrack.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
|
||||
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
||||
- dotnet publish HeartTrack.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release
|
||||
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
||||
depends_on: [ tests ]
|
||||
|
||||
---
|
||||
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: HeartTrack-Admin-CD
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
steps:
|
||||
|
||||
- name: docker-build-and-push
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: Sources/HeartTrack/Dockerfile
|
||||
context: Sources/HeartTrack/
|
||||
registry: hub.codefirst.iut.uca.fr
|
||||
repo: hub.codefirst.iut.uca.fr/david.d_almeida/admin
|
||||
username:
|
||||
from_secret: SECRET_REGISTRY_USERNAME
|
||||
password:
|
||||
from_secret: SECRET_REGISTRY_PASSWORD
|
||||
|
||||
# database container admin
|
||||
- name: deploy-container-admin
|
||||
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
||||
environment:
|
||||
CODEFIRST_CLIENTDRONE_ENV_TYPE: ADMIN
|
||||
IMAGENAME: hub.codefirst.iut.uca.fr/david.d_almeida/admin:latest
|
||||
CONTAINERNAME: heart_track_admin
|
||||
COMMAND: create
|
||||
ADMINS: davidd_almeida,kevinmonteiro,antoineperederii,paullevrault,antoinepinagot,nicolasraymond,marcchevaldonne
|
||||
OVERWRITE: true
|
||||
depends_on: [ docker-build-and-push ]
|
@ -0,0 +1,20 @@
|
||||
# Utiliser l'image SDK .NET pour construire l'application
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /app
|
||||
|
||||
# Copier les fichiers du projet et restaurer les dépendances
|
||||
COPY *.csproj .
|
||||
RUN dotnet restore
|
||||
|
||||
# Copier tout le reste et construire l'application
|
||||
COPY . .
|
||||
RUN dotnet publish -c Release -o out
|
||||
|
||||
# Utiliser l'image runtime .NET pour exécuter l'application
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/out .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["dotnet", "HeartTrack.dll"]
|
@ -1,4 +0,0 @@
|
||||
@page "/admin-manager"
|
||||
@attribute [Authorize(Roles = "superadmin")]
|
||||
|
||||
<h3>Admin Page</h3>
|
@ -1,30 +0,0 @@
|
||||
@page "/banned-users"
|
||||
@using HeartTrack.Models
|
||||
|
||||
<PageTitle>Banned Users</PageTitle>
|
||||
|
||||
<h1>Banned Users</h1>
|
||||
|
||||
This is banned users list of this website.
|
||||
<div>
|
||||
<NavLink class="btn btn-primary" href="banned-users/add" Match="NavLinkMatch.All">
|
||||
<i class="fa fa-plus"></i> Ajouter
|
||||
</NavLink>
|
||||
</div>
|
||||
<SurveyPrompt Title="How is Blazor working for you?" />
|
||||
|
||||
<DataGrid TItem="User"
|
||||
Data="@users"
|
||||
ReadData="@OnReadData"
|
||||
TotalItems="@totalUser"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Responsive>
|
||||
<DataGridColumn TItem="User" Field="@nameof(User.Id)" Caption="Id" />
|
||||
<DataGridColumn TItem="User" Field="@nameof(User.Username)" Caption="@Localizer["Username"]" />
|
||||
<DataGridColumn TItem="User" Field="@nameof(User.Nom)" Caption="@Localizer["FirstN"]" />
|
||||
<DataGridColumn TItem="User" Field="@nameof(User.Prenom)" Caption="@Localizer["LastN"]" />
|
||||
<DataGridColumn Caption="" />
|
||||
</DataGrid>
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
@page "/reports"
|
||||
|
||||
<PageTitle>Reports</PageTitle>
|
||||
|
||||
<h1>Report list</h1>
|
||||
|
||||
This is the report list of users.
|
||||
|
||||
<SurveyPrompt Title="How is Blazor working for you?" />
|
||||
|
@ -1,20 +0,0 @@
|
||||
@page "/test"
|
||||
<div class="text-center bg-blue-100">
|
||||
<input class="border-4 w-1/3 rounded m-6 p-6 h-8
|
||||
border-blue-300" @bind-value="SearchText"
|
||||
@bind-value:event="oninput" placeholder="Search by title" />
|
||||
</div>
|
||||
|
||||
@if (!Users.Any())
|
||||
{
|
||||
<p>Loading some images...</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="p-2 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3">
|
||||
@foreach (var user in FilteredUsers)
|
||||
{
|
||||
<p>feur</p>
|
||||
}
|
||||
</div>
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
@page "/tickets/view/{Id:int}"
|
||||
|
||||
|
||||
|
||||
<h3>Ticket number @Id</h3>
|
||||
|
||||
<p>
|
||||
Username: @ticket.Username
|
||||
</p>
|
||||
<p>
|
||||
Contexte: @ticket.Contexte
|
||||
</p>
|
||||
<p>
|
||||
Description: @ticket.Description
|
||||
</p>
|
||||
<p>
|
||||
Status: @ticket.isCheck
|
||||
</p>
|
||||
<MudButton @OnClick="OnNavigateOnReturnClicked">Return</MudButton>
|
@ -1,42 +1,12 @@
|
||||
@using System.Globalization
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<p>
|
||||
<label>
|
||||
<select @bind="Culture">
|
||||
@foreach (var culture in supportedCultures)
|
||||
@foreach (var culture in @supportedCultures)
|
||||
{
|
||||
<option value="@culture">@culture.DisplayName</option>
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
@code
|
||||
{
|
||||
private CultureInfo[] supportedCultures = new[]
|
||||
{
|
||||
new CultureInfo("en-US"),
|
||||
new CultureInfo("fr-FR")
|
||||
};
|
||||
|
||||
private CultureInfo Culture
|
||||
{
|
||||
get => CultureInfo.CurrentCulture;
|
||||
set
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var culture = value.Name.ToLower(CultureInfo.InvariantCulture);
|
||||
|
||||
var uri = new Uri(this.NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped);
|
||||
var query = $"?culture={Uri.EscapeDataString(culture)}&" + $"redirectUri={Uri.EscapeDataString(uri)}";
|
||||
|
||||
// Redirect the user to the culture controller to set the cookie
|
||||
this.NavigationManager.NavigateTo("/Culture/SetCulture" + query, forceLoad: true);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<div class="alert alert-secondary mt-4">
|
||||
<span class="oi oi-pencil me-2" aria-hidden="true"></span>
|
||||
<strong>@Title</strong>
|
||||
|
||||
<span class="text-nowrap">
|
||||
Please take our
|
||||
<a target="_blank" class="font-weight-bold link-dark" href="https://go.microsoft.com/fwlink/?linkid=2149017">brief survey</a>
|
||||
</span>
|
||||
and tell us what you think.
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// Demonstrates how a parent component can supply parameters
|
||||
[Parameter]
|
||||
public string? Title { get; set; }
|
||||
}
|
||||
|
@ -1,379 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2018-12-27",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2021-06-29",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2021-04-09",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2022-11-20",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2021-02-20",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2014-02-17",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2020-07-14",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2018-02-21",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2014-07-31",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2019-10-02",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2015-07-26",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2020-10-23",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2014-11-03",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2014-01-31",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2022-04-12",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2018-07-22",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2017-04-04",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2015-08-15",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2022-04-10",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2020-02-09",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2017-02-18",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2023-06-25",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2017-09-27",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2015-02-01",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2017-05-28",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2022-06-11",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2019-08-08",
|
||||
"isban": true
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2015-01-29",
|
||||
"isban": false
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"username": "johndoe",
|
||||
"nom": "Doe",
|
||||
"prenom": "John",
|
||||
"email": "john.doe@example.com",
|
||||
"password": "password123",
|
||||
"sexe": "male",
|
||||
"taille": 1.76,
|
||||
"poids": 56.3,
|
||||
"birthdate": "2020-08-21",
|
||||
"isban": false
|
||||
}
|
||||
]
|
Loading…
Reference in new issue