Skip to content

Commit 36f3ed1

Browse files
committed
fix: remove KVM from verbage for ISM system on redirection warning
1 parent c79ebce commit 36f3ed1

17 files changed

Lines changed: 75 additions & 3 deletions

src/app/devices/device-detail/device-detail.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ <h3 matListItemTitle>{{ item.name | translate }}</h3>
3333
<mat-sidenav-content>
3434
@switch (currentView) {
3535
@default {
36-
<app-general [deviceId]="deviceId"></app-general>
36+
<app-general [deviceId]="deviceId" [isISM]="isISMSystem()"></app-general>
3737
}
3838
@case ('general') {
39-
<app-general [deviceId]="deviceId"></app-general>
39+
<app-general [deviceId]="deviceId" [isISM]="isISMSystem()"></app-general>
4040
}
4141
@case ('kvm') {
4242
@if (isLoading()) {

src/app/devices/device-detail/device-detail.component.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ describe('DeviceDetailComponent', () => {
5151
readonly isLoading = input(signal(false))
5252

5353
public readonly deviceId = input('')
54+
public readonly isISM = input(false)
5455
}
5556

5657
@Component({

src/app/devices/general/general.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@
7272
style="margin-bottom: 16px; padding: 8px 12px">
7373
<div class="flex items-center">
7474
<mat-icon color="warn" aria-hidden="true" style="margin-right: 8px; flex-shrink: 0">warning</mat-icon>
75-
<span>{{ 'general.redirectionWarning.value' | translate }}</span>
75+
<span>{{
76+
(isISM() ? 'general.redirectionWarningISM.value' : 'general.redirectionWarning.value') | translate
77+
}}</span>
7678
</div>
7779
<button mat-stroked-button (click)="setAmtFeatures()">
7880
{{ 'general.redirectionEnable.value' | translate }}

src/app/devices/general/general.component.spec.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,26 @@ describe('GeneralComponent', () => {
135135
expect(devicesServiceSpy.setAmtFeatures).toHaveBeenCalled()
136136
})
137137

138+
it('shows ISM redirection warning text for ISM systems', () => {
139+
fixture.componentRef.setInput('isISM', true)
140+
component.amtEnabledFeatures.get('enableKVM')?.setValue(true)
141+
component.amtEnabledFeatures.get('redirection')?.setValue(false)
142+
fixture.detectChanges()
143+
144+
expect(fixture.nativeElement.textContent).toContain('general.redirectionWarningISM.value')
145+
expect(fixture.nativeElement.textContent).not.toContain('general.redirectionWarning.value')
146+
})
147+
148+
it('shows standard redirection warning text for non-ISM systems', () => {
149+
fixture.componentRef.setInput('isISM', false)
150+
component.amtEnabledFeatures.get('enableKVM')?.setValue(true)
151+
component.amtEnabledFeatures.get('redirection')?.setValue(false)
152+
fixture.detectChanges()
153+
154+
expect(fixture.nativeElement.textContent).toContain('general.redirectionWarning.value')
155+
expect(fixture.nativeElement.textContent).not.toContain('general.redirectionWarningISM.value')
156+
})
157+
138158
it('sends remoteErase from the loaded features, not the default', () => {
139159
devicesServiceSpy.setAmtFeatures = jasmine.createSpy().and.returnValue(of({}))
140160
component.setAmtFeatures()

src/app/devices/general/general.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class GeneralComponent implements OnInit, OnDestroy {
4444
private readonly translate = inject(TranslateService)
4545

4646
public readonly deviceId = input('')
47+
public readonly isISM = input(false)
4748

4849
public amtFeatures: AMTFeaturesResponse = {
4950
KVM: false,

src/assets/i18n/ar.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,10 @@
15191519
"description": "تحذير عندما يكون إعادة التوجيه معطلاً ولكن KVM/SOL/IDER مفعل",
15201520
"value": "إعادة التوجيه معطلة. يتطلب KVM وSOL وIDER تفعيل إعادة التوجيه."
15211521
},
1522+
"general.redirectionWarningISM": {
1523+
"description": "تحذير عندما يكون إعادة التوجيه معطلاً ولكن SOL/IDER مفعل",
1524+
"value": "إعادة التوجيه معطلة. يتطلب SOL وIDER تفعيل إعادة التوجيه."
1525+
},
15221526
"general.serialOverLan": {
15231527
"description": "تسمية SOL",
15241528
"value": "Serial-Over-Lan (SOL):"

src/assets/i18n/de.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,10 @@
15111511
"description": "Schaltflächenbeschriftung zum Aktivieren der Umleitung",
15121512
"value": "Aktivieren"
15131513
},
1514+
"general.redirectionWarningISM": {
1515+
"description": "Warnung, wenn Umleitung deaktiviert ist, aber SOL/IDER aktiviert ist",
1516+
"value": "Umleitung ist deaktiviert. SOL und IDER erfordern eine aktivierte Umleitung."
1517+
},
15141518
"general.redirectionWarning": {
15151519
"description": "Warnung, wenn Umleitung deaktiviert ist, aber KVM/SOL/IDER aktiviert ist",
15161520
"value": "Umleitung ist deaktiviert. KVM, SOL und IDER erfordern eine aktivierte Umleitung."

src/assets/i18n/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,10 @@
16911691
"description": "Warning shown when redirection is disabled but KVM/SOL/IDER is enabled",
16921692
"value": "Redirection is disabled. KVM, SOL, and IDER require redirection to be enabled."
16931693
},
1694+
"general.redirectionWarningISM": {
1695+
"description": "Warning shown when redirection is disabled but SOL/IDER is enabled",
1696+
"value": "Redirection is disabled. SOL and IDER require redirection to be enabled."
1697+
},
16941698
"general.serialOverLan": {
16951699
"description": "Label for SOL",
16961700
"value": "Serial-Over-Lan (SOL):"

src/assets/i18n/es.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,10 @@
15151515
"description": "Advertencia cuando la redirección está deshabilitada pero KVM/SOL/IDER está habilitado",
15161516
"value": "La redirección está deshabilitada. KVM, SOL e IDER requieren que la redirección esté habilitada."
15171517
},
1518+
"general.redirectionWarningISM": {
1519+
"description": "Advertencia cuando la redirección está deshabilitada pero SOL/IDER está habilitado",
1520+
"value": "La redirección está deshabilitada. SOL e IDER requieren que la redirección esté habilitada."
1521+
},
15181522
"general.serialOverLan": {
15191523
"description": "Etiqueta para SOL",
15201524
"value": "Serial-Over-Lan (SOL):"

src/assets/i18n/fi.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,10 @@
15151515
"description": "Varoitus, kun uudelleenohjaus on poistettu käytöstä, mutta KVM/SOL/IDER on käytössä",
15161516
"value": "Uudelleenohjaus on poistettu käytöstä. KVM, SOL ja IDER vaativat uudelleenohjauksen käyttöönottoa."
15171517
},
1518+
"general.redirectionWarningISM": {
1519+
"description": "Varoitus, kun uudelleenohjaus on poistettu käytöstä, mutta SOL/IDER on käytössä",
1520+
"value": "Uudelleenohjaus on poistettu käytöstä. SOL ja IDER vaativat uudelleenohjauksen käyttöönottoa."
1521+
},
15181522
"general.serialOverLan": {
15191523
"description": "SOL-merkki",
15201524
"value": "Serial-Over-Lan (SOL):"

0 commit comments

Comments
 (0)