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

dut_pwr: display notifcations on power failure #34

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

hnez
Copy link
Member

@hnez hnez commented Aug 31, 2023

Add notification on the LCD …

lcd

… and web interface if the LXA TAC's DUT Power supply shut off due to e.g. an overcurrent or overvoltage event.

web

case OutputState.RealtimeViolation:
reason = "a realtime violation";
break;
}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: maybe we should add a default handler in case none of the cases match. Otherwise looks good to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

I initially agreed but I've had a second look and think we shouldn't. In the default case we would want reason to be null to make sure the Alert is set to be not visible:

return (
<Alert
statusIconAriaLabel="Info"
visible={reason !== null}
action={
<SpaceBetween size="xs">
<MqttButton iconName="refresh" topic="/v1/dut/powered" send={"On"}>
Turn DUT back on

This is however already the case when none of the cases match, as reason is initialized that way.

@hnez
Copy link
Member Author

hnez commented Sep 26, 2023

I've resolved merge conflicts in src/ui/screens.rs and web/src/TacComponents.tsx caused by other alert screens added to the main branch in the meantime.
Please re-approve and merge if you like.

@hnez
Copy link
Member Author

hnez commented Oct 6, 2023

Hi @KarlK90 can I get a new approval? The previous one was invalidated by required changes in a rebase.

@KarlK90
Copy link
Member

KarlK90 commented Oct 6, 2023

@hnez done

The DUT powering off due to one of the possible errors may come as a surprise
to the user. Help them troubleshoot by displaying a prominent error message.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
The DUT powering off due to one of the possible errors may come as a surprise
to the user. Help them troubleshoot by displaying a prominent error message.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
@hnez hnez merged commit faeb54d into linux-automation:main Oct 6, 2023
12 of 13 checks passed
@hnez hnez deleted the dut-pwr-alerts branch October 6, 2023 13:24
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