Skip to content

Commit

Permalink
Fixed some sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianPienaar committed Sep 21, 2023
1 parent 5a87d33 commit c299e5d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions frontend/src/app/edit/edit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ <h4 *ngIf="sideBarTab" class="sidebarHeaderText">History</h4>
class="spinner"
src="assets/Spinner/loading2.gif"
title="Loading..."
alt="Loading..."
/>
</div>

Expand All @@ -275,6 +276,7 @@ <h4 *ngIf="sideBarTab" class="sidebarHeaderText">History</h4>
class="spinner"
src="assets/Spinner/loading2.gif"
title="Loading..."
alt="Loading..."
/>
</div>
<div
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/app/edit/edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ export class EditComponent implements AfterViewInit, OnInit {
: 0;
});

snapshot.map((a, i) => {
snapshot.forEach((a, i) => {
a.LastModifiedString = this.formatDate(a.LastModified);
a.OrderNumber = i + 1;
a.Name = 'Snapshot ' + a.OrderNumber;
Expand All @@ -647,14 +647,14 @@ export class EditComponent implements AfterViewInit, OnInit {
}
}
});
snapshot.map((a) =>
snapshot.forEach((a) =>
a.ChildDiffs.sort((a, b) => {
return a.LastModified < b.LastModified
? 1
: a.LastModified > b.LastModified
? -1
: 0;
}).map((a, i, arr) => {
}).forEach((a, i, arr) => {
a.VersionNumber = arr.length - i + 1;
a.Name = 'Version ' + a.VersionNumber;
})
Expand All @@ -669,7 +669,7 @@ export class EditComponent implements AfterViewInit, OnInit {
this.history.push(diff[i]);
}
}
snapshot.map((a) => this.history.push(a));
snapshot.forEach((a) => this.history.push(a));

console.log(this.history);
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<div *ngIf="loading" class="loading-overlay">
<img class="loadingIcon" src="assets/Spinner/loading2.gif" alt="Loading..." />
<img class="loadingIcon" src="assets/Spinner/loading2.gif" title="Loading..." alt="Loading..." />
</div>

<div class="container" data-testid="home-page" (click)="unselectAll()">
Expand Down

0 comments on commit c299e5d

Please sign in to comment.