[
https://issues.apache.org/jira/browse/HDDS-14423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18054762#comment-18054762
]
Abhishek Pal commented on HDDS-14423:
-------------------------------------
I think this is expected behaviour.
If there are negative values coming up for space then that means something went
wrong in the backend. The backend should validate and ensure that negative
values are not passed in the response.
If we show N/A instead, errors like this might be missed from the UI as the
user will never know what went wrong since we are showing N/A instead of the
negative value. The negative value will prompt the user to check for errors and
the reason on why it is coming up as negative.
[~deveshsingh] what do you think?
> [Recon UI] Fix "N/A" fallback logic to handle negative values correctly
> -----------------------------------------------------------------------
>
> Key: HDDS-14423
> URL: https://issues.apache.org/jira/browse/HDDS-14423
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Recon
> Affects Versions: 2.1.0
> Reporter: Arafat Khan
> Assignee: Abhishek Pal
> Priority: Major
> Fix For: 2.2.0
>
>
> The UI currently displays negative values (e.g., {{{}-1{}}}) directly (e.g.,
> as {{{}-1 B{}}}) instead of falling back to "N/A". This happens because the
> check {{if (!value)}} evaluates negative numbers as truthy in JavaScript,
> bypassing the fallback logic.
> *Expected Behavior:* Negative values (like {{{}-1{}}}) should be treated as
> invalid/missing data and displayed as {{{}N/A{}}}.
> *Actual Behavior:* Negative values are formatted and displayed (e.g., {{{}-1
> B{}}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]