Skip to content

Commit 0681000

Browse files
feat(devices): add tabs, product type column, and discovered field
- Add All/Activated/Discovered tab group to devices list - Add Product Type column derived from fwSku bitmask (ISM/vPro) - Add discovered field to DeviceInfo model - Show paginator on all tabs using server total count - Add i18n keys for tab labels and Product Type header in all 12 locales - Add unit tests for getProductType and tab filter logic - Fix cdk-overlay-backdrop leak in device.spec.ts cypress test Resolves: #3417
1 parent 2b763be commit 0681000

23 files changed

Lines changed: 407 additions & 206 deletions

CHANGELOG.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
## [3.60.1](https://github.com/device-management-toolkit/sample-web-ui/compare/v3.60.0...v3.60.1) (2026-07-20)
2-
3-
4-
### Bug Fixes
5-
6-
* fix refresh power button issue ([#3441](https://github.com/device-management-toolkit/sample-web-ui/issues/3441)) ([98210d2](https://github.com/device-management-toolkit/sample-web-ui/commit/98210d29feeb823ef62df84b4b2300a37d49d9a9))
7-
81
# [3.60.0](https://github.com/device-management-toolkit/sample-web-ui/compare/v3.59.0...v3.60.0) (2026-07-16)
92

103

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN npm run build -- --configuration=${BUILD_CONFIGURATION} \
2020
fi
2121

2222
### STAGE 2: Run ###
23-
FROM nginx:mainline-alpine-slim@sha256:45b82ed5f285b90d63df07ba70430fdd8f25624b416617d9e6dc93412b2006dc
23+
FROM nginx:mainline-alpine-slim@sha256:8763397d71453fccb4a2613ccfd89aa62e1d731d618b1eaa8e14631539a3a65b
2424

2525
LABEL license='SPDX-License-Identifier: Apache-2.0' \
2626
copyright='Copyright (c) 2021: Intel'

package-lock.json

Lines changed: 2 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@device-management-toolkit/sample-web-ui",
3-
"version": "3.60.1",
3+
"version": "3.60.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

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

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,19 @@
5151
</button>
5252
<mat-divider style="height: 40px" vertical="true"></mat-divider>
5353
@if (!isLoading()()) {
54-
<button
55-
mat-icon-button
56-
type="button"
57-
[matTooltip]="powerState() | translate"
58-
[attr.aria-label]="'deviceToolbar.power.refreshAriaLabel.value' | translate"
54+
<mat-icon
55+
(click)="getPowerState()"
56+
style="padding: 0 18px 0 12px; cursor: pointer"
5957
[style.color]="
6058
powerState() === 'deviceToolbar.power.on.value'
6159
? 'green'
6260
: powerState() === 'deviceToolbar.power.sleep.value'
6361
? 'yellow'
64-
: powerState() === 'deviceToolbar.power.off.value'
65-
? 'red'
66-
: 'gray'
62+
: 'red'
6763
"
68-
(click)="refreshPowerState()">
69-
<mat-icon>mode_standby</mat-icon>
70-
</button>
64+
[matTooltip]="powerState() | translate"
65+
>mode_standby</mat-icon
66+
>
7167
}
7268
<mat-divider style="height: 40px" vertical="true"></mat-divider>
7369
<button mat-icon-button [matTooltip]="'devices.actions.powerUp.value' | translate" (click)="sendPowerAction(2)">

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -138,30 +138,6 @@ describe('DeviceToolbarComponent', () => {
138138
expect(component.isLoading()()).toBeFalse()
139139
})
140140

141-
it('should fetch power state using cached API on initial load', () => {
142-
expect(devicesService.getPowerStateCached).toHaveBeenCalledWith('guid')
143-
expect(devicesService.getPowerState).not.toHaveBeenCalled()
144-
})
145-
146-
it('should fetch power state using non-cached API on refresh', () => {
147-
devicesService.getPowerState.calls.reset()
148-
devicesService.getPowerStateCached.calls.reset()
149-
150-
component.refreshPowerState()
151-
152-
expect(devicesService.getPowerState).toHaveBeenCalledWith('guid')
153-
expect(devicesService.getPowerStateCached).not.toHaveBeenCalled()
154-
})
155-
156-
it('should show snackbar and reset loading state when refresh power state fails', () => {
157-
devicesService.getPowerState.and.returnValue(throwError(() => new Error('Network error')))
158-
159-
component.refreshPowerState()
160-
161-
expect(snackBar.open).toHaveBeenCalled()
162-
expect(component.isLoading()()).toBeFalse()
163-
})
164-
165141
it('should navigate to device', async () => {
166142
fixture.componentRef.setInput('deviceId', '12345-pokli-456772')
167143
const routerSpy = spyOn(component.router, 'navigate')

0 commit comments

Comments
 (0)