diff --git a/src/app/core/testing/utils/mock-auth.utils.ts b/src/app/core/testing/utils/mock-auth.utils.ts index 0d4e19c034a..ebd0853882f 100644 --- a/src/app/core/testing/utils/mock-auth.utils.ts +++ b/src/app/core/testing/utils/mock-auth.utils.ts @@ -44,6 +44,7 @@ export function mockAuth( }), createSpyObject(Store), createSpyObject(WebSocketService), + createSpyObject(Window), ); mockService.setUser(user as LoggedInUser); diff --git a/src/app/directives/autofocus/autofocus.directive.ts b/src/app/directives/autofocus/autofocus.directive.ts index 52fb62e130d..cc104b36f88 100644 --- a/src/app/directives/autofocus/autofocus.directive.ts +++ b/src/app/directives/autofocus/autofocus.directive.ts @@ -7,9 +7,12 @@ import { AfterViewInit, Directive, ElementRef } from '@angular/core'; selector: '[ixAutofocus]', }) export class AutofocusDirective implements AfterViewInit { - constructor(private host: ElementRef) {} + constructor(private host: ElementRef) {} ngAfterViewInit(): void { - (this.host.nativeElement as HTMLElement).querySelector('input, textarea, select').focus(); + // Do not intercept focus when a full-screen dialog is open. + const rootNode = this.host.nativeElement.getRootNode() as HTMLElement; + if (rootNode.querySelector('ix-full-screen-dialog')) return; + this.host.nativeElement.querySelector('input, textarea, select').focus(); } } diff --git a/src/app/enums/system-state.enum.ts b/src/app/enums/system-state.enum.ts new file mode 100644 index 00000000000..b75bc13606d --- /dev/null +++ b/src/app/enums/system-state.enum.ts @@ -0,0 +1,5 @@ +export enum SystemState { + Ready = 'READY', + Booting = 'BOOTING', + ShuttingDown = 'SHUTTING_DOWN', +} diff --git a/src/app/interfaces/advanced-config.interface.ts b/src/app/interfaces/advanced-config.interface.ts index 7a406d22290..feb2d4afcba 100644 --- a/src/app/interfaces/advanced-config.interface.ts +++ b/src/app/interfaces/advanced-config.interface.ts @@ -15,6 +15,7 @@ export interface AdvancedConfig { isolated_gpu_pci_ids: string[]; kdump_enabled: boolean; motd: string; + login_banner: string; overprovision: number; powerdaemon: boolean; sed_user: SedUser; diff --git a/src/app/interfaces/api/api-call-directory.interface.ts b/src/app/interfaces/api/api-call-directory.interface.ts index 9d9bfd15f90..8303206be81 100644 --- a/src/app/interfaces/api/api-call-directory.interface.ts +++ b/src/app/interfaces/api/api-call-directory.interface.ts @@ -9,6 +9,7 @@ import { ProductType } from 'app/enums/product-type.enum'; import { ServiceName } from 'app/enums/service-name.enum'; import { SmbInfoLevel } from 'app/enums/smb-info-level.enum'; import { SystemEnvironment } from 'app/enums/system-environment.enum'; +import { SystemState } from 'app/enums/system-state.enum'; import { TransportMode } from 'app/enums/transport-mode.enum'; import { Acl, @@ -794,6 +795,7 @@ export interface ApiCallDirectory { 'system.advanced.syslog_certificate_choices': { params: void; response: Choices }; 'system.advanced.update': { params: [Partial]; response: AdvancedConfig }; 'system.advanced.update_gpu_pci_ids': { params: [isolated_gpu_pci_ids: string[]]; response: void }; + 'system.advanced.login_banner': { params: void; response: string }; 'system.build_time': { params: void; response: ApiTimestamp }; 'system.boot_id': { params: void; response: string }; 'system.environment': { params: void; response: SystemEnvironment }; @@ -820,6 +822,10 @@ export interface ApiCallDirectory { 'system.security.config': { params: void; response: SystemSecurityConfig }; 'system.security.info.fips_available': { params: void; response: boolean }; 'system.set_time': { params: [number]; response: void }; + 'system.ready': { params: void; response: boolean }; + 'system.state': { params: void; response: SystemState }; + 'system.version': { params: void; response: string }; + 'system.version_short': { params: void; response: string }; // Systemdataset 'systemdataset.config': { params: void; response: SystemDatasetConfig }; diff --git a/src/app/modules/dialog/components/full-screen-dialog/full-screen-dialog.component.html b/src/app/modules/dialog/components/full-screen-dialog/full-screen-dialog.component.html index 96bc729bc44..22dba757a19 100644 --- a/src/app/modules/dialog/components/full-screen-dialog/full-screen-dialog.component.html +++ b/src/app/modules/dialog/components/full-screen-dialog/full-screen-dialog.component.html @@ -1,7 +1,11 @@
-
{{ title | translate }}
-

{{ message | translate }}

+ @if (title) { +
{{ title | translate }}
+ } + @if (message) { +

{{ message | translate }}

+ }
@if (data.showClose) {