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

Update reporting #6

Closed

Conversation

nathandarnell
Copy link
Contributor

Here is what was changed:

I switched getDeviceName() to attempt deviceAttributes.getDeviceHostname and if it fails to use deviceAttributes.getDeviceAssetId and then fail to using a generic name.
.getDeviceHostname is supposed to come in Chrome 83 so theoretically this should work soon. .getDeviceAssetId returns the correct value now.

I changed getDeviceSerial() to use .deviceAttributes.getDeviceSerialNumber since DeviceId is not very helpful.

For CPU, the .trim() already removes the trailing space so the .endsWith method wasn't finding the CPU.

Memory was reported as 4.03 GB when it was 3.75 GB so I adjusted the calculation and added the _kb value as well.

Counting callbackTotal gave me 11.

There are two waitForSettings() so I commented out the first one.

After a day of trying I could not get hardwarePlatform.getHardwarePlatformInfo to return the make and model of the device. Maybe it doesn't work on Chrome devices? I added placeholders for machine_model and machine_model_friendly in the meantime.

Fixed reporting of serial, CPU, mem, and hostname.  Updated callbackTotal.  Removed second waitForSettings function.  Added placeholders for model names.
@grahamgilbert
Copy link
Member

Sorry, I'm awful at keeping an eye on this. I see the serial number fixes are already merged - would you be open to opening a separate PR with your other fixes?

@nathandarnell
Copy link
Contributor Author

nathandarnell commented Dec 2, 2021

I'll rewrite and open another PR. It might take me a few days...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants