diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index 9b322d4a9e5..ccaf8742330 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -42,11 +42,6 @@ export const rootRouterConfig: Routes = [ loadChildren: () => import('app/pages/dashboard/dashboard.module').then((module) => module.DashboardModule), data: { title: T('Dashboard'), breadcrumb: T('Dashboard') }, }, - { - path: 'credentials', - loadChildren: () => import('./pages/account/account.module').then((module) => module.AccountModule), - data: { title: T('Credentials'), breadcrumb: T('Credentials') }, - }, { path: 'system', loadChildren: () => import('./pages/system/system.module').then((module) => module.SystemModule), @@ -59,17 +54,17 @@ export const rootRouterConfig: Routes = [ }, { path: 'network', - loadChildren: () => import('./pages/network/network.module').then((module) => module.NetworkModule), + loadComponent: () => import('./pages/network/network.component').then((module) => module.NetworkComponent), data: { title: T('Network'), breadcrumb: T('Network') }, }, { path: 'services', - loadChildren: () => import('./pages/services/services.module').then((module) => module.ServicesModule), + loadComponent: () => import('./pages/services/services.component').then((module) => module.ServicesComponent), data: { title: T('Services'), breadcrumb: T('Services') }, }, { path: 'directoryservice', - loadChildren: () => import('app/pages/directory-service/directory-service.module').then((module) => module.DirectoryServiceModule), + loadChildren: () => import('app/pages/directory-service/directory-service.routes').then((module) => module.routes), data: { title: T('Directory Services'), breadcrumb: T('Directory Services') }, }, { @@ -104,12 +99,12 @@ export const rootRouterConfig: Routes = [ }, { path: 'shell', - loadChildren: () => import('./pages/shell/shell.module').then((module) => module.ShellModule), + loadComponent: () => import('./pages/shell/shell.component').then((module) => module.ShellComponent), data: { title: T('Shell'), breadcrumb: T('Shell') }, }, { path: 'apikeys', - loadChildren: () => import('./pages/api-keys/api-keys.module').then((module) => module.ApiKeysModule), + loadComponent: () => import('./pages/api-keys/api-keys.component').then((module) => module.ApiKeysComponent), data: { title: T('API Keys'), breadcrumb: T('API Keys') }, }, { @@ -134,7 +129,7 @@ export const rootRouterConfig: Routes = [ }, { path: 'system/audit', - loadChildren: () => import('./pages/audit/audit.module').then((module) => module.AuditModule), + loadComponent: () => import('./pages/audit/audit.component').then((module) => module.AuditComponent), }, ], }, diff --git a/src/app/modules/global-search/components/global-search-results/global-search-results.component.ts b/src/app/modules/global-search/components/global-search-results/global-search-results.component.ts index ed67212f431..5e16f43e122 100644 --- a/src/app/modules/global-search/components/global-search-results/global-search-results.component.ts +++ b/src/app/modules/global-search/components/global-search-results/global-search-results.component.ts @@ -1,8 +1,11 @@ import { ChangeDetectionStrategy, Component, Inject, Input, OnChanges, output, TrackByFunction, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatCard } from '@angular/material/card'; import { Router } from '@angular/router'; import { UntilDestroy } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; import { findIndex, isEqual } from 'lodash-es'; import { WINDOW } from 'app/helpers/window.helper'; import { Option } from 'app/interfaces/option.interface'; @@ -13,6 +16,8 @@ import { processHierarchy } from 'app/modules/global-search/helpers/process-hier import { UiSearchableElement } from 'app/modules/global-search/interfaces/ui-searchable-element.interface'; import { GlobalSearchSectionsProvider } from 'app/modules/global-search/services/global-search-sections.service'; import { UiSearchProvider } from 'app/modules/global-search/services/ui-search.service'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { AuthService } from 'app/services/auth/auth.service'; @UntilDestroy() @@ -21,6 +26,14 @@ import { AuthService } from 'app/services/auth/auth.service'; templateUrl: './global-search-results.component.html', styleUrls: ['./global-search-results.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatCard, + TestDirective, + IxIconComponent, + MatButton, + TranslateModule, + ], }) export class GlobalSearchResultsComponent implements OnChanges { @Input() searchTerm = ''; diff --git a/src/app/modules/global-search/components/global-search-trigger/global-search-trigger.component.spec.ts b/src/app/modules/global-search/components/global-search-trigger/global-search-trigger.component.spec.ts index 28cfcf9a8f5..9ed18f19cc9 100644 --- a/src/app/modules/global-search/components/global-search-trigger/global-search-trigger.component.spec.ts +++ b/src/app/modules/global-search/components/global-search-trigger/global-search-trigger.component.spec.ts @@ -1,5 +1,6 @@ import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { ComponentPortal } from '@angular/cdk/portal'; +import { MatInput } from '@angular/material/input'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; @@ -17,9 +18,10 @@ describe('GlobalSearchTriggerComponent', () => { const createComponent = createComponentFactory({ component: GlobalSearchTriggerComponent, detectChanges: false, - declarations: [ + imports: [ MockComponent(KeyboardShortcutComponent), MockComponent(GlobalSearchComponent), + MatInput, ], providers: [ mockProvider(UiSearchProvider, { diff --git a/src/app/modules/global-search/components/global-search-trigger/global-search-trigger.component.ts b/src/app/modules/global-search/components/global-search-trigger/global-search-trigger.component.ts index d2af8e74e26..b71c912bd03 100644 --- a/src/app/modules/global-search/components/global-search-trigger/global-search-trigger.component.ts +++ b/src/app/modules/global-search/components/global-search-trigger/global-search-trigger.component.ts @@ -8,11 +8,16 @@ import { HostListener, ViewContainerRef, } from '@angular/core'; +import { MatInput } from '@angular/material/input'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; import { delay, take } from 'rxjs'; import { GlobalSearchComponent } from 'app/modules/global-search/components/global-search/global-search.component'; import { searchDelayConst } from 'app/modules/global-search/constants/delay.const'; import { UiSearchProvider } from 'app/modules/global-search/services/ui-search.service'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { KeyboardShortcutComponent } from 'app/modules/keyboard-shortcut/keyboard-shortcut.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { FocusService } from 'app/services/focus.service'; @UntilDestroy() @@ -21,6 +26,14 @@ import { FocusService } from 'app/services/focus.service'; templateUrl: './global-search-trigger.component.html', styleUrls: ['./global-search-trigger.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxIconComponent, + MatInput, + TestDirective, + KeyboardShortcutComponent, + TranslateModule, + ], }) export class GlobalSearchTriggerComponent implements AfterViewInit { protected overlayRef: OverlayRef; diff --git a/src/app/modules/global-search/components/global-search/global-search.component.spec.ts b/src/app/modules/global-search/components/global-search/global-search.component.spec.ts index c549338a051..d4d5e969bfd 100644 --- a/src/app/modules/global-search/components/global-search/global-search.component.spec.ts +++ b/src/app/modules/global-search/components/global-search/global-search.component.spec.ts @@ -35,7 +35,6 @@ describe('GlobalSearchComponent', () => { const createComponent = createComponentFactory({ component: GlobalSearchComponent, - declarations: [GlobalSearchResultsComponent], imports: [ FormsModule, ReactiveFormsModule, @@ -46,6 +45,7 @@ describe('GlobalSearchComponent', () => { IxIconComponent, A11yModule, EmptyComponent, + GlobalSearchResultsComponent, ], providers: [ mockAuth(), diff --git a/src/app/modules/global-search/components/global-search/global-search.component.ts b/src/app/modules/global-search/components/global-search/global-search.component.ts index 05eb4b2e5d3..f3e49855323 100644 --- a/src/app/modules/global-search/components/global-search/global-search.component.ts +++ b/src/app/modules/global-search/components/global-search/global-search.component.ts @@ -1,3 +1,4 @@ +import { CdkTrapFocus } from '@angular/cdk/a11y'; import { DOCUMENT } from '@angular/common'; import { Component, ChangeDetectionStrategy, OnInit, ViewChild, ElementRef, ChangeDetectorRef, @@ -5,9 +6,11 @@ import { AfterViewInit, OnDestroy, } from '@angular/core'; -import { FormControl } from '@angular/forms'; +import { FormControl, ReactiveFormsModule } from '@angular/forms'; +import { MatInput } from '@angular/material/input'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; +import { TranslateModule } from '@ngx-translate/core'; import { isEqual } from 'lodash-es'; import { tap, debounceTime, filter, switchMap, @@ -15,6 +18,7 @@ import { distinctUntilChanged, } from 'rxjs'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { GlobalSearchResultsComponent } from 'app/modules/global-search/components/global-search-results/global-search-results.component'; import { searchDelayConst } from 'app/modules/global-search/constants/delay.const'; import { extractVersion } from 'app/modules/global-search/helpers/extract-version'; import { moveToNextFocusableElement, moveToPreviousFocusableElement } from 'app/modules/global-search/helpers/focus-helper'; @@ -22,6 +26,8 @@ import { UiSearchableElement } from 'app/modules/global-search/interfaces/ui-sea import { GlobalSearchSectionsProvider } from 'app/modules/global-search/services/global-search-sections.service'; import { UiSearchDirectivesService } from 'app/modules/global-search/services/ui-search-directives.service'; import { UiSearchProvider } from 'app/modules/global-search/services/ui-search.service'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { FocusService } from 'app/services/focus.service'; import { IxChainedSlideInService } from 'app/services/ix-chained-slide-in.service'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @@ -35,6 +41,16 @@ import { waitForSystemInfo } from 'app/store/system-info/system-info.selectors'; templateUrl: './global-search.component.html', styleUrls: ['./global-search.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + CdkTrapFocus, + IxIconComponent, + MatInput, + ReactiveFormsModule, + TestDirective, + GlobalSearchResultsComponent, + TranslateModule, + ], }) export class GlobalSearchComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild('searchInput') searchInput: ElementRef; diff --git a/src/app/modules/global-search/global-search.module.ts b/src/app/modules/global-search/global-search.module.ts deleted file mode 100644 index 8c6f9e554f9..00000000000 --- a/src/app/modules/global-search/global-search.module.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { A11yModule } from '@angular/cdk/a11y'; -import { OverlayModule } from '@angular/cdk/overlay'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatInputModule } from '@angular/material/input'; -import { TranslateModule } from '@ngx-translate/core'; -import { EmptyComponent } from 'app/modules/empty/empty.component'; -import { GlobalSearchComponent } from 'app/modules/global-search/components/global-search/global-search.component'; -import { GlobalSearchResultsComponent } from 'app/modules/global-search/components/global-search-results/global-search-results.component'; -import { GlobalSearchTriggerComponent } from 'app/modules/global-search/components/global-search-trigger/global-search-trigger.component'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { KeyboardShortcutComponent } from 'app/modules/keyboard-shortcut/keyboard-shortcut.component'; -import { TestDirective } from 'app/modules/test-id/test.directive'; - -@NgModule({ - declarations: [ - GlobalSearchComponent, - GlobalSearchResultsComponent, - GlobalSearchTriggerComponent, - ], - imports: [ - IxIconComponent, - MatInputModule, - TranslateModule, - MatDialogModule, - ReactiveFormsModule, - MatCardModule, - OverlayModule, - A11yModule, - EmptyComponent, - MatButtonModule, - KeyboardShortcutComponent, - TestDirective, - ], - exports: [GlobalSearchComponent, GlobalSearchTriggerComponent], -}) -export class GlobalSearchModule { } diff --git a/src/app/modules/layout/admin-layout/admin-layout.component.ts b/src/app/modules/layout/admin-layout/admin-layout.component.ts index 7b32de3594c..990851ef527 100644 --- a/src/app/modules/layout/admin-layout/admin-layout.component.ts +++ b/src/app/modules/layout/admin-layout/admin-layout.component.ts @@ -31,7 +31,7 @@ import { CopyrightLineComponent } from 'app/modules/layout/copyright-line/copyri import { NavigationComponent } from 'app/modules/layout/navigation/navigation.component'; import { SecondaryMenuComponent } from 'app/modules/layout/secondary-menu/secondary-menu.component'; import { TopbarComponent } from 'app/modules/layout/topbar/topbar.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { DefaultPageHeaderComponent } from 'app/modules/page-header/default-page-header/default-page-header.component'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { LanguageService } from 'app/services/language.service'; @@ -63,7 +63,7 @@ import { selectBuildYear, waitForSystemInfo } from 'app/store/system-info/system CopyrightLineComponent, MatSidenavContent, TopbarComponent, - PageHeaderModule, + DefaultPageHeaderComponent, RouterOutlet, ConsoleFooterComponent, AlertsModule, diff --git a/src/app/modules/layout/topbar/topbar.component.ts b/src/app/modules/layout/topbar/topbar.component.ts index cb54b494476..4eb4dda5870 100644 --- a/src/app/modules/layout/topbar/topbar.component.ts +++ b/src/app/modules/layout/topbar/topbar.component.ts @@ -19,7 +19,7 @@ import { helptextTopbar } from 'app/helptext/topbar'; import { AlertSlice, selectImportantUnreadAlertsCount } from 'app/modules/alerts/store/alert.selectors'; import { UpdateDialogComponent } from 'app/modules/dialog/components/update-dialog/update-dialog.component'; import { FeedbackDialogComponent } from 'app/modules/feedback/components/feedback-dialog/feedback-dialog.component'; -import { GlobalSearchModule } from 'app/modules/global-search/global-search.module'; +import { GlobalSearchTriggerComponent } from 'app/modules/global-search/components/global-search-trigger/global-search-trigger.component'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { selectUpdateJob } from 'app/modules/jobs/store/job.selectors'; import { CheckinIndicatorComponent } from 'app/modules/layout/topbar/checkin-indicator/checkin-indicator.component'; @@ -56,7 +56,7 @@ import { alertIndicatorPressed, sidenavIndicatorPressed } from 'app/store/topbar MatIconButton, MatTooltip, IxIconComponent, - GlobalSearchModule, + GlobalSearchTriggerComponent, RouterLink, IxLogoComponent, TruecommandModule, diff --git a/src/app/modules/page-header/breadcrumb/breadcrumb.component.ts b/src/app/modules/page-header/breadcrumb/breadcrumb.component.ts index 59ecaab9b3b..e7c4ce18fea 100644 --- a/src/app/modules/page-header/breadcrumb/breadcrumb.component.ts +++ b/src/app/modules/page-header/breadcrumb/breadcrumb.component.ts @@ -1,10 +1,12 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { Router, NavigationEnd } from '@angular/router'; +import { Router, NavigationEnd, RouterLink } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; import { uniqBy } from 'lodash-es'; import { filter } from 'rxjs/operators'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { RoutePartsService, RoutePart } from 'app/services/route-parts/route-parts.service'; // TODO: Bad. Redo. @@ -16,6 +18,12 @@ const noLinksRoutes = ['/credentials', '/reportsdashboard', '/system']; templateUrl: './breadcrumb.component.html', styleUrls: ['./breadcrumb.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + RouterLink, + TestDirective, + TranslateModule, + ], }) export class BreadcrumbComponent implements OnInit { breadcrumbs: RoutePart[]; diff --git a/src/app/modules/page-header/default-page-header/default-page-header.component.ts b/src/app/modules/page-header/default-page-header/default-page-header.component.ts index 1425159d61b..2a28eba18c9 100644 --- a/src/app/modules/page-header/default-page-header/default-page-header.component.ts +++ b/src/app/modules/page-header/default-page-header/default-page-header.component.ts @@ -1,4 +1,6 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { LayoutService } from 'app/services/layout.service'; @Component({ @@ -9,6 +11,8 @@ import { LayoutService } from 'app/services/layout.service'; } `, changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [PageHeaderComponent, AsyncPipe], }) export class DefaultPageHeaderComponent { readonly hasCustomPageHeader$ = this.layoutService.hasCustomPageHeader$; diff --git a/src/app/modules/page-header/is-new-indicator/new-page-badge.component.ts b/src/app/modules/page-header/is-new-indicator/new-page-badge.component.ts index ca5117253e1..663be40ef44 100644 --- a/src/app/modules/page-header/is-new-indicator/new-page-badge.component.ts +++ b/src/app/modules/page-header/is-new-indicator/new-page-badge.component.ts @@ -1,12 +1,23 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { MatButton } from '@angular/material/button'; import { MatDialog } from '@angular/material/dialog'; +import { TranslateModule } from '@ngx-translate/core'; +import { IfNightlyDirective } from 'app/directives/if-nightly/if-nightly.directive'; import { FeedbackDialogComponent } from 'app/modules/feedback/components/feedback-dialog/feedback-dialog.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; @Component({ selector: 'ix-new-page-badge', templateUrl: './new-page-badge.component.html', styleUrls: ['./new-page-badge.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IfNightlyDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class NewPageBadgeComponent { constructor(private matDialog: MatDialog) {} diff --git a/src/app/modules/page-header/page-header.module.ts b/src/app/modules/page-header/page-header.module.ts deleted file mode 100644 index c1a3536e583..00000000000 --- a/src/app/modules/page-header/page-header.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { MatButton } from '@angular/material/button'; -import { RouterModule } from '@angular/router'; -import { TranslateModule } from '@ngx-translate/core'; -import { IfNightlyDirective } from 'app/directives/if-nightly/if-nightly.directive'; -import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { BreadcrumbComponent } from 'app/modules/page-header/breadcrumb/breadcrumb.component'; -import { - DefaultPageHeaderComponent, -} from 'app/modules/page-header/default-page-header/default-page-header.component'; -import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { NewPageBadgeComponent } from './is-new-indicator/new-page-badge.component'; - -@NgModule({ - imports: [ - RouterModule, - TranslateModule, - MatButton, - AsyncPipe, - IfNightlyDirective, - FakeProgressBarComponent, - TestDirective, - ], - declarations: [ - BreadcrumbComponent, - PageHeaderComponent, - NewPageBadgeComponent, - DefaultPageHeaderComponent, - ], - exports: [ - PageHeaderComponent, - DefaultPageHeaderComponent, - ], -}) -export class PageHeaderModule {} diff --git a/src/app/modules/page-header/page-title-header/page-header.component.ts b/src/app/modules/page-header/page-title-header/page-header.component.ts index 417dcbfd5e3..5eb31c18605 100644 --- a/src/app/modules/page-header/page-title-header/page-header.component.ts +++ b/src/app/modules/page-header/page-title-header/page-header.component.ts @@ -1,7 +1,12 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit, } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; import { map } from 'rxjs/operators'; +import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; +import { BreadcrumbComponent } from 'app/modules/page-header/breadcrumb/breadcrumb.component'; +import { NewPageBadgeComponent } from 'app/modules/page-header/is-new-indicator/new-page-badge.component'; import { LayoutService } from 'app/services/layout.service'; import { PageTitleService } from 'app/services/page-title.service'; @@ -15,6 +20,14 @@ import { PageTitleService } from 'app/services/page-title.service'; templateUrl: './page-header.component.html', styleUrls: ['./page-header.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + BreadcrumbComponent, + NewPageBadgeComponent, + FakeProgressBarComponent, + TranslateModule, + AsyncPipe, + ], }) export class PageHeaderComponent implements OnInit, OnDestroy { @Input() pageTitle: string; diff --git a/src/app/modules/terminal/components/copy-paste-message/copy-paste-message.component.ts b/src/app/modules/terminal/components/copy-paste-message/copy-paste-message.component.ts index 0f8d77d1c86..1bdb69c656c 100644 --- a/src/app/modules/terminal/components/copy-paste-message/copy-paste-message.component.ts +++ b/src/app/modules/terminal/components/copy-paste-message/copy-paste-message.component.ts @@ -1,12 +1,27 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { MatDialogRef } from '@angular/material/dialog'; -import { TranslateService } from '@ngx-translate/core'; +import { MatButton } from '@angular/material/button'; +import { + MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, +} from '@angular/material/dialog'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { helptextShell } from 'app/helptext/shell/shell'; +import { TestDirective } from 'app/modules/test-id/test.directive'; @Component({ selector: 'ix-copy-paste-message', templateUrl: './copy-paste-message.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + CdkScrollable, + MatDialogContent, + MatDialogActions, + MatButton, + TestDirective, + TranslateModule, + ], }) export class CopyPasteMessageComponent { title = helptextShell.dialog_title; diff --git a/src/app/modules/terminal/components/terminal/terminal.component.ts b/src/app/modules/terminal/components/terminal/terminal.component.ts index 89bc152e467..b1c4c0990c7 100644 --- a/src/app/modules/terminal/components/terminal/terminal.component.ts +++ b/src/app/modules/terminal/components/terminal/terminal.component.ts @@ -1,19 +1,25 @@ +import { NgStyle } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostListener, Input, OnDestroy, OnInit, ViewChild, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; import { MatDialog } from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { FitAddon } from '@xterm/addon-fit'; import { Terminal } from '@xterm/xterm'; import FontFaceObserver from 'fontfaceobserver'; import { filter, take, tap } from 'rxjs/operators'; import { ShellConnectedEvent } from 'app/interfaces/shell.interface'; import { TerminalConfiguration } from 'app/interfaces/terminal.interface'; +import { ToolbarSliderComponent } from 'app/modules/forms/toolbar-slider/toolbar-slider.component'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { CopyPasteMessageComponent } from 'app/modules/terminal/components/copy-paste-message/copy-paste-message.component'; import { XtermAttachAddon } from 'app/modules/terminal/xterm-attach-addon'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { TooltipComponent } from 'app/modules/tooltip/tooltip.component'; import { AuthService } from 'app/services/auth/auth.service'; import { ShellService } from 'app/services/shell.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -27,6 +33,16 @@ import { waitForPreferences } from 'app/store/preferences/preferences.selectors' styleUrls: ['./terminal.component.scss'], providers: [ShellService], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + ToolbarSliderComponent, + MatButton, + TestDirective, + TooltipComponent, + NgStyle, + TranslateModule, + PageHeaderComponent, + ], }) export class TerminalComponent implements OnInit, OnDestroy { @Input() conf: TerminalConfiguration; diff --git a/src/app/modules/terminal/terminal.module.ts b/src/app/modules/terminal/terminal.module.ts deleted file mode 100644 index a78fc37dd84..00000000000 --- a/src/app/modules/terminal/terminal.module.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { NgStyle } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDialogModule } from '@angular/material/dialog'; -import { TranslateModule } from '@ngx-translate/core'; -import { ToolbarSliderComponent } from 'app/modules/forms/toolbar-slider/toolbar-slider.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { CopyPasteMessageComponent } from 'app/modules/terminal/components/copy-paste-message/copy-paste-message.component'; -import { TerminalComponent } from 'app/modules/terminal/components/terminal/terminal.component'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { TooltipComponent } from 'app/modules/tooltip/tooltip.component'; - -@NgModule({ - imports: [ - TranslateModule, - MatButtonModule, - MatDialogModule, - ToolbarSliderComponent, - TooltipComponent, - PageHeaderModule, - NgStyle, - TestDirective, - ], - declarations: [ - TerminalComponent, - CopyPasteMessageComponent, - ], - exports: [ - TerminalComponent, - ], -}) -export class TerminalModule {} diff --git a/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.ts b/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.ts index cd3c7cd19e8..838394b843e 100644 --- a/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.ts +++ b/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.ts @@ -1,14 +1,23 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { + MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, +} from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { helptextTopbar } from 'app/helptext/topbar'; import { TrueCommandConfig, UpdateTrueCommand } from 'app/interfaces/true-command-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -25,6 +34,20 @@ export type TruecommandSignupModalResult = boolean | { deregistered: boolean }; styleUrls: ['./truecommand-connect-modal.component.scss'], templateUrl: './truecommand-connect-modal.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + ReactiveFormsModule, + CdkScrollable, + MatDialogContent, + IxInputComponent, + IxCheckboxComponent, + MatDialogActions, + MatButton, + TestDirective, + RequiresRolesDirective, + TranslateModule, + ], }) export class TruecommandConnectModalComponent implements OnInit { readonly helptext = helptextTopbar; diff --git a/src/app/modules/truecommand/components/truecommand-signup-modal/truecommand-signup-modal.component.ts b/src/app/modules/truecommand/components/truecommand-signup-modal/truecommand-signup-modal.component.ts index 2534cb6b8e5..dcaf104a98b 100644 --- a/src/app/modules/truecommand/components/truecommand-signup-modal/truecommand-signup-modal.component.ts +++ b/src/app/modules/truecommand/components/truecommand-signup-modal/truecommand-signup-modal.component.ts @@ -1,16 +1,37 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, Component, Inject, } from '@angular/core'; -import { MatDialogRef } from '@angular/material/dialog'; +import { MatButton } from '@angular/material/button'; +import { + MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, +} from '@angular/material/dialog'; +import { TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { WINDOW } from 'app/helpers/window.helper'; import { helptextTopbar } from 'app/helptext/topbar'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; @Component({ selector: 'ix-truecommand-signup-modal', templateUrl: './truecommand-signup-modal.component.html', styleUrls: ['./truecommand-signup-modal.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + CdkScrollable, + MatDialogContent, + FormActionsComponent, + MatDialogActions, + MatButton, + TestDirective, + MatDialogClose, + RequiresRolesDirective, + TranslateModule, + ], }) export class TruecommandSignupModalComponent { readonly helptext = helptextTopbar; diff --git a/src/app/modules/truecommand/components/truecommand-status-modal/truecommand-status-modal.component.ts b/src/app/modules/truecommand/components/truecommand-status-modal/truecommand-status-modal.component.ts index 7cd3e9d916d..6fcd4c0514d 100644 --- a/src/app/modules/truecommand/components/truecommand-status-modal/truecommand-status-modal.component.ts +++ b/src/app/modules/truecommand/components/truecommand-status-modal/truecommand-status-modal.component.ts @@ -1,13 +1,21 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, } from '@angular/core'; -import { MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatButton } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, +} from '@angular/material/dialog'; +import { MatDivider } from '@angular/material/divider'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; import { TrueCommandStatus } from 'app/enums/true-command-status.enum'; import { WINDOW } from 'app/helpers/window.helper'; import { helptextTopbar } from 'app/helptext/topbar'; import { TrueCommandConfig } from 'app/interfaces/true-command-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { TruecommandButtonComponent } from 'app/modules/truecommand/truecommand-button.component'; @UntilDestroy() @@ -16,6 +24,18 @@ import { TruecommandButtonComponent } from 'app/modules/truecommand/truecommand- templateUrl: './truecommand-status-modal.component.html', styleUrls: ['./truecommand-status-modal.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + MatDivider, + CdkScrollable, + MatDialogContent, + IxIconComponent, + MatDialogActions, + MatButton, + TestDirective, + TranslateModule, + ], }) export class TruecommandStatusModalComponent { parent = this.data.parent; diff --git a/src/app/modules/truecommand/truecommand-button.component.spec.ts b/src/app/modules/truecommand/truecommand-button.component.spec.ts index 27c2b8ce289..ff0e78531e8 100644 --- a/src/app/modules/truecommand/truecommand-button.component.spec.ts +++ b/src/app/modules/truecommand/truecommand-button.component.spec.ts @@ -38,8 +38,6 @@ describe('TruecommandButtonComponent', () => { component: TruecommandButtonComponent, imports: [ ReactiveFormsModule, - ], - declarations: [ TruecommandStatusModalComponent, ], providers: [ diff --git a/src/app/modules/truecommand/truecommand-button.component.ts b/src/app/modules/truecommand/truecommand-button.component.ts index 35b0e4a6c97..59a1f7f9ac2 100644 --- a/src/app/modules/truecommand/truecommand-button.component.ts +++ b/src/app/modules/truecommand/truecommand-button.component.ts @@ -1,16 +1,24 @@ +import { NgClass } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; +import { MatBadge } from '@angular/material/badge'; +import { MatIconButton } from '@angular/material/button'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; +import { MatTooltip } from '@angular/material/tooltip'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; import { isObject } from 'lodash-es'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { TrueCommandStatus } from 'app/enums/true-command-status.enum'; import { WINDOW } from 'app/helpers/window.helper'; import { helptextTopbar } from 'app/helptext/topbar'; import { TrueCommandConfig } from 'app/interfaces/true-command-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { TruecommandConnectModalComponent, TruecommandSignupModalResult, @@ -30,6 +38,17 @@ import { WebSocketService } from 'app/services/ws.service'; styleUrls: ['./truecommand-button.component.scss'], templateUrl: './truecommand-button.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatIconButton, + TestDirective, + MatTooltip, + IxIconComponent, + MatBadge, + NgClass, + UiSearchDirective, + TranslateModule, + ], }) export class TruecommandButtonComponent implements OnInit { readonly TrueCommandStatus = TrueCommandStatus; diff --git a/src/app/modules/truecommand/truecommand.module.ts b/src/app/modules/truecommand/truecommand.module.ts index 813cb229790..f9be42aa7b3 100644 --- a/src/app/modules/truecommand/truecommand.module.ts +++ b/src/app/modules/truecommand/truecommand.module.ts @@ -21,12 +21,6 @@ import { TruecommandButtonComponent } from 'app/modules/truecommand/truecommand- import { TruecommandSignupModalComponent } from './components/truecommand-signup-modal/truecommand-signup-modal.component'; @NgModule({ - declarations: [ - TruecommandButtonComponent, - TruecommandStatusModalComponent, - TruecommandConnectModalComponent, - TruecommandSignupModalComponent, - ], exports: [ TruecommandButtonComponent, ], @@ -46,6 +40,10 @@ import { TruecommandSignupModalComponent } from './components/truecommand-signup FormActionsComponent, UiSearchDirective, TestDirective, + TruecommandButtonComponent, + TruecommandStatusModalComponent, + TruecommandConnectModalComponent, + TruecommandSignupModalComponent, ], providers: [ provideHttpClient(withInterceptorsFromDi()), diff --git a/src/app/pages/account/account.module.ts b/src/app/pages/account/account.module.ts deleted file mode 100644 index a3fb4953a81..00000000000 --- a/src/app/pages/account/account.module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatCardModule } from '@angular/material/card'; -import { MatListModule } from '@angular/material/list'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatSortModule } from '@angular/material/sort'; -import { TranslateModule } from '@ngx-translate/core'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { GroupsModule } from './groups/groups.module'; -import { UsersModule } from './users/users.module'; - -@NgModule({ - imports: [ - ReactiveFormsModule, - TranslateModule, - MatSortModule, - MatCardModule, - IxIconComponent, - MatListModule, - MatProgressSpinnerModule, - UsersModule, - GroupsModule, - ], -}) -export class AccountModule {} diff --git a/src/app/pages/account/groups/groups.module.ts b/src/app/pages/account/groups/groups.module.ts deleted file mode 100644 index 77c4edfcdf3..00000000000 --- a/src/app/pages/account/groups/groups.module.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatRippleModule } from '@angular/material/core'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatListModule } from '@angular/material/list'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatSlideToggleModule } from '@angular/material/slide-toggle'; -import { MatSortModule } from '@angular/material/sort'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { RouterModule } from '@angular/router'; -import { EffectsModule } from '@ngrx/effects'; -import { StoreModule } from '@ngrx/store'; -import { TranslateModule } from '@ngx-translate/core'; -import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; -import { UiSearchDirective } from 'app/directives/ui-search.directive'; -import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; -import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; -import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; -import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; -import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; -import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; -import { - IxModalHeaderComponent, -} from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; -import { ReadOnlyComponent } from 'app/modules/forms/ix-forms/components/readonly-badge/readonly-badge.component'; -import { SearchInputModule } from 'app/modules/forms/search-input/search-input.module'; -import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; -import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; -import { - IxTableExpandableRowComponent, -} from 'app/modules/ix-table/components/ix-table-expandable-row/ix-table-expandable-row.component'; -import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; -import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; -import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { DualListModule } from 'app/modules/lists/dual-list/dual-list.module'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { GroupDetailsRowComponent } from 'app/pages/account/groups/group-details-row/group-details-row.component'; -import { GroupFormComponent } from 'app/pages/account/groups/group-form/group-form.component'; -import { GroupListComponent } from 'app/pages/account/groups/group-list/group-list.component'; -import { GroupMembersComponent } from 'app/pages/account/groups/group-members/group-members.component'; -import { routing } from 'app/pages/account/groups/groups.routing'; -import { PrivilegeFormComponent } from 'app/pages/account/groups/privilege/privilege-form/privilege-form.component'; -import { PrivilegeListComponent } from 'app/pages/account/groups/privilege/privilege-list/privilege-list.component'; -import { GroupEffects } from 'app/pages/account/groups/store/group.effects'; -import { groupReducer } from 'app/pages/account/groups/store/group.reducer'; -import { groupStateKey } from 'app/pages/account/groups/store/group.selectors'; -import { DeleteGroupDialogComponent } from './group-details-row/delete-group-dialog/delete-group-dialog.component'; - -@NgModule({ - providers: [], - imports: [ - EffectsModule.forFeature([GroupEffects]), - MatButtonModule, - IxIconComponent, - MatListModule, - MatMenuModule, - MatRippleModule, - MatCheckboxModule, - MatSortModule, - MatExpansionModule, - MatCardModule, - MatDialogModule, - MatTooltipModule, - MatProgressBarModule, - MatProgressSpinnerModule, - RouterModule, - ReactiveFormsModule, - routing, - StoreModule.forFeature(groupStateKey, groupReducer), - TranslateModule, - TranslateModule, - DualListModule, - MatSlideToggleModule, - SearchInputModule, - SearchInput1Component, - IxFieldsetComponent, - IxModalHeaderComponent, - IxInputComponent, - IxChipsComponent, - IxCheckboxComponent, - FormActionsComponent, - IxSelectComponent, - ReadOnlyComponent, - PageHeaderModule, - AsyncPipe, - RequiresRolesDirective, - UiSearchDirective, - IxTableDetailsRowDirective, - IxTablePagerComponent, - IxTableBodyComponent, - IxTableHeadComponent, - IxTableComponent, - IxTableEmptyDirective, - IxTableExpandableRowComponent, - TestDirective, - ], - declarations: [ - GroupListComponent, - GroupFormComponent, - GroupDetailsRowComponent, - GroupMembersComponent, - DeleteGroupDialogComponent, - PrivilegeListComponent, - PrivilegeFormComponent, - ], - exports: [], -}) -export class GroupsModule { } diff --git a/src/app/pages/account/groups/groups.routing.ts b/src/app/pages/account/groups/groups.routing.ts deleted file mode 100644 index 8a93b035468..00000000000 --- a/src/app/pages/account/groups/groups.routing.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { ModuleWithProviders } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; -import { GroupListComponent } from 'app/pages/account/groups/group-list/group-list.component'; -import { GroupMembersComponent } from 'app/pages/account/groups/group-members/group-members.component'; -import { PrivilegeListComponent } from 'app/pages/account/groups/privilege/privilege-list/privilege-list.component'; - -export const routes: Routes = [ - { - path: '', - pathMatch: 'full', - redirectTo: 'groups', - }, - { - path: 'groups', - data: { title: T('Groups'), breadcrumb: T('Groups') }, - children: [ - { - path: '', - component: GroupListComponent, - data: { title: T('Groups'), breadcrumb: T('Groups') }, - }, - { - path: ':pk/members', - component: GroupMembersComponent, - data: { title: T('Update Members'), breadcrumb: T('Members') }, - }, - { - path: 'privileges', - component: PrivilegeListComponent, - data: { - title: T('Privileges'), - breadcrumb: T('Privileges'), - }, - }, - ], - }, -]; - -export const routing: ModuleWithProviders = RouterModule.forChild(routes); diff --git a/src/app/pages/account/users/users.module.ts b/src/app/pages/account/users/users.module.ts deleted file mode 100644 index d84f0111adb..00000000000 --- a/src/app/pages/account/users/users.module.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatRippleModule } from '@angular/material/core'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatListModule } from '@angular/material/list'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatSlideToggleModule } from '@angular/material/slide-toggle'; -import { MatSortModule } from '@angular/material/sort'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { RouterModule } from '@angular/router'; -import { EffectsModule } from '@ngrx/effects'; -import { StoreModule } from '@ngrx/store'; -import { TranslateModule } from '@ngx-translate/core'; -import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; -import { UiSearchDirective } from 'app/directives/ui-search.directive'; -import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; -import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; -import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; -import { IxComboboxComponent } from 'app/modules/forms/ix-forms/components/ix-combobox/ix-combobox.component'; -import { IxExplorerComponent } from 'app/modules/forms/ix-forms/components/ix-explorer/ix-explorer.component'; -import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; -import { IxFileInputComponent } from 'app/modules/forms/ix-forms/components/ix-file-input/ix-file-input.component'; -import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; -import { IxPermissionsComponent } from 'app/modules/forms/ix-forms/components/ix-permissions/ix-permissions.component'; -import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; -import { - IxModalHeaderComponent, -} from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; -import { - IxSlideToggleComponent, -} from 'app/modules/forms/ix-forms/components/ix-slide-toggle/ix-slide-toggle.component'; -import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; -import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; -import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; -import { - IxTableExpandableRowComponent, -} from 'app/modules/ix-table/components/ix-table-expandable-row/ix-table-expandable-row.component'; -import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; -import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; -import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { TestOverrideDirective } from 'app/modules/test-id/test-override/test-override.directive'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { UserEffects } from 'app/pages/account/users/store/user.effects'; -import { userReducer } from 'app/pages/account/users/store/user.reducer'; -import { userStateKey } from 'app/pages/account/users/store/user.selectors'; -import { UserFormComponent } from 'app/pages/account/users/user-form/user-form.component'; -import { UserListComponent } from 'app/pages/account/users/user-list/user-list.component'; -import { routing } from 'app/pages/account/users/users.routing'; -import { DeleteUserDialogComponent } from './user-details-row/delete-user-dialog/delete-user-dialog.component'; -import { UserDetailsRowComponent } from './user-details-row/user-details-row.component'; - -@NgModule({ - providers: [], - imports: [ - EffectsModule.forFeature([UserEffects]), - MatButtonModule, - IxIconComponent, - MatListModule, - MatMenuModule, - MatRippleModule, - MatSlideToggleModule, - MatFormFieldModule, - MatInputModule, - MatCheckboxModule, - MatSortModule, - MatExpansionModule, - MatCardModule, - MatDialogModule, - MatTooltipModule, - MatProgressBarModule, - MatProgressSpinnerModule, - RouterModule, - ReactiveFormsModule, - routing, - StoreModule.forFeature(userStateKey, userReducer), - TranslateModule, - TranslateModule, - SearchInput1Component, - IxModalHeaderComponent, - IxFieldsetComponent, - IxInputComponent, - IxSlideToggleComponent, - IxChipsComponent, - IxComboboxComponent, - IxTextareaComponent, - IxCheckboxComponent, - IxExplorerComponent, - IxPermissionsComponent, - IxSelectComponent, - IxFileInputComponent, - FormActionsComponent, - PageHeaderModule, - AsyncPipe, - RequiresRolesDirective, - UiSearchDirective, - IxTableComponent, - IxTableEmptyDirective, - IxTableHeadComponent, - IxTableBodyComponent, - IxTableDetailsRowDirective, - IxTablePagerComponent, - IxTableExpandableRowComponent, - TestOverrideDirective, - TestDirective, - ], - declarations: [ - UserListComponent, - UserFormComponent, - UserDetailsRowComponent, - DeleteUserDialogComponent, - ], - exports: [], -}) -export class UsersModule { } diff --git a/src/app/pages/account/users/users.routing.ts b/src/app/pages/account/users/users.routing.ts deleted file mode 100644 index 44b97e90a02..00000000000 --- a/src/app/pages/account/users/users.routing.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ModuleWithProviders } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; -import { UserListComponent } from 'app/pages/account/users/user-list/user-list.component'; - -export const routes: Routes = [ - { - path: '', - pathMatch: 'full', - redirectTo: 'users', - }, - { - path: 'users', - data: { title: T('Users') }, - children: [ - { - path: '', - component: UserListComponent, - data: { title: T('Users'), breadcrumb: T('Users') }, - }, - ], - }, -]; - -export const routing: ModuleWithProviders = RouterModule.forChild(routes); diff --git a/src/app/pages/api-keys/components/api-key-list/api-key-list.component.html b/src/app/pages/api-keys/api-keys.component.html similarity index 100% rename from src/app/pages/api-keys/components/api-key-list/api-key-list.component.html rename to src/app/pages/api-keys/api-keys.component.html diff --git a/src/app/pages/account/groups/group-list/group-list.component.scss b/src/app/pages/api-keys/api-keys.component.scss similarity index 100% rename from src/app/pages/account/groups/group-list/group-list.component.scss rename to src/app/pages/api-keys/api-keys.component.scss diff --git a/src/app/pages/api-keys/components/api-key-list/api-key-list.component.spec.ts b/src/app/pages/api-keys/api-keys.component.spec.ts similarity index 90% rename from src/app/pages/api-keys/components/api-key-list/api-key-list.component.spec.ts rename to src/app/pages/api-keys/api-keys.component.spec.ts index 77768661e3e..20bb3756dbe 100644 --- a/src/app/pages/api-keys/components/api-key-list/api-key-list.component.spec.ts +++ b/src/app/pages/api-keys/api-keys.component.spec.ts @@ -2,7 +2,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatDialog } from '@angular/material/dialog'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { FakeFormatDateTimePipe } from 'app/core/testing/classes/fake-format-datetime.pipe'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; @@ -12,15 +12,15 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { ApiKeysComponent } from 'app/pages/api-keys/api-keys.component'; import { ApiKeyFormDialogComponent } from 'app/pages/api-keys/components/api-key-form-dialog/api-key-form-dialog.component'; -import { ApiKeyListComponent } from 'app/pages/api-keys/components/api-key-list/api-key-list.component'; import { ApiKeyComponentStore } from 'app/pages/api-keys/store/api-key.store'; import { LocaleService } from 'app/services/locale.service'; import { WebSocketService } from 'app/services/ws.service'; -describe('ApiKeyListComponent', () => { - let spectator: Spectator; +describe('ApiKeysComponent', () => { + let spectator: Spectator; let loader: HarnessLoader; let table: IxTableHarness; @@ -43,10 +43,10 @@ describe('ApiKeyListComponent', () => { ] as ApiKey[]; const createComponent = createComponentFactory({ - component: ApiKeyListComponent, + component: ApiKeysComponent, imports: [ SearchInput1Component, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), ], declarations: [ FakeFormatDateTimePipe, diff --git a/src/app/pages/api-keys/components/api-key-list/api-key-list.component.ts b/src/app/pages/api-keys/api-keys.component.ts similarity index 76% rename from src/app/pages/api-keys/components/api-key-list/api-key-list.component.ts rename to src/app/pages/api-keys/api-keys.component.ts index 5ce180992a7..3678107bfe4 100644 --- a/src/app/pages/api-keys/components/api-key-list/api-key-list.component.ts +++ b/src/app/pages/api-keys/api-keys.component.ts @@ -1,39 +1,68 @@ +import { AsyncPipe } from '@angular/common'; import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, } from '@angular/core'; +import { MatAnchor, MatButton } from '@angular/material/button'; import { MatDialog } from '@angular/material/dialog'; import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { combineLatest, Observable, of } from 'rxjs'; import { filter, map, switchMap, tap, } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { EmptyType } from 'app/enums/empty-type.enum'; import { Role } from 'app/enums/role.enum'; import { ApiKey } from 'app/interfaces/api-key.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { ArrayDataProvider } from 'app/modules/ix-table/classes/array-data-provider/array-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { dateColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-date/ix-cell-date.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { createTable } from 'app/modules/ix-table/utils'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { apiKeysElements } from 'app/pages/api-keys/api-keys.elements'; import { ApiKeyFormDialogComponent } from 'app/pages/api-keys/components/api-key-form-dialog/api-key-form-dialog.component'; -import { apiKeysElements } from 'app/pages/api-keys/components/api-key-list/api-key-list.elements'; import { ApiKeyComponentStore } from 'app/pages/api-keys/store/api-key.store'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @UntilDestroy() @Component({ - selector: 'ix-api-key-list', - templateUrl: './api-key-list.component.html', - styleUrls: ['./api-key-list.component.scss'], + selector: 'ix-api-keys', + templateUrl: './api-keys.component.html', + styleUrls: ['./api-keys.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + SearchInput1Component, + MatAnchor, + TestDirective, + RequiresRolesDirective, + MatButton, + IxTableComponent, + UiSearchDirective, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + IxTablePagerComponent, + TranslateModule, + AsyncPipe, + PageHeaderComponent, + ], }) -export class ApiKeyListComponent implements OnInit { +export class ApiKeysComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; protected readonly searchableElements = apiKeysElements; diff --git a/src/app/pages/api-keys/components/api-key-list/api-key-list.elements.ts b/src/app/pages/api-keys/api-keys.elements.ts similarity index 100% rename from src/app/pages/api-keys/components/api-key-list/api-key-list.elements.ts rename to src/app/pages/api-keys/api-keys.elements.ts diff --git a/src/app/pages/api-keys/api-keys.module.ts b/src/app/pages/api-keys/api-keys.module.ts deleted file mode 100644 index 4bd2c81809e..00000000000 --- a/src/app/pages/api-keys/api-keys.module.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { ClipboardModule } from '@angular/cdk/clipboard'; -import { AsyncPipe } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatSortModule } from '@angular/material/sort'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; -import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; -import { UiSearchDirective } from 'app/directives/ui-search.directive'; -import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; -import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; -import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; -import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; -import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; -import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; -import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; -import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { - ApiKeyFormDialogComponent, -} from 'app/pages/api-keys/components/api-key-form-dialog/api-key-form-dialog.component'; -import { ApiKeyListComponent } from 'app/pages/api-keys/components/api-key-list/api-key-list.component'; -import { - KeyCreatedDialogComponent, -} from 'app/pages/api-keys/components/key-created-dialog/key-created-dialog.component'; -import { routing } from './api-keys.routing'; -import { ApiKeyComponentStore } from './store/api-key.store'; - -@NgModule({ - imports: [ - ReactiveFormsModule, - ClipboardModule, - MatButtonModule, - MatCardModule, - MatSortModule, - IxIconComponent, - MatMenuModule, - MatTooltipModule, - MatDialogModule, - TranslateModule, - routing, - SearchInput1Component, - IxInputComponent, - IxCheckboxComponent, - FormActionsComponent, - PageHeaderModule, - AsyncPipe, - RequiresRolesDirective, - UiSearchDirective, - IxTableComponent, - IxTableEmptyDirective, - IxTableHeadComponent, - IxTableBodyComponent, - IxTablePagerComponent, - TestDirective, - ], - declarations: [ - ApiKeyListComponent, - ApiKeyFormDialogComponent, - KeyCreatedDialogComponent, - ], - exports: [ - ApiKeyListComponent, - ], - providers: [ - ApiKeyComponentStore, - ], -}) -export class ApiKeysModule { } diff --git a/src/app/pages/api-keys/api-keys.routing.ts b/src/app/pages/api-keys/api-keys.routing.ts deleted file mode 100644 index b9f2b3772e9..00000000000 --- a/src/app/pages/api-keys/api-keys.routing.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ModuleWithProviders } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; -import { ApiKeyListComponent } from 'app/pages/api-keys/components/api-key-list/api-key-list.component'; - -export const routes: Routes = [{ - path: '', - component: ApiKeyListComponent, - data: { title: T('API Keys'), breadcrumb: T('API Keys') }, -}]; -export const routing: ModuleWithProviders = RouterModule.forChild(routes); diff --git a/src/app/pages/api-keys/components/api-key-form-dialog/api-key-form-dialog.component.ts b/src/app/pages/api-keys/components/api-key-form-dialog/api-key-form-dialog.component.ts index 8c13c94b001..018ee228b29 100644 --- a/src/app/pages/api-keys/components/api-key-form-dialog/api-key-form-dialog.component.ts +++ b/src/app/pages/api-keys/components/api-key-form-dialog/api-key-form-dialog.component.ts @@ -1,14 +1,23 @@ import { ChangeDetectionStrategy, Component, Inject, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, MatDialog, MatDialogRef, MatDialogTitle, MatDialogClose, +} from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { helptextApiKeys } from 'app/helptext/api-keys'; import { ApiKey, UpdateApiKeyRequest } from 'app/interfaces/api-key.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { KeyCreatedDialogComponent, } from 'app/pages/api-keys/components/key-created-dialog/key-created-dialog.component'; @@ -21,6 +30,19 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './api-key-form-dialog.component.html', styleUrls: ['./api-key-form-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + ReactiveFormsModule, + IxInputComponent, + IxCheckboxComponent, + FormActionsComponent, + MatButton, + TestDirective, + MatDialogClose, + RequiresRolesDirective, + TranslateModule, + ], }) export class ApiKeyFormDialogComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/api-keys/components/key-created-dialog/key-created-dialog.component.ts b/src/app/pages/api-keys/components/key-created-dialog/key-created-dialog.component.ts index 43b1e6bf7cf..583f10efb3b 100644 --- a/src/app/pages/api-keys/components/key-created-dialog/key-created-dialog.component.ts +++ b/src/app/pages/api-keys/components/key-created-dialog/key-created-dialog.component.ts @@ -1,12 +1,31 @@ import { Clipboard } from '@angular/cdk/clipboard'; +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatButton } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, +} from '@angular/material/dialog'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; @Component({ selector: 'ix-key-created-dialog', templateUrl: './key-created-dialog.component.html', styleUrls: ['./key-created-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + CdkScrollable, + MatDialogContent, + FormActionsComponent, + MatDialogActions, + MatButton, + TestDirective, + MatDialogClose, + TranslateModule, + ], }) export class KeyCreatedDialogComponent { constructor( diff --git a/src/app/pages/apps/apps.module.ts b/src/app/pages/apps/apps.module.ts index 089eff8a65b..0d8a369e6f3 100644 --- a/src/app/pages/apps/apps.module.ts +++ b/src/app/pages/apps/apps.module.ts @@ -51,14 +51,14 @@ import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table- import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { BulkListItemComponent } from 'app/modules/lists/bulk-list-item/bulk-list-item.component'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { CleanLinkPipe } from 'app/modules/pipes/clean-link/clean-link.pipe'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { NetworkSpeedPipe } from 'app/modules/pipes/network-speed/network-speed.pipe'; import { OrNotAvailablePipe } from 'app/modules/pipes/or-not-available/or-not-available.pipe'; -import { TerminalModule } from 'app/modules/terminal/terminal.module'; +import { TerminalComponent } from 'app/modules/terminal/components/terminal/terminal.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { AppsRoutingModule } from 'app/pages/apps/apps-routing.module'; import { @@ -155,7 +155,6 @@ import { InstalledAppsComponent } from './components/installed-apps/installed-ap imports: [ AppsRoutingModule, IxCodeEditorComponent, - PageHeaderModule, MatButtonModule, TranslateModule, IxDynamicFormModule, @@ -172,7 +171,6 @@ import { InstalledAppsComponent } from './components/installed-apps/installed-ap IxIconComponent, LazyLoadImageModule, MatExpansionModule, - TerminalModule, MatTooltipModule, MatMenuModule, CustomFormsModule, @@ -221,6 +219,8 @@ import { InstalledAppsComponent } from './components/installed-apps/installed-ap IxTablePagerComponent, FakeProgressBarComponent, TestDirective, + PageHeaderComponent, + TerminalComponent, ], }) export class AppsModule { } diff --git a/src/app/pages/apps/components/app-detail-view/app-detail-view.component.spec.ts b/src/app/pages/apps/components/app-detail-view/app-detail-view.component.spec.ts index d03e49cfa56..252dd0be9fa 100644 --- a/src/app/pages/apps/components/app-detail-view/app-detail-view.component.spec.ts +++ b/src/app/pages/apps/components/app-detail-view/app-detail-view.component.spec.ts @@ -3,14 +3,14 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatButtonHarness } from '@angular/material/button/testing'; import { Router } from '@angular/router'; import { createRoutingFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockComponents, MockModule } from 'ng-mocks'; +import { MockComponents } from 'ng-mocks'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { of } from 'rxjs'; import { mockCall, mockJob, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; import { App } from 'app/interfaces/app.interface'; import { AvailableApp } from 'app/interfaces/available-app.interface'; import { CatalogApp } from 'app/interfaces/catalog.interface'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { OrNotAvailablePipe } from 'app/modules/pipes/or-not-available/or-not-available.pipe'; import { AppCardLogoComponent } from 'app/pages/apps/components/app-card-logo/app-card-logo.component'; import { @@ -57,7 +57,7 @@ describe('AppDetailViewComponent', () => { component: AppDetailViewComponent, imports: [ NgxSkeletonLoaderModule, - MockModule(PageHeaderModule), + MockComponents(PageHeaderComponent), OrNotAvailablePipe, ], declarations: [ diff --git a/src/app/pages/apps/components/app-wizard/app-wizard.component.spec.ts b/src/app/pages/apps/components/app-wizard/app-wizard.component.spec.ts index 80080c2ddf0..d2affc39bff 100644 --- a/src/app/pages/apps/components/app-wizard/app-wizard.component.spec.ts +++ b/src/app/pages/apps/components/app-wizard/app-wizard.component.spec.ts @@ -6,7 +6,7 @@ import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { Spectator } from '@ngneat/spectator'; import { mockProvider, createComponentFactory } from '@ngneat/spectator/jest'; -import { MockComponent, MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockJob, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -18,7 +18,7 @@ import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/i import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { AppWizardComponent } from 'app/pages/apps/components/app-wizard/app-wizard.component'; import { DockerHubRateInfoDialogComponent } from 'app/pages/apps/components/dockerhub-rate-limit-info-dialog/dockerhub-rate-limit-info-dialog.component'; import { ApplicationsService } from 'app/pages/apps/services/applications.service'; @@ -265,7 +265,7 @@ describe('AppWizardComponent', () => { imports: [ ReactiveFormsModule, IxDynamicFormModule, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), ], declarations: [ MockComponent(DockerHubRateInfoDialogComponent), diff --git a/src/app/pages/apps/components/available-apps/available-apps.component.spec.ts b/src/app/pages/apps/components/available-apps/available-apps.component.spec.ts index 6b2a23a0c61..8ff26cf3663 100644 --- a/src/app/pages/apps/components/available-apps/available-apps.component.spec.ts +++ b/src/app/pages/apps/components/available-apps/available-apps.component.spec.ts @@ -5,12 +5,12 @@ import { MatInputHarness } from '@angular/material/input/testing'; import { Spectator, mockProvider, createComponentFactory, } from '@ngneat/spectator/jest'; -import { MockDeclaration, MockModule } from 'ng-mocks'; +import { MockComponent, MockDeclaration } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; import { AvailableApp } from 'app/interfaces/available-app.interface'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { OrNotAvailablePipe } from 'app/modules/pipes/or-not-available/or-not-available.pipe'; import { AppCardLogoComponent } from 'app/pages/apps/components/app-card-logo/app-card-logo.component'; import { AppCardComponent } from 'app/pages/apps/components/available-apps/app-card/app-card.component'; @@ -43,7 +43,7 @@ describe('Finding app', () => { component: AvailableAppsComponent, imports: [ ReactiveFormsModule, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), OrNotAvailablePipe, ], declarations: [ diff --git a/src/app/pages/apps/components/available-apps/category-view/category-view.component.spec.ts b/src/app/pages/apps/components/available-apps/category-view/category-view.component.spec.ts index ed0e836c338..de9859bdddb 100644 --- a/src/app/pages/apps/components/available-apps/category-view/category-view.component.spec.ts +++ b/src/app/pages/apps/components/available-apps/category-view/category-view.component.spec.ts @@ -4,10 +4,10 @@ import { MatButtonHarness } from '@angular/material/button/testing'; import { ActivatedRoute } from '@angular/router'; import { SpectatorRouting } from '@ngneat/spectator'; import { createRoutingFactory, mockProvider } from '@ngneat/spectator/jest'; -import { MockComponent, MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { AvailableApp } from 'app/interfaces/available-app.interface'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { AppCardComponent } from 'app/pages/apps/components/available-apps/app-card/app-card.component'; import { CustomAppButtonComponent, @@ -25,7 +25,7 @@ describe('CategoryViewComponent', () => { const createComponent = createRoutingFactory({ component: CategoryViewComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), ], declarations: [ MockComponent(AppCardComponent), diff --git a/src/app/pages/apps/components/custom-app-form/custom-app-form.component.spec.ts b/src/app/pages/apps/components/custom-app-form/custom-app-form.component.spec.ts index 6bc280ecec9..1042b95dbf7 100644 --- a/src/app/pages/apps/components/custom-app-form/custom-app-form.component.spec.ts +++ b/src/app/pages/apps/components/custom-app-form/custom-app-form.component.spec.ts @@ -3,7 +3,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { ReactiveFormsModule } from '@angular/forms'; import { MatButtonHarness } from '@angular/material/button/testing'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockJob, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -15,7 +15,7 @@ import { IxCodeEditorHarness } from 'app/modules/forms/ix-forms/components/ix-co import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.harness'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { CustomAppFormComponent } from 'app/pages/apps/components/custom-app-form/custom-app-form.component'; import { ApplicationsService } from 'app/pages/apps/services/applications.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; @@ -44,7 +44,7 @@ describe('CustomAppFormComponent', () => { imports: [ IxInputComponent, IxCodeEditorComponent, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), ReactiveFormsModule, ], providers: [ diff --git a/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.spec.ts b/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.spec.ts index 1524d00ab66..427c2756365 100644 --- a/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.spec.ts +++ b/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.spec.ts @@ -3,7 +3,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatButtonHarness } from '@angular/material/button/testing'; import { MatDialog } from '@angular/material/dialog'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of, Subject } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -11,7 +11,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { DockerImageDeleteDialogComponent } from 'app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component'; import { PullImageFormComponent } from 'app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component'; import { fakeDockerImagesDataSource } from 'app/pages/apps/components/docker-images/test/fake-docker-images'; @@ -27,7 +27,7 @@ describe('DockerImagesListComponent', () => { const createComponent = createComponentFactory({ component: DockerImagesListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], declarations: [ diff --git a/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.spec.ts b/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.spec.ts index 7344fcce99e..42639e13a93 100644 --- a/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.spec.ts +++ b/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.spec.ts @@ -1,11 +1,11 @@ import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { Spectator, createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; -import { MockComponent, MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { ToolbarSliderComponent } from 'app/modules/forms/toolbar-slider/toolbar-slider.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { ContainerLogsComponent } from 'app/pages/apps/components/installed-apps/container-logs/container-logs.component'; import { LogsDetailsDialogComponent } from 'app/pages/apps/components/logs-details-dialog/logs-details-dialog.component'; import { WebSocketService } from 'app/services/ws.service'; @@ -16,7 +16,7 @@ describe('ContainerLogsComponent', () => { const createComponent = createComponentFactory({ component: ContainerLogsComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), ], declarations: [ MockComponent(ToolbarSliderComponent), diff --git a/src/app/pages/apps/components/installed-apps/installed-apps.component.spec.ts b/src/app/pages/apps/components/installed-apps/installed-apps.component.spec.ts index 2ea58db293c..59f3ef7187e 100644 --- a/src/app/pages/apps/components/installed-apps/installed-apps.component.spec.ts +++ b/src/app/pages/apps/components/installed-apps/installed-apps.component.spec.ts @@ -5,7 +5,7 @@ import { Spectator, createComponentFactory, mockProvider, } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockDeclaration, MockModule } from 'ng-mocks'; +import { MockComponent, MockDeclaration } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -15,7 +15,7 @@ import { App } from 'app/interfaces/app.interface'; import { EmptyComponent } from 'app/modules/empty/empty.component'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { AppDetailsPanelComponent } from 'app/pages/apps/components/installed-apps/app-details-panel/app-details-panel.component'; import { AppRowComponent } from 'app/pages/apps/components/installed-apps/app-row/app-row.component'; import { AppSettingsButtonComponent } from 'app/pages/apps/components/installed-apps/app-settings-button/app-settings-button.component'; @@ -46,7 +46,7 @@ describe('InstalledAppsComponent', () => { imports: [ ReactiveFormsModule, MatTableModule, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), FakeProgressBarComponent, ], declarations: [ diff --git a/src/app/pages/audit/components/audit/audit.component.html b/src/app/pages/audit/audit.component.html similarity index 100% rename from src/app/pages/audit/components/audit/audit.component.html rename to src/app/pages/audit/audit.component.html diff --git a/src/app/pages/audit/components/audit/audit.component.scss b/src/app/pages/audit/audit.component.scss similarity index 100% rename from src/app/pages/audit/components/audit/audit.component.scss rename to src/app/pages/audit/audit.component.scss diff --git a/src/app/pages/audit/components/audit/audit.component.spec.ts b/src/app/pages/audit/audit.component.spec.ts similarity index 98% rename from src/app/pages/audit/components/audit/audit.component.spec.ts rename to src/app/pages/audit/audit.component.spec.ts index bd040337651..d07641d2a74 100644 --- a/src/app/pages/audit/components/audit/audit.component.spec.ts +++ b/src/app/pages/audit/audit.component.spec.ts @@ -15,7 +15,7 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-cell.directive'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; -import { AuditComponent } from 'app/pages/audit/components/audit/audit.component'; +import { AuditComponent } from 'app/pages/audit/audit.component'; import { LogDetailsPanelComponent } from 'app/pages/audit/components/log-details-panel/log-details-panel.component'; import { LocaleService } from 'app/services/locale.service'; import { WebSocketService } from 'app/services/ws.service'; diff --git a/src/app/pages/audit/components/audit/audit.component.ts b/src/app/pages/audit/audit.component.ts similarity index 85% rename from src/app/pages/audit/components/audit/audit.component.ts rename to src/app/pages/audit/audit.component.ts index 3c971258fcd..280236c68e8 100644 --- a/src/app/pages/audit/components/audit/audit.component.ts +++ b/src/app/pages/audit/audit.component.ts @@ -1,21 +1,27 @@ import { BreakpointObserver, BreakpointState, Breakpoints } from '@angular/cdk/layout'; +import { AsyncPipe, NgTemplateOutlet } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, effect, Inject, OnDestroy, OnInit, signal, } from '@angular/core'; import { toSignal } from '@angular/core/rxjs-interop'; -import { MatButtonToggleChange } from '@angular/material/button-toggle'; +import { MatAnchor, MatButton } from '@angular/material/button'; +import { MatButtonToggle, MatButtonToggleChange, MatButtonToggleGroup } from '@angular/material/button-toggle'; +import { MatCard } from '@angular/material/card'; +import { MatTooltip } from '@angular/material/tooltip'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { toSvg } from 'jdenticon'; import { Observable, combineLatest, - filter, map, of, shareReplay, take, + filter, map, of, shareReplay, take, async, } from 'rxjs'; +import { IxDetailsHeightDirective } from 'app/directives/details-height/details-height.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { AuditEvent, AuditService, auditEventLabels, auditServiceLabels, } from 'app/enums/audit.enum'; @@ -27,7 +33,9 @@ import { CredentialType, credentialTypeLabels } from 'app/interfaces/credential- import { Option } from 'app/interfaces/option.interface'; import { QueryFilters } from 'app/interfaces/query-api.interface'; import { User } from 'app/interfaces/user.interface'; +import { ExportButtonComponent } from 'app/modules/buttons/export-button/export-button.component'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInputModule } from 'app/modules/forms/search-input/search-input.module'; import { SearchProperty } from 'app/modules/forms/search-input/types/search-property.interface'; import { AdvancedSearchQuery, @@ -40,12 +48,22 @@ import { } from 'app/modules/forms/search-input/utils/search-properties.utils'; import { PaginationServerSide } from 'app/modules/ix-table/classes/api-data-provider/pagination-server-side.class'; import { SortingServerSide } from 'app/modules/ix-table/classes/api-data-provider/sorting-server-side.class'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { dateColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-date/ix-cell-date.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; +import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-cell.directive'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { TablePagination } from 'app/modules/ix-table/interfaces/table-pagination.interface'; import { createTable } from 'app/modules/ix-table/utils'; -import { auditElements } from 'app/pages/audit/components/audit/audit.elements'; +import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { auditElements } from 'app/pages/audit/audit.elements'; +import { LogDetailsPanelComponent } from 'app/pages/audit/components/log-details-panel/log-details-panel.component'; import { AuditApiDataProvider } from 'app/pages/audit/utils/audit-api-data-provider'; import { getLogImportantData } from 'app/pages/audit/utils/get-log-important-data.utils'; import { UrlOptionsService } from 'app/services/url-options.service'; @@ -58,6 +76,33 @@ import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; selector: 'ix-audit', templateUrl: './audit.component.html', styleUrls: ['./audit.component.scss'], + standalone: true, + imports: [ + PageHeaderComponent, + MatButtonToggleGroup, + TestDirective, + MatAnchor, + RouterLink, + MatCard, + FakeProgressBarComponent, + SearchInputModule, + MatButtonToggle, + NgTemplateOutlet, + IxTableBodyComponent, + IxTableComponent, + IxTableCellDirective, + MatTooltip, + IxTablePagerComponent, + IxDetailsHeightDirective, + ExportButtonComponent, + LogDetailsPanelComponent, + IxTableHeadComponent, + UiSearchDirective, + IxTableEmptyDirective, + MatButton, + TranslateModule, + AsyncPipe, + ], changeDetection: ChangeDetectionStrategy.OnPush, }) export class AuditComponent implements OnInit, OnDestroy { @@ -390,4 +435,6 @@ export class AuditComponent implements OnInit, OnDestroy { private getAuditLogs(): void { this.dataProvider.load(); } + + protected readonly async = async; } diff --git a/src/app/pages/audit/components/audit/audit.elements.ts b/src/app/pages/audit/audit.elements.ts similarity index 100% rename from src/app/pages/audit/components/audit/audit.elements.ts rename to src/app/pages/audit/audit.elements.ts diff --git a/src/app/pages/audit/audit.module.ts b/src/app/pages/audit/audit.module.ts deleted file mode 100644 index ff7186e74a0..00000000000 --- a/src/app/pages/audit/audit.module.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { AsyncPipe, NgTemplateOutlet } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatButtonToggleModule } from '@angular/material/button-toggle'; -import { MatCardModule } from '@angular/material/card'; -import { MatSelectModule } from '@angular/material/select'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; -import { IxDetailsHeightDirective } from 'app/directives/details-height/details-height.directive'; -import { UiSearchDirective } from 'app/directives/ui-search.directive'; -import { CopyButtonComponent } from 'app/modules/buttons/copy-button/copy-button.component'; -import { ExportButtonComponent } from 'app/modules/buttons/export-button/export-button.component'; -import { SearchInputModule } from 'app/modules/forms/search-input/search-input.module'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; -import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; -import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; -import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; -import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-cell.directive'; -import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { AuditComponent } from 'app/pages/audit/components/audit/audit.component'; -import { routing } from './audit.routing'; -import { EventDataDetailsCardComponent } from './components/event-data-details-card/event-data-details-card.component'; -import { LogDetailsPanelComponent } from './components/log-details-panel/log-details-panel.component'; -import { MetadataDetailsCardComponent } from './components/metadata-details-card/metadata-details-card.component'; - -@NgModule({ - imports: [ - MatButtonModule, - TranslateModule, - MatCardModule, - IxIconComponent, - ReactiveFormsModule, - MatSelectModule, - SearchInputModule, - MatTooltipModule, - routing, - ExportButtonComponent, - CopyButtonComponent, - PageHeaderModule, - NgTemplateOutlet, - AsyncPipe, - IxDetailsHeightDirective, - UiSearchDirective, - IxTableComponent, - IxTableEmptyDirective, - IxTableBodyComponent, - IxTableCellDirective, - IxTablePagerComponent, - IxTableHeadComponent, - MatButtonToggleModule, - FakeProgressBarComponent, - TestDirective, - ], - exports: [], - declarations: [ - AuditComponent, - LogDetailsPanelComponent, - MetadataDetailsCardComponent, - EventDataDetailsCardComponent, - ], - providers: [], -}) -export class AuditModule { -} diff --git a/src/app/pages/audit/audit.routing.ts b/src/app/pages/audit/audit.routing.ts deleted file mode 100644 index 7c1dc87965d..00000000000 --- a/src/app/pages/audit/audit.routing.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ModuleWithProviders } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; -import { AuditComponent } from 'app/pages/audit/components/audit/audit.component'; - -export const routes: Routes = [ - { - path: '', - data: { title: T('Audit') }, - component: AuditComponent, - pathMatch: 'full', - }, - { - path: ':options', - data: { - title: T('Audit'), - }, - component: AuditComponent, - pathMatch: 'full', - }, -]; -export const routing: ModuleWithProviders = RouterModule.forChild(routes); diff --git a/src/app/pages/audit/components/event-data-details-card/event-data-details-card.component.ts b/src/app/pages/audit/components/event-data-details-card/event-data-details-card.component.ts index ed2a2148c55..845b79618cb 100644 --- a/src/app/pages/audit/components/event-data-details-card/event-data-details-card.component.ts +++ b/src/app/pages/audit/components/event-data-details-card/event-data-details-card.component.ts @@ -1,15 +1,26 @@ import { ChangeDetectionStrategy, Component, computed, input, } from '@angular/core'; +import { MatCard, MatCardContent, MatCardHeader } from '@angular/material/card'; +import { TranslateModule } from '@ngx-translate/core'; import { jsonToYaml } from 'app/helpers/json-to-yaml.helper'; import { convertObjectKeysToHumanReadable } from 'app/helpers/object-keys-to-human-readable.helper'; import { AuditEntry } from 'app/interfaces/audit/audit.interface'; +import { CopyButtonComponent } from 'app/modules/buttons/copy-button/copy-button.component'; @Component({ selector: 'ix-event-data-details-card', templateUrl: './event-data-details-card.component.html', styleUrls: ['./event-data-details-card.component.scss'], + standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, + imports: [ + CopyButtonComponent, + MatCard, + MatCardHeader, + MatCardContent, + TranslateModule, + ], }) export class EventDataDetailsCardComponent { readonly log = input.required(); diff --git a/src/app/pages/audit/components/log-details-panel/log-details-panel.component.ts b/src/app/pages/audit/components/log-details-panel/log-details-panel.component.ts index 4aac3901e28..9996f6d63c7 100644 --- a/src/app/pages/audit/components/log-details-panel/log-details-panel.component.ts +++ b/src/app/pages/audit/components/log-details-panel/log-details-panel.component.ts @@ -1,13 +1,30 @@ import { ChangeDetectionStrategy, Component, input, output, } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; import { AuditEntry } from 'app/interfaces/audit/audit.interface'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { + EventDataDetailsCardComponent, +} from 'app/pages/audit/components/event-data-details-card/event-data-details-card.component'; +import { + MetadataDetailsCardComponent, +} from 'app/pages/audit/components/metadata-details-card/metadata-details-card.component'; @Component({ selector: 'ix-log-details-panel', templateUrl: './log-details-panel.component.html', styleUrls: ['./log-details-panel.component.scss'], + standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, + imports: [ + EventDataDetailsCardComponent, + IxIconComponent, + MetadataDetailsCardComponent, + TranslateModule, + TestDirective, + ], }) export class LogDetailsPanelComponent { readonly log = input.required(); diff --git a/src/app/pages/audit/components/metadata-details-card/metadata-details-card.component.ts b/src/app/pages/audit/components/metadata-details-card/metadata-details-card.component.ts index 43be86cb873..8356275a99d 100644 --- a/src/app/pages/audit/components/metadata-details-card/metadata-details-card.component.ts +++ b/src/app/pages/audit/components/metadata-details-card/metadata-details-card.component.ts @@ -1,13 +1,22 @@ import { ChangeDetectionStrategy, Component, input, } from '@angular/core'; +import { MatCard, MatCardContent, MatCardHeader } from '@angular/material/card'; +import { TranslateModule } from '@ngx-translate/core'; import { AuditEntry } from 'app/interfaces/audit/audit.interface'; @Component({ selector: 'ix-metadata-details-card', templateUrl: './metadata-details-card.component.html', styleUrls: ['./metadata-details-card.component.scss'], + standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, + imports: [ + MatCardContent, + MatCardHeader, + MatCard, + TranslateModule, + ], }) export class MetadataDetailsCardComponent { readonly log = input.required(); diff --git a/src/app/pages/credentials/credentials.module.ts b/src/app/pages/credentials/credentials.module.ts index 0f6c471c352..748e6359f36 100644 --- a/src/app/pages/credentials/credentials.module.ts +++ b/src/app/pages/credentials/credentials.module.ts @@ -11,6 +11,8 @@ import { MatStepperModule } from '@angular/material/stepper'; import { MatToolbarModule } from '@angular/material/toolbar'; import { MatTooltipModule } from '@angular/material/tooltip'; import { RouterModule } from '@angular/router'; +import { EffectsModule } from '@ngrx/effects'; +import { StoreModule } from '@ngrx/store'; import { TranslateModule } from '@ngx-translate/core'; import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { UiSearchDirective } from 'app/directives/ui-search.directive'; @@ -89,7 +91,13 @@ import { ViewCertificateDialogComponent, } from 'app/pages/credentials/certificates-dash/view-certificate-dialog/view-certificate-dialog.component'; import { routing } from 'app/pages/credentials/credentials.routing'; +import { GroupEffects } from 'app/pages/credentials/groups/store/group.effects'; +import { groupReducer } from 'app/pages/credentials/groups/store/group.reducer'; +import { groupStateKey } from 'app/pages/credentials/groups/store/group.selectors'; import { KmipComponent } from 'app/pages/credentials/kmip/kmip.component'; +import { UserEffects } from 'app/pages/credentials/users/store/user.effects'; +import { userReducer } from 'app/pages/credentials/users/store/user.reducer'; +import { userStateKey } from 'app/pages/credentials/users/store/user.selectors'; import { CloudSyncProviderDescriptionComponent } from 'app/pages/data-protection/cloudsync/cloudsync-provider-description/cloudsync-provider-description.component'; import { BackupCredentialsComponent } from './backup-credentials/backup-credentials.component'; import { CloudCredentialsCardComponent } from './backup-credentials/cloud-credentials-card/cloud-credentials-card.component'; @@ -215,6 +223,9 @@ import { CertificateSubjectComponent } from './certificates-dash/forms/common-st IxTablePagerShowMoreComponent, IxTableCellDirective, TestDirective, + EffectsModule.forFeature([UserEffects, GroupEffects]), + StoreModule.forFeature(groupStateKey, groupReducer), + StoreModule.forFeature(userStateKey, userReducer), ], }) export class CredentialsModule { } diff --git a/src/app/pages/credentials/credentials.routing.ts b/src/app/pages/credentials/credentials.routing.ts index 5e5852a7165..631e70bbc3a 100644 --- a/src/app/pages/credentials/credentials.routing.ts +++ b/src/app/pages/credentials/credentials.routing.ts @@ -17,11 +17,11 @@ export const routes: Routes = [{ }, { path: 'users', - loadChildren: () => import('app/pages/account/users/users.module').then((module) => module.UsersModule), + loadComponent: () => import('app/pages/credentials/users/user-list/user-list.component').then((module) => module.UserListComponent), data: { title: T('Users'), breadcrumb: T('Users'), icon: 'group' }, }, { path: 'groups', - loadChildren: () => import('app/pages/account/groups/groups.module').then((module) => module.GroupsModule), + loadComponent: () => import('app/pages/credentials/groups/group-list/group-list.component').then((module) => module.GroupListComponent), data: { title: T('Groups'), breadcrumb: T('Groups'), icon: 'group_work' }, }, // TODO: Temporary dashboards attached to accounts for now diff --git a/src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.html b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.html similarity index 100% rename from src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.html rename to src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.html diff --git a/src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.scss b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.scss similarity index 100% rename from src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.scss rename to src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.scss diff --git a/src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts similarity index 95% rename from src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts rename to src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts index 19d602a91c9..21337617351 100644 --- a/src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts +++ b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts @@ -12,7 +12,7 @@ import { IxCheckboxHarness } from 'app/modules/forms/ix-forms/components/ix-chec import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { DeleteGroupDialogComponent, -} from 'app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component'; +} from 'app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component'; import { WebSocketService } from 'app/services/ws.service'; describe('DeleteGroupDialogComponent', () => { diff --git a/src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts similarity index 64% rename from src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts rename to src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts index ba96a709554..9f8f93fd79a 100644 --- a/src/app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts +++ b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts @@ -1,15 +1,23 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, Component, Inject, } from '@angular/core'; -import { FormControl } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { FormControl, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, +} from '@angular/material/dialog'; import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { Group } from 'app/interfaces/group.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -19,6 +27,21 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './delete-group-dialog.component.html', styleUrls: ['./delete-group-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + CdkScrollable, + MatDialogContent, + IxCheckboxComponent, + ReactiveFormsModule, + FormActionsComponent, + MatDialogActions, + MatButton, + TestDirective, + MatDialogClose, + RequiresRolesDirective, + TranslateModule, + ], }) export class DeleteGroupDialogComponent { readonly requiredRoles = [Role.AccountWrite]; diff --git a/src/app/pages/account/groups/group-details-row/group-details-row.component.html b/src/app/pages/credentials/groups/group-details-row/group-details-row.component.html similarity index 100% rename from src/app/pages/account/groups/group-details-row/group-details-row.component.html rename to src/app/pages/credentials/groups/group-details-row/group-details-row.component.html diff --git a/src/app/pages/account/groups/group-details-row/group-details-row.component.scss b/src/app/pages/credentials/groups/group-details-row/group-details-row.component.scss similarity index 100% rename from src/app/pages/account/groups/group-details-row/group-details-row.component.scss rename to src/app/pages/credentials/groups/group-details-row/group-details-row.component.scss diff --git a/src/app/pages/account/groups/group-details-row/group-details-row.component.spec.ts b/src/app/pages/credentials/groups/group-details-row/group-details-row.component.spec.ts similarity index 89% rename from src/app/pages/account/groups/group-details-row/group-details-row.component.spec.ts rename to src/app/pages/credentials/groups/group-details-row/group-details-row.component.spec.ts index 34485fa0ec8..6fdac4ec19f 100644 --- a/src/app/pages/account/groups/group-details-row/group-details-row.component.spec.ts +++ b/src/app/pages/credentials/groups/group-details-row/group-details-row.component.spec.ts @@ -6,6 +6,7 @@ import { Router } from '@angular/router'; import { SpectatorRouting } from '@ngneat/spectator'; import { mockProvider, createRoutingFactory } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockWebSocket, mockCall } from 'app/core/testing/utils/mock-websocket.utils'; @@ -16,9 +17,9 @@ import { } from 'app/modules/ix-table/components/ix-table-expandable-row/ix-table-expandable-row.component'; import { DeleteGroupDialogComponent, -} from 'app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component'; -import { GroupDetailsRowComponent } from 'app/pages/account/groups/group-details-row/group-details-row.component'; -import { GroupFormComponent } from 'app/pages/account/groups/group-form/group-form.component'; +} from 'app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component'; +import { GroupDetailsRowComponent } from 'app/pages/credentials/groups/group-details-row/group-details-row.component'; +import { GroupFormComponent } from 'app/pages/credentials/groups/group-form/group-form.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; @@ -39,9 +40,7 @@ describe('GroupDetailsRowComponent', () => { component: GroupDetailsRowComponent, imports: [ IxTableExpandableRowComponent, - ], - declarations: [ - GroupFormComponent, + MockComponent(GroupFormComponent), ], providers: [ mockProvider(IxSlideInService), diff --git a/src/app/pages/account/groups/group-details-row/group-details-row.component.ts b/src/app/pages/credentials/groups/group-details-row/group-details-row.component.ts similarity index 63% rename from src/app/pages/account/groups/group-details-row/group-details-row.component.ts rename to src/app/pages/credentials/groups/group-details-row/group-details-row.component.ts index 117f5edcda9..6c89bb123ea 100644 --- a/src/app/pages/account/groups/group-details-row/group-details-row.component.ts +++ b/src/app/pages/credentials/groups/group-details-row/group-details-row.component.ts @@ -1,15 +1,23 @@ import { Component, ChangeDetectionStrategy, input, output, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { Group } from 'app/interfaces/group.interface'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { + IxTableExpandableRowComponent, +} from 'app/modules/ix-table/components/ix-table-expandable-row/ix-table-expandable-row.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { DeleteGroupDialogComponent, -} from 'app/pages/account/groups/group-details-row/delete-group-dialog/delete-group-dialog.component'; -import { GroupFormComponent } from 'app/pages/account/groups/group-form/group-form.component'; +} from 'app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component'; +import { GroupFormComponent } from 'app/pages/credentials/groups/group-form/group-form.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @UntilDestroy() @@ -18,6 +26,15 @@ import { IxSlideInService } from 'app/services/ix-slide-in.service'; templateUrl: './group-details-row.component.html', styleUrls: ['./group-details-row.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxTableExpandableRowComponent, + MatButton, + TestDirective, + IxIconComponent, + RequiresRolesDirective, + TranslateModule, + ], }) export class GroupDetailsRowComponent { readonly group = input.required(); diff --git a/src/app/pages/account/groups/group-form/group-form.component.html b/src/app/pages/credentials/groups/group-form/group-form.component.html similarity index 100% rename from src/app/pages/account/groups/group-form/group-form.component.html rename to src/app/pages/credentials/groups/group-form/group-form.component.html diff --git a/src/app/pages/account/groups/group-form/group-form.component.spec.ts b/src/app/pages/credentials/groups/group-form/group-form.component.spec.ts similarity index 98% rename from src/app/pages/account/groups/group-form/group-form.component.spec.ts rename to src/app/pages/credentials/groups/group-form/group-form.component.spec.ts index d1f1a974f66..32a30759d4b 100644 --- a/src/app/pages/account/groups/group-form/group-form.component.spec.ts +++ b/src/app/pages/credentials/groups/group-form/group-form.component.spec.ts @@ -17,7 +17,7 @@ import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { GroupFormComponent } from 'app/pages/account/groups/group-form/group-form.component'; +import { GroupFormComponent } from 'app/pages/credentials/groups/group-form/group-form.component'; import { WebSocketService } from 'app/services/ws.service'; describe('GroupFormComponent', () => { diff --git a/src/app/pages/account/groups/group-form/group-form.component.ts b/src/app/pages/credentials/groups/group-form/group-form.component.ts similarity index 86% rename from src/app/pages/account/groups/group-form/group-form.component.ts rename to src/app/pages/credentials/groups/group-form/group-form.component.ts index 24486e856d2..6532026fa30 100644 --- a/src/app/pages/account/groups/group-form/group-form.component.ts +++ b/src/app/pages/credentials/groups/group-form/group-form.component.ts @@ -1,27 +1,37 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable, combineLatest, of, } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { allCommands } from 'app/constants/all-commands.constant'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { helptextGroups } from 'app/helptext/account/groups'; import { Group } from 'app/interfaces/group.interface'; import { Privilege, PrivilegeUpdate } from 'app/interfaces/privilege.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { ChipsProvider } from 'app/modules/forms/ix-forms/components/ix-chips/chips-provider'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { forbiddenValues } from 'app/modules/forms/ix-forms/validators/forbidden-values-validation/forbidden-values-validation'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { groupAdded, groupChanged } from 'app/pages/account/groups/store/group.actions'; -import { GroupSlice } from 'app/pages/account/groups/store/group.selectors'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { groupAdded, groupChanged } from 'app/pages/credentials/groups/store/group.actions'; +import { GroupSlice } from 'app/pages/credentials/groups/store/group.selectors'; import { UserService } from 'app/services/user.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -30,6 +40,22 @@ import { WebSocketService } from 'app/services/ws.service'; selector: 'ix-group-form', templateUrl: './group-form.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxChipsComponent, + IxCheckboxComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class GroupFormComponent implements OnInit { protected readonly requiredRoles = [Role.AccountWrite]; diff --git a/src/app/pages/account/groups/group-list/group-list.component.html b/src/app/pages/credentials/groups/group-list/group-list.component.html similarity index 100% rename from src/app/pages/account/groups/group-list/group-list.component.html rename to src/app/pages/credentials/groups/group-list/group-list.component.html diff --git a/src/app/pages/account/users/user-list/user-list.component.scss b/src/app/pages/credentials/groups/group-list/group-list.component.scss similarity index 100% rename from src/app/pages/account/users/user-list/user-list.component.scss rename to src/app/pages/credentials/groups/group-list/group-list.component.scss diff --git a/src/app/pages/account/groups/group-list/group-list.component.spec.ts b/src/app/pages/credentials/groups/group-list/group-list.component.spec.ts similarity index 88% rename from src/app/pages/account/groups/group-list/group-list.component.spec.ts rename to src/app/pages/credentials/groups/group-list/group-list.component.spec.ts index 8bdeafc4ef7..6e2c0921d75 100644 --- a/src/app/pages/account/groups/group-list/group-list.component.spec.ts +++ b/src/app/pages/credentials/groups/group-list/group-list.component.spec.ts @@ -2,7 +2,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; import { MockStore, provideMockStore } from '@ngrx/store/testing'; -import { MockComponent, MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { Role } from 'app/enums/role.enum'; import { Group } from 'app/interfaces/group.interface'; @@ -11,11 +11,11 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { GroupDetailsRowComponent } from 'app/pages/account/groups/group-details-row/group-details-row.component'; -import { GroupListComponent } from 'app/pages/account/groups/group-list/group-list.component'; -import { groupsInitialState, GroupsState } from 'app/pages/account/groups/store/group.reducer'; -import { selectGroups, selectGroupState, selectGroupsTotal } from 'app/pages/account/groups/store/group.selectors'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { GroupDetailsRowComponent } from 'app/pages/credentials/groups/group-details-row/group-details-row.component'; +import { GroupListComponent } from 'app/pages/credentials/groups/group-list/group-list.component'; +import { groupsInitialState, GroupsState } from 'app/pages/credentials/groups/store/group.reducer'; +import { selectGroups, selectGroupState, selectGroupsTotal } from 'app/pages/credentials/groups/store/group.selectors'; import { WebSocketService } from 'app/services/ws.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; @@ -49,7 +49,7 @@ describe('GroupListComponent', () => { const createComponent = createComponentFactory({ component: GroupListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableDetailsRowDirective, ], diff --git a/src/app/pages/account/groups/group-list/group-list.component.ts b/src/app/pages/credentials/groups/group-list/group-list.component.ts similarity index 69% rename from src/app/pages/account/groups/group-list/group-list.component.ts rename to src/app/pages/credentials/groups/group-list/group-list.component.ts index 83f31bd9dbb..daf23406fcb 100644 --- a/src/app/pages/account/groups/group-list/group-list.component.ts +++ b/src/app/pages/credentials/groups/group-list/group-list.component.ts @@ -1,29 +1,45 @@ +import { AsyncPipe } from '@angular/common'; import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, } from '@angular/core'; +import { MatAnchor, MatButton } from '@angular/material/button'; +import { MatSlideToggle } from '@angular/material/slide-toggle'; +import { RouterLink } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { select, Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable, combineLatest, of, } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { EmptyType } from 'app/enums/empty-type.enum'; import { Role, roleNames } from 'app/enums/role.enum'; import { Group } from 'app/interfaces/group.interface'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { ArrayDataProvider } from 'app/modules/ix-table/classes/array-data-provider/array-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; import { yesNoColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-yes-no/ix-cell-yes-no.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; +import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { createTable } from 'app/modules/ix-table/utils'; -import { GroupFormComponent } from 'app/pages/account/groups/group-form/group-form.component'; -import { groupListElements } from 'app/pages/account/groups/group-list/group-list.elements'; -import { groupPageEntered, groupRemoved } from 'app/pages/account/groups/store/group.actions'; -import { selectGroupState, selectGroupsTotal, selectGroups } from 'app/pages/account/groups/store/group.selectors'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { GroupDetailsRowComponent } from 'app/pages/credentials/groups/group-details-row/group-details-row.component'; +import { GroupFormComponent } from 'app/pages/credentials/groups/group-form/group-form.component'; +import { groupListElements } from 'app/pages/credentials/groups/group-list/group-list.elements'; +import { groupPageEntered, groupRemoved } from 'app/pages/credentials/groups/store/group.actions'; +import { selectGroupState, selectGroupsTotal, selectGroups } from 'app/pages/credentials/groups/store/group.selectors'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; import { AppsState } from 'app/store'; import { builtinGroupsToggled } from 'app/store/preferences/preferences.actions'; @@ -35,6 +51,27 @@ import { waitForPreferences } from 'app/store/preferences/preferences.selectors' templateUrl: './group-list.component.html', styleUrls: ['./group-list.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + SearchInput1Component, + MatSlideToggle, + TestDirective, + UiSearchDirective, + MatAnchor, + RouterLink, + RequiresRolesDirective, + MatButton, + IxTableComponent, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + IxTableDetailsRowDirective, + GroupDetailsRowComponent, + IxTablePagerComponent, + TranslateModule, + AsyncPipe, + PageHeaderComponent, + ], }) export class GroupListComponent implements OnInit { protected readonly requiredRoles = [Role.AccountWrite]; diff --git a/src/app/pages/account/groups/group-list/group-list.elements.ts b/src/app/pages/credentials/groups/group-list/group-list.elements.ts similarity index 100% rename from src/app/pages/account/groups/group-list/group-list.elements.ts rename to src/app/pages/credentials/groups/group-list/group-list.elements.ts diff --git a/src/app/pages/account/groups/group-members/group-members.component.html b/src/app/pages/credentials/groups/group-members/group-members.component.html similarity index 100% rename from src/app/pages/account/groups/group-members/group-members.component.html rename to src/app/pages/credentials/groups/group-members/group-members.component.html diff --git a/src/app/pages/account/groups/group-members/group-members.component.scss b/src/app/pages/credentials/groups/group-members/group-members.component.scss similarity index 100% rename from src/app/pages/account/groups/group-members/group-members.component.scss rename to src/app/pages/credentials/groups/group-members/group-members.component.scss diff --git a/src/app/pages/account/groups/group-members/group-members.component.spec.ts b/src/app/pages/credentials/groups/group-members/group-members.component.spec.ts similarity index 97% rename from src/app/pages/account/groups/group-members/group-members.component.spec.ts rename to src/app/pages/credentials/groups/group-members/group-members.component.spec.ts index ccc12af79ee..20f48b20933 100644 --- a/src/app/pages/account/groups/group-members/group-members.component.spec.ts +++ b/src/app/pages/credentials/groups/group-members/group-members.component.spec.ts @@ -13,7 +13,7 @@ import { User } from 'app/interfaces/user.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { DualListboxComponent } from 'app/modules/lists/dual-list/dual-list.component'; import { DualListModule } from 'app/modules/lists/dual-list/dual-list.module'; -import { GroupMembersComponent } from 'app/pages/account/groups/group-members/group-members.component'; +import { GroupMembersComponent } from 'app/pages/credentials/groups/group-members/group-members.component'; import { WebSocketService } from 'app/services/ws.service'; const fakeGroupDataSource = [{ diff --git a/src/app/pages/account/groups/group-members/group-members.component.ts b/src/app/pages/credentials/groups/group-members/group-members.component.ts similarity index 71% rename from src/app/pages/account/groups/group-members/group-members.component.ts rename to src/app/pages/credentials/groups/group-members/group-members.component.ts index 953723a41e0..320a108c4c5 100644 --- a/src/app/pages/account/groups/group-members/group-members.component.ts +++ b/src/app/pages/credentials/groups/group-members/group-members.component.ts @@ -1,14 +1,27 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { + MatCard, MatCardTitle, MatCardContent, MatCardActions, +} from '@angular/material/card'; +import { MatListItemIcon, MatListItemLine } from '@angular/material/list'; +import { MatProgressBar } from '@angular/material/progress-bar'; import { ActivatedRoute, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { switchMap } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { Group } from 'app/interfaces/group.interface'; import { User } from 'app/interfaces/user.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { ReadOnlyComponent } from 'app/modules/forms/ix-forms/components/readonly-badge/readonly-badge.component'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { DualListModule } from 'app/modules/lists/dual-list/dual-list.module'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -19,6 +32,24 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './group-members.component.html', styleUrls: ['./group-members.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatCard, + MatProgressBar, + MatCardTitle, + ReadOnlyComponent, + MatCardContent, + DualListModule, + IxIconComponent, + MatListItemIcon, + MatListItemLine, + MatCardActions, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + AsyncPipe, + ], }) export class GroupMembersComponent implements OnInit { protected readonly requiredRoles = [Role.AccountWrite]; diff --git a/src/app/pages/account/groups/privilege/privilege-form/privilege-form.component.html b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.html similarity index 100% rename from src/app/pages/account/groups/privilege/privilege-form/privilege-form.component.html rename to src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.html diff --git a/src/app/pages/account/groups/privilege/privilege-form/privilege-form.component.spec.ts b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.spec.ts similarity index 98% rename from src/app/pages/account/groups/privilege/privilege-form/privilege-form.component.spec.ts rename to src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.spec.ts index 17de42480ba..22baed53680 100644 --- a/src/app/pages/account/groups/privilege/privilege-form/privilege-form.component.spec.ts +++ b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.spec.ts @@ -12,7 +12,7 @@ import { IxSelectHarness } from 'app/modules/forms/ix-forms/components/ix-select import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { PrivilegeFormComponent } from 'app/pages/account/groups/privilege/privilege-form/privilege-form.component'; +import { PrivilegeFormComponent } from 'app/pages/credentials/groups/privilege/privilege-form/privilege-form.component'; import { WebSocketService } from 'app/services/ws.service'; describe('PrivilegeFormComponent', () => { diff --git a/src/app/pages/account/groups/privilege/privilege-form/privilege-form.component.ts b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.ts similarity index 77% rename from src/app/pages/account/groups/privilege/privilege-form/privilege-form.component.ts rename to src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.ts index 438fbaa4972..334b3c04e42 100644 --- a/src/app/pages/account/groups/privilege/privilege-form/privilege-form.component.ts +++ b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.ts @@ -1,19 +1,30 @@ import { Component, ChangeDetectionStrategy, ChangeDetectorRef, Inject, OnInit, } from '@angular/core'; -import { Validators } from '@angular/forms'; +import { Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable, map } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role, roleNames } from 'app/enums/role.enum'; import { helptextPrivilege } from 'app/helptext/account/priviledge'; import { Group } from 'app/interfaces/group.interface'; import { Privilege, PrivilegeUpdate } from 'app/interfaces/privilege.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { ChipsProvider } from 'app/modules/forms/ix-forms/components/ix-chips/chips-provider'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { WebSocketService } from 'app/services/ws.service'; @UntilDestroy() @@ -21,6 +32,23 @@ import { WebSocketService } from 'app/services/ws.service'; selector: 'ix-privilege-form', templateUrl: './privilege-form.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxChipsComponent, + IxSelectComponent, + IxCheckboxComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class PrivilegeFormComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.html b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.html similarity index 100% rename from src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.html rename to src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.html diff --git a/src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.scss b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.scss similarity index 100% rename from src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.scss rename to src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.scss diff --git a/src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.spec.ts b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.spec.ts similarity index 89% rename from src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.spec.ts rename to src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.spec.ts index 8b83b255d16..bf631819aa3 100644 --- a/src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.spec.ts +++ b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.spec.ts @@ -10,9 +10,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInputModule } from 'app/modules/forms/search-input/search-input.module'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { PrivilegeFormComponent } from 'app/pages/account/groups/privilege/privilege-form/privilege-form.component'; -import { PrivilegeListComponent } from 'app/pages/account/groups/privilege/privilege-list/privilege-list.component'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { PrivilegeFormComponent } from 'app/pages/credentials/groups/privilege/privilege-form/privilege-form.component'; +import { PrivilegeListComponent } from 'app/pages/credentials/groups/privilege/privilege-list/privilege-list.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -43,7 +43,7 @@ describe('PrivilegeListComponent', () => { const createComponent = createComponentFactory({ component: PrivilegeListComponent, imports: [ - PageHeaderModule, + PageHeaderComponent, SearchInputModule, ], providers: [ diff --git a/src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.ts b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.ts similarity index 81% rename from src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.ts rename to src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.ts index 525d2ce25ec..2b4afefa4b0 100644 --- a/src/app/pages/account/groups/privilege/privilege-list/privilege-list.component.ts +++ b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.ts @@ -1,29 +1,41 @@ +import { AsyncPipe } from '@angular/common'; import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core'; +import { MatButton } from '@angular/material/button'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; import { filter, map, shareReplay, switchMap, take, } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { Role, roleNames } from 'app/enums/role.enum'; import { ParamsBuilder } from 'app/helpers/params-builder/params-builder.class'; import { Option } from 'app/interfaces/option.interface'; import { Privilege } from 'app/interfaces/privilege.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInputModule } from 'app/modules/forms/search-input/search-input.module'; import { SearchProperty } from 'app/modules/forms/search-input/types/search-property.interface'; import { AdvancedSearchQuery, SearchQuery } from 'app/modules/forms/search-input/types/search-query.interface'; import { booleanProperty, searchProperties, textProperty } from 'app/modules/forms/search-input/utils/search-properties.utils'; import { ApiDataProvider } from 'app/modules/ix-table/classes/api-data-provider/api-data-provider'; import { PaginationServerSide } from 'app/modules/ix-table/classes/api-data-provider/pagination-server-side.class'; import { SortingServerSide } from 'app/modules/ix-table/classes/api-data-provider/sorting-server-side.class'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; import { yesNoColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-yes-no/ix-cell-yes-no.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { TablePagination } from 'app/modules/ix-table/interfaces/table-pagination.interface'; import { createTable } from 'app/modules/ix-table/utils'; -import { PrivilegeFormComponent } from 'app/pages/account/groups/privilege/privilege-form/privilege-form.component'; -import { privilegesListElements } from 'app/pages/account/groups/privilege/privilege-list/privilege-list.elements'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { PrivilegeFormComponent } from 'app/pages/credentials/groups/privilege/privilege-form/privilege-form.component'; +import { privilegesListElements } from 'app/pages/credentials/groups/privilege/privilege-list/privilege-list.elements'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -34,6 +46,22 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './privilege-list.component.html', styleUrls: ['./privilege-list.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + SearchInputModule, + MatButton, + TestDirective, + RequiresRolesDirective, + UiSearchDirective, + IxTableComponent, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + IxTablePagerComponent, + TranslateModule, + AsyncPipe, + PageHeaderComponent, + ], }) export class PrivilegeListComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/account/groups/privilege/privilege-list/privilege-list.elements.ts b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.elements.ts similarity index 100% rename from src/app/pages/account/groups/privilege/privilege-list/privilege-list.elements.ts rename to src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.elements.ts diff --git a/src/app/pages/account/groups/store/group.actions.ts b/src/app/pages/credentials/groups/store/group.actions.ts similarity index 100% rename from src/app/pages/account/groups/store/group.actions.ts rename to src/app/pages/credentials/groups/store/group.actions.ts diff --git a/src/app/pages/account/groups/store/group.effects.ts b/src/app/pages/credentials/groups/store/group.effects.ts similarity index 94% rename from src/app/pages/account/groups/store/group.effects.ts rename to src/app/pages/credentials/groups/store/group.effects.ts index 11b7c06b6b6..5234bef6686 100644 --- a/src/app/pages/account/groups/store/group.effects.ts +++ b/src/app/pages/credentials/groups/store/group.effects.ts @@ -10,8 +10,11 @@ import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; import { Group } from 'app/interfaces/group.interface'; import { QueryParams } from 'app/interfaces/query-api.interface'; import { - groupPageEntered, groupsLoaded, groupsNotLoaded, groupRemoved, -} from 'app/pages/account/groups/store/group.actions'; + groupPageEntered, + groupRemoved, + groupsLoaded, + groupsNotLoaded, +} from 'app/pages/credentials/groups/store/group.actions'; import { WebSocketService } from 'app/services/ws.service'; import { AppsState } from 'app/store'; import { builtinGroupsToggled } from 'app/store/preferences/preferences.actions'; diff --git a/src/app/pages/account/groups/store/group.reducer.ts b/src/app/pages/credentials/groups/store/group.reducer.ts similarity index 89% rename from src/app/pages/account/groups/store/group.reducer.ts rename to src/app/pages/credentials/groups/store/group.reducer.ts index 1b5319f4431..e562e0ebaa1 100644 --- a/src/app/pages/account/groups/store/group.reducer.ts +++ b/src/app/pages/credentials/groups/store/group.reducer.ts @@ -4,8 +4,12 @@ import { } from '@ngrx/store'; import { Group } from 'app/interfaces/group.interface'; import { - groupPageEntered, groupsLoaded, groupsNotLoaded, groupAdded, groupChanged, groupRemoved, -} from 'app/pages/account/groups/store/group.actions'; + groupAdded, groupChanged, + groupPageEntered, + groupRemoved, + groupsLoaded, + groupsNotLoaded, +} from 'app/pages/credentials/groups/store/group.actions'; import { builtinGroupsToggled } from 'app/store/preferences/preferences.actions'; export interface GroupsState extends EntityState { diff --git a/src/app/pages/account/groups/store/group.selectors.ts b/src/app/pages/credentials/groups/store/group.selectors.ts similarity index 89% rename from src/app/pages/account/groups/store/group.selectors.ts rename to src/app/pages/credentials/groups/store/group.selectors.ts index 9aec92183a6..7b2346cb71b 100644 --- a/src/app/pages/account/groups/store/group.selectors.ts +++ b/src/app/pages/credentials/groups/store/group.selectors.ts @@ -1,6 +1,6 @@ import { MemoizedSelector, createFeatureSelector, createSelector } from '@ngrx/store'; import { Group } from 'app/interfaces/group.interface'; -import { adapter, GroupsState } from 'app/pages/account/groups/store/group.reducer'; +import { adapter, GroupsState } from 'app/pages/credentials/groups/store/group.reducer'; export const groupStateKey = 'groups'; export const selectGroupState = createFeatureSelector(groupStateKey); diff --git a/src/app/pages/account/users/store/user.actions.ts b/src/app/pages/credentials/users/store/user.actions.ts similarity index 100% rename from src/app/pages/account/users/store/user.actions.ts rename to src/app/pages/credentials/users/store/user.actions.ts diff --git a/src/app/pages/account/users/store/user.effects.ts b/src/app/pages/credentials/users/store/user.effects.ts similarity index 94% rename from src/app/pages/account/users/store/user.effects.ts rename to src/app/pages/credentials/users/store/user.effects.ts index 05c6e8bbeef..bc50bbb6a93 100644 --- a/src/app/pages/account/users/store/user.effects.ts +++ b/src/app/pages/credentials/users/store/user.effects.ts @@ -10,8 +10,11 @@ import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; import { QueryParams } from 'app/interfaces/query-api.interface'; import { User } from 'app/interfaces/user.interface'; import { - userPageEntered, usersLoaded, usersNotLoaded, userRemoved, -} from 'app/pages/account/users/store/user.actions'; + userPageEntered, + userRemoved, + usersLoaded, + usersNotLoaded, +} from 'app/pages/credentials/users/store/user.actions'; import { WebSocketService } from 'app/services/ws.service'; import { AppsState } from 'app/store'; import { builtinUsersToggled } from 'app/store/preferences/preferences.actions'; diff --git a/src/app/pages/account/users/store/user.reducer.ts b/src/app/pages/credentials/users/store/user.reducer.ts similarity index 89% rename from src/app/pages/account/users/store/user.reducer.ts rename to src/app/pages/credentials/users/store/user.reducer.ts index 4bc76e12bb9..b7d059f5a7d 100644 --- a/src/app/pages/account/users/store/user.reducer.ts +++ b/src/app/pages/credentials/users/store/user.reducer.ts @@ -4,8 +4,11 @@ import { } from '@ngrx/store'; import { User } from 'app/interfaces/user.interface'; import { - userPageEntered, usersLoaded, usersNotLoaded, userAdded, userChanged, userRemoved, -} from 'app/pages/account/users/store/user.actions'; + userAdded, userChanged, + userPageEntered, userRemoved, + usersLoaded, + usersNotLoaded, +} from 'app/pages/credentials/users/store/user.actions'; import { builtinUsersToggled } from 'app/store/preferences/preferences.actions'; export interface UsersState extends EntityState { diff --git a/src/app/pages/account/users/store/user.selectors.ts b/src/app/pages/credentials/users/store/user.selectors.ts similarity index 84% rename from src/app/pages/account/users/store/user.selectors.ts rename to src/app/pages/credentials/users/store/user.selectors.ts index 84e9a69b9de..b2e39bd4ea8 100644 --- a/src/app/pages/account/users/store/user.selectors.ts +++ b/src/app/pages/credentials/users/store/user.selectors.ts @@ -1,5 +1,5 @@ import { createFeatureSelector, createSelector } from '@ngrx/store'; -import { adapter, UsersState } from 'app/pages/account/users/store/user.reducer'; +import { adapter, UsersState } from 'app/pages/credentials/users/store/user.reducer'; export const userStateKey = 'users'; export const selectUserState = createFeatureSelector(userStateKey); diff --git a/src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.html b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.html similarity index 100% rename from src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.html rename to src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.html diff --git a/src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.scss b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.scss similarity index 100% rename from src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.scss rename to src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.scss diff --git a/src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts similarity index 97% rename from src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts rename to src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts index 815c9a48e86..b3000ac1ad4 100644 --- a/src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts +++ b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts @@ -14,7 +14,7 @@ import { IxCheckboxHarness } from 'app/modules/forms/ix-forms/components/ix-chec import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { DeleteUserDialogComponent, -} from 'app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component'; +} from 'app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component'; import { WebSocketService } from 'app/services/ws.service'; describe('DeleteUserDialogComponent', () => { diff --git a/src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts similarity index 65% rename from src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts rename to src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts index 6a6cccdd923..a075d5f177e 100644 --- a/src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts +++ b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts @@ -1,15 +1,24 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { FormControl } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { FormControl, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, +} from '@angular/material/dialog'; import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { User } from 'app/interfaces/user.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestOverrideDirective } from 'app/modules/test-id/test-override/test-override.directive'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -19,6 +28,22 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './delete-user-dialog.component.html', styleUrls: ['./delete-user-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + CdkScrollable, + MatDialogContent, + IxCheckboxComponent, + TestOverrideDirective, + ReactiveFormsModule, + FormActionsComponent, + MatDialogActions, + MatButton, + TestDirective, + MatDialogClose, + RequiresRolesDirective, + TranslateModule, + ], }) export class DeleteUserDialogComponent implements OnInit { readonly requiredRoles = [Role.AccountWrite]; diff --git a/src/app/pages/account/users/user-details-row/user-details-row.component.html b/src/app/pages/credentials/users/user-details-row/user-details-row.component.html similarity index 100% rename from src/app/pages/account/users/user-details-row/user-details-row.component.html rename to src/app/pages/credentials/users/user-details-row/user-details-row.component.html diff --git a/src/app/pages/account/users/user-details-row/user-details-row.component.spec.ts b/src/app/pages/credentials/users/user-details-row/user-details-row.component.spec.ts similarity index 95% rename from src/app/pages/account/users/user-details-row/user-details-row.component.spec.ts rename to src/app/pages/credentials/users/user-details-row/user-details-row.component.spec.ts index eed189cafbf..7e854bfc06b 100644 --- a/src/app/pages/account/users/user-details-row/user-details-row.component.spec.ts +++ b/src/app/pages/credentials/users/user-details-row/user-details-row.component.spec.ts @@ -20,8 +20,8 @@ import { import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { DeleteUserDialogComponent, -} from 'app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component'; -import { UserFormComponent } from 'app/pages/account/users/user-form/user-form.component'; +} from 'app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component'; +import { UserFormComponent } from 'app/pages/credentials/users/user-form/user-form.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { UserDetailsRowComponent } from './user-details-row.component'; diff --git a/src/app/pages/account/users/user-details-row/user-details-row.component.ts b/src/app/pages/credentials/users/user-details-row/user-details-row.component.ts similarity index 80% rename from src/app/pages/account/users/user-details-row/user-details-row.component.ts rename to src/app/pages/credentials/users/user-details-row/user-details-row.component.ts index 7ae1a91b06e..e4a02849c80 100644 --- a/src/app/pages/account/users/user-details-row/user-details-row.component.ts +++ b/src/app/pages/credentials/users/user-details-row/user-details-row.component.ts @@ -2,18 +2,23 @@ import { Component, ChangeDetectionStrategy, input, output, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { Option } from 'app/interfaces/option.interface'; import { User } from 'app/interfaces/user.interface'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { IxTableExpandableRowComponent } from 'app/modules/ix-table/components/ix-table-expandable-row/ix-table-expandable-row.component'; import { YesNoPipe } from 'app/modules/pipes/yes-no/yes-no.pipe'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { DeleteUserDialogComponent, -} from 'app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component'; -import { UserFormComponent } from 'app/pages/account/users/user-form/user-form.component'; +} from 'app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component'; +import { UserFormComponent } from 'app/pages/credentials/users/user-form/user-form.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; import { UrlOptionsService } from 'app/services/url-options.service'; @@ -22,6 +27,15 @@ import { UrlOptionsService } from 'app/services/url-options.service'; selector: 'ix-user-details-row', templateUrl: './user-details-row.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxTableExpandableRowComponent, + MatButton, + TestDirective, + IxIconComponent, + RequiresRolesDirective, + TranslateModule, + ], }) export class UserDetailsRowComponent { readonly user = input.required(); diff --git a/src/app/pages/account/users/user-form/user-form.component.html b/src/app/pages/credentials/users/user-form/user-form.component.html similarity index 100% rename from src/app/pages/account/users/user-form/user-form.component.html rename to src/app/pages/credentials/users/user-form/user-form.component.html diff --git a/src/app/pages/account/users/user-form/user-form.component.scss b/src/app/pages/credentials/users/user-form/user-form.component.scss similarity index 100% rename from src/app/pages/account/users/user-form/user-form.component.scss rename to src/app/pages/credentials/users/user-form/user-form.component.scss diff --git a/src/app/pages/account/users/user-form/user-form.component.spec.ts b/src/app/pages/credentials/users/user-form/user-form.component.spec.ts similarity index 99% rename from src/app/pages/account/users/user-form/user-form.component.spec.ts rename to src/app/pages/credentials/users/user-form/user-form.component.spec.ts index 2e6d975fc6e..c18fab5b629 100644 --- a/src/app/pages/account/users/user-form/user-form.component.spec.ts +++ b/src/app/pages/credentials/users/user-form/user-form.component.spec.ts @@ -21,7 +21,7 @@ import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { selectUsers } from 'app/pages/account/users/store/user.selectors'; +import { selectUsers } from 'app/pages/credentials/users/store/user.selectors'; import { DownloadService } from 'app/services/download.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { StorageService } from 'app/services/storage.service'; diff --git a/src/app/pages/account/users/user-form/user-form.component.ts b/src/app/pages/credentials/users/user-form/user-form.component.ts similarity index 87% rename from src/app/pages/account/users/user-form/user-form.component.ts rename to src/app/pages/credentials/users/user-form/user-form.component.ts index d85d20f3d74..4a954278d33 100644 --- a/src/app/pages/account/users/user-form/user-form.component.ts +++ b/src/app/pages/credentials/users/user-form/user-form.component.ts @@ -1,11 +1,13 @@ import { Component, ChangeDetectionStrategy, ChangeDetectorRef, Inject, OnInit, } from '@angular/core'; -import { Validators } from '@angular/forms'; +import { Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatDivider } from '@angular/material/divider'; import { FormBuilder } from '@ngneat/reactive-forms'; import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { from, Observable, of, Subscription, } from 'rxjs'; @@ -13,6 +15,7 @@ import { debounceTime, filter, map, switchMap, take, } from 'rxjs/operators'; import { allCommands } from 'app/constants/all-commands.constant'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { choicesToOptions } from 'app/helpers/operators/options.operators'; import { helptextUsers } from 'app/helptext/account/user-form'; @@ -20,17 +23,35 @@ import { Option } from 'app/interfaces/option.interface'; import { User, UserUpdate } from 'app/interfaces/user.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { SimpleAsyncComboboxProvider } from 'app/modules/forms/ix-forms/classes/simple-async-combobox-provider'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { ChipsProvider } from 'app/modules/forms/ix-forms/components/ix-chips/chips-provider'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxComboboxComponent } from 'app/modules/forms/ix-forms/components/ix-combobox/ix-combobox.component'; +import { IxExplorerComponent } from 'app/modules/forms/ix-forms/components/ix-explorer/ix-explorer.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxFileInputComponent } from 'app/modules/forms/ix-forms/components/ix-file-input/ix-file-input.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxPermissionsComponent } from 'app/modules/forms/ix-forms/components/ix-permissions/ix-permissions.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { + IxModalHeaderComponent, +} from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; +import { + IxSlideToggleComponent, +} from 'app/modules/forms/ix-forms/components/ix-slide-toggle/ix-slide-toggle.component'; +import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { emailValidator } from 'app/modules/forms/ix-forms/validators/email-validation/email-validation'; import { forbiddenValues } from 'app/modules/forms/ix-forms/validators/forbidden-values-validation/forbidden-values-validation'; import { matchOthersFgValidator } from 'app/modules/forms/ix-forms/validators/password-validation/password-validation'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { userAdded, userChanged } from 'app/pages/account/users/store/user.actions'; -import { selectUsers } from 'app/pages/account/users/store/user.selectors'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { userAdded, userChanged } from 'app/pages/credentials/users/store/user.actions'; +import { selectUsers } from 'app/pages/credentials/users/store/user.selectors'; import { DownloadService } from 'app/services/download.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { StorageService } from 'app/services/storage.service'; @@ -46,6 +67,28 @@ const defaultHomePath = '/var/empty'; templateUrl: './user-form.component.html', styleUrls: ['./user-form.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxSlideToggleComponent, + MatDivider, + IxChipsComponent, + IxComboboxComponent, + IxExplorerComponent, + IxPermissionsComponent, + IxCheckboxComponent, + IxTextareaComponent, + IxFileInputComponent, + IxSelectComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class UserFormComponent implements OnInit { isFormLoading = false; diff --git a/src/app/pages/account/users/user-list/user-list.component.html b/src/app/pages/credentials/users/user-list/user-list.component.html similarity index 100% rename from src/app/pages/account/users/user-list/user-list.component.html rename to src/app/pages/credentials/users/user-list/user-list.component.html diff --git a/src/app/pages/api-keys/components/api-key-list/api-key-list.component.scss b/src/app/pages/credentials/users/user-list/user-list.component.scss similarity index 100% rename from src/app/pages/api-keys/components/api-key-list/api-key-list.component.scss rename to src/app/pages/credentials/users/user-list/user-list.component.scss diff --git a/src/app/pages/account/users/user-list/user-list.component.spec.ts b/src/app/pages/credentials/users/user-list/user-list.component.spec.ts similarity index 91% rename from src/app/pages/account/users/user-list/user-list.component.spec.ts rename to src/app/pages/credentials/users/user-list/user-list.component.spec.ts index cf61c8143ee..14b77be5a72 100644 --- a/src/app/pages/account/users/user-list/user-list.component.spec.ts +++ b/src/app/pages/credentials/users/user-list/user-list.component.spec.ts @@ -2,7 +2,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; import { MockStore, provideMockStore } from '@ngrx/store/testing'; -import { MockComponent, MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { Role } from 'app/enums/role.enum'; import { Preferences } from 'app/interfaces/preferences.interface'; @@ -11,10 +11,10 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { usersInitialState, UsersState } from 'app/pages/account/users/store/user.reducer'; -import { selectUsers, selectUserState, selectUsersTotal } from 'app/pages/account/users/store/user.selectors'; -import { UserDetailsRowComponent } from 'app/pages/account/users/user-details-row/user-details-row.component'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { usersInitialState, UsersState } from 'app/pages/credentials/users/store/user.reducer'; +import { selectUsers, selectUserState, selectUsersTotal } from 'app/pages/credentials/users/store/user.selectors'; +import { UserDetailsRowComponent } from 'app/pages/credentials/users/user-details-row/user-details-row.component'; import { WebSocketService } from 'app/services/ws.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { UserListComponent } from './user-list.component'; @@ -74,7 +74,7 @@ describe('UserListComponent', () => { const createComponent = createComponentFactory({ component: UserListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableDetailsRowDirective, ], diff --git a/src/app/pages/account/users/user-list/user-list.component.ts b/src/app/pages/credentials/users/user-list/user-list.component.ts similarity index 69% rename from src/app/pages/account/users/user-list/user-list.component.ts rename to src/app/pages/credentials/users/user-list/user-list.component.ts index 14790974abd..5ba127d568e 100644 --- a/src/app/pages/account/users/user-list/user-list.component.ts +++ b/src/app/pages/credentials/users/user-list/user-list.component.ts @@ -1,27 +1,42 @@ +import { AsyncPipe } from '@angular/common'; import { Component, OnInit, ChangeDetectorRef, ChangeDetectionStrategy, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatSlideToggle } from '@angular/material/slide-toggle'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { select, Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { combineLatest, Observable, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { EmptyType } from 'app/enums/empty-type.enum'; import { Role, roleNames } from 'app/enums/role.enum'; import { User } from 'app/interfaces/user.interface'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { ArrayDataProvider } from 'app/modules/ix-table/classes/array-data-provider/array-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; import { yesNoColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-yes-no/ix-cell-yes-no.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; +import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { createTable } from 'app/modules/ix-table/utils'; -import { userPageEntered, userRemoved } from 'app/pages/account/users/store/user.actions'; -import { selectUsers, selectUserState, selectUsersTotal } from 'app/pages/account/users/store/user.selectors'; -import { UserFormComponent } from 'app/pages/account/users/user-form/user-form.component'; -import { userListElements } from 'app/pages/account/users/user-list/user-list.elements'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { userPageEntered, userRemoved } from 'app/pages/credentials/users/store/user.actions'; +import { selectUsers, selectUserState, selectUsersTotal } from 'app/pages/credentials/users/store/user.selectors'; +import { UserDetailsRowComponent } from 'app/pages/credentials/users/user-details-row/user-details-row.component'; +import { UserFormComponent } from 'app/pages/credentials/users/user-form/user-form.component'; +import { userListElements } from 'app/pages/credentials/users/user-list/user-list.elements'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; import { AppsState } from 'app/store'; import { builtinUsersToggled } from 'app/store/preferences/preferences.actions'; @@ -33,6 +48,25 @@ import { waitForPreferences } from 'app/store/preferences/preferences.selectors' templateUrl: './user-list.component.html', styleUrls: ['./user-list.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + SearchInput1Component, + MatSlideToggle, + TestDirective, + UiSearchDirective, + RequiresRolesDirective, + MatButton, + IxTableComponent, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + IxTableDetailsRowDirective, + UserDetailsRowComponent, + IxTablePagerComponent, + TranslateModule, + AsyncPipe, + PageHeaderComponent, + ], }) export class UserListComponent implements OnInit { protected readonly requiredRoles = [Role.AccountWrite]; diff --git a/src/app/pages/account/users/user-list/user-list.elements.ts b/src/app/pages/credentials/users/user-list/user-list.elements.ts similarity index 100% rename from src/app/pages/account/users/user-list/user-list.elements.ts rename to src/app/pages/credentials/users/user-list/user-list.elements.ts diff --git a/src/app/pages/dashboard/dashboard.module.ts b/src/app/pages/dashboard/dashboard.module.ts index 6e55a7b9cdb..9a7bce00156 100644 --- a/src/app/pages/dashboard/dashboard.module.ts +++ b/src/app/pages/dashboard/dashboard.module.ts @@ -38,7 +38,7 @@ import { CopyrightLineComponent } from 'app/modules/layout/copyright-line/copyri import { WithLoadingStateDirective, } from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; @@ -122,7 +122,6 @@ import { PoolUsageGaugeComponent } from './widgets/storage/widget-pool/common/po ReactiveFormsModule, TranslateModule, NgComponentOutlet, - PageHeaderModule, routing, MatCard, IxIconComponent, @@ -177,6 +176,7 @@ import { PoolUsageGaugeComponent } from './widgets/storage/widget-pool/common/po AppVersionPipe, TestDirective, WithLoadingStateDirective, + PageHeaderComponent, ], }) export class DashboardModule { diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.spec.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.spec.ts index bd8d53cae0e..a7bbc152877 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.spec.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.spec.ts @@ -4,7 +4,7 @@ import { MatButtonHarness } from '@angular/material/button/testing'; import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockComponents, MockModule } from 'ng-mocks'; +import { MockComponent, MockComponents } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockJob, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -18,7 +18,7 @@ import { AsyncDataProvider } from 'app/modules/ix-table/classes/async-data-provi import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { selectJobs } from 'app/modules/jobs/store/job.selectors'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { CloudBackupDetailsComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-details.component'; import { CloudBackupFormComponent, @@ -47,13 +47,13 @@ describe('CloudBackupListComponent', () => { $date: new Date().getTime() - 50000, }, }, - } as unknown as CloudBackup, + } as CloudBackup, ]; const createComponent = createComponentFactory({ component: CloudBackupListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], declarations: [ diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.spec.ts b/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.spec.ts index 49566ba06b0..ac1cccd750b 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.spec.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.spec.ts @@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { fakeSuccessfulJob } from 'app/core/testing/utils/fake-job.utils'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; @@ -23,7 +23,7 @@ import { } from 'app/modules/ix-table/components/ix-table-details-row/ix-table-details-row.component'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; import { selectJob } from 'app/modules/jobs/store/job.selectors'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { CloudSyncFormComponent } from 'app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component'; import { CloudSyncListComponent } from 'app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component'; @@ -91,7 +91,7 @@ describe('CloudSyncListComponent', () => { const createComponent = createComponentFactory({ component: CloudSyncListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableColumnsSelectorComponent, IxTableDetailsRowComponent, diff --git a/src/app/pages/data-protection/data-protection.module.ts b/src/app/pages/data-protection/data-protection.module.ts index 29b147e93b7..20539aea6e2 100755 --- a/src/app/pages/data-protection/data-protection.module.ts +++ b/src/app/pages/data-protection/data-protection.module.ts @@ -53,7 +53,7 @@ import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table- import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-cell.directive'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { SchedulerModule } from 'app/modules/scheduler/scheduler.module'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { CloudBackupRestoreFromSnapshotFormComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component'; @@ -137,7 +137,6 @@ import { SmartTaskListComponent } from './smart-task/smart-task-list/smart-task- TranslateModule, CloudCredentialsSelectModule, SshCredentialsSelectModule, - PageHeaderModule, SchedulerModule, MatButtonModule, MatDialogModule, @@ -178,6 +177,7 @@ import { SmartTaskListComponent } from './smart-task/smart-task-list/smart-task- IxTableColumnsSelectorComponent, IxTableCellDirective, TestDirective, + PageHeaderComponent, ], declarations: [ SnapshotTaskListComponent, diff --git a/src/app/pages/data-protection/replication/replication-list/replication-list.component.spec.ts b/src/app/pages/data-protection/replication/replication-list/replication-list.component.spec.ts index 0c3a2af143d..837494e7579 100644 --- a/src/app/pages/data-protection/replication/replication-list/replication-list.component.spec.ts +++ b/src/app/pages/data-protection/replication/replication-list/replication-list.component.spec.ts @@ -6,7 +6,7 @@ import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { fakeSuccessfulJob } from 'app/core/testing/utils/fake-job.utils'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; @@ -32,7 +32,7 @@ import { } from 'app/modules/ix-table/components/ix-table-details-row/ix-table-details-row.component'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; import { selectJobs } from 'app/modules/jobs/store/job.selectors'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { ReplicationFormComponent } from 'app/pages/data-protection/replication/replication-form/replication-form.component'; import { ReplicationListComponent } from 'app/pages/data-protection/replication/replication-list/replication-list.component'; import { ReplicationRestoreDialogComponent } from 'app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component'; @@ -117,7 +117,7 @@ describe('ReplicationListComponent', () => { const createComponent = createComponentFactory({ component: ReplicationListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableDetailsRowDirective, IxTableDetailsRowComponent, diff --git a/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.spec.ts b/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.spec.ts index 201c7a70c42..1b18b9b97e5 100644 --- a/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.spec.ts +++ b/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.spec.ts @@ -2,7 +2,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { fakeSuccessfulJob } from 'app/core/testing/utils/fake-job.utils'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; @@ -19,7 +19,7 @@ import { IxTableColumnsSelectorComponent, } from 'app/modules/ix-table/components/ix-table-columns-selector/ix-table-columns-selector.component'; import { selectJobs } from 'app/modules/jobs/store/job.selectors'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { RsyncTaskFormComponent } from 'app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component'; import { RsyncTaskListComponent } from 'app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component'; import { IxChainedSlideInService } from 'app/services/ix-chained-slide-in.service'; @@ -81,7 +81,7 @@ describe('RsyncTaskListComponent', () => { const createComponent = createComponentFactory({ component: RsyncTaskListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableColumnsSelectorComponent, ], diff --git a/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.spec.ts b/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.spec.ts index 6df570798af..15d12c21ecf 100644 --- a/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.spec.ts +++ b/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.spec.ts @@ -2,7 +2,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -13,7 +13,7 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { IxTableColumnsSelectorComponent, } from 'app/modules/ix-table/components/ix-table-columns-selector/ix-table-columns-selector.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { ScrubListComponent } from 'app/pages/data-protection/scrub-task/scrub-list/scrub-list.component'; import { ScrubTaskFormComponent } from 'app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @@ -61,7 +61,7 @@ describe('ScrubListComponent', () => { const createComponent = createComponentFactory({ component: ScrubListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), IxTableColumnsSelectorComponent, ], providers: [ diff --git a/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.spec.ts b/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.spec.ts index d6d42dbc5a9..6d67b94417a 100644 --- a/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.spec.ts +++ b/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.spec.ts @@ -4,7 +4,7 @@ import { MatDialog } from '@angular/material/dialog'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockWebSocket, mockCall } from 'app/core/testing/utils/mock-websocket.utils'; @@ -16,7 +16,7 @@ import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { SmartTaskCardComponent } from 'app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component'; import { SmartTaskFormComponent } from 'app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @@ -76,7 +76,7 @@ describe('SmartTaskCardComponent', () => { const createComponent = createComponentFactory({ component: SmartTaskCardComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], providers: [ diff --git a/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.spec.ts b/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.spec.ts index 45f72e485dc..09443b8fad6 100644 --- a/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.spec.ts +++ b/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.spec.ts @@ -3,7 +3,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatButtonHarness } from '@angular/material/button/testing'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockWebSocket, mockCall } from 'app/core/testing/utils/mock-websocket.utils'; @@ -19,7 +19,7 @@ import { IxTableDetailsRowComponent, } from 'app/modules/ix-table/components/ix-table-details-row/ix-table-details-row.component'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { SnapshotTaskFormComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component'; import { SnapshotTaskListComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @@ -62,7 +62,7 @@ describe('SnapshotTaskListComponent', () => { const createComponent = createComponentFactory({ component: SnapshotTaskListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableColumnsSelectorComponent, IxTableDetailsRowDirective, diff --git a/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.spec.ts b/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.spec.ts index 9af05095921..7928404cbc6 100644 --- a/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.spec.ts +++ b/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.spec.ts @@ -3,7 +3,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatButtonHarness } from '@angular/material/button/testing'; import { ActivatedRoute } from '@angular/router'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of, Subject } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -18,7 +18,7 @@ import { SearchInput1Component } from 'app/modules/forms/search-input1/search-in import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { DatasetQuotaAddFormComponent } from 'app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component'; import { DatasetQuotaEditFormComponent } from 'app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component'; import { DatasetQuotasListComponent } from 'app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component'; @@ -52,7 +52,7 @@ describe('DatasetQuotasListComponent', () => { const createComponent = createComponentFactory({ component: DatasetQuotasListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], providers: [ diff --git a/src/app/pages/datasets/datasets.module.ts b/src/app/pages/datasets/datasets.module.ts index 63bebe4df79..8da0088cde3 100644 --- a/src/app/pages/datasets/datasets.module.ts +++ b/src/app/pages/datasets/datasets.module.ts @@ -38,7 +38,7 @@ import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table- import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { TreeModule } from 'app/modules/ix-tree/tree.module'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { OrNotAvailablePipe } from 'app/modules/pipes/or-not-available/or-not-available.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; @@ -104,7 +104,6 @@ import { DatasetNodeComponent } from './components/dataset-node/dataset-node.com IxModalHeaderComponent, IxChipsComponent, IxTextareaComponent, - PageHeaderModule, IxWarningComponent, AsyncPipe, PercentPipe, @@ -118,6 +117,7 @@ import { DatasetNodeComponent } from './components/dataset-node/dataset-node.com IxTableEmptyDirective, FakeProgressBarComponent, TestDirective, + PageHeaderComponent, ], declarations: [ DatasetsManagementComponent, diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-list/snapshot-list.component.spec.ts b/src/app/pages/datasets/modules/snapshots/snapshot-list/snapshot-list.component.spec.ts index fc3bc6f9b79..8cd4097d7a1 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-list/snapshot-list.component.spec.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-list/snapshot-list.component.spec.ts @@ -5,7 +5,7 @@ import { MatButtonHarness } from '@angular/material/button/testing'; import { ActivatedRoute } from '@angular/router'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { FakeFormatDateTimePipe } from 'app/core/testing/classes/fake-format-datetime.pipe'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; @@ -15,7 +15,7 @@ import { IxSlideToggleHarness } from 'app/modules/forms/ix-forms/components/ix-s import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { SnapshotAddFormComponent } from 'app/pages/datasets/modules/snapshots/snapshot-add-form/snapshot-add-form.component'; import { snapshotsInitialState } from 'app/pages/datasets/modules/snapshots/store/snapshot.reducer'; import { selectSnapshotState, selectSnapshots, selectSnapshotsTotal } from 'app/pages/datasets/modules/snapshots/store/snapshot.selectors'; @@ -33,7 +33,7 @@ describe('SnapshotListComponent', () => { const createComponent = createComponentFactory({ component: SnapshotListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ReactiveFormsModule, IxTableDetailsRowDirective, diff --git a/src/app/pages/datasets/modules/snapshots/snapshots.module.ts b/src/app/pages/datasets/modules/snapshots/snapshots.module.ts index c2bfd669bc7..7277163d59c 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshots.module.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshots.module.ts @@ -39,7 +39,7 @@ import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-h import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; @@ -97,7 +97,6 @@ const components = [ IxModalHeaderComponent, IxInputComponent, IxSlideToggleComponent, - PageHeaderModule, AsyncPipe, RequiresRolesDirective, IxTableComponent, @@ -107,6 +106,7 @@ const components = [ IxTableDetailsRowDirective, IxTablePagerComponent, TestDirective, + PageHeaderComponent, ], declarations: [ ...components, diff --git a/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts b/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts index 5f41aa0b8db..1c7ec9070dd 100644 --- a/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts +++ b/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts @@ -59,6 +59,7 @@ describe('ActiveDirectoryComponent', () => { component: ActiveDirectoryComponent, imports: [ ReactiveFormsModule, + LeaveDomainDialogComponent, ], providers: [ mockWebSocket([ @@ -91,9 +92,6 @@ describe('ActiveDirectoryComponent', () => { mockAuth(), { provide: SLIDE_IN_DATA, useValue: undefined }, ], - declarations: [ - LeaveDomainDialogComponent, - ], }); beforeEach(async () => { diff --git a/src/app/pages/directory-service/components/active-directory/active-directory.component.ts b/src/app/pages/directory-service/components/active-directory/active-directory.component.ts index dd32809ca9f..5baa197f509 100644 --- a/src/app/pages/directory-service/components/active-directory/active-directory.component.ts +++ b/src/app/pages/directory-service/components/active-directory/active-directory.component.ts @@ -1,21 +1,33 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { Validators } from '@angular/forms'; +import { Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { MatDialog } from '@angular/material/dialog'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { forkJoin, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { DirectoryServiceState } from 'app/enums/directory-service-state.enum'; import { Role } from 'app/enums/role.enum'; import { singleArrayToOptions } from 'app/helpers/operators/options.operators'; import { helptextActiveDirectory } from 'app/helptext/directory-service/active-directory'; import { NssInfoType } from 'app/interfaces/active-directory.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { LeaveDomainDialogComponent, } from 'app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component'; @@ -29,6 +41,24 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './active-directory.component.html', styleUrls: ['./active-directory.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxCheckboxComponent, + IxSelectComponent, + IxChipsComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + AsyncPipe, + ], }) export class ActiveDirectoryComponent implements OnInit { protected readonly requiredRoles = [Role.DirectoryServiceWrite]; diff --git a/src/app/pages/directory-service/components/idmap-form/idmap-form.component.ts b/src/app/pages/directory-service/components/idmap-form/idmap-form.component.ts index 33d69302add..5e2fafd0876 100644 --- a/src/app/pages/directory-service/components/idmap-form/idmap-form.component.ts +++ b/src/app/pages/directory-service/components/idmap-form/idmap-form.component.ts @@ -1,12 +1,16 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { Validators } from '@angular/forms'; +import { Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable, of, tap } from 'rxjs'; import { filter, switchMap } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { IdmapBackend, IdmapLinkedService, IdmapName, IdmapSchemaMode, IdmapSslEncryptionMode, } from 'app/enums/idmap.enum'; @@ -17,11 +21,19 @@ import { IdmapBackendOption, IdmapBackendOptions } from 'app/interfaces/idmap-ba import { Idmap, IdmapUpdate } from 'app/interfaces/idmap.interface'; import { Option } from 'app/interfaces/option.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; +import { WithManageCertificatesLinkComponent } from 'app/modules/forms/ix-forms/components/with-manage-certificates-link/with-manage-certificates-link.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { requiredIdmapDomains } from 'app/pages/directory-service/utils/required-idmap-domains.utils'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IdmapService } from 'app/services/idmap.service'; @@ -37,6 +49,24 @@ const customIdmapName = 'custom' as const; selector: 'ix-idmap-form', templateUrl: './idmap-form.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxSelectComponent, + IxInputComponent, + WithManageCertificatesLinkComponent, + IxCheckboxComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + AsyncPipe, + ], }) export class IdmapFormComponent implements OnInit { protected readonly requiredRoles = [Role.DirectoryServiceWrite]; diff --git a/src/app/pages/directory-service/components/idmap-list/idmap-list.component.spec.ts b/src/app/pages/directory-service/components/idmap-list/idmap-list.component.spec.ts index 61a490b9ef5..3deace1b0a6 100644 --- a/src/app/pages/directory-service/components/idmap-list/idmap-list.component.spec.ts +++ b/src/app/pages/directory-service/components/idmap-list/idmap-list.component.spec.ts @@ -2,7 +2,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatButtonHarness } from '@angular/material/button/testing'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -15,7 +15,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { IdmapFormComponent } from 'app/pages/directory-service/components/idmap-form/idmap-form.component'; import { IdmapListComponent } from 'app/pages/directory-service/components/idmap-list/idmap-list.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @@ -57,7 +57,7 @@ describe('IdmapListComponent', () => { const createComponent = createComponentFactory({ component: IdmapListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], providers: [ diff --git a/src/app/pages/directory-service/components/idmap-list/idmap-list.component.ts b/src/app/pages/directory-service/components/idmap-list/idmap-list.component.ts index 9cfd1886431..76009a07275 100644 --- a/src/app/pages/directory-service/components/idmap-list/idmap-list.component.ts +++ b/src/app/pages/directory-service/components/idmap-list/idmap-list.component.ts @@ -1,22 +1,37 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input, OnInit, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatToolbar } from '@angular/material/toolbar'; +import { RouterLink } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { filter, map, of, switchMap, tap, } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { DirectoryServiceState } from 'app/enums/directory-service-state.enum'; import { IdmapName } from 'app/enums/idmap.enum'; import { Role } from 'app/enums/role.enum'; import { helptextIdmap } from 'app/helptext/directory-service/idmap'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { AsyncDataProvider } from 'app/modules/ix-table/classes/async-data-provider/async-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { createTable } from 'app/modules/ix-table/utils'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ActiveDirectoryComponent } from 'app/pages/directory-service/components/active-directory/active-directory.component'; import { IdmapFormComponent } from 'app/pages/directory-service/components/idmap-form/idmap-form.component'; import { idMapElements } from 'app/pages/directory-service/components/idmap-list/idmap-list.elements'; @@ -33,6 +48,25 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './idmap-list.component.html', styleUrls: ['./idmap-list.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + SearchInput1Component, + RequiresRolesDirective, + MatButton, + TestDirective, + UiSearchDirective, + MatToolbar, + RouterLink, + IxIconComponent, + IxTableComponent, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + IxTablePagerComponent, + TranslateModule, + AsyncPipe, + PageHeaderComponent, + ], }) export class IdmapListComponent implements OnInit { @Input() paginator = true; diff --git a/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component.ts b/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component.ts index 26fc2562837..24089b6cf4f 100644 --- a/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component.ts +++ b/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component.ts @@ -1,16 +1,25 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { helptextKerberosKeytabs } from 'app/helptext/directory-service/kerberos-keytabs-form-list'; import { KerberosKeytab } from 'app/interfaces/kerberos-config.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxFileInputComponent } from 'app/modules/forms/ix-forms/components/ix-file-input/ix-file-input.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { WebSocketService } from 'app/services/ws.service'; @UntilDestroy() @@ -18,6 +27,21 @@ import { WebSocketService } from 'app/services/ws.service'; selector: 'ix-kereberos-keytabs-form', templateUrl: './kerberos-keytabs-form.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxFileInputComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class KerberosKeytabsFormComponent implements OnInit { protected readonly requiredRoles = [Role.DirectoryServiceWrite]; diff --git a/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component.ts b/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component.ts index fc3908d0882..ab0418139e7 100644 --- a/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component.ts +++ b/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component.ts @@ -1,18 +1,33 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatToolbar } from '@angular/material/toolbar'; +import { RouterLink } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { filter, switchMap, tap } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { Role } from 'app/enums/role.enum'; import { KerberosKeytab } from 'app/interfaces/kerberos-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { AsyncDataProvider } from 'app/modules/ix-table/classes/async-data-provider/async-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { createTable } from 'app/modules/ix-table/utils'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { KerberosKeytabsFormComponent } from 'app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component'; import { kerberosKeytabsListElements } from 'app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.elements'; import { ErrorHandlerService } from 'app/services/error-handler.service'; @@ -25,6 +40,25 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './kerberos-keytabs-list.component.html', styleUrls: ['./kerberos-keytabs-list.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + SearchInput1Component, + RequiresRolesDirective, + MatButton, + TestDirective, + UiSearchDirective, + MatToolbar, + RouterLink, + IxIconComponent, + IxTableComponent, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + IxTablePagerComponent, + TranslateModule, + AsyncPipe, + PageHeaderComponent, + ], }) export class KerberosKeytabsListComponent implements OnInit { @Input() paginator = true; diff --git a/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.ts b/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.ts index f6396dbdccd..399efd2a24c 100644 --- a/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.ts +++ b/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.ts @@ -1,16 +1,25 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { helptextKerberosRealms } from 'app/helptext/directory-service/kerberos-realms-form-list'; import { KerberosRealm, KerberosRealmUpdate } from 'app/interfaces/kerberos-realm.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { WebSocketService } from 'app/services/ws.service'; @UntilDestroy() @@ -18,6 +27,21 @@ import { WebSocketService } from 'app/services/ws.service'; selector: 'ix-kerberos-realms-form', templateUrl: './kerberos-realms-form.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxChipsComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class KerberosRealmsFormComponent implements OnInit { protected readonly requiredRoles = [Role.DirectoryServiceWrite]; diff --git a/src/app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component.ts b/src/app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component.ts index 5bd70b2bbc9..4fe71649e47 100644 --- a/src/app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component.ts +++ b/src/app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component.ts @@ -1,20 +1,35 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input, OnInit, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatToolbar } from '@angular/material/toolbar'; +import { RouterLink } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { filter, map, switchMap, tap, } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { Role } from 'app/enums/role.enum'; import { helptextKerberosRealms } from 'app/helptext/directory-service/kerberos-realms-form-list'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { AsyncDataProvider } from 'app/modules/ix-table/classes/async-data-provider/async-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { createTable } from 'app/modules/ix-table/utils'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { KerberosRealmRow } from 'app/pages/directory-service/components/kerberos-realms/kerberos-realm-row.interface'; import { kerberosRealmsListElements } from 'app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.elements'; import { KerberosRealmsFormComponent } from 'app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component'; @@ -28,6 +43,25 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './kerberos-realms-list.component.html', styleUrls: ['./kerberos-realms-list.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + SearchInput1Component, + RequiresRolesDirective, + MatButton, + TestDirective, + UiSearchDirective, + MatToolbar, + RouterLink, + IxIconComponent, + IxTableComponent, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + IxTablePagerComponent, + TranslateModule, + AsyncPipe, + PageHeaderComponent, + ], }) export class KerberosRealmsListComponent implements OnInit { @Input() paginator = true; diff --git a/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.ts b/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.ts index 9469e852521..2df28e2b733 100644 --- a/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.ts +++ b/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.ts @@ -1,14 +1,23 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; +import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { helptextKerberosSettings } from 'app/helptext/directory-service/kerberos-settings'; import { KerberosConfigUpdate } from 'app/interfaces/kerberos-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; +import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -17,6 +26,20 @@ import { WebSocketService } from 'app/services/ws.service'; selector: 'ix-kerberos-settings', templateUrl: './kerberos-settings.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxTextareaComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class KerberosSettingsComponent implements OnInit { protected readonly requiredRoles = [Role.DirectoryServiceWrite]; diff --git a/src/app/pages/directory-service/components/ldap/ldap.component.ts b/src/app/pages/directory-service/components/ldap/ldap.component.ts index e6ac0f811a5..7409b6a0850 100644 --- a/src/app/pages/directory-service/components/ldap/ldap.component.ts +++ b/src/app/pages/directory-service/components/ldap/ldap.component.ts @@ -1,18 +1,32 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { Validators } from '@angular/forms'; +import { Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { map } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { idNameArrayToOptions, singleArrayToOptions } from 'app/helpers/operators/options.operators'; import { helptextLdap } from 'app/helptext/directory-service/ldap'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; +import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; +import { WithManageCertificatesLinkComponent } from 'app/modules/forms/ix-forms/components/with-manage-certificates-link/with-manage-certificates-link.component'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -23,6 +37,26 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './ldap.component.html', styleUrls: ['./ldap.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxChipsComponent, + IxInputComponent, + IxCheckboxComponent, + IxSelectComponent, + WithManageCertificatesLinkComponent, + IxTextareaComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + AsyncPipe, + ], }) export class LdapComponent implements OnInit { protected readonly requiredRoles = [Role.DirectoryServiceWrite]; diff --git a/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.ts b/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.ts index 6728d4a4d94..301ff58642a 100644 --- a/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.ts +++ b/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.ts @@ -1,15 +1,20 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; -import { MatDialogRef } from '@angular/material/dialog'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatDialogRef, MatDialogTitle, MatDialogClose } from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { JobState } from 'app/enums/job-state.enum'; import { Role } from 'app/enums/role.enum'; import { helptextActiveDirectory } from 'app/helptext/directory-service/active-directory'; import { LeaveActiveDirectory } from 'app/interfaces/active-directory-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -19,6 +24,18 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './leave-domain-dialog.component.html', styleUrls: ['./leave-domain-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + ReactiveFormsModule, + IxInputComponent, + FormActionsComponent, + MatButton, + MatDialogClose, + TestDirective, + RequiresRolesDirective, + TranslateModule, + ], }) export class LeaveDomainDialogComponent { form = this.formBuilder.group({ diff --git a/src/app/pages/directory-service/directory-service.module.ts b/src/app/pages/directory-service/directory-service.module.ts deleted file mode 100644 index 6ac6ccae4de..00000000000 --- a/src/app/pages/directory-service/directory-service.module.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { CdkAccordionModule } from '@angular/cdk/accordion'; -import { AsyncPipe, NgTemplateOutlet } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatListModule } from '@angular/material/list'; -import { MatToolbarModule } from '@angular/material/toolbar'; -import { TranslateModule } from '@ngx-translate/core'; -import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; -import { UiSearchDirective } from 'app/directives/ui-search.directive'; -import { EmptyComponent } from 'app/modules/empty/empty.component'; -import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; -import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; -import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; -import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; -import { IxFileInputComponent } from 'app/modules/forms/ix-forms/components/ix-file-input/ix-file-input.component'; -import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; -import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; -import { - IxModalHeaderComponent, -} from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; -import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; -import { - WithManageCertificatesLinkComponent, -} from 'app/modules/forms/ix-forms/components/with-manage-certificates-link/with-manage-certificates-link.component'; -import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; -import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; -import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; -import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; -import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ActiveDirectoryComponent } from 'app/pages/directory-service/components/active-directory/active-directory.component'; -import { IdmapFormComponent } from 'app/pages/directory-service/components/idmap-form/idmap-form.component'; -import { IdmapListComponent } from 'app/pages/directory-service/components/idmap-list/idmap-list.component'; -import { KerberosKeytabsFormComponent } from 'app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component'; -import { KerberosKeytabsListComponent } from 'app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component'; -import { KerberosRealmsListComponent } from 'app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component'; -import { KerberosSettingsComponent } from 'app/pages/directory-service/components/kerberos-settings/kerberos-settings.component'; -import { - LeaveDomainDialogComponent, -} from 'app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component'; -import { routing } from 'app/pages/directory-service/directory-service.routing'; -import { DirectoryServicesComponent } from 'app/pages/directory-service/directory-services.component'; -import { SystemGeneralService } from 'app/services/system-general.service'; -import { KerberosRealmsFormComponent } from './components/kerberos-realms-form/kerberos-realms-form.component'; -import { LdapComponent } from './components/ldap/ldap.component'; - -@NgModule({ - imports: [ - ReactiveFormsModule, - routing, - MatListModule, - PageHeaderModule, - MatToolbarModule, - IxIconComponent, - MatButtonModule, - MatCardModule, - TranslateModule, - CdkAccordionModule, - MatDialogModule, - SearchInput1Component, - EmptyComponent, - IxChipsComponent, - IxModalHeaderComponent, - IxInputComponent, - IxCheckboxComponent, - IxFieldsetComponent, - WithManageCertificatesLinkComponent, - IxSelectComponent, - IxTextareaComponent, - IxFileInputComponent, - FormActionsComponent, - AsyncPipe, - NgTemplateOutlet, - RequiresRolesDirective, - UiSearchDirective, - IxTableComponent, - IxTableHeadComponent, - IxTableBodyComponent, - IxTablePagerComponent, - IxTableEmptyDirective, - TestDirective, - ], - declarations: [ - LdapComponent, - ActiveDirectoryComponent, - KerberosRealmsListComponent, - KerberosRealmsFormComponent, - KerberosSettingsComponent, - KerberosKeytabsListComponent, - KerberosKeytabsFormComponent, - IdmapListComponent, - IdmapFormComponent, - DirectoryServicesComponent, - LeaveDomainDialogComponent, - ], - providers: [SystemGeneralService], -}) export class DirectoryServiceModule { } diff --git a/src/app/pages/directory-service/directory-service.routing.ts b/src/app/pages/directory-service/directory-service.routes.ts similarity index 85% rename from src/app/pages/directory-service/directory-service.routing.ts rename to src/app/pages/directory-service/directory-service.routes.ts index 789fa568587..1c0aa741bb9 100644 --- a/src/app/pages/directory-service/directory-service.routing.ts +++ b/src/app/pages/directory-service/directory-service.routes.ts @@ -1,5 +1,4 @@ -import { ModuleWithProviders } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; +import { Routes } from '@angular/router'; import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; import { IdmapListComponent } from 'app/pages/directory-service/components/idmap-list/idmap-list.component'; import { KerberosKeytabsListComponent } from 'app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component'; @@ -27,4 +26,3 @@ export const routes: Routes = [{ data: { title: T('Kerberos Keytab'), breadcrumb: null, icon: 'apps' }, }], }]; -export const routing: ModuleWithProviders = RouterModule.forChild(routes); diff --git a/src/app/pages/directory-service/directory-services.component.ts b/src/app/pages/directory-service/directory-services.component.ts index 55d73102bd9..e38ffc49ccd 100644 --- a/src/app/pages/directory-service/directory-services.component.ts +++ b/src/app/pages/directory-service/directory-services.component.ts @@ -1,20 +1,29 @@ import { CdkAccordionItem } from '@angular/cdk/accordion'; +import { NgTemplateOutlet } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, ViewChild, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; +import { MatList, MatListItem } from '@angular/material/list'; +import { MatToolbarRow } from '@angular/material/toolbar'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { forkJoin, } from 'rxjs'; import { filter } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { DirectoryServiceState } from 'app/enums/directory-service-state.enum'; import { Role } from 'app/enums/role.enum'; import { helptextDashboard } from 'app/helptext/directory-service/dashboard'; import { EmptyConfig } from 'app/interfaces/empty-config.interface'; import { Option } from 'app/interfaces/option.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { EmptyComponent } from 'app/modules/empty/empty.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ActiveDirectoryComponent } from 'app/pages/directory-service/components/active-directory/active-directory.component'; import { IdmapListComponent } from 'app/pages/directory-service/components/idmap-list/idmap-list.component'; import { KerberosKeytabsListComponent } from 'app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component'; @@ -23,6 +32,9 @@ import { KerberosSettingsComponent } from 'app/pages/directory-service/component import { directoryServicesElements } from 'app/pages/directory-service/directory-services.elements'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; import { WebSocketService } from 'app/services/ws.service'; +import { IdmapListComponent as IdmapListComponent_1 } from './components/idmap-list/idmap-list.component'; +import { KerberosKeytabsListComponent as KerberosKeytabsListComponent_1 } from './components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component'; +import { KerberosRealmsListComponent as KerberosRealmsListComponent_1 } from './components/kerberos-realms/kerberos-realms-list.component'; import { LdapComponent } from './components/ldap/ldap.component'; interface DataCard { @@ -37,6 +49,25 @@ interface DataCard { templateUrl: './directory-services.component.html', styleUrls: ['./directory-services.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + EmptyComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + UiSearchDirective, + NgTemplateOutlet, + MatCard, + MatToolbarRow, + MatCardContent, + CdkAccordionItem, + IdmapListComponent_1, + KerberosRealmsListComponent_1, + KerberosKeytabsListComponent_1, + MatList, + MatListItem, + TranslateModule, + ], }) export class DirectoryServicesComponent implements OnInit { readonly requiredRoles = [Role.DirectoryServiceWrite]; diff --git a/src/app/pages/jobs/jobs-list.module.ts b/src/app/pages/jobs/jobs-list.module.ts index 5db465b312d..66c5a828d52 100644 --- a/src/app/pages/jobs/jobs-list.module.ts +++ b/src/app/pages/jobs/jobs-list.module.ts @@ -23,7 +23,7 @@ import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table- import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-cell.directive'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { JobLogsRowComponent } from 'app/pages/jobs/job-logs-row/job-logs-row.component'; @@ -48,7 +48,6 @@ import { JobsListComponent } from './jobs-list/jobs-list.component'; MapValuePipe, CopyButtonComponent, MatIconButton, - PageHeaderModule, AsyncPipe, DecimalPipe, JsonPipe, @@ -61,6 +60,7 @@ import { JobsListComponent } from './jobs-list/jobs-list.component'; IxTableDetailsRowDirective, IxTablePagerComponent, TestDirective, + PageHeaderComponent, ], declarations: [JobsListComponent, JobLogsRowComponent, JobNameComponent], }) diff --git a/src/app/pages/jobs/jobs-list/jobs-list.component.spec.ts b/src/app/pages/jobs/jobs-list/jobs-list.component.spec.ts index cf4f6bef521..327b36f36b2 100644 --- a/src/app/pages/jobs/jobs-list/jobs-list.component.spec.ts +++ b/src/app/pages/jobs/jobs-list/jobs-list.component.spec.ts @@ -6,7 +6,7 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { MatTabsModule } from '@angular/material/tabs'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; import { MockStore, provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { FakeFormatDateTimePipe } from 'app/core/testing/classes/fake-format-datetime.pipe'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -21,7 +21,7 @@ import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-c import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; import { jobsInitialState, JobsState } from 'app/modules/jobs/store/job.reducer'; import { selectJobs, selectJobState } from 'app/modules/jobs/store/job.selectors'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { JobLogsRowComponent } from 'app/pages/jobs/job-logs-row/job-logs-row.component'; import { JobNameComponent } from 'app/pages/jobs/job-name/job-name.component'; import { DownloadService } from 'app/services/download.service'; @@ -72,7 +72,7 @@ describe('JobsListComponent', () => { component: JobsListComponent, imports: [ MatTabsModule, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, MatButtonToggleGroup, MatButtonToggle, diff --git a/src/app/pages/network/components/configuration/configuration.component.ts b/src/app/pages/network/components/configuration/configuration.component.ts index 9c58765e140..6b1d498bd8b 100644 --- a/src/app/pages/network/components/configuration/configuration.component.ts +++ b/src/app/pages/network/components/configuration/configuration.component.ts @@ -1,10 +1,14 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; +import { TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { NetworkActivityType } from 'app/enums/network-activity-type.enum'; import { ProductType } from 'app/enums/product-type.enum'; import { Role } from 'app/enums/role.enum'; @@ -14,9 +18,17 @@ import { NetworkConfiguration, NetworkConfigurationActivity, NetworkConfigurationConfig, NetworkConfigurationUpdate, } from 'app/interfaces/network-configuration.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxRadioGroupComponent } from 'app/modules/forms/ix-forms/components/ix-radio-group/ix-radio-group.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { ipv4Validator, ipv6Validator } from 'app/modules/forms/ix-forms/validators/ip-validation'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -29,6 +41,23 @@ import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; templateUrl: './configuration.component.html', styleUrls: ['./configuration.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxCheckboxComponent, + IxChipsComponent, + IxRadioGroupComponent, + IxSelectComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class NetworkConfigurationComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.ts b/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.ts index 3dfc4f63623..28da61ed46f 100644 --- a/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.ts +++ b/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.ts @@ -1,17 +1,27 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; -import { MatDialogRef } from '@angular/material/dialog'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { + MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, +} from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { EMPTY } from 'rxjs'; import { catchError } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { toLoadingState } from 'app/helpers/operators/to-loading-state.helper'; import { helptextNetworkConfiguration } from 'app/helptext/network/configuration/configuration'; import { helptextIpmi } from 'app/helptext/network/ipmi/ipmi'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { ipv4Validator } from 'app/modules/forms/ix-forms/validators/ip-validation'; +import { WithLoadingStateDirective } from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -21,6 +31,23 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './default-gateway-dialog.component.html', styleUrls: ['./default-gateway-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + CdkScrollable, + MatDialogContent, + WithLoadingStateDirective, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + FormActionsComponent, + MatDialogActions, + MatButton, + TestDirective, + MatDialogClose, + RequiresRolesDirective, + TranslateModule, + ], }) export class DefaultGatewayDialogComponent { readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/network/components/interface-form/interface-form.component.spec.ts b/src/app/pages/network/components/interface-form/interface-form.component.spec.ts index 608e0d9077c..68849c9953c 100644 --- a/src/app/pages/network/components/interface-form/interface-form.component.spec.ts +++ b/src/app/pages/network/components/interface-form/interface-form.component.spec.ts @@ -66,6 +66,7 @@ describe('InterfaceFormComponent', () => { imports: [ ReactiveFormsModule, IxIpInputWithNetmaskComponent, + DefaultGatewayDialogComponent, StoreModule.forRoot({ [haInfoStateKey]: haInfoReducer }, { initialState: { [haInfoStateKey]: { @@ -79,9 +80,6 @@ describe('InterfaceFormComponent', () => { }, }), ], - declarations: [ - DefaultGatewayDialogComponent, - ], providers: [ { provide: Store, diff --git a/src/app/pages/network/components/interface-form/interface-form.component.ts b/src/app/pages/network/components/interface-form/interface-form.component.ts index 6679670d3fc..c6c3514f984 100644 --- a/src/app/pages/network/components/interface-form/interface-form.component.ts +++ b/src/app/pages/network/components/interface-form/interface-form.component.ts @@ -1,14 +1,17 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { Validators } from '@angular/forms'; +import { Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { MatDialog } from '@angular/material/dialog'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { range } from 'lodash-es'; import { forkJoin, of } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { CreateNetworkInterfaceType, LacpduRate, @@ -25,13 +28,25 @@ import { NetworkInterfaceCreate, NetworkInterfaceUpdate, } from 'app/interfaces/network-interface.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxErrorsComponent } from 'app/modules/forms/ix-forms/components/ix-errors/ix-errors.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxIpInputWithNetmaskComponent } from 'app/modules/forms/ix-forms/components/ix-ip-input-with-netmask/ix-ip-input-with-netmask.component'; +import { IxListItemComponent } from 'app/modules/forms/ix-forms/components/ix-list/ix-list-item/ix-list-item.component'; +import { IxListComponent } from 'app/modules/forms/ix-forms/components/ix-list/ix-list.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { ipv4or6cidrValidator, ipv4or6Validator } from 'app/modules/forms/ix-forms/validators/ip-validation'; import { rangeValidator } from 'app/modules/forms/ix-forms/validators/range-validation/range-validation'; +import { NgxOrderedListboxModule } from 'app/modules/lists/ordered-list/ordered-list.module'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { DefaultGatewayDialogComponent, } from 'app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component'; @@ -56,6 +71,27 @@ import { networkInterfacesChanged } from 'app/store/network-interfaces/network-i styleUrls: ['./interface-form.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [InterfaceNameValidatorService], + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxSelectComponent, + IxInputComponent, + IxCheckboxComponent, + NgxOrderedListboxModule, + IxListComponent, + IxListItemComponent, + IxIpInputWithNetmaskComponent, + IxErrorsComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class InterfaceFormComponent implements OnInit { protected readonly requiredRoles = [Role.NetworkInterfaceWrite]; diff --git a/src/app/pages/network/components/interfaces-card/interfaces-card.component.ts b/src/app/pages/network/components/interfaces-card/interfaces-card.component.ts index 338adbfcbdb..936aca8595e 100644 --- a/src/app/pages/network/components/interfaces-card/interfaces-card.component.ts +++ b/src/app/pages/network/components/interfaces-card/interfaces-card.component.ts @@ -7,22 +7,34 @@ import { OnInit, output, signal, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatCard } from '@angular/material/card'; +import { MatToolbarRow } from '@angular/material/toolbar'; +import { MatTooltip } from '@angular/material/tooltip'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, of } from 'rxjs'; import { filter, map, throttleTime } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { NetworkInterfaceType } from 'app/enums/network-interface.enum'; import { Role } from 'app/enums/role.enum'; import { helptextInterfaces } from 'app/helptext/network/interfaces/interfaces-list'; import { NetworkInterface } from 'app/interfaces/network-interface.interface'; import { AllNetworkInterfacesUpdate } from 'app/interfaces/reporting.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { InterfaceStatusIconComponent } from 'app/modules/interface-status-icon/interface-status-icon.component'; import { ArrayDataProvider } from 'app/modules/ix-table/classes/array-data-provider/array-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-cell.directive'; import { createTable } from 'app/modules/ix-table/utils'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { InterfaceFormComponent } from 'app/pages/network/components/interface-form/interface-form.component'; import { interfacesCardElements } from 'app/pages/network/components/interfaces-card/interfaces-card.elements'; import { @@ -42,6 +54,22 @@ import { networkInterfacesChanged } from 'app/store/network-interfaces/network-i templateUrl: './interfaces-card.component.html', styleUrls: ['./interfaces-card.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatCard, + MatToolbarRow, + MatTooltip, + RequiresRolesDirective, + MatButton, + TestDirective, + UiSearchDirective, + IxTableComponent, + IxTableHeadComponent, + IxTableBodyComponent, + IxTableCellDirective, + InterfaceStatusIconComponent, + TranslateModule, + ], }) export class InterfacesCardComponent implements OnInit, OnChanges { protected readonly searchableElements = interfacesCardElements.elements; diff --git a/src/app/pages/network/components/interfaces-card/ip-addresses-cell/ip-addresses-cell.component.ts b/src/app/pages/network/components/interfaces-card/ip-addresses-cell/ip-addresses-cell.component.ts index 6da6753f70c..7d9abd6914b 100644 --- a/src/app/pages/network/components/interfaces-card/ip-addresses-cell/ip-addresses-cell.component.ts +++ b/src/app/pages/network/components/interfaces-card/ip-addresses-cell/ip-addresses-cell.component.ts @@ -12,6 +12,7 @@ import { Column, ColumnComponent } from 'app/modules/ix-table/interfaces/column- templateUrl: './ip-addresses-cell.component.html', styleUrls: ['./ip-addresses-cell.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, }) export class IpAddressesCellComponent extends ColumnComponent { protected addresses: string[] = []; diff --git a/src/app/pages/network/components/ipmi-card/ipmi-card.component.ts b/src/app/pages/network/components/ipmi-card/ipmi-card.component.ts index df35c377565..0f3d8950080 100644 --- a/src/app/pages/network/components/ipmi-card/ipmi-card.component.ts +++ b/src/app/pages/network/components/ipmi-card/ipmi-card.component.ts @@ -1,17 +1,26 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, Inject, OnInit, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatCard } from '@angular/material/card'; import { MatDialog } from '@angular/material/dialog'; +import { MatToolbarRow } from '@angular/material/toolbar'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { filter, of } from 'rxjs'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { WINDOW } from 'app/helpers/window.helper'; import { Ipmi } from 'app/interfaces/ipmi.interface'; import { EmptyService } from 'app/modules/empty/empty.service'; import { AsyncDataProvider } from 'app/modules/ix-table/classes/async-data-provider/async-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { createTable } from 'app/modules/ix-table/utils'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ipmiCardElements } from 'app/pages/network/components/ipmi-card/ipmi-card.elements'; import { IpmiEventsDialogComponent, @@ -26,6 +35,19 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './ipmi-card.component.html', styleUrls: ['./ipmi-card.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatCard, + UiSearchDirective, + MatToolbarRow, + MatButton, + TestDirective, + IxTableComponent, + IxTableEmptyDirective, + IxTableBodyComponent, + TranslateModule, + AsyncPipe, + ], }) export class IpmiCardComponent implements OnInit { protected readonly searchableElements = ipmiCardElements.elements; diff --git a/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.ts b/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.ts index 216839fc199..dba75a87ebb 100644 --- a/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.ts +++ b/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.ts @@ -1,14 +1,24 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { + MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, +} from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { parse } from 'date-fns'; import { EmptyType } from 'app/enums/empty-type.enum'; import { JobState } from 'app/enums/job-state.enum'; import { EmptyConfig } from 'app/interfaces/empty-config.interface'; import { IpmiEvent } from 'app/interfaces/ipmi.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { EmptyComponent } from 'app/modules/empty/empty.component'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; +import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -18,6 +28,21 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './ipmi-events-dialog.component.html', styleUrls: ['./ipmi-events-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + FakeProgressBarComponent, + MatDialogTitle, + CdkScrollable, + MatDialogContent, + EmptyComponent, + FormActionsComponent, + MatDialogActions, + MatButton, + TestDirective, + MatDialogClose, + TranslateModule, + FormatDateTimePipe, + ], }) export class IpmiEventsDialogComponent implements OnInit { protected isLoading = false; diff --git a/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.ts b/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.ts index 45981bd85ec..d7b87414da3 100644 --- a/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.ts +++ b/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.ts @@ -1,13 +1,17 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { Validators } from '@angular/forms'; +import { Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent, MatCardActions } from '@angular/material/card'; +import { MatDivider } from '@angular/material/divider'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { forkJoin, Observable, of } from 'rxjs'; import { switchMap, tap } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { IpmiChassisIdentifyState, IpmiIpAddressSource } from 'app/enums/ipmi.enum'; import { OnOff } from 'app/enums/on-off.enum'; import { ProductType } from 'app/enums/product-type.enum'; @@ -16,12 +20,19 @@ import { helptextIpmi } from 'app/helptext/network/ipmi/ipmi'; import { Ipmi, IpmiQueryParams, IpmiUpdate } from 'app/interfaces/ipmi.interface'; import { RadioOption } from 'app/interfaces/option.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxRadioGroupComponent } from 'app/modules/forms/ix-forms/components/ix-radio-group/ix-radio-group.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { ipv4Validator } from 'app/modules/forms/ix-forms/validators/ip-validation'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { RedirectService } from 'app/services/redirect.service'; import { SystemGeneralService } from 'app/services/system-general.service'; @@ -34,6 +45,24 @@ import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; selector: 'ix-ipmi-form', templateUrl: './ipmi-form.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxRadioGroupComponent, + MatDivider, + IxCheckboxComponent, + IxInputComponent, + MatCardActions, + RequiresRolesDirective, + MatButton, + TestDirective, + IxIconComponent, + TranslateModule, + ], }) export class IpmiFormComponent implements OnInit { protected readonly requiredRoles = [Role.IpmiWrite]; diff --git a/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.ts b/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.ts index e17657fd5a1..7769502d4a3 100644 --- a/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.ts +++ b/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.ts @@ -1,17 +1,25 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; +import { MatList, MatListItem } from '@angular/material/list'; +import { MatToolbarRow } from '@angular/material/toolbar'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, ofType } from '@ngrx/effects'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import ipRegex from 'ip-regex'; import { combineLatest, filter } from 'rxjs'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { NetworkActivityType } from 'app/enums/network-activity-type.enum'; import { NetworkConfiguration } from 'app/interfaces/network-configuration.interface'; import { NetworkSummary } from 'app/interfaces/network-summary.interface'; import { Option } from 'app/interfaces/option.interface'; import { searchDelayConst } from 'app/modules/global-search/constants/delay.const'; import { UiSearchDirectivesService } from 'app/modules/global-search/services/ui-search-directives.service'; +import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; +import { CastPipe } from 'app/modules/pipes/cast/cast.pipe'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { NetworkConfigurationComponent } from 'app/pages/network/components/configuration/configuration.component'; import { networkConfigurationCardElements, @@ -26,6 +34,20 @@ import { networkInterfacesChanged } from 'app/store/network-interfaces/network-i templateUrl: './network-configuration-card.component.html', styleUrls: ['./network-configuration-card.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatCard, + MatToolbarRow, + MatButton, + TestDirective, + UiSearchDirective, + MatCardContent, + MatList, + MatListItem, + IxIconComponent, + TranslateModule, + CastPipe, + ], }) export class NetworkConfigurationCardComponent implements OnInit { protected readonly networkConfigurationCardElements = networkConfigurationCardElements; diff --git a/src/app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component.ts b/src/app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component.ts index 713d2527296..83db7474bce 100644 --- a/src/app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component.ts +++ b/src/app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component.ts @@ -1,14 +1,21 @@ +import { CdkScrollable } from '@angular/cdk/scrolling'; import { ChangeDetectionStrategy, Component, Inject, } from '@angular/core'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatButton } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, +} from '@angular/material/dialog'; import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { StaticRoute } from 'app/interfaces/static-route.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -17,6 +24,19 @@ import { WebSocketService } from 'app/services/ws.service'; selector: 'ix-static-route-delete-dialog', templateUrl: './static-route-delete-dialog.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + CdkScrollable, + MatDialogContent, + FormActionsComponent, + MatDialogActions, + MatButton, + TestDirective, + MatDialogClose, + RequiresRolesDirective, + TranslateModule, + ], }) export class StaticRouteDeleteDialogComponent { readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/network/components/static-route-form/static-route-form.component.ts b/src/app/pages/network/components/static-route-form/static-route-form.component.ts index 10ab94c2992..e80b488e493 100644 --- a/src/app/pages/network/components/static-route-form/static-route-form.component.ts +++ b/src/app/pages/network/components/static-route-form/static-route-form.component.ts @@ -1,18 +1,26 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { helptextStaticRoutes } from 'app/helptext/network/static-routes/static-routes'; import { StaticRoute, UpdateStaticRoute } from 'app/interfaces/static-route.interface'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in.token'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { ipv4or6Validator } from 'app/modules/forms/ix-forms/validators/ip-validation'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { WebSocketService } from 'app/services/ws.service'; @UntilDestroy() @@ -20,6 +28,20 @@ import { WebSocketService } from 'app/services/ws.service'; selector: 'ix-static-route-form', templateUrl: './static-route-form.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class StaticRouteFormComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/network/components/static-routes-card/static-routes-card.component.ts b/src/app/pages/network/components/static-routes-card/static-routes-card.component.ts index 88cd38bc702..6a30945753f 100644 --- a/src/app/pages/network/components/static-routes-card/static-routes-card.component.ts +++ b/src/app/pages/network/components/static-routes-card/static-routes-card.component.ts @@ -1,18 +1,30 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { MatDialog } from '@angular/material/dialog'; +import { MatToolbarRow } from '@angular/material/toolbar'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { filter, tap } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { Role } from 'app/enums/role.enum'; import { StaticRoute } from 'app/interfaces/static-route.interface'; import { EmptyService } from 'app/modules/empty/empty.service'; import { AsyncDataProvider } from 'app/modules/ix-table/classes/async-data-provider/async-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn, } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTablePagerShowMoreComponent } from 'app/modules/ix-table/components/ix-table-pager-show-more/ix-table-pager-show-more.component'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { createTable } from 'app/modules/ix-table/utils'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { StaticRouteDeleteDialogComponent, } from 'app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component'; @@ -27,6 +39,23 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './static-routes-card.component.html', styleUrls: ['./static-routes-card.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatCard, + UiSearchDirective, + MatToolbarRow, + RequiresRolesDirective, + MatButton, + TestDirective, + MatCardContent, + IxTableComponent, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + IxTablePagerShowMoreComponent, + TranslateModule, + AsyncPipe, + ], }) export class StaticRoutesCardComponent implements OnInit { protected readonly searchableElements = staticRoutesCardElements.elements; diff --git a/src/app/pages/network/network.component.ts b/src/app/pages/network/network.component.ts index 54bdbcbf39d..b24c9b08636 100644 --- a/src/app/pages/network/network.component.ts +++ b/src/app/pages/network/network.component.ts @@ -2,16 +2,21 @@ import { Component, Inject, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, } from '@angular/core'; -import { NgModel } from '@angular/forms'; +import { NgModel, ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent, MatCardActions } from '@angular/material/card'; +import { MatFormField, MatError } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; import { Navigation, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Actions, ofType } from '@ngrx/effects'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { combineLatest, firstValueFrom, lastValueFrom, switchMap, } from 'rxjs'; import { filter } from 'rxjs/operators'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { ProductType } from 'app/enums/product-type.enum'; import { Role } from 'app/enums/role.enum'; import { WINDOW } from 'app/helpers/window.helper'; @@ -21,6 +26,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { InterfaceFormComponent } from 'app/pages/network/components/interface-form/interface-form.component'; import { networkElements } from 'app/pages/network/network.elements'; import { InterfacesStore } from 'app/pages/network/stores/interfaces.store'; @@ -32,6 +38,10 @@ import { WebSocketService } from 'app/services/ws.service'; import { selectHaStatus, selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { AppsState } from 'app/store/index'; import { networkInterfacesChanged } from 'app/store/network-interfaces/network-interfaces.actions'; +import { InterfacesCardComponent } from './components/interfaces-card/interfaces-card.component'; +import { IpmiCardComponent } from './components/ipmi-card/ipmi-card.component'; +import { NetworkConfigurationCardComponent } from './components/network-configuration-card/network-configuration-card.component'; +import { StaticRoutesCardComponent } from './components/static-routes-card/static-routes-card.component'; @UntilDestroy() @Component({ @@ -39,6 +49,28 @@ import { networkInterfacesChanged } from 'app/store/network-interfaces/network-i templateUrl: './network.component.html', styleUrls: ['./network.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + UiSearchDirective, + MatCard, + MatCardContent, + MatFormField, + MatInput, + ReactiveFormsModule, + TestDirective, + FormsModule, + MatError, + MatCardActions, + MatButton, + InterfacesCardComponent, + NetworkConfigurationCardComponent, + StaticRoutesCardComponent, + IpmiCardComponent, + TranslateModule, + ], + providers: [ + InterfacesStore, + ], }) export class NetworkComponent implements OnInit { protected readonly searchableElements = networkElements; diff --git a/src/app/pages/network/network.module.ts b/src/app/pages/network/network.module.ts deleted file mode 100644 index f18ce87acc0..00000000000 --- a/src/app/pages/network/network.module.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatListModule } from '@angular/material/list'; -import { MatToolbarModule } from '@angular/material/toolbar'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; -import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; -import { UiSearchDirective } from 'app/directives/ui-search.directive'; -import { EmptyComponent } from 'app/modules/empty/empty.component'; -import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; -import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; -import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; -import { IxErrorsComponent } from 'app/modules/forms/ix-forms/components/ix-errors/ix-errors.component'; -import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; -import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; -import { - IxIpInputWithNetmaskComponent, -} from 'app/modules/forms/ix-forms/components/ix-ip-input-with-netmask/ix-ip-input-with-netmask.component'; -import { IxListItemComponent } from 'app/modules/forms/ix-forms/components/ix-list/ix-list-item/ix-list-item.component'; -import { IxListComponent } from 'app/modules/forms/ix-forms/components/ix-list/ix-list.component'; -import { IxRadioGroupComponent } from 'app/modules/forms/ix-forms/components/ix-radio-group/ix-radio-group.component'; -import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; -import { - IxModalHeaderComponent, -} from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; -import { InterfaceStatusIconComponent } from 'app/modules/interface-status-icon/interface-status-icon.component'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; -import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; -import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; -import { - IxTablePagerShowMoreComponent, -} from 'app/modules/ix-table/components/ix-table-pager-show-more/ix-table-pager-show-more.component'; -import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-cell.directive'; -import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { NgxOrderedListboxModule } from 'app/modules/lists/ordered-list/ordered-list.module'; -import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { - WithLoadingStateDirective, -} from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; -import { CastPipe } from 'app/modules/pipes/cast/cast.pipe'; -import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { NetworkConfigurationComponent } from 'app/pages/network/components/configuration/configuration.component'; -import { - DefaultGatewayDialogComponent, -} from 'app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component'; -import { InterfaceFormComponent } from 'app/pages/network/components/interface-form/interface-form.component'; -import { InterfacesCardComponent } from 'app/pages/network/components/interfaces-card/interfaces-card.component'; -import { IpAddressesCellComponent } from 'app/pages/network/components/interfaces-card/ip-addresses-cell/ip-addresses-cell.component'; -import { IpmiCardComponent } from 'app/pages/network/components/ipmi-card/ipmi-card.component'; -import { IpmiEventsDialogComponent } from 'app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component'; -import { IpmiFormComponent } from 'app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component'; -import { - NetworkConfigurationCardComponent, -} from 'app/pages/network/components/network-configuration-card/network-configuration-card.component'; -import { StaticRouteDeleteDialogComponent } from 'app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component'; -import { StaticRouteFormComponent } from 'app/pages/network/components/static-route-form/static-route-form.component'; -import { StaticRoutesCardComponent } from 'app/pages/network/components/static-routes-card/static-routes-card.component'; -import { InterfacesStore } from 'app/pages/network/stores/interfaces.store'; -import { NetworkService } from 'app/services/network.service'; -import { NetworkComponent } from './network.component'; -import { routing } from './network.routing'; - -@NgModule({ - imports: [ - FormsModule, - ReactiveFormsModule, - routing, - MatCardModule, - MatListModule, - IxIconComponent, - MatFormFieldModule, - MatInputModule, - MatButtonModule, - MatToolbarModule, - TranslateModule, - MatDialogModule, - NgxOrderedListboxModule, - MatTooltipModule, - InterfaceStatusIconComponent, - EmptyComponent, - CastPipe, - FormatDateTimePipe, - IxModalHeaderComponent, - IxFieldsetComponent, - IxInputComponent, - IxCheckboxComponent, - IxChipsComponent, - IxRadioGroupComponent, - IxSelectComponent, - IxListComponent, - IxListItemComponent, - IxIpInputWithNetmaskComponent, - IxErrorsComponent, - FormActionsComponent, - AsyncPipe, - RequiresRolesDirective, - UiSearchDirective, - IxTableComponent, - IxTableHeadComponent, - IxTableBodyComponent, - IxTableCellDirective, - IxTableEmptyDirective, - IxTablePagerShowMoreComponent, - FakeProgressBarComponent, - TestDirective, - WithLoadingStateDirective, - ], - declarations: [ - DefaultGatewayDialogComponent, - InterfaceFormComponent, - InterfacesCardComponent, - IpAddressesCellComponent, - IpmiCardComponent, - IpmiEventsDialogComponent, - IpmiFormComponent, - NetworkComponent, - NetworkConfigurationCardComponent, - NetworkConfigurationComponent, - StaticRouteDeleteDialogComponent, - StaticRouteFormComponent, - StaticRoutesCardComponent, - ], - providers: [ - NetworkService, - InterfacesStore, - ], -}) -export class NetworkModule { -} diff --git a/src/app/pages/network/network.routing.ts b/src/app/pages/network/network.routing.ts deleted file mode 100644 index b5fc79fd771..00000000000 --- a/src/app/pages/network/network.routing.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ModuleWithProviders } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { marker as T } from '@biesbjerg/ngx-translate-extract-marker'; -import { NetworkComponent } from './network.component'; - -export const routes: Routes = [ - { - path: '', - data: { title: T('Network') }, - children: [ - { - path: '', - component: NetworkComponent, - data: { title: T('Network'), breadcrumb: null, icon: 'settings' }, - }, - ], - }, -]; -export const routing: ModuleWithProviders = RouterModule.forChild(routes); diff --git a/src/app/pages/reports-dashboard/reports-dashboard.module.ts b/src/app/pages/reports-dashboard/reports-dashboard.module.ts index 15bdc2d125a..efa40a5100e 100644 --- a/src/app/pages/reports-dashboard/reports-dashboard.module.ts +++ b/src/app/pages/reports-dashboard/reports-dashboard.module.ts @@ -34,7 +34,7 @@ import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-h import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { IxDateComponent } from 'app/modules/pipes/ix-date/ix-date.component'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; @@ -79,7 +79,6 @@ import { ReportsGlobalControlsComponent } from './components/reports-global-cont IxCheckboxComponent, FormActionsComponent, IxSlideToggleComponent, - PageHeaderModule, AsyncPipe, KeyValuePipe, NgTemplateOutlet, @@ -92,6 +91,7 @@ import { ReportsGlobalControlsComponent } from './components/reports-global-cont IxTablePagerComponent, FakeProgressBarComponent, TestDirective, + PageHeaderComponent, ], declarations: [ LineChartComponent, diff --git a/src/app/pages/services/components/service-ftp/service-ftp.component.ts b/src/app/pages/services/components/service-ftp/service-ftp.component.ts index 757990bb879..0ab6dbe6d58 100644 --- a/src/app/pages/services/components/service-ftp/service-ftp.component.ts +++ b/src/app/pages/services/components/service-ftp/service-ftp.component.ts @@ -1,21 +1,36 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { Validators } from '@angular/forms'; +import { Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { invertUmask } from 'app/helpers/mode.helper'; import { idNameArrayToOptions } from 'app/helpers/operators/options.operators'; import { helptextServiceFtp } from 'app/helptext/services/components/service-ftp'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxExplorerComponent } from 'app/modules/forms/ix-forms/components/ix-explorer/ix-explorer.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxPermissionsComponent } from 'app/modules/forms/ix-forms/components/ix-permissions/ix-permissions.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; +import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; +import { WithManageCertificatesLinkComponent } from 'app/modules/forms/ix-forms/components/with-manage-certificates-link/with-manage-certificates-link.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxFormatterService } from 'app/modules/forms/ix-forms/services/ix-formatter.service'; import { portRangeValidator, rangeValidator } from 'app/modules/forms/ix-forms/validators/range-validation/range-validation'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { SystemGeneralService } from 'app/services/system-general.service'; @@ -27,6 +42,27 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './service-ftp.component.html', styleUrls: ['./service-ftp.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxCheckboxComponent, + IxExplorerComponent, + IxPermissionsComponent, + WithManageCertificatesLinkComponent, + IxSelectComponent, + IxTextareaComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + AsyncPipe, + ], }) export class ServiceFtpComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.ts b/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.ts index 356f6c916a4..20ce80ec829 100644 --- a/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.ts +++ b/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.ts @@ -1,13 +1,17 @@ import { ChangeDetectionStrategy, Component, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; -import { MatDialogRef } from '@angular/material/dialog'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatDialogRef, MatDialogTitle, MatDialogClose } from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { CloudSyncRestoreDialogComponent } from 'app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -18,6 +22,17 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './add-spn-dialog.component.html', styleUrls: ['./add-spn-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + ReactiveFormsModule, + IxInputComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + MatDialogClose, + TranslateModule, + ], }) export class AddSpnDialogComponent { readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/services/components/service-nfs/service-nfs.component.ts b/src/app/pages/services/components/service-nfs/service-nfs.component.ts index eb7a046e516..abac0e5ecbf 100644 --- a/src/app/pages/services/components/service-nfs/service-nfs.component.ts +++ b/src/app/pages/services/components/service-nfs/service-nfs.component.ts @@ -1,11 +1,14 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { MatDialog } from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { DirectoryServiceState } from 'app/enums/directory-service-state.enum'; import { NfsProtocol, nfsProtocolLabels } from 'app/enums/nfs-protocol.enum'; import { Role } from 'app/enums/role.enum'; @@ -13,11 +16,19 @@ import { choicesToOptions } from 'app/helpers/operators/options.operators'; import { mapToOptions } from 'app/helpers/options.helper'; import { helptextServiceNfs } from 'app/helptext/services/components/service-nfs'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { rangeValidator, portRangeValidator } from 'app/modules/forms/ix-forms/validators/range-validation/range-validation'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; +import { TooltipComponent } from 'app/modules/tooltip/tooltip.component'; import { AddSpnDialogComponent } from 'app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -28,6 +39,23 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './service-nfs.component.html', styleUrls: ['./service-nfs.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxSelectComponent, + IxCheckboxComponent, + IxInputComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TooltipComponent, + TranslateModule, + ], }) export class ServiceNfsComponent implements OnInit { isFormLoading = false; diff --git a/src/app/pages/services/components/service-smart/service-smart.component.ts b/src/app/pages/services/components/service-smart/service-smart.component.ts index e1e95d8e203..0e6608a4dd3 100644 --- a/src/app/pages/services/components/service-smart/service-smart.component.ts +++ b/src/app/pages/services/components/service-smart/service-smart.component.ts @@ -1,18 +1,27 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { SmartPowerMode } from 'app/enums/smart-power.mode'; import { helptextServiceSmart } from 'app/helptext/services/components/service-smart'; import { SmartConfigUpdate } from 'app/interfaces/smart-test.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -22,6 +31,21 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './service-smart.component.html', styleUrls: ['./service-smart.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxSelectComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class ServiceSmartComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/services/components/service-smb/service-smb.component.ts b/src/app/pages/services/components/service-smb/service-smb.component.ts index 5c3421c8ddb..20a26730e43 100644 --- a/src/app/pages/services/components/service-smb/service-smb.component.ts +++ b/src/app/pages/services/components/service-smb/service-smb.component.ts @@ -1,12 +1,15 @@ import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, } from '@angular/core'; -import { AbstractControl, Validators } from '@angular/forms'; +import { AbstractControl, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { FormBuilder } from '@ngneat/reactive-forms'; import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { of, Subscription } from 'rxjs'; import { map } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { LogLevel } from 'app/enums/log-level.enum'; import { Role } from 'app/enums/role.enum'; import { SmbEncryption, smbEncryptionLabels } from 'app/enums/smb-encryption.enum'; @@ -16,10 +19,19 @@ import { helptextServiceSmb } from 'app/helptext/services/components/service-smb import { SmbConfigUpdate } from 'app/interfaces/smb-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { SimpleAsyncComboboxProvider } from 'app/modules/forms/ix-forms/classes/simple-async-combobox-provider'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxComboboxComponent } from 'app/modules/forms/ix-forms/components/ix-combobox/ix-combobox.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { UserService } from 'app/services/user.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -30,6 +42,24 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './service-smb.component.html', styleUrls: ['./service-smb.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxChipsComponent, + IxCheckboxComponent, + IxSelectComponent, + IxComboboxComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class ServiceSmbComponent implements OnInit { isFormLoading = false; diff --git a/src/app/pages/services/components/service-snmp/service-snmp.component.ts b/src/app/pages/services/components/service-snmp/service-snmp.component.ts index d8362642f65..88ee76495c1 100644 --- a/src/app/pages/services/components/service-snmp/service-snmp.component.ts +++ b/src/app/pages/services/components/service-snmp/service-snmp.component.ts @@ -1,19 +1,30 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { helptextServiceSmart } from 'app/helptext/services/components/service-snmp'; import { SnmpConfigUpdate } from 'app/interfaces/snmp-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; +import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { emailValidator } from 'app/modules/forms/ix-forms/validators/email-validation/email-validation'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -23,6 +34,23 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './service-snmp.component.html', styleUrls: ['./service-snmp.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxCheckboxComponent, + IxSelectComponent, + IxTextareaComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class ServiceSnmpComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/services/components/service-ssh/service-ssh.component.ts b/src/app/pages/services/components/service-ssh/service-ssh.component.ts index b678f16f81e..22f9be1c828 100644 --- a/src/app/pages/services/components/service-ssh/service-ssh.component.ts +++ b/src/app/pages/services/components/service-ssh/service-ssh.component.ts @@ -1,20 +1,32 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; +import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { map, of } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { SshSftpLogFacility, SshSftpLogLevel, SshWeakCipher } from 'app/enums/ssh.enum'; import { choicesToOptions } from 'app/helpers/operators/options.operators'; import { helptextServiceSsh } from 'app/helptext/services/components/service-ssh'; import { SshConfigUpdate } from 'app/interfaces/ssh-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { ChipsProvider } from 'app/modules/forms/ix-forms/components/ix-chips/chips-provider'; +import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; +import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { UserService } from 'app/services/user.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -25,6 +37,24 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './service-ssh.component.html', styleUrls: ['./service-ssh.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxChipsComponent, + IxCheckboxComponent, + IxSelectComponent, + IxTextareaComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class ServiceSshComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/services/components/service-state-column/service-state-column.component.ts b/src/app/pages/services/components/service-state-column/service-state-column.component.ts index 79162350df3..394de3a3a21 100644 --- a/src/app/pages/services/components/service-state-column/service-state-column.component.ts +++ b/src/app/pages/services/components/service-state-column/service-state-column.component.ts @@ -3,9 +3,10 @@ import { } from '@angular/core'; import { MatSlideToggle, MatSlideToggleChange } from '@angular/material/slide-toggle'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { filter, switchMap, tap } from 'rxjs/operators'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { ServiceName, serviceNames } from 'app/enums/service-name.enum'; import { ServiceStatus } from 'app/enums/service-status.enum'; import { ServiceRow } from 'app/interfaces/service.interface'; @@ -14,6 +15,7 @@ import { ColumnComponent } from 'app/modules/ix-table/interfaces/column-componen import { convertStringToId } from 'app/modules/ix-table/utils'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; import { ServicesService } from 'app/services/services.service'; @@ -24,6 +26,13 @@ import { WebSocketService } from 'app/services/ws.service'; selector: 'ix-service-state-column', templateUrl: './service-state-column.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + RequiresRolesDirective, + MatSlideToggle, + TestDirective, + TranslateModule, + ], }) export class ServiceStateColumnComponent extends ColumnComponent { protected service = computed(() => this.row()); diff --git a/src/app/pages/services/components/service-ups/service-ups.component.ts b/src/app/pages/services/components/service-ups/service-ups.component.ts index 9ea1186d44a..d84c425b571 100644 --- a/src/app/pages/services/components/service-ups/service-ups.component.ts +++ b/src/app/pages/services/components/service-ups/service-ups.component.ts @@ -1,10 +1,13 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; +import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { MatCard, MatCardContent } from '@angular/material/card'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; +import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; import { Role } from 'app/enums/role.enum'; import { UpsMode } from 'app/enums/ups-mode.enum'; import { choicesToOptions, singleArrayToOptions } from 'app/helpers/operators/options.operators'; @@ -12,10 +15,19 @@ import { helptextServiceUps } from 'app/helptext/services/components/service-ups import { UpsConfigUpdate } from 'app/interfaces/ups-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { SimpleAsyncComboboxProvider } from 'app/modules/forms/ix-forms/classes/simple-async-combobox-provider'; +import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; +import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { IxComboboxProvider } from 'app/modules/forms/ix-forms/components/ix-combobox/ix-combobox-provider'; +import { IxComboboxComponent } from 'app/modules/forms/ix-forms/components/ix-combobox/ix-combobox.component'; +import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; +import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; +import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; +import { IxModalHeaderComponent } from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; import { IxSlideInRef } from 'app/modules/forms/ix-forms/components/ix-slide-in/ix-slide-in-ref'; +import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; +import { TestDirective } from 'app/modules/test-id/test.directive'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { WebSocketService } from 'app/services/ws.service'; @@ -25,6 +37,24 @@ import { WebSocketService } from 'app/services/ws.service'; templateUrl: './service-ups.component.html', styleUrls: ['./service-ups.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + IxModalHeaderComponent, + MatCard, + MatCardContent, + ReactiveFormsModule, + IxFieldsetComponent, + IxInputComponent, + IxSelectComponent, + IxComboboxComponent, + IxTextareaComponent, + IxCheckboxComponent, + FormActionsComponent, + RequiresRolesDirective, + MatButton, + TestDirective, + TranslateModule, + ], }) export class ServiceUpsComponent implements OnInit { protected readonly requiredRoles = [Role.FullAdmin]; diff --git a/src/app/pages/services/services.component.spec.ts b/src/app/pages/services/services.component.spec.ts index 9fb8a06b3ac..da6e096fc5d 100644 --- a/src/app/pages/services/services.component.spec.ts +++ b/src/app/pages/services/services.component.spec.ts @@ -7,7 +7,7 @@ import { createComponentFactory, mockProvider, Spectator, } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; import { ServiceName, serviceNames } from 'app/enums/service-name.enum'; @@ -17,7 +17,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { ServiceFtpComponent } from 'app/pages/services/components/service-ftp/service-ftp.component'; import { ServiceNfsComponent } from 'app/pages/services/components/service-nfs/service-nfs.component'; import { ServiceSmartComponent } from 'app/pages/services/components/service-smart/service-smart.component'; @@ -57,7 +57,7 @@ describe('ServicesComponent', () => { component: ServicesComponent, imports: [ FormsModule, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], declarations: [ diff --git a/src/app/pages/services/services.component.ts b/src/app/pages/services/services.component.ts index a1eff41514c..b89855b1cec 100644 --- a/src/app/pages/services/services.component.ts +++ b/src/app/pages/services/services.component.ts @@ -1,6 +1,8 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core'; +import { MatCard } from '@angular/material/card'; import { Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; @@ -9,17 +11,24 @@ import { EMPTY, of } from 'rxjs'; import { catchError, map, take, } from 'rxjs/operators'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { AuditService } from 'app/enums/audit.enum'; import { EmptyType } from 'app/enums/empty-type.enum'; import { ServiceName, serviceNames } from 'app/enums/service-name.enum'; import { Service, ServiceRow } from 'app/interfaces/service.interface'; import { EmptyService } from 'app/modules/empty/empty.service'; +import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { ArrayDataProvider } from 'app/modules/ix-table/classes/array-data-provider/array-data-provider'; +import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; import { actionsColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component'; import { textColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-text/ix-cell-text.component'; import { toggleColumn } from 'app/modules/ix-table/components/ix-table-body/cells/ix-cell-toggle/ix-cell-toggle.component'; +import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; +import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; +import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { createTable } from 'app/modules/ix-table/utils'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { ServiceFtpComponent } from 'app/pages/services/components/service-ftp/service-ftp.component'; import { ServiceNfsComponent } from 'app/pages/services/components/service-nfs/service-nfs.component'; import { ServiceSmartComponent } from 'app/pages/services/components/service-smart/service-smart.component'; @@ -47,6 +56,18 @@ import { waitForServices } from 'app/store/services/services.selectors'; templateUrl: './services.component.html', providers: [IscsiService], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + SearchInput1Component, + MatCard, + UiSearchDirective, + IxTableComponent, + IxTableEmptyDirective, + IxTableHeadComponent, + IxTableBodyComponent, + AsyncPipe, + PageHeaderComponent, + ], }) export class ServicesComponent implements OnInit { protected readonly searchableElements = servicesElements; diff --git a/src/app/pages/services/services.module.ts b/src/app/pages/services/services.module.ts deleted file mode 100644 index 71258796028..00000000000 --- a/src/app/pages/services/services.module.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatSlideToggleModule } from '@angular/material/slide-toggle'; -import { MatTableModule } from '@angular/material/table'; -import { MatTabsModule } from '@angular/material/tabs'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { TranslateModule } from '@ngx-translate/core'; -import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive'; -import { UiSearchDirective } from 'app/directives/ui-search.directive'; -import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; -import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; -import { IxChipsComponent } from 'app/modules/forms/ix-forms/components/ix-chips/ix-chips.component'; -import { IxComboboxComponent } from 'app/modules/forms/ix-forms/components/ix-combobox/ix-combobox.component'; -import { IxExplorerComponent } from 'app/modules/forms/ix-forms/components/ix-explorer/ix-explorer.component'; -import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fieldset/ix-fieldset.component'; -import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; -import { IxPermissionsComponent } from 'app/modules/forms/ix-forms/components/ix-permissions/ix-permissions.component'; -import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; -import { - IxModalHeaderComponent, -} from 'app/modules/forms/ix-forms/components/ix-slide-in/components/ix-modal-header/ix-modal-header.component'; -import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; -import { - WithManageCertificatesLinkComponent, -} from 'app/modules/forms/ix-forms/components/with-manage-certificates-link/with-manage-certificates-link.component'; -import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; -import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { IxTableComponent } from 'app/modules/ix-table/components/ix-table/ix-table.component'; -import { IxTableBodyComponent } from 'app/modules/ix-table/components/ix-table-body/ix-table-body.component'; -import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-head/ix-table-head.component'; -import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; -import { TestDirective } from 'app/modules/test-id/test.directive'; -import { TooltipComponent } from 'app/modules/tooltip/tooltip.component'; -import { ServiceFtpComponent } from 'app/pages/services/components/service-ftp/service-ftp.component'; -import { AddSpnDialogComponent } from 'app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component'; -import { ServiceNfsComponent } from 'app/pages/services/components/service-nfs/service-nfs.component'; -import { ServiceSmbComponent } from 'app/pages/services/components/service-smb/service-smb.component'; -import { ServiceSnmpComponent } from 'app/pages/services/components/service-snmp/service-snmp.component'; -import { ServiceSshComponent } from 'app/pages/services/components/service-ssh/service-ssh.component'; -import { - ServiceStateColumnComponent, -} from 'app/pages/services/components/service-state-column/service-state-column.component'; -import { ServiceUpsComponent } from 'app/pages/services/components/service-ups/service-ups.component'; -import { ServiceSmartComponent } from './components/service-smart/service-smart.component'; -import { ServicesComponent } from './services.component'; -import { routing } from './services.routing'; - -@NgModule({ - imports: [ - FormsModule, - routing, - TranslateModule, - IxIconComponent, - MatTooltipModule, - MatSlideToggleModule, - MatProgressSpinnerModule, - MatCardModule, - MatProgressBarModule, - MatTabsModule, - ReactiveFormsModule, - MatTableModule, - MatCheckboxModule, - MatButtonModule, - MatDialogModule, - SearchInput1Component, - TooltipComponent, - IxModalHeaderComponent, - IxFieldsetComponent, - IxSelectComponent, - IxComboboxComponent, - IxInputComponent, - IxTextareaComponent, - IxCheckboxComponent, - IxExplorerComponent, - IxPermissionsComponent, - WithManageCertificatesLinkComponent, - FormActionsComponent, - IxChipsComponent, - PageHeaderModule, - AsyncPipe, - RequiresRolesDirective, - UiSearchDirective, - IxTableComponent, - IxTableHeadComponent, - IxTableEmptyDirective, - IxTableBodyComponent, - TestDirective, - ], - declarations: [ - ServicesComponent, - ServiceSshComponent, - ServiceFtpComponent, - ServiceSmartComponent, - ServiceNfsComponent, - ServiceUpsComponent, - ServiceSmbComponent, - ServiceSnmpComponent, - AddSpnDialogComponent, - ServiceStateColumnComponent, - ], -}) -export class ServicesModule { -} diff --git a/src/app/pages/services/services.routing.ts b/src/app/pages/services/services.routing.ts deleted file mode 100644 index 439b16b04d6..00000000000 --- a/src/app/pages/services/services.routing.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ModuleWithProviders } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { ServicesComponent } from './services.component'; - -export const routes: Routes = [ - { - path: '', - pathMatch: 'full', - component: ServicesComponent, - }, -]; - -export const routing: ModuleWithProviders = RouterModule.forChild(routes); diff --git a/src/app/pages/sharing/iscsi/iscsi.component.spec.ts b/src/app/pages/sharing/iscsi/iscsi.component.spec.ts index aa3a9d675cf..d11c98b3a2e 100644 --- a/src/app/pages/sharing/iscsi/iscsi.component.spec.ts +++ b/src/app/pages/sharing/iscsi/iscsi.component.spec.ts @@ -1,9 +1,9 @@ import { MatTabsModule } from '@angular/material/tabs'; import { Spectator } from '@ngneat/spectator'; import { createRoutingFactory } from '@ngneat/spectator/jest'; -import { MockComponents, MockModule } from 'ng-mocks'; +import { MockComponent, MockComponents } from 'ng-mocks'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { TargetGlobalConfigurationComponent } from 'app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component'; import { IscsiService } from 'app/services/iscsi.service'; import { IscsiComponent } from './iscsi.component'; @@ -18,7 +18,7 @@ describe('IscsiComponent', () => { ], imports: [ MatTabsModule, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), ], providers: [IscsiService, mockAuth()], params: { diff --git a/src/app/pages/sharing/nfs/nfs-session-list/nfs-session-list.component.spec.ts b/src/app/pages/sharing/nfs/nfs-session-list/nfs-session-list.component.spec.ts index 42513065526..a60e572b92b 100644 --- a/src/app/pages/sharing/nfs/nfs-session-list/nfs-session-list.component.spec.ts +++ b/src/app/pages/sharing/nfs/nfs-session-list/nfs-session-list.component.spec.ts @@ -3,7 +3,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { mockWebSocket, mockCall } from 'app/core/testing/utils/mock-websocket.utils'; import { Nfs3Session, Nfs4Session, NfsType } from 'app/interfaces/nfs-share.interface'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; @@ -11,7 +11,7 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { IxTableColumnsSelectorComponent, } from 'app/modules/ix-table/components/ix-table-columns-selector/ix-table-columns-selector.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { NfsSessionListComponent } from './nfs-session-list.component'; describe('NfsSessionListComponent', () => { @@ -48,7 +48,7 @@ describe('NfsSessionListComponent', () => { component: NfsSessionListComponent, imports: [ MatButtonToggleModule, - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableColumnsSelectorComponent, ], diff --git a/src/app/pages/sharing/sharing.module.ts b/src/app/pages/sharing/sharing.module.ts index 09fa6b2e73a..007ed577c1c 100644 --- a/src/app/pages/sharing/sharing.module.ts +++ b/src/app/pages/sharing/sharing.module.ts @@ -53,7 +53,7 @@ import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-t import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { DualListModule } from 'app/modules/lists/dual-list/dual-list.module'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { IscsiCardComponent } from 'app/pages/sharing/components/shares-dashboard/iscsi-card/iscsi-card.component'; @@ -132,7 +132,6 @@ import { SmbStatusComponent } from './smb/smb-status/smb-status.component'; IxComboboxComponent, IxIpInputWithNetmaskComponent, IxErrorsComponent, - PageHeaderModule, AsyncPipe, LowerCasePipe, NgClass, @@ -149,6 +148,7 @@ import { SmbStatusComponent } from './smb/smb-status/smb-status.component'; TestDirective, NgTemplateOutlet, IxTableDetailsRowDirective, + PageHeaderComponent, ], declarations: [ NfsListComponent, diff --git a/src/app/pages/shell/shell.component.ts b/src/app/pages/shell/shell.component.ts index 22f179c26a7..ff889efe650 100644 --- a/src/app/pages/shell/shell.component.ts +++ b/src/app/pages/shell/shell.component.ts @@ -1,11 +1,15 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { TerminalConfiguration } from 'app/interfaces/terminal.interface'; +import { TerminalComponent } from 'app/modules/terminal/components/terminal/terminal.component'; import { shellElements } from 'app/pages/shell/shell.elements'; @Component({ selector: 'ix-shell', templateUrl: './shell.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [UiSearchDirective, TerminalComponent], }) export class ShellComponent implements TerminalConfiguration { protected readonly searchableElements = shellElements; diff --git a/src/app/pages/shell/shell.module.ts b/src/app/pages/shell/shell.module.ts deleted file mode 100644 index 77fe746f901..00000000000 --- a/src/app/pages/shell/shell.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { TranslateModule } from '@ngx-translate/core'; -import { UiSearchDirective } from 'app/directives/ui-search.directive'; -import { TerminalModule } from 'app/modules/terminal/terminal.module'; -import { ShellComponent } from './shell.component'; -import { routing } from './shell.routing'; - -@NgModule({ - imports: [ - routing, - TranslateModule, - TerminalModule, - UiSearchDirective, - ], - declarations: [ShellComponent], -}) -export class ShellModule {} diff --git a/src/app/pages/shell/shell.routing.ts b/src/app/pages/shell/shell.routing.ts deleted file mode 100644 index cec1016efbe..00000000000 --- a/src/app/pages/shell/shell.routing.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ModuleWithProviders } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { ShellComponent } from './shell.component'; - -export const routes: Routes = [{ - path: '', - component: ShellComponent, -}]; - -export const routing: ModuleWithProviders = RouterModule.forChild(routes); diff --git a/src/app/pages/storage/modules/devices/devices.module.ts b/src/app/pages/storage/modules/devices/devices.module.ts index 8aac962e7be..e68acb9610e 100644 --- a/src/app/pages/storage/modules/devices/devices.module.ts +++ b/src/app/pages/storage/modules/devices/devices.module.ts @@ -26,7 +26,7 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { WithLoadingStateDirective, } from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { CastPipe } from 'app/modules/pipes/cast/cast.pipe'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { OrNotAvailablePipe } from 'app/modules/pipes/or-not-available/or-not-available.pipe'; @@ -83,7 +83,6 @@ import { ExtendDialogComponent } from './components/zfs-info-card/extend-dialog/ FormActionsComponent, IxInputComponent, IxCheckboxComponent, - PageHeaderModule, NgClass, DecimalPipe, AsyncPipe, @@ -106,6 +105,7 @@ import { ExtendDialogComponent } from './components/zfs-info-card/extend-dialog/ WithLoadingStateDirective, TestDirective, WithLoadingStateDirective, + PageHeaderComponent, ], declarations: [ DevicesComponent, diff --git a/src/app/pages/storage/modules/disks/components/disk-list/disk-list.component.spec.ts b/src/app/pages/storage/modules/disks/components/disk-list/disk-list.component.spec.ts index e2dd988f183..df1fb4c697f 100644 --- a/src/app/pages/storage/modules/disks/components/disk-list/disk-list.component.spec.ts +++ b/src/app/pages/storage/modules/disks/components/disk-list/disk-list.component.spec.ts @@ -4,7 +4,7 @@ import { MatButtonHarness } from '@angular/material/button/testing'; import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -20,7 +20,7 @@ import { IxTableDetailsRowComponent, } from 'app/modules/ix-table/components/ix-table-details-row/ix-table-details-row.component'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { DiskFormComponent } from 'app/pages/storage/modules/disks/components/disk-form/disk-form.component'; import { DiskListComponent } from 'app/pages/storage/modules/disks/components/disk-list/disk-list.component'; import { @@ -99,7 +99,7 @@ describe('DiskListComponent', () => { const createComponent = createComponentFactory({ component: DiskListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableColumnsSelectorComponent, IxTableDetailsRowDirective, diff --git a/src/app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component.spec.ts b/src/app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component.spec.ts index e8721f899db..9d587d25b08 100644 --- a/src/app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component.spec.ts +++ b/src/app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component.spec.ts @@ -2,7 +2,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockWebSocket, mockCall } from 'app/core/testing/utils/mock-websocket.utils'; import { SmartTestResultStatus } from 'app/enums/smart-test-result-status.enum'; @@ -13,7 +13,7 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { IxTableColumnsSelectorComponent, } from 'app/modules/ix-table/components/ix-table-columns-selector/ix-table-columns-selector.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { SmartTestResultListComponent } from 'app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component'; describe('SmartTestResultListComponent', () => { @@ -92,7 +92,7 @@ describe('SmartTestResultListComponent', () => { const createComponent = createComponentFactory({ component: SmartTestResultListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableColumnsSelectorComponent, ], diff --git a/src/app/pages/storage/modules/disks/disks.module.ts b/src/app/pages/storage/modules/disks/disks.module.ts index ba5461eb304..c02a80e9f43 100644 --- a/src/app/pages/storage/modules/disks/disks.module.ts +++ b/src/app/pages/storage/modules/disks/disks.module.ts @@ -35,7 +35,7 @@ import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-h import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { @@ -63,7 +63,6 @@ import { routes } from 'app/pages/storage/modules/disks/disks.routing'; MatDividerModule, MatProgressBarModule, IxIconComponent, - PageHeaderModule, SearchInput1Component, UnusedDiskSelectComponent, FormatDateTimePipe, @@ -95,6 +94,7 @@ import { routes } from 'app/pages/storage/modules/disks/disks.routing'; TestDirective, TestDirective, TestDirective, + PageHeaderComponent, ], declarations: [ DiskBulkEditComponent, diff --git a/src/app/pages/storage/storage.module.ts b/src/app/pages/storage/storage.module.ts index b9541828c7a..c479f19ccbc 100644 --- a/src/app/pages/storage/storage.module.ts +++ b/src/app/pages/storage/storage.module.ts @@ -39,7 +39,7 @@ import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { WithLoadingStateDirective, } from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; @@ -101,7 +101,6 @@ import { ZfsHealthCardComponent } from './components/dashboard-pool/zfs-health-c IxSelectComponent, IxModalHeaderComponent, IxInputComponent, - PageHeaderModule, AsyncPipe, DecimalPipe, PercentPipe, @@ -130,6 +129,7 @@ import { ZfsHealthCardComponent } from './components/dashboard-pool/zfs-health-c TestDirective, TestDirective, TestDirective, + PageHeaderComponent, ], declarations: [ PoolsDashboardComponent, diff --git a/src/app/pages/system/advanced/advanced-settings.component.spec.ts b/src/app/pages/system/advanced/advanced-settings.component.spec.ts index b6753bd6a7f..a6f17c3a058 100644 --- a/src/app/pages/system/advanced/advanced-settings.component.spec.ts +++ b/src/app/pages/system/advanced/advanced-settings.component.spec.ts @@ -1,9 +1,9 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; -import { MockComponents, MockModule } from 'ng-mocks'; +import { MockComponent, MockComponents } from 'ng-mocks'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { AccessCardComponent } from 'app/pages/system/advanced/access/access-card/access-card.component'; import { AdvancedSettingsComponent } from 'app/pages/system/advanced/advanced-settings.component'; import { @@ -35,7 +35,7 @@ describe('AdvancedSettingsComponent', () => { const createComponent = createComponentFactory({ component: AdvancedSettingsComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], declarations: [ diff --git a/src/app/pages/system/advanced/cron/cron-list/cron-list.component.spec.ts b/src/app/pages/system/advanced/cron/cron-list/cron-list.component.spec.ts index c02a9be14be..23cbe07b3ef 100644 --- a/src/app/pages/system/advanced/cron/cron-list/cron-list.component.spec.ts +++ b/src/app/pages/system/advanced/cron/cron-list/cron-list.component.spec.ts @@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; import { provideMockStore } from '@ngrx/store/testing'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockWebSocket, mockCall } from 'app/core/testing/utils/mock-websocket.utils'; @@ -20,7 +20,7 @@ import { IxTableDetailsRowComponent, } from 'app/modules/ix-table/components/ix-table-details-row/ix-table-details-row.component'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { CronDeleteDialogComponent } from 'app/pages/system/advanced/cron/cron-delete-dialog/cron-delete-dialog.component'; import { CronFormComponent } from 'app/pages/system/advanced/cron/cron-form/cron-form.component'; import { CronListComponent } from 'app/pages/system/advanced/cron/cron-list/cron-list.component'; @@ -57,7 +57,7 @@ describe('CronListComponent', () => { const createComponent = createComponentFactory({ component: CronListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableColumnsSelectorComponent, IxTableDetailsRowDirective, diff --git a/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.spec.ts b/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.spec.ts index ee05c581bf3..e24e8b35197 100644 --- a/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.spec.ts +++ b/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.spec.ts @@ -1,6 +1,6 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -11,7 +11,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { InitShutdownFormComponent, } from 'app/pages/system/advanced/init-shutdown/init-shutdown-form/init-shutdown-form.component'; @@ -46,7 +46,7 @@ describe('InitShutdownListComponent', () => { const createComponent = createComponentFactory({ component: InitShutdownListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], providers: [ diff --git a/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.spec.ts b/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.spec.ts index 61c32f9b8e0..d88cdcf5eb9 100644 --- a/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.spec.ts +++ b/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.spec.ts @@ -3,7 +3,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatButtonHarness } from '@angular/material/button/testing'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { fakeSuccessfulJob } from 'app/core/testing/utils/fake-job.utils'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; @@ -15,7 +15,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { TunableFormComponent } from 'app/pages/system/advanced/sysctl/tunable-form/tunable-form.component'; import { TunableListComponent } from 'app/pages/system/advanced/sysctl/tunable-list/tunable-list.component'; import { IxChainedSlideInService } from 'app/services/ix-chained-slide-in.service'; @@ -104,7 +104,7 @@ describe('TunableListComponent', () => { const createComponent = createComponentFactory({ component: TunableListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], providers: [ diff --git a/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.spec.ts b/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.spec.ts index b1e2e6c8c4c..d86579f2630 100644 --- a/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.spec.ts +++ b/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.spec.ts @@ -2,7 +2,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatSnackBar } from '@angular/material/snack-bar'; import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of, Subject } from 'rxjs'; import { FakeFormatDateTimePipe } from 'app/core/testing/classes/fake-format-datetime.pipe'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; @@ -10,7 +10,7 @@ import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.u import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { BootEnvironmentListComponent } from 'app/pages/system/bootenv/bootenv-list/bootenv-list.component'; import { fakeBootEnvironmentsDataSource } from 'app/pages/system/bootenv/test/fake-boot-environments'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @@ -26,7 +26,7 @@ describe('BootEnvironmentListComponent', () => { const createComponent = createComponentFactory({ component: BootEnvironmentListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, ], declarations: [ diff --git a/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.spec.ts b/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.spec.ts index 5649be1b4a8..0f466a078f5 100644 --- a/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.spec.ts +++ b/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.spec.ts @@ -1,6 +1,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { Spectator, createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { MockWebSocketService } from 'app/core/testing/classes/mock-websocket.service'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; @@ -10,7 +11,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { JbofFormComponent } from 'app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component'; import { JbofListComponent } from 'app/pages/system/enclosure/components/jbof-list/jbof-list.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @@ -43,7 +44,7 @@ describe('JbofListComponent', () => { const createComponent = createComponentFactory({ component: JbofListComponent, imports: [ - PageHeaderModule, + MockComponent(PageHeaderComponent), SearchInput1Component, ], providers: [ diff --git a/src/app/pages/system/enclosure/enclosure.module.ts b/src/app/pages/system/enclosure/enclosure.module.ts index 93e5a332ae9..dcc2a1241f3 100644 --- a/src/app/pages/system/enclosure/enclosure.module.ts +++ b/src/app/pages/system/enclosure/enclosure.module.ts @@ -27,7 +27,7 @@ import { IxTableHeadComponent } from 'app/modules/ix-table/components/ix-table-h import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table-pager/ix-table-pager.component'; import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { OrNotAvailablePipe } from 'app/modules/pipes/or-not-available/or-not-available.pipe'; @@ -138,7 +138,6 @@ import { SvgCacheService } from 'app/pages/system/enclosure/services/svg-cache.s IxCheckboxComponent, IxFieldsetComponent, IxModalHeaderComponent, - PageHeaderModule, DecimalPipe, AsyncPipe, RequiresRolesDirective, @@ -154,6 +153,7 @@ import { SvgCacheService } from 'app/pages/system/enclosure/services/svg-cache.s TestDirective, TestDirective, TestDirective, + PageHeaderComponent, ], declarations: [ EnclosureDashboardComponent, diff --git a/src/app/pages/system/general-settings/general-settings.component.spec.ts b/src/app/pages/system/general-settings/general-settings.component.spec.ts index ec103c8c5c7..dc4c9b3f7b3 100644 --- a/src/app/pages/system/general-settings/general-settings.component.spec.ts +++ b/src/app/pages/system/general-settings/general-settings.component.spec.ts @@ -1,6 +1,6 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; -import { MockComponents, MockModule } from 'ng-mocks'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { MockComponent, MockComponents } from 'ng-mocks'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { EmailCardComponent } from 'app/pages/system/general-settings/email/email-card/email-card.component'; import { GeneralSettingsComponent } from 'app/pages/system/general-settings/general-settings.component'; import { GuiCardComponent } from 'app/pages/system/general-settings/gui/gui-card/gui-card.component'; @@ -16,7 +16,7 @@ describe('GeneralSettingsComponent', () => { const createComponent = createComponentFactory({ component: GeneralSettingsComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), ], declarations: [ MockComponents( diff --git a/src/app/pages/system/system.module.ts b/src/app/pages/system/system.module.ts index 87b7e74dcb9..e8ae1f5d401 100644 --- a/src/app/pages/system/system.module.ts +++ b/src/app/pages/system/system.module.ts @@ -73,7 +73,7 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { WithLoadingStateDirective, } from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { CastPipe } from 'app/modules/pipes/cast/cast.pipe'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; @@ -235,7 +235,6 @@ import { routing } from './system.routing'; IxListComponent, IxListItemComponent, IxExplorerComponent, - PageHeaderModule, AsyncPipe, KeyValuePipe, RequiresRolesDirective, @@ -304,6 +303,7 @@ import { routing } from './system.routing'; WithLoadingStateDirective, TestOverrideDirective, TestOverrideDirective, + PageHeaderComponent, ], declarations: [ AdvancedSettingsComponent, diff --git a/src/app/pages/vm/devices/device-list/device-list/device-list.component.spec.ts b/src/app/pages/vm/devices/device-list/device-list/device-list.component.spec.ts index c8665b24cdb..ae81254c15c 100644 --- a/src/app/pages/vm/devices/device-list/device-list/device-list.component.spec.ts +++ b/src/app/pages/vm/devices/device-list/device-list/device-list.component.spec.ts @@ -4,7 +4,7 @@ import { MatButtonHarness } from '@angular/material/button/testing'; import { MatDialog } from '@angular/material/dialog'; import { MatMenuHarness } from '@angular/material/menu/testing'; import { createRoutingFactory, mockProvider, Spectator } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -14,7 +14,7 @@ import { SearchInput1Component } from 'app/modules/forms/search-input1/search-in import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; import { IxTableCellDirective } from 'app/modules/ix-table/directives/ix-table-cell.directive'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { DeviceFormComponent } from 'app/pages/vm/devices/device-form/device-form.component'; import { DeviceDeleteModalComponent, @@ -46,7 +46,7 @@ describe('DeviceListComponent', () => { const createComponent = createRoutingFactory({ component: DeviceListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableDetailsRowDirective, IxTableCellDirective, diff --git a/src/app/pages/vm/vm-list/vm-list.component.spec.ts b/src/app/pages/vm/vm-list/vm-list.component.spec.ts index 87a955c4eef..2d5412359db 100644 --- a/src/app/pages/vm/vm-list/vm-list.component.spec.ts +++ b/src/app/pages/vm/vm-list/vm-list.component.spec.ts @@ -3,7 +3,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatButtonHarness } from '@angular/material/button/testing'; import { Spectator } from '@ngneat/spectator'; import { createComponentFactory, mockProvider } from '@ngneat/spectator/jest'; -import { MockModule } from 'ng-mocks'; +import { MockComponent } from 'ng-mocks'; import { Subject, of } from 'rxjs'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { mockCall, mockWebSocket } from 'app/core/testing/utils/mock-websocket.utils'; @@ -15,7 +15,7 @@ import { IxTableColumnsSelectorComponent, } from 'app/modules/ix-table/components/ix-table-columns-selector/ix-table-columns-selector.component'; import { IxTableDetailsRowDirective } from 'app/modules/ix-table/directives/ix-table-details-row.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { VmWizardComponent } from 'app/pages/vm/vm-wizard/vm-wizard.component'; import { IxSlideInService } from 'app/services/ix-slide-in.service'; @@ -54,7 +54,7 @@ describe('VmListComponent', () => { const createComponent = createComponentFactory({ component: VmListComponent, imports: [ - MockModule(PageHeaderModule), + MockComponent(PageHeaderComponent), SearchInput1Component, IxTableColumnsSelectorComponent, FileSizePipe, diff --git a/src/app/pages/vm/vm.module.ts b/src/app/pages/vm/vm.module.ts index 67b14e501a5..fa445206e86 100644 --- a/src/app/pages/vm/vm.module.ts +++ b/src/app/pages/vm/vm.module.ts @@ -45,10 +45,10 @@ import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table- import { WithLoadingStateDirective, } from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; -import { PageHeaderModule } from 'app/modules/page-header/page-header.module'; +import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { SummaryComponent } from 'app/modules/summary/summary.component'; -import { TerminalModule } from 'app/modules/terminal/terminal.module'; +import { TerminalComponent } from 'app/modules/terminal/components/terminal/terminal.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { DeviceFormComponent } from 'app/pages/vm/devices/device-form/device-form.component'; import { DeviceDeleteModalComponent } from 'app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component'; @@ -85,7 +85,6 @@ import { routing } from './vm.routing'; MatTooltipModule, ReactiveFormsModule, routing, - TerminalModule, TranslateModule, SearchInput1Component, SummaryComponent, @@ -102,7 +101,6 @@ import { routing } from './vm.routing'; IxErrorsComponent, IxFileInputComponent, IxRadioGroupComponent, - PageHeaderModule, AsyncPipe, RequiresRolesDirective, UiSearchDirective, @@ -117,6 +115,8 @@ import { routing } from './vm.routing'; IxTableColumnsSelectorComponent, TestDirective, WithLoadingStateDirective, + TerminalComponent, + PageHeaderComponent, ], declarations: [ VmSerialShellComponent, diff --git a/src/assets/i18n/af.json b/src/assets/i18n/af.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/af.json +++ b/src/assets/i18n/af.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ar.json b/src/assets/i18n/ar.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ar.json +++ b/src/assets/i18n/ar.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ast.json b/src/assets/i18n/ast.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ast.json +++ b/src/assets/i18n/ast.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/az.json b/src/assets/i18n/az.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/az.json +++ b/src/assets/i18n/az.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/be.json b/src/assets/i18n/be.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/be.json +++ b/src/assets/i18n/be.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/bg.json b/src/assets/i18n/bg.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/bg.json +++ b/src/assets/i18n/bg.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/bn.json b/src/assets/i18n/bn.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/bn.json +++ b/src/assets/i18n/bn.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/br.json b/src/assets/i18n/br.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/br.json +++ b/src/assets/i18n/br.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/bs.json b/src/assets/i18n/bs.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/bs.json +++ b/src/assets/i18n/bs.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ca.json b/src/assets/i18n/ca.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ca.json +++ b/src/assets/i18n/ca.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/cs.json b/src/assets/i18n/cs.json index a03be9e0f32..7babdaf6306 100644 --- a/src/assets/i18n/cs.json +++ b/src/assets/i18n/cs.json @@ -4749,7 +4749,6 @@ "Update Image": "Aktualizovat obrázek", "Update Interval": "Interval aktualizace", "Update License": "Aktualizovat licenci", - "Update Members": "Aktualizovat členy", "Update Password": "Aktualizovat heslo", "Update Pool": "Aktualizovat pool", "Update Production Status": "Aktualizovat stav výroby", diff --git a/src/assets/i18n/cy.json b/src/assets/i18n/cy.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/cy.json +++ b/src/assets/i18n/cy.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/da.json b/src/assets/i18n/da.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/da.json +++ b/src/assets/i18n/da.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 3e0f6dbd438..562e3be6a4e 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -3302,7 +3302,6 @@ "Update Dashboard": "", "Update Image": "", "Update Interval": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/dsb.json b/src/assets/i18n/dsb.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/dsb.json +++ b/src/assets/i18n/dsb.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/el.json b/src/assets/i18n/el.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/el.json +++ b/src/assets/i18n/el.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/en-au.json b/src/assets/i18n/en-au.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/en-au.json +++ b/src/assets/i18n/en-au.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/en-gb.json b/src/assets/i18n/en-gb.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/en-gb.json +++ b/src/assets/i18n/en-gb.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/eo.json b/src/assets/i18n/eo.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/eo.json +++ b/src/assets/i18n/eo.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/es-ar.json b/src/assets/i18n/es-ar.json index 64e162b6d9b..4b96dd2bd4a 100644 --- a/src/assets/i18n/es-ar.json +++ b/src/assets/i18n/es-ar.json @@ -2533,7 +2533,6 @@ "Update Dashboard": "", "Update Image": "", "Update Interval": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Release Notes": "", diff --git a/src/assets/i18n/es-co.json b/src/assets/i18n/es-co.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/es-co.json +++ b/src/assets/i18n/es-co.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/es-mx.json b/src/assets/i18n/es-mx.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/es-mx.json +++ b/src/assets/i18n/es-mx.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/es-ni.json b/src/assets/i18n/es-ni.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/es-ni.json +++ b/src/assets/i18n/es-ni.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/es-ve.json b/src/assets/i18n/es-ve.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/es-ve.json +++ b/src/assets/i18n/es-ve.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index c7c517bd27b..a3ffb129b24 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -4226,7 +4226,6 @@ "Update File": "", "Update File Temporary Storage Location": "", "Update Image": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/et.json b/src/assets/i18n/et.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/et.json +++ b/src/assets/i18n/et.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/eu.json b/src/assets/i18n/eu.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/eu.json +++ b/src/assets/i18n/eu.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/fa.json b/src/assets/i18n/fa.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/fa.json +++ b/src/assets/i18n/fa.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/fi.json b/src/assets/i18n/fi.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/fi.json +++ b/src/assets/i18n/fi.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 54477879518..e910cb9c54e 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -4716,7 +4716,6 @@ "Update File Temporary Storage Location": "Mettre à jour l'emplacement de stockage temporaire des fichiers", "Update Image": "Mettre à jour l’image", "Update License": "Mettre à jour la licence", - "Update Members": "Mettre à jour les membres", "Update Password": "Mettre à jour le mot de passe", "Update Pool": "Mettre à jour le volume", "Update Production Status": "Mettre à jour le statut de production", diff --git a/src/assets/i18n/fy.json b/src/assets/i18n/fy.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/fy.json +++ b/src/assets/i18n/fy.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ga.json b/src/assets/i18n/ga.json index 94535feb7f1..58121a345a5 100644 --- a/src/assets/i18n/ga.json +++ b/src/assets/i18n/ga.json @@ -4630,7 +4630,6 @@ "Update Image": "Nuashonraigh Íomhá", "Update Interval": "Eatramh Nuashonraithe", "Update License": "Nuashonraigh Ceadúnas", - "Update Members": "Baill Nuashonrú", "Update Password": "Nuashonraigh Pasfhocal", "Update Pool": "Snámha Nuashonraithe", "Update Production Status": "Nuashonraigh an Stádas Táirgthe", diff --git a/src/assets/i18n/gd.json b/src/assets/i18n/gd.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/gd.json +++ b/src/assets/i18n/gd.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/gl.json b/src/assets/i18n/gl.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/gl.json +++ b/src/assets/i18n/gl.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/he.json b/src/assets/i18n/he.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/he.json +++ b/src/assets/i18n/he.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/hi.json b/src/assets/i18n/hi.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/hi.json +++ b/src/assets/i18n/hi.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/hr.json b/src/assets/i18n/hr.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/hr.json +++ b/src/assets/i18n/hr.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/hsb.json b/src/assets/i18n/hsb.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/hsb.json +++ b/src/assets/i18n/hsb.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/hu.json b/src/assets/i18n/hu.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/hu.json +++ b/src/assets/i18n/hu.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ia.json b/src/assets/i18n/ia.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ia.json +++ b/src/assets/i18n/ia.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/id.json b/src/assets/i18n/id.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/id.json +++ b/src/assets/i18n/id.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/io.json b/src/assets/i18n/io.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/io.json +++ b/src/assets/i18n/io.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/is.json b/src/assets/i18n/is.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/is.json +++ b/src/assets/i18n/is.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/it.json b/src/assets/i18n/it.json index aa64a49d546..373114d64b6 100644 --- a/src/assets/i18n/it.json +++ b/src/assets/i18n/it.json @@ -4706,7 +4706,6 @@ "Update Image": "Immagine di aggiornamento", "Update Interval": "Intervallo di aggiornamento", "Update License": "Aggiorna Licenza", - "Update Members": "Aggiorna Membri", "Update Password": "Aggiorna Password", "Update Pool": "Aggiorna Pool", "Update Production Status": "Aggiorna lo stato di produzione", diff --git a/src/assets/i18n/ja.json b/src/assets/i18n/ja.json index aa910d2e3b0..2dff549ddaf 100644 --- a/src/assets/i18n/ja.json +++ b/src/assets/i18n/ja.json @@ -4105,7 +4105,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ka.json b/src/assets/i18n/ka.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ka.json +++ b/src/assets/i18n/ka.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/kk.json b/src/assets/i18n/kk.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/kk.json +++ b/src/assets/i18n/kk.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/km.json b/src/assets/i18n/km.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/km.json +++ b/src/assets/i18n/km.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/kn.json b/src/assets/i18n/kn.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/kn.json +++ b/src/assets/i18n/kn.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index 1a81c8d4063..576da433fe3 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -4158,7 +4158,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/lb.json b/src/assets/i18n/lb.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/lb.json +++ b/src/assets/i18n/lb.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/lt.json b/src/assets/i18n/lt.json index c1b9a47ae5a..b592a803872 100644 --- a/src/assets/i18n/lt.json +++ b/src/assets/i18n/lt.json @@ -4576,7 +4576,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/lv.json b/src/assets/i18n/lv.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/lv.json +++ b/src/assets/i18n/lv.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/mk.json b/src/assets/i18n/mk.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/mk.json +++ b/src/assets/i18n/mk.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ml.json b/src/assets/i18n/ml.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ml.json +++ b/src/assets/i18n/ml.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/mn.json b/src/assets/i18n/mn.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/mn.json +++ b/src/assets/i18n/mn.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/mr.json b/src/assets/i18n/mr.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/mr.json +++ b/src/assets/i18n/mr.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/my.json b/src/assets/i18n/my.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/my.json +++ b/src/assets/i18n/my.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/nb.json b/src/assets/i18n/nb.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/nb.json +++ b/src/assets/i18n/nb.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ne.json b/src/assets/i18n/ne.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ne.json +++ b/src/assets/i18n/ne.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index 928bb3efe19..0a5b4418b92 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -4754,7 +4754,6 @@ "Update File Temporary Storage Location": "Bestand tijdelijke opslaglocatie updaten", "Update Image": "Image updaten", "Update License": "Licentie updaten", - "Update Members": "Leden bijwerken", "Update Pool": "Pool bijwerken", "Update Production Status": "Productiestatus updaten", "Update TrueCommand Settings": "TrueCommand instellingen updaten", diff --git a/src/assets/i18n/nn.json b/src/assets/i18n/nn.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/nn.json +++ b/src/assets/i18n/nn.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/os.json b/src/assets/i18n/os.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/os.json +++ b/src/assets/i18n/os.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/pa.json b/src/assets/i18n/pa.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/pa.json +++ b/src/assets/i18n/pa.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/pl.json b/src/assets/i18n/pl.json index 3d032c81df2..8adc1407158 100644 --- a/src/assets/i18n/pl.json +++ b/src/assets/i18n/pl.json @@ -4504,7 +4504,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/pt-br.json b/src/assets/i18n/pt-br.json index 67c2e224363..952473950e5 100644 --- a/src/assets/i18n/pt-br.json +++ b/src/assets/i18n/pt-br.json @@ -4522,7 +4522,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/pt.json b/src/assets/i18n/pt.json index c0497ee5fdf..f394caa29cf 100644 --- a/src/assets/i18n/pt.json +++ b/src/assets/i18n/pt.json @@ -2841,7 +2841,6 @@ "Update All": "", "Update Dashboard": "", "Update Interval": "", - "Update Members": "", "Update Password": "", "Update Release Notes": "", "Update Software": "", diff --git a/src/assets/i18n/ro.json b/src/assets/i18n/ro.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ro.json +++ b/src/assets/i18n/ro.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ru.json b/src/assets/i18n/ru.json index b9391cf4d30..e0ee92ea0d0 100644 --- a/src/assets/i18n/ru.json +++ b/src/assets/i18n/ru.json @@ -2935,7 +2935,6 @@ "Update All": "", "Update Dashboard": "", "Update Interval": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/sk.json b/src/assets/i18n/sk.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/sk.json +++ b/src/assets/i18n/sk.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/sl.json b/src/assets/i18n/sl.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/sl.json +++ b/src/assets/i18n/sl.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/sq.json b/src/assets/i18n/sq.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/sq.json +++ b/src/assets/i18n/sq.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/sr-latn.json b/src/assets/i18n/sr-latn.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/sr-latn.json +++ b/src/assets/i18n/sr-latn.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/sr.json b/src/assets/i18n/sr.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/sr.json +++ b/src/assets/i18n/sr.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/strings.json b/src/assets/i18n/strings.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/strings.json +++ b/src/assets/i18n/strings.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/sv.json b/src/assets/i18n/sv.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/sv.json +++ b/src/assets/i18n/sv.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/sw.json b/src/assets/i18n/sw.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/sw.json +++ b/src/assets/i18n/sw.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/ta.json b/src/assets/i18n/ta.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/ta.json +++ b/src/assets/i18n/ta.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/te.json b/src/assets/i18n/te.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/te.json +++ b/src/assets/i18n/te.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/th.json b/src/assets/i18n/th.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/th.json +++ b/src/assets/i18n/th.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/tr.json b/src/assets/i18n/tr.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/tr.json +++ b/src/assets/i18n/tr.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/tt.json b/src/assets/i18n/tt.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/tt.json +++ b/src/assets/i18n/tt.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/udm.json b/src/assets/i18n/udm.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/udm.json +++ b/src/assets/i18n/udm.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/uk.json b/src/assets/i18n/uk.json index fad19708d77..029a9f5971e 100644 --- a/src/assets/i18n/uk.json +++ b/src/assets/i18n/uk.json @@ -1691,7 +1691,6 @@ "Update All": "", "Update Dashboard": "", "Update Interval": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Release Notes": "", diff --git a/src/assets/i18n/vi.json b/src/assets/i18n/vi.json index a9a659e029b..3626d9f4696 100644 --- a/src/assets/i18n/vi.json +++ b/src/assets/i18n/vi.json @@ -4582,7 +4582,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/i18n/zh-hans.json b/src/assets/i18n/zh-hans.json index 00ae7136f7a..fca1b415b9a 100644 --- a/src/assets/i18n/zh-hans.json +++ b/src/assets/i18n/zh-hans.json @@ -4786,7 +4786,6 @@ "Update File Temporary Storage Location": "更新文件临时存储位置", "Update Image": "更新镜像", "Update License": "更新许可证", - "Update Members": "更新成员", "Update Pool": "更新池", "Update Production Status": "更新生产状态", "Update TrueCommand Settings": "更新 TrueCommand 设置", diff --git a/src/assets/i18n/zh-hant.json b/src/assets/i18n/zh-hant.json index da2ac8b98e0..b7ce9739aa3 100644 --- a/src/assets/i18n/zh-hant.json +++ b/src/assets/i18n/zh-hant.json @@ -3859,7 +3859,6 @@ "Update Image": "", "Update Interval": "", "Update License": "", - "Update Members": "", "Update Password": "", "Update Pool": "", "Update Production Status": "", diff --git a/src/assets/ui-searchable-elements.json b/src/assets/ui-searchable-elements.json index 081dfc65d67..557971774e9 100644 --- a/src/assets/ui-searchable-elements.json +++ b/src/assets/ui-searchable-elements.json @@ -199,179 +199,6 @@ "triggerAnchor": null, "section": "ui" }, - { - "hierarchy": [ - "Credentials", - "Groups", - "Show Built-in Groups" - ], - "synonyms": [], - "requiredRoles": [], - "visibleTokens": [], - "anchorRouterLink": [ - "/credentials", - "groups" - ], - "routerLink": null, - "anchor": "show-built-in-groups", - "triggerAnchor": null, - "section": "ui" - }, - { - "hierarchy": [ - "Credentials", - "Groups", - "Add Group" - ], - "synonyms": [ - "New Group", - "Create Group", - "Group", - "Add Local Group" - ], - "requiredRoles": [ - "ACCOUNT_WRITE" - ], - "visibleTokens": [], - "anchorRouterLink": [ - "/credentials", - "groups" - ], - "routerLink": null, - "anchor": "add-group", - "triggerAnchor": null, - "section": "ui" - }, - { - "hierarchy": [ - "Credentials", - "Groups" - ], - "synonyms": [ - "Local Groups" - ], - "requiredRoles": [], - "visibleTokens": [], - "anchorRouterLink": [ - "/credentials", - "groups" - ], - "routerLink": null, - "anchor": "credentials-groups", - "triggerAnchor": null, - "section": "ui" - }, - { - "hierarchy": [ - "Credentials", - "Groups", - "Privileges", - "Add Privilege" - ], - "synonyms": [ - "New Privilege", - "Create Privilege", - "Privilege" - ], - "requiredRoles": [ - "FULL_ADMIN" - ], - "visibleTokens": [], - "anchorRouterLink": [ - "/credentials", - "groups", - "privileges" - ], - "routerLink": null, - "anchor": "add-privilege", - "triggerAnchor": null, - "section": "ui" - }, - { - "hierarchy": [ - "Credentials", - "Groups", - "Privileges" - ], - "synonyms": [], - "requiredRoles": [], - "visibleTokens": [], - "anchorRouterLink": [ - "/credentials", - "groups", - "privileges" - ], - "routerLink": null, - "anchor": "credentials-groups-privileges", - "triggerAnchor": null, - "section": "ui" - }, - { - "hierarchy": [ - "Credentials", - "Users", - "Show Built-in Users" - ], - "synonyms": [], - "requiredRoles": [], - "visibleTokens": [], - "anchorRouterLink": [ - "/credentials", - "users" - ], - "routerLink": null, - "anchor": "show-built-in-users", - "triggerAnchor": null, - "section": "ui" - }, - { - "hierarchy": [ - "Credentials", - "Users", - "Add User" - ], - "synonyms": [ - "New User", - "Create User", - "User", - "Add Local User" - ], - "requiredRoles": [ - "ACCOUNT_WRITE" - ], - "visibleTokens": [], - "anchorRouterLink": [ - "/credentials", - "users" - ], - "routerLink": null, - "anchor": "add-user", - "triggerAnchor": null, - "section": "ui" - }, - { - "hierarchy": [ - "Credentials", - "Users" - ], - "synonyms": [ - "Local Users", - "User List", - "User Management", - "Admins", - "Administrators" - ], - "requiredRoles": [], - "visibleTokens": [], - "anchorRouterLink": [ - "/credentials", - "users" - ], - "routerLink": null, - "anchor": "credentials-users", - "triggerAnchor": null, - "section": "ui" - }, { "hierarchy": [ "API Keys" @@ -850,6 +677,113 @@ "triggerAnchor": null, "section": "ui" }, + { + "hierarchy": [ + "Credentials", + "Groups", + "Show Built-in Groups" + ], + "synonyms": [], + "requiredRoles": [], + "visibleTokens": [], + "anchorRouterLink": [ + "/credentials", + "groups" + ], + "routerLink": null, + "anchor": "show-built-in-groups", + "triggerAnchor": null, + "section": "ui" + }, + { + "hierarchy": [ + "Credentials", + "Groups", + "Add Group" + ], + "synonyms": [ + "New Group", + "Create Group", + "Group", + "Add Local Group" + ], + "requiredRoles": [ + "ACCOUNT_WRITE" + ], + "visibleTokens": [], + "anchorRouterLink": [ + "/credentials", + "groups" + ], + "routerLink": null, + "anchor": "add-group", + "triggerAnchor": null, + "section": "ui" + }, + { + "hierarchy": [ + "Credentials", + "Groups" + ], + "synonyms": [ + "Local Groups" + ], + "requiredRoles": [], + "visibleTokens": [], + "anchorRouterLink": [ + "/credentials", + "groups" + ], + "routerLink": null, + "anchor": "credentials-groups", + "triggerAnchor": null, + "section": "ui" + }, + { + "hierarchy": [ + "Credentials", + "Groups", + "Privileges", + "Add Privilege" + ], + "synonyms": [ + "New Privilege", + "Create Privilege", + "Privilege" + ], + "requiredRoles": [ + "FULL_ADMIN" + ], + "visibleTokens": [], + "anchorRouterLink": [ + "/credentials", + "groups", + "privileges" + ], + "routerLink": null, + "anchor": "add-privilege", + "triggerAnchor": null, + "section": "ui" + }, + { + "hierarchy": [ + "Credentials", + "Groups", + "Privileges" + ], + "synonyms": [], + "requiredRoles": [], + "visibleTokens": [], + "anchorRouterLink": [ + "/credentials", + "groups", + "privileges" + ], + "routerLink": null, + "anchor": "credentials-groups-privileges", + "triggerAnchor": null, + "section": "ui" + }, { "hierarchy": [ "Credentials", @@ -867,6 +801,72 @@ "triggerAnchor": null, "section": "ui" }, + { + "hierarchy": [ + "Credentials", + "Users", + "Show Built-in Users" + ], + "synonyms": [], + "requiredRoles": [], + "visibleTokens": [], + "anchorRouterLink": [ + "/credentials", + "users" + ], + "routerLink": null, + "anchor": "show-built-in-users", + "triggerAnchor": null, + "section": "ui" + }, + { + "hierarchy": [ + "Credentials", + "Users", + "Add User" + ], + "synonyms": [ + "New User", + "Create User", + "User", + "Add Local User" + ], + "requiredRoles": [ + "ACCOUNT_WRITE" + ], + "visibleTokens": [], + "anchorRouterLink": [ + "/credentials", + "users" + ], + "routerLink": null, + "anchor": "add-user", + "triggerAnchor": null, + "section": "ui" + }, + { + "hierarchy": [ + "Credentials", + "Users" + ], + "synonyms": [ + "Local Users", + "User List", + "User Management", + "Admins", + "Administrators" + ], + "requiredRoles": [], + "visibleTokens": [], + "anchorRouterLink": [ + "/credentials", + "users" + ], + "routerLink": null, + "anchor": "credentials-users", + "triggerAnchor": null, + "section": "ui" + }, { "hierarchy": [ "Dashboard", diff --git a/tsconfig.strictNullChecks.json b/tsconfig.strictNullChecks.json index 1ef5c40273b..116ea592634 100644 --- a/tsconfig.strictNullChecks.json +++ b/tsconfig.strictNullChecks.json @@ -548,9 +548,8 @@ "./src/app/modules/test-id/test-override/test-override.directive.ts", "./src/app/modules/test-id/test.directive.ts", "./src/app/modules/tooltip/tooltip.component.ts", - "./src/app/modules/truecommand/components/truecommand-signup-modal/truecommand-signup-modal.component.ts", - "./src/app/pages/account/groups/store/group.actions.ts", - "./src/app/pages/account/users/store/user.actions.ts", + "./src/app/pages/credentials/groups/store/group.actions.ts", + "./src/app/pages/credentials/users/store/user.actions.ts", "./src/app/pages/api-keys/components/key-created-dialog/key-created-dialog.component.spec.ts", "./src/app/pages/api-keys/components/key-created-dialog/key-created-dialog.component.ts", "./src/app/pages/apps/components/app-router-outlet/app-router-outlet.component.ts", @@ -620,8 +619,6 @@ "./src/app/pages/sharing/components/shares-dashboard/shares-dashboard.component.ts", "./src/app/pages/sharing/smb/smb-form/restart-smb-dialog/restart-smb-dialog.component.ts", "./src/app/pages/sharing/smb/smb-status/smb-status.component.ts", - "./src/app/pages/shell/shell.component.ts", - "./src/app/pages/shell/shell.routing.ts", "./src/app/pages/storage/components/dashboard-pool/disk-health-card/disk-health-card.component.ts", "./src/app/pages/storage/components/dashboard-pool/pool-card-icon/pool-card-icon.component.ts", "./src/app/pages/storage/components/dashboard-pool/pool-usage-card/gauge-chart/rounded-doughnut.class.ts",