Fix: evcs cluster widget missing alias
Before
After
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
Additional details and impacted files
@@ Coverage Diff @@
## develop #2807 +/- ##
=============================================
- Coverage 59.87% 59.86% -0.00%
Complexity 112 112
=============================================
Files 2787 2787
Lines 121037 121037
Branches 9061 9061
=============================================
- Hits 72455 72451 -4
- Misses 45868 45870 +2
- Partials 2714 2716 +2
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@Jasonlee6789 default is a empty string right now, https://github.com/OpenEMS/openems/blob/7ef6c74fb0f90b8d24f0fcef1d076e04fc53070e/io.openems.edge.evcs.cluster/src/io/openems/edge/evcs/cluster/Config.java#L16 so it is possible that the title is not set, it would be better if we touch the edge config instead, then we can also get rid of the https://github.com/OpenEMS/openems/blob/7ef6c74fb0f90b8d24f0fcef1d076e04fc53070e/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/Evcs_Api_Cluster.ts#L63
FYI @sebastianasen wasnt there a general change in aliases not being empty but taking the id as default?
@Jasonlee6789 default is a empty string right now,
https://github.com/OpenEMS/openems/blob/7ef6c74fb0f90b8d24f0fcef1d076e04fc53070e/io.openems.edge.evcs.cluster/src/io/openems/edge/evcs/cluster/Config.java#L16
so it is possible that the title is not set, it would be better if we touch the edge config instead, then we can also get rid of the https://github.com/OpenEMS/openems/blob/7ef6c74fb0f90b8d24f0fcef1d076e04fc53070e/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/Evcs_Api_Cluster.ts#L63
FYI @sebastianasen wasnt there a general change in aliases not being empty but taking the id as default?
If this previous international alias doesn't display, I find the bug is that we should use || replace ??, I have tried ||, it works, I will make a new commit.
After the latest commit , the default name shows like below
This PR has been automatically marked as stale due to inactivity. It will be closed in 7 days if no further activity occurs.
Replaced ?? with || to handle empty string aliases, check more strictly. This ensures a fallback value is used when alias is missing or empty, like handling empty strings, which improves consistency and prevents alias display issues.