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

Reintroduce missing custom metrics and metadata to device page. #1578

Merged

Conversation

elinol
Copy link
Contributor

@elinol elinol commented Oct 3, 2024

Also stop saving firmware metadata on device health.

@elinol
Copy link
Contributor Author

elinol commented Oct 3, 2024

image

@joshk
Copy link
Collaborator

joshk commented Oct 3, 2024

Thanks for including the screenshot.

I would recommend not showing custom metrics in the health section on the Device show page as it will mess with formatting.

Can we keep custom metrics on the Device Metrics page only?

@lawik
Copy link
Contributor

lawik commented Oct 3, 2024

As clarified on Slack, this restores functionality that was broken with metrics-changes. It needs to be nicer in the next iteration of the UI. But it does matter.

Copy link
Collaborator

@joshk joshk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve this under duress 😆

@lawik
Copy link
Contributor

lawik commented Oct 3, 2024

I would prefer if we remove the "stop saving firmware metadata" bit from this part for now. That's mixing two different topics. That merge is intentional and at some point I can explain more of my thinking there. It may turn out to be unnecessary but I think it will be helpful to have.

Copy link
Contributor

@lawik lawik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small thing about that merge bit.

Thanks for fixing the thing :)

# Separate metrics from health report to store in metrics table
metrics = device_status["metrics"]

health_report =
device_status
|> Map.delete("metrics")
|> Map.put("metadata", Map.merge(device_status["metadata"], device_meta))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather this not be in this PR :)

@elinol elinol force-pushed the reintroduce-custom-metrics-and-metadata branch from d291fac to 9e9f320 Compare October 3, 2024 08:55
@lawik lawik merged commit 711e985 into nerves-hub:main Oct 3, 2024
2 checks passed
@lawik
Copy link
Contributor

lawik commented Oct 3, 2024

Thank you very much ✨

@elinol elinol deleted the reintroduce-custom-metrics-and-metadata branch November 19, 2024 07:29
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.

3 participants