feat(devices): add remote platform erase support - #3206
Conversation
c7091b5 to
cf0fa97
Compare
58e08ae to
9afb33d
Compare
bb235c9 to
c88557f
Compare
93f60f7 to
f0dfe42
Compare
6b8b3f0 to
0db2b32
Compare
871d2e1 to
2c0484a
Compare
ce3ce1f to
1eb5340
Compare
3f0071e to
195fa82
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new Remote Platform Erase (RPE) area under device details and updates the AMT-features contract from remoteErase to rpe/rpeSupported, along with UI text and test updates across the app.
Changes:
- Introduces
RemotePlatformEraseComponentand wires it into the device detail navigation. - Updates
DevicesService+ related components/specs to userpe/rpeSupportedinstead ofremoteErase. - Adds/updates i18n strings and adds Cypress coverage for the new RPE flow.
Reviewed changes
Copilot reviewed 38 out of 39 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/models.ts | Updates AMT feature typings to rpe/rpeSupported and adds types for remote erase capabilities/options. |
| src/assets/i18n/ar.json | Adds RPE-related translations (and related shared keys) for Arabic. |
| src/assets/i18n/de.json | Adds RPE-related translations (and related shared keys) for German. |
| src/assets/i18n/en.json | Adds RPE UI strings and general labels/tooltips for the new feature. |
| src/assets/i18n/es.json | Adds RPE-related translations (and related shared keys) for Spanish. |
| src/assets/i18n/fi.json | Adds RPE-related translations (and related shared keys) for Finnish. |
| src/assets/i18n/fr.json | Adds RPE-related translations (and related shared keys) for French. |
| src/assets/i18n/he.json | Adds RPE-related translations (and related shared keys) for Hebrew. |
| src/assets/i18n/it.json | Adds RPE-related translations (and related shared keys) for Italian. |
| src/assets/i18n/ja.json | Adds RPE-related translations (and related shared keys) for Japanese. |
| src/assets/i18n/nl.json | Adds RPE-related translations (and related shared keys) for Dutch. |
| src/assets/i18n/ru.json | Adds RPE-related translations (and related shared keys) for Russian. |
| src/assets/i18n/sv.json | Adds RPE-related translations (and related shared keys) for Swedish. |
| src/app/shared/are-you-sure/are-you-sure.component.ts | Extends confirmation dialog to optionally accept custom message/params via MAT_DIALOG_DATA. |
| src/app/shared/are-you-sure/are-you-sure.component.html | Switches confirmation dialog body to support dynamic translation keys + params. |
| src/app/devices/user-consent.service.spec.ts | Updates mocked AMT features to use rpe/rpeSupported. |
| src/app/devices/sol/sol.component.ts | Updates SOL feature-save payload to use rpe instead of remoteErase. |
| src/app/devices/sol/sol.component.spec.ts | Updates SOL tests to include rpe/rpeSupported. |
| src/app/devices/remote-platform-erase/remote-platform-erase.constants.ts | Adds RPE capability key list used by the new UI. |
| src/app/devices/remote-platform-erase/remote-platform-erase.component.ts | Implements the RPE UI logic: load features/caps, toggle RPE, confirm and post erase options. |
| src/app/devices/remote-platform-erase/remote-platform-erase.component.html | Implements the RPE UI template with capability selection + confirmation flow. |
| src/app/devices/remote-platform-erase/remote-platform-erase.component.scss | Adds basic host styling for the new component. |
| src/app/devices/kvm/kvm.component.ts | Updates KVM feature-save payload to use rpe instead of remoteErase. |
| src/app/devices/kvm/kvm.component.spec.ts | Updates KVM tests to include rpe/rpeSupported. |
| src/app/devices/ider/ider.component.ts | Updates IDER feature-save payload to use rpe instead of remoteErase. |
| src/app/devices/ider/ider.component.spec.ts | Updates IDER tests and payload assertions to use rpe. |
| src/app/devices/hardware-information/hardware-information.component.spec.ts | Updates hardware info test fixtures to include rpe/rpeSupported. |
| src/app/devices/general/general.component.ts | Adds rpe controls to the General tab and updates feature-save payload composition. |
| src/app/devices/general/general.component.spec.ts | Updates General tab tests to expect rpe instead of remoteErase and stubs featuresChanges. |
| src/app/devices/general/general.component.html | Adds an RPE checkbox row + tooltip in the General tab. |
| src/app/devices/devices.service.ts | Adds remote erase options/capabilities API methods and updates AMT-features POST body/caching behavior. |
| src/app/devices/devices.service.spec.ts | Updates DevicesService tests for new AMT-features request body and rpe cache behavior. |
| src/app/devices/device-toolbar/device-toolbar.component.spec.ts | Updates toolbar test fixtures to include rpe/rpeSupported. |
| src/app/devices/device-detail/device-detail.component.ts | Adds the “Remote Platform Erase” nav item and includes the new component in imports. |
| src/app/devices/device-detail/device-detail.component.html | Adds the route switch case to render <app-remote-platform-erase>. |
| cypress/e2e/integration/device/remote-platform-erase.spec.ts | Adds Cypress coverage for supported/unsupported states, toggling, confirm/cancel, and failure snackbar. |
| cypress/e2e/fixtures/api/eventlog.ts | Adds fixture responses for RPE features and capabilities. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 38 out of 39 changed files in this pull request and generated no new comments.
Suppressed comments (3)
src/app/devices/remote-platform-erase/remote-platform-erase.component.ts:184
- Fallback translation key
remotePlatformErase.toggleFeatureErroris not present in the i18n JSON (the existing key isremotePlatformErase.updateError). When the API call fails without a server-provided message, the snackbar will show the raw key instead of a localized message.
const msg: string = err.error?.message || this.t('remotePlatformErase.toggleFeatureError')
src/app/devices/remote-platform-erase/remote-platform-erase.constants.ts:10
- This header comment says the file defines “Bitmask definitions”, but the file only exports string capability keys. This is misleading and contradicts the boolean-capabilities request approach used elsewhere in this PR.
/**
* Bitmask definitions for AMT_BootCapabilities.PlatformErase.
* Capabilities vary by AMT/CSME version.
* Reference: https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/
* default.htm?turl=HTMLDocuments%2FWS-Management_Class_Reference%2FAMT_BootCapabilities.htm%23PlatformErase
src/app/devices/devices.service.ts:474
- The comment says in-flight GET responses will “preserve” the updated value rather than being overwritten, but
getAMTFeatures()always overwrites the cache with the GET response. This comment should be updated to match the actual behavior (optimistic UI update only).
// Update cache immediately so any in-flight GET responses will read the
// updated value and preserve it (rather than being overwritten).
|
After multiple rounds of feedback and updates, this PR is now in good shape. Since it has already grown quite large, any additional issues or improvements we identify can be addressed in follow-up PRs. |
|
🎉 This PR is included in version 3.63.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |


Summary
This PR adds the Remote Platform Erase (RPE) experience to the device detail view, including UI integration, API wiring, localization, and test coverage.
It also standardizes RPE naming across app and test code (
remoteErase→rpe/rpeSupported) to match current API fields.What changed
1) Remote Platform Erase UI (device details)
Added a new
RemotePlatformEraseComponentunder:src/app/devices/remote-platform-erase/Key behavior:
2) Device detail navigation integration
Updated
DeviceDetailComponentto include a new sidebar/category entry:computer_cancelicon)3) Service/API updates
Updated
DevicesServicewith a remote erase action method:sendRemotePlatformErase(deviceId, capabilities)POST /api/v1/amt/boot/remoteErase/:deviceIdAlso aligned AMT feature field naming in requests/responses with current backend expectations.
4) Model and naming consistency
Updated model/types and related usage to consistently use:
rperpeSupportedplatformEraseEnabled(AMT feature field)This replaces older/inconsistent naming patterns and keeps app/tests aligned.
5) Internationalization
Added translation keys for all new RPE strings across all supported locales.
6) Test coverage
Unit tests
Expanded
DevicesServicetests to validate:Cypress E2E tests
Added/expanded E2E coverage for:
Reviewer notes
POST /api/v1/amt/boot/remoteErase/:deviceIddevice-management-toolkit/mps#2407device-management-toolkit/console#846PR checklist