openems icon indicating copy to clipboard operation
openems copied to clipboard

Fix: evcs cluster widget missing alias

Open Jasonlee6789 opened this issue 1 year ago • 6 comments

Before image

After image

Jasonlee6789 avatar Sep 17 '24 22:09 Jasonlee6789

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.

codecov[bot] avatar Sep 17 '24 22:09 codecov[bot]

@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?

lukasrgr avatar Oct 27 '24 23:10 lukasrgr

@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.

Jasonlee6789 avatar Oct 27 '24 23:10 Jasonlee6789

After the latest commit , the default name shows like below image

Jasonlee6789 avatar Oct 27 '24 23:10 Jasonlee6789

This PR has been automatically marked as stale due to inactivity. It will be closed in 7 days if no further activity occurs.

github-actions[bot] avatar Sep 18 '25 07:09 github-actions[bot]

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.

Jasonlee6789 avatar Sep 30 '25 23:09 Jasonlee6789