diff --git a/src/app/devices/certificates/certificates.component.html b/src/app/devices/certificates/certificates.component.html index 7cabe783b..b54918316 100644 --- a/src/app/devices/certificates/certificates.component.html +++ b/src/app/devices/certificates/certificates.component.html @@ -24,7 +24,7 @@ Type: {{ cert.trustedRootCertificate ? 'Root' : 'Client' }} Profile Associations: - @if (!cert.associatedProfiles) { + @if (!cert.associatedProfiles || cert.associatedProfiles.length === 0) { Unassociated } @else { {{ cert.associatedProfiles }} diff --git a/src/app/devices/device-detail/device-detail.component.ts b/src/app/devices/device-detail/device-detail.component.ts index e5a8d8612..71ecd3463 100644 --- a/src/app/devices/device-detail/device-detail.component.ts +++ b/src/app/devices/device-detail/device-detail.component.ts @@ -108,17 +108,17 @@ export class DeviceDetailComponent implements OnInit { description: 'Manage device alarms', component: 'alarms', icon: 'alarm' + }, + { + name: 'Certificates', + description: 'Manage certificates', + component: 'certificates', + icon: 'verified' } ] constructor() { if (!this.isCloudMode) { - this.categories.push({ - name: 'Certificates', - description: 'Manage certificates', - component: 'certificates', - icon: 'verified' - }) this.categories.push({ name: 'Explorer', description: 'Send WSMAN commands', diff --git a/src/app/devices/device-toolbar/device-toolbar.component.spec.ts b/src/app/devices/device-toolbar/device-toolbar.component.spec.ts index ceb4525f9..40b6d5098 100644 --- a/src/app/devices/device-toolbar/device-toolbar.component.spec.ts +++ b/src/app/devices/device-toolbar/device-toolbar.component.spec.ts @@ -155,16 +155,6 @@ describe('DeviceToolbarComponent', () => { expect(ocrOption?.label).toBe('Reset to HTTPS Boot (OCR)') }) - it('should not have OCR power option in cloud mode', () => { - environment.cloud = true - component.isCloudMode = true - - component.ngOnInit() - - const ocrOption = component.powerOptions.find((option) => option.action === 105) - expect(ocrOption).toBeFalsy() - }) - it('should open HttpbootDetailComponent dialog in non-cloud mode', () => { environment.cloud = false component.isCloudMode = false diff --git a/src/app/devices/device-toolbar/device-toolbar.component.ts b/src/app/devices/device-toolbar/device-toolbar.component.ts index 45a03451c..e4e689fa6 100644 --- a/src/app/devices/device-toolbar/device-toolbar.component.ts +++ b/src/app/devices/device-toolbar/device-toolbar.component.ts @@ -105,21 +105,18 @@ export class DeviceToolbarComponent implements OnInit { { label: 'Power Up to PXE', action: 401 + }, + { + label: 'Reset to HTTPS Boot (OCR)', + action: 105 + }, + { + label: 'Power Up to HTTPS Boot (OCR)', + action: 106 } ] ngOnInit(): void { - if (!this.isCloudMode) { - this.powerOptions.push({ - label: 'Reset to HTTPS Boot (OCR)', - action: 105 - }) - this.powerOptions.push({ - label: 'Power Up to HTTPS Boot (OCR)', - action: 106 - }) - } - this.devicesService.getDevice(this.deviceId()).subscribe((data) => { this.device = data this.devicesService.device.next(this.device) diff --git a/src/app/devices/general/general.component.html b/src/app/devices/general/general.component.html index 80e52c687..d57da9dbf 100644 --- a/src/app/devices/general/general.component.html +++ b/src/app/devices/general/general.component.html @@ -112,18 +112,16 @@ - @if (!isCloudMode) { -
-

HTTPS Network boot:

-
-
- -
- } +
+

HTTPS Network boot:

+
+
+ +
diff --git a/src/app/devices/general/general.component.ts b/src/app/devices/general/general.component.ts index 6a2dfadd5..deeb961b3 100644 --- a/src/app/devices/general/general.component.ts +++ b/src/app/devices/general/general.component.ts @@ -144,7 +144,11 @@ export class GeneralComponent implements OnInit { setAmtFeatures(): void { this.isLoading.set(true) this.devicesService - .setAmtFeatures(this.deviceId(), this.amtEnabledFeatures.value as AMTFeaturesRequest) + .setAmtFeatures(this.deviceId(), { + ...this.amtEnabledFeatures.getRawValue(), + ocr: this.amtFeatures.ocr, + remoteErase: this.amtFeatures.remoteErase + } as AMTFeaturesRequest) .pipe( finalize(() => { this.isLoading.set(false)