Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displays OTA ID #176

Merged
merged 1 commit into from
Jan 7, 2024
Merged
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
4 changes: 3 additions & 1 deletion src/app/core/services/device-manager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ export class DeviceManagerService extends BackendClient {

async getDeviceInfo(device: DeviceLike): Promise<Partial<DeviceInfo>> {
const systemInfo = await this.luna.call<SystemInfo>(device, 'luna://com.webos.service.tv.systemproperty/getSystemInfo', {
keys: ['firmwareVersion', 'modelName', 'sdkVersion']
keys: ['firmwareVersion', 'modelName', 'sdkVersion', 'otaId']
});
const osInfo = await this.luna.call<Partial<OsInfo>>(device, 'luna://com.webos.service.systemservice/osInfo/query', {
parameters: ['webos_manufacturing_version', 'webos_release']
}).catch(() => null);
return {
modelName: systemInfo.modelName,
osVersion: osInfo?.webos_release || systemInfo.sdkVersion,
otaId: systemInfo.otaId,
firmwareVersion: systemInfo.firmwareVersion
};
}
Expand Down Expand Up @@ -227,5 +228,6 @@ export class CrashReport implements CrashReportEntry {
export interface DeviceInfo {
modelName: string;
osVersion?: string;
otaId?: string;
firmwareVersion: string;
}
13 changes: 9 additions & 4 deletions src/app/info/info.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
<div class="card-body">
<h5 class="card-title">Device - {{deviceInfo.modelName}}</h5>
<p class="card-text">
<strong>Firmware version: </strong><span>{{deviceInfo.firmwareVersion}}</span>
<strong>Firmware version: </strong>
<span class="user-select-text">{{deviceInfo.firmwareVersion}}</span>
<ng-container *ngIf="deviceInfo.osVersion as osVersion">
<br>
<strong>webOS version: </strong><span>{{osVersion}}</span>
<strong>webOS version: </strong><span class="user-select-text">{{osVersion}}</span>
</ng-container>
<ng-container *ngIf="deviceInfo.otaId as otaId">
<br>
<strong>OTA ID: </strong><span class="user-select-text">{{otaId}}</span>
</ng-container>
</p>
<div class="btn-group">
<button class="btn btn-primary" (click)="takeScreenshot()" *ngIf="device.username === 'root'">Take Screenshot
<div class="btn-group" *ngIf="device.username === 'root'">
<button class="btn btn-primary" (click)="takeScreenshot()">Take Screenshot
</button>
<div class="btn-group" ngbDropdown container="body" display="dynamic" role="group"
aria-label="More options">
Expand Down
1 change: 1 addition & 0 deletions src/app/types/luna-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export declare interface SystemInfo extends LunaResponse {
firmwareVersion: string;
modelName: string;
sdkVersion: string;
otaId: string;
}

export declare interface OsInfo extends LunaResponse {
Expand Down
Loading