From eddc00d48351d860d4fcec6ae97702708dc0231d Mon Sep 17 00:00:00 2001 From: DeviceInfra Date: Tue, 13 Jan 2026 03:20:41 -0800 Subject: [PATCH] Internal change PiperOrigin-RevId: 855629557 --- .../services/mock_data/hosts/overview_13.ts | 108 +++++ .../app/core/services/mock_data/index.ts | 2 + .../device_empty/device_empty.ng.html | 6 +- .../device_empty/device_empty.scss | 9 + .../device_settings/device_settings.ng.html | 4 +- .../device_settings/device_settings.scss | 13 + .../device_wizard/device_wizard.ng.html | 4 +- .../device_wizard/device_wizard.scss | 9 + .../host_managed/host_managed.ng.html | 4 +- .../host_managed/host_managed.scss | 14 +- .../device_overview_tab.scss | 4 - .../host_config/host_empty/host_empty.ng.html | 4 +- .../host_config/host_empty/host_empty.scss | 11 +- .../host_wizard/host_wizard.ng.html | 4 +- .../host_config/host_wizard/host_wizard.scss | 9 + .../host_overview/host_overview.ng.html | 31 +- .../components/host_overview/host_overview.ts | 98 ++++- .../entry_chip/entry_chip.ng.html | 2 +- .../config_common/entry_chip/entry_chip.scss | 4 + .../wizard_stepper/wizard_stepper.ng.html | 10 +- .../wizard_stepper/wizard_stepper.scss | 13 + .../confirm_dialog/confirm_dialog.ng.html | 36 +- .../confirm_dialog/confirm_dialog.scss | 409 +++++++++++++++++- .../confirm_dialog/confirm_dialog.ts | 60 ++- .../v6/angular/app/shared/styles/common.scss | 91 ++++ .../app/shared/styles/configuration.scss | 52 --- .../angular/app/shared/styles/overview.scss | 35 +- 27 files changed, 884 insertions(+), 162 deletions(-) create mode 100644 src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_13.ts create mode 100644 src/devtools/mobileharness/fe/v6/angular/app/shared/styles/common.scss diff --git a/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_13.ts b/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_13.ts new file mode 100644 index 0000000000..146d6075f9 --- /dev/null +++ b/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_13.ts @@ -0,0 +1,108 @@ +import {DeviceSummary, HostOverview} from '../../../models/host_overview'; +import {MockHostScenario} from '../models'; + +import {createDefaultUiStatus} from './ui_status_utils'; + +const overview: HostOverview = { + hostName: 'decommission-test-host.prod.example.com', + ip: '192.168.13.113', + os: 'gLinux', + labTypeDisplayNames: ['Satellite Lab'], + labServer: { + connectivity: { + state: 'RUNNING', + title: 'Running', + tooltip: + 'Host is running and connected. OmniLab is receiving heartbeats.', + }, + activity: { + state: 'STARTED', + title: 'Started', + tooltip: + 'The Lab Server process was started by the release system, and OmniLab is receiving heartbeats.', + }, + version: 'R126.0.0', + passThroughFlags: '', + }, + daemonServer: { + status: { + state: 'RUNNING', + title: 'Running', + tooltip: 'The Daemon Server is running.', + }, + version: '24.09.01', + }, + properties: {}, +}; + +const deviceSummaries: DeviceSummary[] = [ + { + id: 'MISSING-DEV-1', + healthState: { + health: 'OUT_OF_SERVICE_NEEDS_FIXING', + title: 'Out of Service (Needs Fixing)', + tooltip: 'Device is missing.', + }, + types: [{type: 'AndroidRealDevice', isAbnormal: false}], + deviceStatus: {isCritical: true, status: 'MISSING'}, + label: 'old-device-1', + requiredDims: 'pool:missing', + model: 'Pixel 6', + version: '13', + }, + { + id: 'MISSING-DEV-2', + healthState: { + health: 'OUT_OF_SERVICE_NEEDS_FIXING', + title: 'Out of Service (Needs Fixing)', + tooltip: 'Device is missing.', + }, + types: [{type: 'AndroidRealDevice', isAbnormal: false}], + deviceStatus: {isCritical: true, status: 'MISSING'}, + label: 'old-device-2', + requiredDims: 'pool:missing', + model: 'Pixel 6 Pro', + version: '13', + }, + { + id: 'MISSING-DEV-3', + healthState: { + health: 'OUT_OF_SERVICE_NEEDS_FIXING', + title: 'Out of Service (Needs Fixing)', + tooltip: 'Device is missing.', + }, + types: [{type: 'AndroidRealDevice', isAbnormal: false}], + deviceStatus: {isCritical: true, status: 'MISSING'}, + label: 'old-device-3', + requiredDims: 'pool:missing', + model: 'Pixel 7', + version: '14', + }, + { + id: 'ACTIVE-DEV-4', + healthState: { + health: 'IN_SERVICE_IDLE', + title: 'In Service (Idle)', + tooltip: 'Device is healthy and ready for tasks.', + }, + types: [{type: 'AndroidRealDevice', isAbnormal: false}], + deviceStatus: {isCritical: false, status: 'IDLE'}, + label: 'active-device', + requiredDims: 'pool:active', + model: 'Pixel 8', + version: '14', + }, +]; + +/** Mock host overview data. */ +export const OVERVIEW_13: MockHostScenario = { + hostName: 'decommission-test-host.prod.example.com', + scenarioName: 'Overview 13: Decommission Devices', + overview, + deviceSummaries, + hostConfigResult: { + hostConfig: undefined, + uiStatus: createDefaultUiStatus(), + }, + defaultDeviceConfig: null, +}; diff --git a/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/index.ts b/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/index.ts index 360fb997e5..94c6131577 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/index.ts +++ b/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/index.ts @@ -49,6 +49,7 @@ import {OVERVIEW_09} from './hosts/overview_09'; import {OVERVIEW_10} from './hosts/overview_10'; import {OVERVIEW_11} from './hosts/overview_11'; import {OVERVIEW_12} from './hosts/overview_12'; +import {OVERVIEW_13} from './hosts/overview_13'; import {MockDeviceScenario, MockHostScenario} from './models'; /** @@ -107,4 +108,5 @@ export const MOCK_HOST_SCENARIOS: MockHostScenario[] = [ OVERVIEW_10, OVERVIEW_11, OVERVIEW_12, + OVERVIEW_13, ]; diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_empty/device_empty.ng.html b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_empty/device_empty.ng.html index 90c7ea63da..16deaba29c 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_empty/device_empty.ng.html +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_empty/device_empty.ng.html @@ -14,7 +14,7 @@

Host Configuration Not Found

@@ -58,7 +58,7 @@

{{ title }}

diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_empty/device_empty.scss b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_empty/device_empty.scss index 0866405625..bce1c34ece 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_empty/device_empty.scss +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_empty/device_empty.scss @@ -1,4 +1,13 @@ @use '../../../../../shared/styles/configuration' as config; +@use '../../../../../shared/styles/common'; + +.primary-button { + @include common.shared-button('primary'); +} + +.cancel-button { + @include common.shared-button('secondary'); +} .empty-config-grid { @media (min-width: 640px) { diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_settings/device_settings.ng.html b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_settings/device_settings.ng.html index 6d33134ee5..dcadd029b8 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_settings/device_settings.ng.html +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/device_settings/device_settings.ng.html @@ -59,14 +59,14 @@ + -
Go to Host Configuration + Go to Host Configuration diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/host_managed/host_managed.scss b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/host_managed/host_managed.scss index f161080d26..43db5d6090 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/host_managed/host_managed.scss +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_config/host_managed/host_managed.scss @@ -1,4 +1,5 @@ @use '../../../../../shared/styles/configuration' as config; +@use '../../../../../shared/styles/common'; .host-managed-content { font-size: 0.875rem; @@ -63,9 +64,14 @@ display: flex; gap: 0.75rem; align-items: center; +} - a { - text-decoration: none; - font-family: config.$labconsole-font; - } +.close-button { + @include common.shared-button('secondary'); +} + +.go-to-host-button { + @include common.shared-button('primary'); + text-decoration: none; + font-family: config.$labconsole-font; } diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_overview_tab/device_overview_tab.scss b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_overview_tab/device_overview_tab.scss index ddcfb37ed8..59e8acfdd4 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_overview_tab/device_overview_tab.scss +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/device_detail/components/device_overview_tab/device_overview_tab.scss @@ -561,10 +561,6 @@ font-size: 0.9rem; } - - - - .mt-6 { margin-top: 1.5rem; } diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_empty/host_empty.ng.html b/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_empty/host_empty.ng.html index fbc476faa6..fdd49102db 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_empty/host_empty.ng.html +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_empty/host_empty.ng.html @@ -33,7 +33,7 @@

{{ title }}

/> diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_empty/host_empty.scss b/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_empty/host_empty.scss index cee782924c..1931a0bdc8 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_empty/host_empty.scss +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_empty/host_empty.scss @@ -1,7 +1,16 @@ @use '../../../../../shared/styles/configuration' as config; +@use '../../../../../shared/styles/common'; + +.load-button { + @include common.shared-button('primary'); +} + +.cancel-button { + @include common.shared-button('tertiary'); +} .empty-config-grid { - @media (min-width: 640px) { + @media (min-width: 640px) { grid-template-columns: repeat(2, minmax(0, 1fr)); } } diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_wizard/host_wizard.ng.html b/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_wizard/host_wizard.ng.html index 9dbc658164..3772dd8136 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_wizard/host_wizard.ng.html +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_config/host_wizard/host_wizard.ng.html @@ -82,9 +82,9 @@

Device Wi-Fi

> - +