[ 
https://issues.apache.org/jira/browse/HDDS-14423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18054821#comment-18054821
 ] 

Devesh Kumar Singh commented on HDDS-14423:
-------------------------------------------

Negative values have different meaning in different context. If it is for 
denoting the status of any task or process, then it means that task was failed, 
so need to evaluate at UI accordingly. But if the negative value is to denote 
some valid value from API response, then it should be shown as negative only. 
So need to analyze accordingly. Cannot be generalized.

> [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]

Reply via email to