Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/devices/certificates/certificates.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<span matListItemLine>Type: {{ cert.trustedRootCertificate ? 'Root' : 'Client' }}</span>
<span matListItemLine
>Profile Associations:
@if (!cert.associatedProfiles) {
@if (!cert.associatedProfiles || cert.associatedProfiles.length === 0) {
Unassociated
} @else {
{{ cert.associatedProfiles }}
Expand Down
12 changes: 6 additions & 6 deletions src/app/devices/device-detail/device-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 0 additions & 10 deletions src/app/devices/device-toolbar/device-toolbar.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 8 additions & 11 deletions src/app/devices/device-toolbar/device-toolbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 10 additions & 12 deletions src/app/devices/general/general.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,16 @@
</mat-select>
</mat-form-field>
</div>
@if (!isCloudMode) {
<div class="flex flex-50">
<p>HTTPS Network boot:</p>
</div>
<div
class="flex flex-50 justify-end"
matTooltip="HTTPS Boot is not supported"
[matTooltipDisabled]="!amtEnabledFeatures.get('httpsBootSupported')?.disabled"
matTooltipPosition="after">
<mat-checkbox formControlName="httpsBootSupported" (change)="setAmtFeatures()"></mat-checkbox>
</div>
}
<div class="flex flex-50">
<p>HTTPS Network boot:</p>
</div>
<div
class="flex flex-50 justify-end"
matTooltip="HTTPS Boot is not supported"
[matTooltipDisabled]="!amtEnabledFeatures.get('httpsBootSupported')?.disabled"
matTooltipPosition="after">
<mat-checkbox formControlName="httpsBootSupported" (change)="setAmtFeatures()"></mat-checkbox>
</div>
</div>
</mat-card-content>
</mat-card>
Expand Down
6 changes: 5 additions & 1 deletion src/app/devices/general/general.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Comment thread
madhavilosetty-intel marked this conversation as resolved.
ocr: this.amtFeatures.ocr,
remoteErase: this.amtFeatures.remoteErase
} as AMTFeaturesRequest)
.pipe(
finalize(() => {
this.isLoading.set(false)
Expand Down
Loading