Skip to content

Commit 98296ce

Browse files
author
Bertrand Thomas
committed
Merge branch 'feature/upgrade' into 'main'
Migrate to .NET 9.0 and upgrade NuGet packages See merge request devpro-labs/software/keeptrack!453
2 parents 76deac0 + 8d47715 commit 98296ce

22 files changed

Lines changed: 153 additions & 120 deletions

File tree

.azure/pipelines/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ variables:
3535
- group: "devproapp-testing"
3636
# common task variables
3737
- name: "dotnet.sdk.version"
38-
value: "7.0.x"
38+
value: "9.0.x"
3939
- name: "BuildConfiguration"
4040
value: "Debug"
4141
- name: "SolutionFile"
@@ -53,15 +53,15 @@ variables:
5353
value: "devpro.keep-track"
5454
# specific variables
5555
- name: "angular.cli.version"
56-
value: "16.2.0"
56+
value: "16.2.6"
5757
- name: "angular.path"
5858
value: "angular-bootstrap"
5959
- name: "blazorwasm.path"
6060
value: "dotnet/src/BlazorWebAssemblyApp"
6161
- name: "dotnet.path"
6262
value: "dotnet"
6363
- name: "nodejs.version.spec"
64-
value: "18.x"
64+
value: "22.x"
6565

6666
stages:
6767
# Unit testing

.azure/pipelines/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variables:
2929
- name: "dotnet.path"
3030
value: "dotnet"
3131
- name: "dotnet.sdk.version"
32-
value: "7.0.x"
32+
value: "9.0.x"
3333

3434
stages:
3535
- ${{ if eq(parameters['testing.production.enabled'], true) }}:

.azure/pipelines/pkg.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ variables:
2525
value: "test/*IntegrationTests/*.csproj"
2626
# specific variables
2727
- name: "angular.cli.version"
28-
value: "16.2.0"
28+
value: "16.2.6"
2929
- name: "angular.build.configuration"
3030
value: "production"
3131
- name: "dotnet.buildconfiguration"
3232
value: "Release"
3333
- name: "dotnet.sdk.version"
34-
value: "7.0.x"
34+
value: "9.0.x"
3535
- name: "nodejs.version.spec"
36-
value: "18.x"
36+
value: "22.x"
3737

3838
pool:
3939
vmImage: "ubuntu-latest"

.gitlab-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
stages:
2+
- build
3+
# - test # TODO
4+
# - package # TODO
5+
6+
workflow:
7+
rules:
8+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
9+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
10+
- if: $CI_PIPELINE_SOURCE == "web"
11+
12+
variables:
13+
DOTNET_VERSION: "9.0"
14+
NODEJS_VERSION: "22"
15+
16+
.base-dotnet:
17+
image: mcr.microsoft.com/dotnet/sdk:$DOTNET_VERSION
18+
before_script:
19+
- cd dotnet
20+
21+
.base-angular:
22+
image: node:$NODEJS_VERSION
23+
before_script:
24+
- cd angular-bootstrap
25+
26+
build-dotnet:
27+
extends: .base-dotnet
28+
stage: build
29+
script:
30+
- dotnet restore
31+
- dotnet build --no-restore --configuration Debug
32+
33+
build-angular:
34+
extends: .base-angular
35+
stage: build
36+
script:
37+
- npm install

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Keeptrack
22

