diff --git a/frontend/src/app/projects/models/backup-settings/pipeline-runs/service/pipeline-run.service.ts b/frontend/src/app/projects/models/backup-settings/pipeline-runs/service/pipeline-run.service.ts index 5dc2db1937..ba8b18e8e0 100644 --- a/frontend/src/app/projects/models/backup-settings/pipeline-runs/service/pipeline-run.service.ts +++ b/frontend/src/app/projects/models/backup-settings/pipeline-runs/service/pipeline-run.service.ts @@ -125,13 +125,9 @@ export class PipelineRunService { this.setPipelineRunPageStatusToLoading(page); this.http - .get>( - `${this.urlFactory( - projectSlug, - modelSlug, - pipelineID, - )}?page=${page}&size=${size}`, - ) + .get< + Page + >(`${this.urlFactory(projectSlug, modelSlug, pipelineID)}?page=${page}&size=${size}`) .subscribe((pipelineRuns) => { const pipelineRunPages = this._pipelineRunPages.getValue(); pipelineRunPages.pages[page - 1] = pipelineRuns; diff --git a/frontend/src/app/projects/project-detail/model-overview/model-detail/git-model.service.ts b/frontend/src/app/projects/project-detail/model-overview/model-detail/git-model.service.ts index 04c760add5..8061562933 100644 --- a/frontend/src/app/projects/project-detail/model-overview/model-detail/git-model.service.ts +++ b/frontend/src/app/projects/project-detail/model-overview/model-detail/git-model.service.ts @@ -26,10 +26,9 @@ export class GitModelService { loadGitModels(project_slug: string, model_slug: string): void { this.http - .get>( - this.BACKEND_URL_PREFIX + - `/projects/${project_slug}/models/${model_slug}/modelsources/git`, - ) + .get< + Array + >(this.BACKEND_URL_PREFIX + `/projects/${project_slug}/models/${model_slug}/modelsources/git`) .subscribe((gitModels) => this._gitModels.next(gitModels)); } diff --git a/frontend/src/app/projects/project-detail/model-overview/move-model/move-model.component.ts b/frontend/src/app/projects/project-detail/model-overview/move-model/move-model.component.ts index 3fdb334a9d..20c08eaeec 100644 --- a/frontend/src/app/projects/project-detail/model-overview/move-model/move-model.component.ts +++ b/frontend/src/app/projects/project-detail/model-overview/move-model/move-model.component.ts @@ -41,9 +41,8 @@ export class MoveModelComponent { ) { this.projectService.loadProjectsForRole('manager'); this.filteredProjects$ = projectService.projects$.pipe( - map( - (projects) => - projects?.filter((project) => project.slug !== data.projectSlug), + map((projects) => + projects?.filter((project) => project.slug !== data.projectSlug), ), ); } @@ -85,11 +84,10 @@ export class MoveModelComponent { return this.filteredProjects$; } return this.filteredProjects$.pipe( - map( - (projects) => - projects?.filter((project) => - project.slug.toLowerCase().includes(this.search.toLowerCase()), - ), + map((projects) => + projects?.filter((project) => + project.slug.toLowerCase().includes(this.search.toLowerCase()), + ), ), ); } diff --git a/frontend/src/app/projects/project-detail/project-metadata/project-metadata.component.ts b/frontend/src/app/projects/project-detail/project-metadata/project-metadata.component.ts index 85ac1d11a3..a6a3ecda83 100644 --- a/frontend/src/app/projects/project-detail/project-metadata/project-metadata.component.ts +++ b/frontend/src/app/projects/project-detail/project-metadata/project-metadata.component.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; @@ -24,7 +24,7 @@ import { templateUrl: './project-metadata.component.html', styleUrls: ['./project-metadata.component.css'], }) -export class ProjectMetadataComponent { +export class ProjectMetadataComponent implements OnInit { project?: Project; canDelete = false; diff --git a/frontend/src/app/projects/project-detail/project-users/project-audit-log/project-audit-log.component.ts b/frontend/src/app/projects/project-detail/project-users/project-audit-log/project-audit-log.component.ts index ef53996fa7..e48920c1bf 100644 --- a/frontend/src/app/projects/project-detail/project-users/project-audit-log/project-audit-log.component.ts +++ b/frontend/src/app/projects/project-detail/project-users/project-audit-log/project-audit-log.component.ts @@ -4,9 +4,11 @@ */ import { + AfterViewInit, Component, ElementRef, Inject, + OnInit, QueryList, ViewChildren, } from '@angular/core'; @@ -20,7 +22,7 @@ import { ProjectAuditLogService } from 'src/app/projects/project-detail/project- styleUrls: ['./project-audit-log.component.css'], }) @UntilDestroy() -export class ProjectAuditLogComponent { +export class ProjectAuditLogComponent implements OnInit, AfterViewInit { pageSize = 25; pageSizeArray = [...Array(this.pageSize).keys()]; diff --git a/frontend/src/app/projects/project-detail/project-users/project-audit-log/service/project-audit-log.service.ts b/frontend/src/app/projects/project-detail/project-users/project-audit-log/service/project-audit-log.service.ts index 1542d9a601..264b3e5f0b 100644 --- a/frontend/src/app/projects/project-detail/project-users/project-audit-log/service/project-audit-log.service.ts +++ b/frontend/src/app/projects/project-detail/project-users/project-audit-log/service/project-audit-log.service.ts @@ -70,9 +70,9 @@ export class ProjectAuditLogService { this.setProjectEventPageStatusToLoading(page); this.http - .get>( - `${environment.backend_url}/projects/${projectSlug}/events?page=${page}&size=${size}`, - ) + .get< + Page + >(`${environment.backend_url}/projects/${projectSlug}/events?page=${page}&size=${size}`) .subscribe((projectEvents) => { const projectHistoryEventPages = this._projectHistoryEventPages.getValue(); diff --git a/frontend/src/app/projects/project-detail/project-users/service/project-user.service.ts b/frontend/src/app/projects/project-detail/project-users/service/project-user.service.ts index 4f3c325a15..4da105f8fe 100644 --- a/frontend/src/app/projects/project-detail/project-users/service/project-user.service.ts +++ b/frontend/src/app/projects/project-detail/project-users/service/project-user.service.ts @@ -50,11 +50,10 @@ export class ProjectUserService { public readonly nonAdminProjectUsers$ = this._projectUsers .asObservable() .pipe( - map( - (projectUsers) => - projectUsers?.filter( - (projectUser) => projectUser.role !== 'administrator', - ), + map((projectUsers) => + projectUsers?.filter( + (projectUser) => projectUser.role !== 'administrator', + ), ), ); diff --git a/frontend/src/app/services/settings/t4c-instance.service.ts b/frontend/src/app/services/settings/t4c-instance.service.ts index 7832642349..bcccffdc78 100644 --- a/frontend/src/app/services/settings/t4c-instance.service.ts +++ b/frontend/src/app/services/settings/t4c-instance.service.ts @@ -67,9 +67,8 @@ export class T4CInstanceService { public readonly t4cInstance$ = this._t4cInstance.asObservable(); public readonly unarchivedT4cInstances$ = this._t4cInstances.pipe( - map( - (t4cInstances) => - t4cInstances?.filter((t4cInstance) => !t4cInstance.is_archived), + map((t4cInstances) => + t4cInstances?.filter((t4cInstance) => !t4cInstance.is_archived), ), ); diff --git a/frontend/src/app/sessions/user-sessions-wrapper/create-session/create-readonly-session/create-readonly-session.component.ts b/frontend/src/app/sessions/user-sessions-wrapper/create-session/create-readonly-session/create-readonly-session.component.ts index 254fb7ec86..40074b0efa 100644 --- a/frontend/src/app/sessions/user-sessions-wrapper/create-session/create-readonly-session/create-readonly-session.component.ts +++ b/frontend/src/app/sessions/user-sessions-wrapper/create-session/create-readonly-session/create-readonly-session.component.ts @@ -103,8 +103,8 @@ export class CreateReadonlySessionComponent implements OnInit { this.toolService.getVersionsForTool(tool.id).subscribe((toolVersions) => { const toolVersionIds = this.models?.map((m) => m.version?.id); - this.toolVersions = toolVersions.filter( - (v) => toolVersionIds?.includes(v.id), + this.toolVersions = toolVersions.filter((v) => + toolVersionIds?.includes(v.id), ); }); } diff --git a/frontend/src/app/settings/modelsources/t4c-settings/service/t4c-repos/t4c-repo.service.ts b/frontend/src/app/settings/modelsources/t4c-settings/service/t4c-repos/t4c-repo.service.ts index 8630394648..1b8551c5e3 100644 --- a/frontend/src/app/settings/modelsources/t4c-settings/service/t4c-repos/t4c-repo.service.ts +++ b/frontend/src/app/settings/modelsources/t4c-settings/service/t4c-repos/t4c-repo.service.ts @@ -39,9 +39,9 @@ export class T4CRepoService { loadRepositories(instanceId: number): void { this.http - .get( - `${this.t4cInstanceService.urlFactory(instanceId)}/repositories/`, - ) + .get< + T4CServerRepository[] + >(`${this.t4cInstanceService.urlFactory(instanceId)}/repositories/`) .subscribe({ next: (repositories) => this._repositories.next(repositories), error: () => this._repositories.next(undefined),