Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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',
Expand All @@ -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,
};
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
type="host"
width="64rem"
height="80vh"
maxHeight="90vh"
maxHeight="80vh"
footerType="normal">
<div header-prefix class="header-icon-wrapper">
<mat-icon>tune</mat-icon>
Expand Down Expand Up @@ -112,7 +112,8 @@
</div>

<!-- Right Column: Presets -->
<div class="flags-dialog-presets-col">
<!-- TODO: qiupingf - remove hidden when the RPC is ready. -->
<div class="flags-dialog-presets-col hidden">
<div class="presets-header">
<div class="header-title">
<mat-icon>auto_awesome</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@
}
}
}

&.hidden {
display: none;
}
}
}

Expand Down
Loading
Loading