Skip to content

Commit 088512e

Browse files
OmniLab Teamcopybara-github
authored andcommitted
Internal change
PiperOrigin-RevId: 914779319
1 parent 25fc446 commit 088512e

27 files changed

Lines changed: 247 additions & 100 deletions

File tree

src/devtools/mobileharness/fe/v6/angular/app/core/models/host_overview.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,18 @@ export interface DeviceTarget {
212212
subDeviceId?: string;
213213
}
214214

215+
/**
216+
* Semantic state of the lab type.
217+
* Frontend uses this to determine display name and logic.
218+
*/
219+
export type UiLabType =
220+
| 'CORE'
221+
| 'FUSION'
222+
| 'SATELLITE'
223+
| 'SLAAS'
224+
| 'ATE'
225+
| 'RIEMANN_FIELD';
226+
215227
/**
216228
* Represents the comprehensive data required to render the Host Detail Page's
217229
* overview section. This is the top-level interface for host overview data.
@@ -225,8 +237,9 @@ export declare interface HostOverview {
225237
/**
226238
* The user-friendly lab type name, derived by the backend,
227239
* e.g., "Core Lab", "Satellite Lab (SLaaS)".
240+
* @deprecated Use uiLabTypes instead.
228241
*/
229-
readonly labTypeDisplayNames: string[];
242+
readonly labTypeDisplayNames?: string[];
230243
/** Lab server information. */
231244
readonly labServer: LabServerInfo;
232245
/** Daemon server information. */
@@ -241,6 +254,10 @@ export declare interface HostOverview {
241254
readonly canUpgrade?: boolean;
242255
/** Whether to show the pass-through flags in the host overview. */
243256
readonly showPassThroughFlags: boolean;
257+
/**
258+
* The semantic types of the lab.
259+
*/
260+
readonly uiLabTypes?: UiLabType[];
244261
}
245262

246263
/**

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/multi_remote_control.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ function createHostOverview(
2222
ip: '192.168.1.1',
2323
os: 'gLinux',
2424
canUpgrade: false,
25-
labTypeDisplayNames: ['Satellite Lab'],
25+
26+
uiLabTypes: ['SATELLITE'],
2627
showPassThroughFlags: true,
2728
labServer: {
2829
connectivity: {

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_01.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,8 @@ const overview: HostOverview = {
4444
ip: '192.168.1.101',
4545
os: 'gLinux',
4646
canUpgrade: false,
47-
labTypeDisplayNames: [
48-
'Satellite Lab',
49-
'SLaaS',
50-
'Core Lab',
51-
'Mobly',
52-
'Android',
53-
],
47+
48+
uiLabTypes: ['SATELLITE', 'SLAAS', 'CORE'],
5449
labServer: {
5550
connectivity: {
5651
state: 'RUNNING',

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_02.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const overview: HostOverview = {
1313
ip: '192.168.2.102',
1414
os: 'gLinux',
1515
canUpgrade: true,
16-
labTypeDisplayNames: ['Satellite Lab'],
16+
17+
uiLabTypes: ['SATELLITE'],
1718
labServer: {
1819
connectivity: {
1920
state: 'RUNNING',

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_03.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const overview: HostOverview = {
1313
ip: '10.0.1.50',
1414
os: 'gLinux',
1515
canUpgrade: false,
16-
labTypeDisplayNames: ['Core Lab'],
16+
17+
uiLabTypes: ['CORE'],
1718
labServer: {
1819
connectivity: {
1920
state: 'RUNNING',

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_04.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const overview: HostOverview = {
1313
ip: '192.168.3.103',
1414
os: 'gLinux',
1515
canUpgrade: false,
16-
labTypeDisplayNames: ['Satellite Lab'],
16+
17+
uiLabTypes: ['SATELLITE'],
1718
labServer: {
1819
connectivity: {
1920
state: 'MISSING',

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_05.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const overview: HostOverview = {
1313
ip: '192.168.4.104',
1414
os: 'gLinux',
1515
canUpgrade: false,
16-
labTypeDisplayNames: ['Satellite Lab'],
16+
uiLabTypes: ['SATELLITE'],
1717
labServer: {
1818
connectivity: {
1919
state: 'RUNNING',

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_06.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const overview: HostOverview = {
1313
ip: '192.168.5.105',
1414
os: 'gLinux',
1515
canUpgrade: false,
16-
labTypeDisplayNames: ['Satellite Lab', 'M&M', 'Shared Lab'],
16+
uiLabTypes: ['SATELLITE'],
1717
labServer: {
1818
connectivity: {
1919
state: 'RUNNING',

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_07.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const overview: HostOverview = {
1313
ip: '192.168.6.106',
1414
os: 'gLinux',
1515
canUpgrade: false,
16-
labTypeDisplayNames: ['Satellite Lab'],
16+
17+
uiLabTypes: ['SATELLITE'],
1718
labServer: {
1819
connectivity: {
1920
state: 'MISSING',

src/devtools/mobileharness/fe/v6/angular/app/core/services/mock_data/hosts/overview_08.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const overview: HostOverview = {
1313
ip: '192.168.7.107',
1414
os: 'gLinux',
1515
canUpgrade: false,
16-
labTypeDisplayNames: ['Satellite Lab'],
16+
17+
uiLabTypes: ['SATELLITE'],
1718
labServer: {
1819
connectivity: {
1920
state: 'RUNNING',

0 commit comments

Comments
 (0)