diff --git a/src/devtools/mobileharness/fe/v6/angular/app/core/models/host_action.ts b/src/devtools/mobileharness/fe/v6/angular/app/core/models/host_action.ts index ec306c2f28..f873a9af08 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/core/models/host_action.ts +++ b/src/devtools/mobileharness/fe/v6/angular/app/core/models/host_action.ts @@ -84,7 +84,12 @@ export declare interface ReleaseReady { /** * Represents the status of a Lab Server release. */ -export type ReleaseStatus = 'Latest' | 'Current' | 'Deprecated' | ''; +export type ReleaseStatus = + | 'LATEST' + | 'CURRENT' + | 'LATEST_AND_CURRENT' + | 'VERSION_STATUS_UNSPECIFIED' + | ''; /** * Configuration for a specific Lab Server release. @@ -174,7 +179,19 @@ export declare interface DecommissionHostResponse {} /** * Response for UpdatePassThroughFlags API. */ -export declare interface UpdatePassThroughFlagsResponse {} +export declare interface UpdatePassThroughFlagsResponse { + readonly success: boolean; + readonly error?: { + readonly code: + | 'CODE_UNSPECIFIED' + | 'PERMISSION_DENIED' + | 'INVALID_FLAGS' + | 'HOST_NOT_FOUND' + | 'WARPGATE_ERROR' + | 'UNKNOWN'; + readonly message?: string; + }; +} /** * Response for those rollout action diff --git a/src/devtools/mobileharness/fe/v6/angular/app/core/services/host/fake_host_service.ts b/src/devtools/mobileharness/fe/v6/angular/app/core/services/host/fake_host_service.ts index 2ba0d5dfb0..391ee50263 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/core/services/host/fake_host_service.ts +++ b/src/devtools/mobileharness/fe/v6/angular/app/core/services/host/fake_host_service.ts @@ -165,7 +165,7 @@ export class FakeHostService extends HostService { const scenario = MOCK_HOST_SCENARIOS.find((s) => s.hostName === hostName); if (scenario && scenario.overview) { scenario.overview.labServer.passThroughFlags = flags; - return of({}); + return of({success: true}); } else { return throwError( () => diff --git a/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/03_shared_mode.ts b/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/03_shared_mode.ts index 49f7a935a1..f78c7c6951 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/03_shared_mode.ts +++ b/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/03_shared_mode.ts @@ -1,6 +1,7 @@ /** @fileoverview Mock host scenario in SHARED device config mode. */ import {DeviceConfig} from '../../../models/device_config_models'; +import {PreflightLabServerReleaseResponse} from '../../../models/host_action'; import {HostConfig} from '../../../models/host_config_models'; import {MockHostScenario} from '../models'; import { @@ -33,6 +34,25 @@ const HOST_CONFIG: HostConfig = { }, }; +const PREFLIGHT_RESPONSE: PreflightLabServerReleaseResponse = { + ready: { + versions: [ + { + name: '[RELEASE] 4.358.0 mobileharness_lab_server', + version: '4.358.0', + status: 'LATEST_AND_CURRENT', + buildTime: new Date(Date.now() - 3600000 * 24).toISOString(), + }, + { + name: '[RELEASE] 4.357.0 mobileharness_lab_server', + version: '4.357.0', + status: '', + buildTime: new Date(Date.now() - 3600000 * 48).toISOString(), + }, + ], + }, +}; + export const SCENARIO_HOST_SHARED_MODE: MockHostScenario = { hostName: 'host-shared-mode.example.com', scenarioName: '3. Shared Mode', @@ -44,4 +64,5 @@ export const SCENARIO_HOST_SHARED_MODE: MockHostScenario = { }, defaultDeviceConfig: null, // No default in SHARED mode actions: createHostActions('RUNNING', true), + releaseResponse: PREFLIGHT_RESPONSE, }; diff --git a/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/ui_status_utils.ts b/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/ui_status_utils.ts index d595a27d0a..180e53d987 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/ui_status_utils.ts +++ b/src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/ui_status_utils.ts @@ -90,7 +90,7 @@ export function createDefaultReleaseResponse(): PreflightLabServerReleaseRespons { name: 'mobileharness_lab_server', version: 'v4.349.0', - status: 'Latest', + status: 'LATEST', buildTime: '2024-03-15 21:30:00', ports: [{protocol: 'grpc', portNumber: 9994}], releaseDetails: { @@ -270,7 +270,7 @@ export function createDefaultReleaseResponse(): PreflightLabServerReleaseRespons { name: 'release_configs', version: 'v4.357.0', - status: 'Current', + status: 'CURRENT', buildTime: '2025-03-13 12:00:00', ports: [ { diff --git a/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_overview/flags_dialog/flags_dialog.ng.html b/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_overview/flags_dialog/flags_dialog.ng.html index cdd0aaa2b6..e827a20761 100644 --- a/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_overview/flags_dialog/flags_dialog.ng.html +++ b/src/devtools/mobileharness/fe/v6/angular/app/features/host_detail/components/host_overview/flags_dialog/flags_dialog.ng.html @@ -4,7 +4,7 @@ type="host" width="64rem" height="80vh" - maxHeight="90vh" + maxHeight="80vh" footerType="normal">
-