From 54db231123120e5111076b32be39a7af09c4e33a Mon Sep 17 00:00:00 2001 From: Tobias Messner Date: Wed, 27 Nov 2024 10:45:02 +0100 Subject: [PATCH] chore: Remove unnecessary imports --- frontend/src/app/app.component.ts | 3 +-- .../metadata/version/version.component.ts | 4 ++-- .../create-backup/create-backup.component.ts | 2 -- .../trigger-pipeline.component.ts | 8 +------- .../model-detail/model-detail.component.ts | 3 +-- .../add-user-to-project.component.ts | 4 ---- .../training-details.component.ts | 9 +-------- .../project-overview.component.ts | 2 -- .../feedback-dialog.component.ts | 6 ------ .../session-overview.component.ts | 2 -- .../file-browser-dialog.component.ts | 2 -- .../session-sharing-dialog.component.ts | 2 -- .../create-provisioned-session.component.ts | 3 +-- .../create-readonly-session.component.ts | 3 --- .../git-settings/git-settings.component.ts | 20 ------------------- .../edit-t4c-license-server.component.ts | 8 +------- .../user-settings/user-settings.component.ts | 2 -- .../user-workspaces.component.ts | 9 +-------- .../users-profile/users-profile.component.ts | 2 -- 19 files changed, 9 insertions(+), 85 deletions(-) diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index d714e2375..20af12db5 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -2,7 +2,7 @@ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors * SPDX-License-Identifier: Apache-2.0 */ -import { NgIf, NgClass, AsyncPipe } from '@angular/common'; +import { NgClass, AsyncPipe } from '@angular/common'; import { AfterViewInit, Component, ViewChild } from '@angular/core'; import { MatSidenav, @@ -30,7 +30,6 @@ import { FullscreenService } from './sessions/service/fullscreen.service'; MatDrawer, NavBarMenuComponent, MatDrawerContent, - NgIf, HeaderComponent, NgClass, NoticeComponent, diff --git a/frontend/src/app/general/metadata/version/version.component.ts b/frontend/src/app/general/metadata/version/version.component.ts index 1d45a413a..1a87b7ede 100644 --- a/frontend/src/app/general/metadata/version/version.component.ts +++ b/frontend/src/app/general/metadata/version/version.component.ts @@ -2,7 +2,7 @@ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors * SPDX-License-Identifier: Apache-2.0 */ -import { NgIf, AsyncPipe } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { Component } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatIcon } from '@angular/material/icon'; @@ -12,7 +12,7 @@ import { MetadataService } from '../metadata.service'; @Component({ selector: 'app-version', templateUrl: './version.component.html', - imports: [NgIf, MatIcon, AsyncPipe], + imports: [MatIcon, AsyncPipe], }) export class VersionComponent { constructor( diff --git a/frontend/src/app/projects/models/backup-settings/create-backup/create-backup.component.ts b/frontend/src/app/projects/models/backup-settings/create-backup/create-backup.component.ts index bf5f59133..4c1d7f5d8 100644 --- a/frontend/src/app/projects/models/backup-settings/create-backup/create-backup.component.ts +++ b/frontend/src/app/projects/models/backup-settings/create-backup/create-backup.component.ts @@ -27,7 +27,6 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { CreateBackup, ProjectsModelsBackupsService } from 'src/app/openapi'; import { T4CModelService } from 'src/app/projects/models/model-source/t4c/service/t4c-model.service'; import { GitModelService } from 'src/app/projects/project-detail/model-overview/model-detail/git-model.service'; -import { MatIconComponent } from '../../../../helpers/mat-icon/mat-icon.component'; @UntilDestroy() @Component({ @@ -44,7 +43,6 @@ import { MatIconComponent } from '../../../../helpers/mat-icon/mat-icon.componen MatDialogClose, AsyncPipe, NgxSkeletonLoaderModule, - MatIconComponent, ], }) export class CreateBackupComponent implements OnInit { diff --git a/frontend/src/app/projects/models/backup-settings/trigger-pipeline/trigger-pipeline.component.ts b/frontend/src/app/projects/models/backup-settings/trigger-pipeline/trigger-pipeline.component.ts index 1a1e5ea41..ef19d48a8 100644 --- a/frontend/src/app/projects/models/backup-settings/trigger-pipeline/trigger-pipeline.component.ts +++ b/frontend/src/app/projects/models/backup-settings/trigger-pipeline/trigger-pipeline.component.ts @@ -5,9 +5,7 @@ import { AsyncPipe } from '@angular/common'; import { Component, Inject, OnInit } from '@angular/core'; import { ReactiveFormsModule } from '@angular/forms'; -import { MatIconAnchor, MatButton, MatAnchor } from '@angular/material/button'; -import { MatCheckbox } from '@angular/material/checkbox'; -import { MatRipple } from '@angular/material/core'; +import { MatButton } from '@angular/material/button'; import { MatDialog, MatDialogRef, @@ -30,13 +28,9 @@ import { PipelineWrapperService } from '../service/pipeline.service'; selector: 'app-trigger-pipeline', templateUrl: './trigger-pipeline.component.html', imports: [ - MatIconAnchor, MatIcon, - MatRipple, ReactiveFormsModule, - MatCheckbox, MatButton, - MatAnchor, AsyncPipe, NgxSkeletonLoaderModule, ], diff --git a/frontend/src/app/projects/models/model-detail/model-detail.component.ts b/frontend/src/app/projects/models/model-detail/model-detail.component.ts index 7627759cc..a3308eae1 100644 --- a/frontend/src/app/projects/models/model-detail/model-detail.component.ts +++ b/frontend/src/app/projects/models/model-detail/model-detail.component.ts @@ -2,7 +2,7 @@ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors * SPDX-License-Identifier: Apache-2.0 */ -import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { NgFor, AsyncPipe } from '@angular/common'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { MatRipple } from '@angular/material/core'; import { MatIconModule } from '@angular/material/icon'; @@ -22,7 +22,6 @@ import { ProjectWrapperService } from '../../service/project.service'; selector: 'app-model-detail', templateUrl: './model-detail.component.html', imports: [ - NgIf, RouterLink, MatRipple, MatIconComponent, diff --git a/frontend/src/app/projects/project-detail/project-users/add-user-to-project/add-user-to-project.component.ts b/frontend/src/app/projects/project-detail/project-users/add-user-to-project/add-user-to-project.component.ts index 3309fa288..5a31e01c6 100644 --- a/frontend/src/app/projects/project-detail/project-users/add-user-to-project/add-user-to-project.component.ts +++ b/frontend/src/app/projects/project-detail/project-users/add-user-to-project/add-user-to-project.component.ts @@ -16,13 +16,11 @@ import { ReactiveFormsModule, } from '@angular/forms'; import { MatButton } from '@angular/material/button'; -import { MatOption } from '@angular/material/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { MatFormField, MatLabel, MatError } from '@angular/material/form-field'; import { MatIcon } from '@angular/material/icon'; import { MatInput } from '@angular/material/input'; import { MatRadioModule } from '@angular/material/radio'; -import { MatSelect } from '@angular/material/select'; import { Observable, map, take } from 'rxjs'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { Project, ProjectUserPermission } from 'src/app/openapi'; @@ -43,8 +41,6 @@ import { MatInput, MatRadioModule, MatError, - MatSelect, - MatOption, MatButton, MatIcon, KeyValuePipe, diff --git a/frontend/src/app/projects/project-detail/training-details/training-details.component.ts b/frontend/src/app/projects/project-detail/training-details/training-details.component.ts index 59f5a8c9a..a60b4e47d 100644 --- a/frontend/src/app/projects/project-detail/training-details/training-details.component.ts +++ b/frontend/src/app/projects/project-detail/training-details/training-details.component.ts @@ -4,12 +4,7 @@ */ import { AsyncPipe, CommonModule } from '@angular/common'; import { Component, OnInit } from '@angular/core'; -import { - MatAnchor, - MatButton, - MatMiniFabAnchor, - MatMiniFabButton, -} from '@angular/material/button'; +import { MatAnchor, MatMiniFabAnchor } from '@angular/material/button'; import { MatIcon } from '@angular/material/icon'; import { MatTooltip } from '@angular/material/tooltip'; import { RouterLink } from '@angular/router'; @@ -36,10 +31,8 @@ import { ProjectWrapperService } from 'src/app/projects/service/project.service' RouterLink, MatTooltip, MatIcon, - MatButton, NgxSkeletonLoaderModule, MatMiniFabAnchor, - MatMiniFabButton, AsyncPipe, MarkdownComponent, ], diff --git a/frontend/src/app/projects/project-overview/project-overview.component.ts b/frontend/src/app/projects/project-overview/project-overview.component.ts index 855e383b1..5fbd603bb 100644 --- a/frontend/src/app/projects/project-overview/project-overview.component.ts +++ b/frontend/src/app/projects/project-overview/project-overview.component.ts @@ -12,7 +12,6 @@ import { } from '@angular/forms'; import { MatChipsModule } from '@angular/material/chips'; import { MatRipple } from '@angular/material/core'; -import { MatDivider } from '@angular/material/divider'; import { MatFormField, MatLabel, @@ -45,7 +44,6 @@ import { ProjectWrapperService } from '../service/project.service'; ReactiveFormsModule, FormsModule, MatChipsModule, - MatDivider, ], }) export class ProjectOverviewComponent implements OnInit { diff --git a/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.ts b/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.ts index da02d8594..11035483b 100644 --- a/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.ts +++ b/frontend/src/app/sessions/feedback/feedback-dialog/feedback-dialog.component.ts @@ -15,11 +15,8 @@ import { MatButtonModule } from '@angular/material/button'; import { MatCheckbox } from '@angular/material/checkbox'; import { MAT_DIALOG_DATA, - MatDialogActions, MatDialogClose, - MatDialogContent, MatDialogRef, - MatDialogTitle, } from '@angular/material/dialog'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatIcon } from '@angular/material/icon'; @@ -46,9 +43,6 @@ interface DialogData { MatIcon, MatFormFieldModule, MatCheckbox, - MatDialogTitle, - MatDialogContent, - MatDialogActions, MatInput, MatDialogClose, ReactiveFormsModule, diff --git a/frontend/src/app/sessions/session-overview/session-overview.component.ts b/frontend/src/app/sessions/session-overview/session-overview.component.ts index b928526a2..619668b12 100644 --- a/frontend/src/app/sessions/session-overview/session-overview.component.ts +++ b/frontend/src/app/sessions/session-overview/session-overview.component.ts @@ -2,7 +2,6 @@ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors * SPDX-License-Identifier: Apache-2.0 */ -import { DatePipe } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { FormControl, @@ -49,7 +48,6 @@ import { DeleteSessionDialogComponent } from '../delete-session-dialog/delete-se MatRowDef, MatRow, MatButton, - DatePipe, NgxSkeletonLoaderModule, RelativeTimeComponent, ], diff --git a/frontend/src/app/sessions/user-sessions-wrapper/active-sessions/file-browser-dialog/file-browser-dialog.component.ts b/frontend/src/app/sessions/user-sessions-wrapper/active-sessions/file-browser-dialog/file-browser-dialog.component.ts index a78aff7fa..1bc953aed 100644 --- a/frontend/src/app/sessions/user-sessions-wrapper/active-sessions/file-browser-dialog/file-browser-dialog.component.ts +++ b/frontend/src/app/sessions/user-sessions-wrapper/active-sessions/file-browser-dialog/file-browser-dialog.component.ts @@ -20,7 +20,6 @@ import { MatTableDataSource } from '@angular/material/table'; import { MatTreeModule } from '@angular/material/tree'; import { saveAs } from 'file-saver'; import { ConfirmationDialogComponent } from 'src/app/helpers/confirmation-dialog/confirmation-dialog.component'; -import { MatIconComponent } from 'src/app/helpers/mat-icon/mat-icon.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { Session, SessionsService } from 'src/app/openapi'; import { PathNode } from 'src/app/sessions/service/session.service'; @@ -38,7 +37,6 @@ import { PathNode } from 'src/app/sessions/service/session.service'; MatTreeModule, NgClass, ReactiveFormsModule, - MatIconComponent, ], }) export class FileBrowserDialogComponent implements OnInit { diff --git a/frontend/src/app/sessions/user-sessions-wrapper/active-sessions/session-sharing-dialog/session-sharing-dialog.component.ts b/frontend/src/app/sessions/user-sessions-wrapper/active-sessions/session-sharing-dialog/session-sharing-dialog.component.ts index d08df045f..eb61bc416 100644 --- a/frontend/src/app/sessions/user-sessions-wrapper/active-sessions/session-sharing-dialog/session-sharing-dialog.component.ts +++ b/frontend/src/app/sessions/user-sessions-wrapper/active-sessions/session-sharing-dialog/session-sharing-dialog.component.ts @@ -23,7 +23,6 @@ import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { MatTooltipModule } from '@angular/material/tooltip'; import { catchError, combineLatest, of, tap } from 'rxjs'; -import { DisplayValueComponent } from 'src/app/helpers/display-value/display-value.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { Session, SessionsService } from 'src/app/openapi'; @@ -32,7 +31,6 @@ import { Session, SessionsService } from 'src/app/openapi'; imports: [ CommonModule, MatCheckboxModule, - DisplayValueComponent, MatFormFieldModule, MatInputModule, MatButtonModule, diff --git a/frontend/src/app/sessions/user-sessions-wrapper/create-sessions/create-provisioned-session/create-provisioned-session.component.ts b/frontend/src/app/sessions/user-sessions-wrapper/create-sessions/create-provisioned-session/create-provisioned-session.component.ts index a250ab4e4..ac5558927 100644 --- a/frontend/src/app/sessions/user-sessions-wrapper/create-sessions/create-provisioned-session/create-provisioned-session.component.ts +++ b/frontend/src/app/sessions/user-sessions-wrapper/create-sessions/create-provisioned-session/create-provisioned-session.component.ts @@ -2,7 +2,7 @@ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors * SPDX-License-Identifier: Apache-2.0 */ -import { CommonModule, KeyValuePipe } from '@angular/common'; +import { CommonModule } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatDialog } from '@angular/material/dialog'; @@ -38,7 +38,6 @@ import { SessionService } from 'src/app/sessions/service/session.service'; MatButtonModule, NgxSkeletonLoaderModule, MatIconComponent, - KeyValuePipe, ], templateUrl: './create-provisioned-session.component.html', styles: ` diff --git a/frontend/src/app/sessions/user-sessions-wrapper/create-sessions/create-readonly-session/create-readonly-session.component.ts b/frontend/src/app/sessions/user-sessions-wrapper/create-sessions/create-readonly-session/create-readonly-session.component.ts index d13c9f085..979051279 100644 --- a/frontend/src/app/sessions/user-sessions-wrapper/create-sessions/create-readonly-session/create-readonly-session.component.ts +++ b/frontend/src/app/sessions/user-sessions-wrapper/create-sessions/create-readonly-session/create-readonly-session.component.ts @@ -2,7 +2,6 @@ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors * SPDX-License-Identifier: Apache-2.0 */ -import { NgIf, NgFor } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { FormBuilder, @@ -37,8 +36,6 @@ import { imports: [ FormsModule, ReactiveFormsModule, - NgIf, - NgFor, NgxSkeletonLoaderModule, MatFormField, MatLabel, diff --git a/frontend/src/app/settings/modelsources/git-settings/git-settings.component.ts b/frontend/src/app/settings/modelsources/git-settings/git-settings.component.ts index b1e8cef81..12527d17d 100644 --- a/frontend/src/app/settings/modelsources/git-settings/git-settings.component.ts +++ b/frontend/src/app/settings/modelsources/git-settings/git-settings.component.ts @@ -5,16 +5,6 @@ import { AsyncPipe } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { - MatIconAnchor, - MatIconButton, - MatButton, -} from '@angular/material/button'; -import { MatOption } from '@angular/material/core'; -import { MatFormField, MatLabel, MatError } from '@angular/material/form-field'; -import { MatIcon } from '@angular/material/icon'; -import { MatInput } from '@angular/material/input'; -import { MatSelect } from '@angular/material/select'; import { RouterLink } from '@angular/router'; import { UntilDestroy } from '@ngneat/until-destroy'; import { MatIconComponent } from 'src/app/helpers/mat-icon/mat-icon.component'; @@ -26,19 +16,9 @@ import { GitInstancesWrapperService } from 'src/app/settings/modelsources/git-se selector: 'app-git-settings', templateUrl: './git-settings.component.html', imports: [ - MatIconAnchor, RouterLink, - MatIcon, - MatIconButton, FormsModule, ReactiveFormsModule, - MatFormField, - MatLabel, - MatSelect, - MatOption, - MatInput, - MatError, - MatButton, AsyncPipe, MatIconComponent, MatCardOverviewSkeletonLoaderComponent, diff --git a/frontend/src/app/settings/modelsources/t4c-settings/edit-t4c-license-server/edit-t4c-license-server.component.ts b/frontend/src/app/settings/modelsources/t4c-settings/edit-t4c-license-server/edit-t4c-license-server.component.ts index cc7df3f21..5d9ea6501 100644 --- a/frontend/src/app/settings/modelsources/t4c-settings/edit-t4c-license-server/edit-t4c-license-server.component.ts +++ b/frontend/src/app/settings/modelsources/t4c-settings/edit-t4c-license-server/edit-t4c-license-server.component.ts @@ -2,7 +2,7 @@ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors * SPDX-License-Identifier: Apache-2.0 */ -import { AsyncPipe, JsonPipe, NgIf } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormBuilder, @@ -12,7 +12,6 @@ import { Validators, } from '@angular/forms'; import { MatButton } from '@angular/material/button'; -import { MatRipple } from '@angular/material/core'; import { MatDialog } from '@angular/material/dialog'; import { MatError, MatFormField, MatLabel } from '@angular/material/form-field'; import { MatIcon } from '@angular/material/icon'; @@ -24,7 +23,6 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { filter, map, take } from 'rxjs'; import { BreadcrumbsService } from '../../../../general/breadcrumbs/breadcrumbs.service'; import { ConfirmationDialogComponent } from '../../../../helpers/confirmation-dialog/confirmation-dialog.component'; -import { MatIconComponent } from '../../../../helpers/mat-icon/mat-icon.component'; import { ToastService } from '../../../../helpers/toast/toast.service'; import { SettingsModelsourcesT4CLicenseServersService } from '../../../../openapi'; import { T4CLicenseServerWrapperService } from '../../../../services/settings/t4c-license-server.service'; @@ -43,11 +41,7 @@ import { T4CLicenseServerWrapperService } from '../../../../services/settings/t4 MatError, MatIcon, AsyncPipe, - NgIf, - JsonPipe, NgxSkeletonLoaderModule, - MatIconComponent, - MatRipple, RouterLink, MatTooltip, ], diff --git a/frontend/src/app/users/user-settings/user-settings.component.ts b/frontend/src/app/users/user-settings/user-settings.component.ts index 5d097bc2f..636954907 100644 --- a/frontend/src/app/users/user-settings/user-settings.component.ts +++ b/frontend/src/app/users/user-settings/user-settings.component.ts @@ -24,7 +24,6 @@ import { } from '@angular/material/form-field'; import { MatIcon } from '@angular/material/icon'; import { MatInput } from '@angular/material/input'; -import { MatListSubheaderCssMatStyler } from '@angular/material/list'; import { MatTooltip } from '@angular/material/tooltip'; import { RouterLink } from '@angular/router'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; @@ -52,7 +51,6 @@ import { UserWrapperService } from 'src/app/users/user-wrapper/user-wrapper.serv FormsModule, MatIcon, MatSuffix, - MatListSubheaderCssMatStyler, RouterLink, MatIconButton, MatTooltip, diff --git a/frontend/src/app/users/users-profile/user-workspaces/user-workspaces.component.ts b/frontend/src/app/users/users-profile/user-workspaces/user-workspaces.component.ts index 9aa544e2d..ae9374170 100644 --- a/frontend/src/app/users/users-profile/user-workspaces/user-workspaces.component.ts +++ b/frontend/src/app/users/users-profile/user-workspaces/user-workspaces.component.ts @@ -10,7 +10,6 @@ import { MatDividerModule } from '@angular/material/divider'; import { MatIconModule } from '@angular/material/icon'; import { BehaviorSubject, of, switchMap } from 'rxjs'; import { ConfirmationDialogComponent } from 'src/app/helpers/confirmation-dialog/confirmation-dialog.component'; -import { DisplayValueComponent } from 'src/app/helpers/display-value/display-value.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { User, UsersService, Workspace } from 'src/app/openapi'; import { OwnUserWrapperService } from 'src/app/services/user/user.service'; @@ -18,13 +17,7 @@ import { UserWrapperService } from 'src/app/users/user-wrapper/user-wrapper.serv @Component({ selector: 'app-user-workspaces', - imports: [ - CommonModule, - MatDividerModule, - DisplayValueComponent, - MatButtonModule, - MatIconModule, - ], + imports: [CommonModule, MatDividerModule, MatButtonModule, MatIconModule], templateUrl: './user-workspaces.component.html', styles: ` :host { diff --git a/frontend/src/app/users/users-profile/users-profile.component.ts b/frontend/src/app/users/users-profile/users-profile.component.ts index 3e8e06afc..50fe378ab 100644 --- a/frontend/src/app/users/users-profile/users-profile.component.ts +++ b/frontend/src/app/users/users-profile/users-profile.component.ts @@ -4,7 +4,6 @@ */ import { AsyncPipe, DatePipe } from '@angular/common'; import { Component } from '@angular/core'; -import { RouterLink } from '@angular/router'; import { UntilDestroy } from '@ngneat/until-destroy'; import { BehaviorSubject } from 'rxjs'; import { OwnUserWrapperService } from 'src/app/services/user/user.service'; @@ -20,7 +19,6 @@ import { UserWorkspacesComponent } from './user-workspaces/user-workspaces.compo selector: 'app-users-profile', templateUrl: './users-profile.component.html', imports: [ - RouterLink, DatePipe, CommonProjectsComponent, UserInformationComponent,