-
Notifications
You must be signed in to change notification settings - Fork 69
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
Show current alarms on device page #1648
Conversation
Display any current alarms for device. Click on alarm to show description if provided.
for {alarm, description} <- alarms, | ||
do: {String.trim_leading(alarm, "Elixir."), description} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for {alarm, description} <- alarms, | |
do: {String.trim_leading(alarm, "Elixir."), description} | |
for {alarm, description} <- alarms, into: %{}, | |
do: {String.trim_leading(alarm, "Elixir."), description} |
I don't know if it matters. I originally thought these were a list, but looks like they are a map. If that's a case, then this would ensure it's placed back into a map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the alarms comes in a map. For current use cases it's fine to pass them on as lists here.
Display any current alarms for device.
Click on alarm to show description if provided.