3+
[![GitLab Pipeline Status](https://gitlab.com/devpro-labs/software/keeptrack/badges/main/pipeline.svg)](https://gitlab.com/devpro-labs/software/keeptrack/-/pipelines)
4+
[![coverage report](https://gitlab.com/devpro-labs/software/keeptrack/badges/main/coverage.svg)](https://gitlab.com/devpro-labs/software/keeptrack/-/commits/main)
35
[![Build Status](https://dev.azure.com/devprofr/open-source/_apis/build/status/keeptrack-ci?branchName=master)](https://dev.azure.com/devprofr/open-source/_build/latest?definitionId=26&branchName=master)
46
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=devpro.keep-track&metric=alert_status)](https://sonarcloud.io/dashboard?id=devpro.keep-track)
57
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=devpro.keep-track&metric=coverage)](https://sonarcloud.io/dashboard?id=devpro.keep-track)

angular-bootstrap/src/app/inventory/base/data.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { BackendData } from 'src/app/backend/types/backend-data';
88
@Directive()
99
export abstract class DataComponent<T extends BackendData> implements OnInit, OnDestroy {
1010
userEventsSubscription: Subscription | undefined;
11-
items: Array<T> = [];
11+
items: Array<T> | undefined;
1212
currentPage = 1;
1313
pageSize = 50;
1414

@@ -44,7 +44,7 @@ export abstract class DataComponent<T extends BackendData> implements OnInit, On
4444

4545
create(item: T) {
4646
this.dataService.create(item).subscribe(created => {
47-
this.items.push(created);
47+
this.items?.push(created);
4848
this.resetInputFields();
4949
});
5050
}
@@ -74,6 +74,10 @@ export abstract class DataComponent<T extends BackendData> implements OnInit, On
7474

7575
delete(item: T) {
7676
this.dataService.delete(item)
77-
.subscribe(() => this.items.splice(this.items.findIndex(x => x.id === item.id), 1));
77+
.subscribe(() => {
78+
if (this.items) {
79+
this.items.splice(this.items.findIndex(x => x.id === item.id), 1);
80+
}
81+
});
7882
}
7983
}

angular-bootstrap/src/app/inventory/book/book.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1 id="tableLabel">Books</h1>
1414
<thead>
1515
<tr>
1616
<th class="col-md-3">Title</th>
17-
<th class="col-md-2">Author</th>
17+
<th class="col-md-2">Author(s)</th>
1818
<th class="col-md-2">Series</th>
1919
<th class="col-md-2">Finished date</th>
2020
<th class="col-md-1">Actions</th>
@@ -65,15 +65,15 @@ <h1 id="tableLabel">Books</h1>
6565
</table>
6666
</div>
6767

68-
<nav aria-label="Table navigation">
68+
<nav aria-label="Table navigation" *ngIf="items">
6969
<ul class="pagination justify-content-center">
7070
<li class="page-item" [ngClass]="{ 'disabled': currentPage === 1 }"><a class="page-link" href="#" (click)="updateCurrentPage($event, currentPage - 1, searchInput.value)">&laquo;</a></li>
7171
<li class="page-item active" aria-current="page"><a class="page-link">{{ currentPage }}</a></li>
7272
<li class="page-item" [ngClass]="{ 'disabled': items.length !== pageSize }"><a class="page-link" href="#" (click)="updateCurrentPage($event, currentPage + 1, searchInput.value)">&raquo;</a></li>
7373
</ul>
7474
</nav>
7575

76-
<div class="card-group mb-1 text-center mx-auto" style="width: 70%;">
76+
<div class="card-group mb-1 text-center mx-auto" style="width: 70%;" *ngIf="items">
7777
<div class="card mb-1 box-shadow">
7878
<div class="card-header">
7979
<h4 class="my-0 font-weight-normal">Add</h4>

angular-bootstrap/src/app/inventory/movie/movie.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ <h1 id="tableLabel">Movies</h1>
5555
</table>
5656
</div>
5757

58-
<nav aria-label="Table navigation">
58+
<nav aria-label="Table navigation" *ngIf="items">
5959
<ul class="pagination justify-content-center">
6060
<li class="page-item" [ngClass]="{ 'disabled': currentPage === 1 }"><a class="page-link" href="#" (click)="updateCurrentPage($event, currentPage - 1, searchInput.value)">&laquo;</a></li>
6161
<li class="page-item active" aria-current="page"><a class="page-link">{{ currentPage }}</a></li>
6262
<li class="page-item" [ngClass]="{ 'disabled': items.length !== pageSize }"><a class="page-link" href="#" (click)="updateCurrentPage($event, currentPage + 1, searchInput.value)">&raquo;</a></li>
6363
</ul>
6464
</nav>
6565

66-
<div class="card-group mb-1 text-center mx-auto" style="width: 70%;">
66+
<div class="card-group mb-1 text-center mx-auto" style="width: 70%;" *ngIf="items">
6767
<div class="card mb-1 box-shadow">
6868
<div class="card-header">
6969
<h4 class="my-0 font-weight-normal">Add</h4>

angular-bootstrap/src/app/inventory/tv-show/tv-show.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ <h1 id="tableLabel">TV shows</h1>
2424
</tbody>
2525
</table>
2626

27-
<nav aria-label="Table navigation">
27+
<nav aria-label="Table navigation" *ngIf="items">
2828
<ul class="pagination justify-content-center">
2929
<li class="page-item" [ngClass]="{ 'disabled': currentPage === 1 }"><a class="page-link" href="#" (click)="updateCurrentPage($event, currentPage - 1, searchInput.value)">&laquo;</a></li>
3030
<li class="page-item active" aria-current="page"><a class="page-link">{{ currentPage }}</a></li>
3131
<li class="page-item" [ngClass]="{ 'disabled': items.length !== pageSize }"><a class="page-link" href="#" (click)="updateCurrentPage($event, currentPage + 1, searchInput.value)">&raquo;</a></li>
3232
</ul>
3333
</nav>
3434

35-
<div class="card mb-1 box-shadow text-center mx-auto" style="width: 70%;">
35+
<div class="card mb-1 box-shadow text-center mx-auto" style="width: 70%;" *ngIf="items">
3636
<div class="card-header">
3737
<h4 class="my-0 font-weight-normal">Add</h4>
3838
</div>

angular-bootstrap/src/app/inventory/video-game/video-game.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ <h1 id="tableLabel">Video games</h1>
9797
</table>
9898
</div>
9999

100-
<nav aria-label="Table navigation">
100+
<nav aria-label="Table navigation" *ngIf="items">
101101
<ul class="pagination justify-content-center">
102102
<li class="page-item" [ngClass]="{ 'disabled': currentPage === 1 }"><a class="page-link" href="#" (click)="updateCurrentPage($event, currentPage - 1, searchInput.value)">&laquo;</a></li>
103103
<li class="page-item active" aria-current="page"><a class="page-link">{{ currentPage }}</a></li>
104104
<li class="page-item" [ngClass]="{ 'disabled': items.length !== pageSize }"><a class="page-link" href="#" (click)="updateCurrentPage($event, currentPage + 1, searchInput.value)">&raquo;</a></li>
105105
</ul>
106106
</nav>
107107

108-
<div class="card-group mb-1 text-center mx-auto" style="width: 70%;">
108+
<div class="card-group mb-1 text-center mx-auto" style="width: 70%;" *ngIf="items">
109109
<div class="card mb-1 box-shadow">
110110
<div class="card-header">
111111
<h4 class="my-0 font-weight-normal">Add</h4>

0 commit comments

Comments
 (0)