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

Jaimin D Jetly commented on AMBARI-18639:
-----------------------------------------

Ember.isEmpty takes account for null, undefined and empty string values. If any 
of the input value is among these three then the tweaked logic converts it to 
null using ternary operator

If we still want null and undefined values to be converted to null then lets 
just change Ember.isEmpty to Ember.isNone

Current change
{code}
return warning && warning.get(property) != null ? warning.get(property) : null;
{code}
is same as 
{code}
return warning ? warning.get(property) : null;
{code}

Lets make it
{code}
return warning && !Ember.isNone(warning.get(property)) ? warning.get(property) 
: null;
{code}

> Ambari UI does not allow to modify EMPTY threshold text of 'OK' and 'WARNING'
> -----------------------------------------------------------------------------
>
>                 Key: AMBARI-18639
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18639
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-web
>    Affects Versions: 2.4.1, 2.5.0
>            Reporter: Xi Wang
>            Assignee: Xi Wang
>            Priority: Critical
>             Fix For: 2.5.0, 2.4.2
>
>         Attachments: AMBARI-18639-2.5.patch, AMBARI-18639.patch
>
>
> Ambari UI does not allow to modify threshold of *'OK'* and *'WARNING'* in 
> ResourceManager WEB UI alert.
> *Steps to reproduce:*
> 1. Remove threshold from WARNING/OK at alert of ResourceManager WEB UI 
> 2. Save 
> 3. Refresh Ambari UI and and the field is blank *- Expected*
> 4. Add any threshold string (may be the one that you removed) to WARNING/OK 
> and then save 
> 5. Refresh Ambari UI. _Here is the problem._ *It shows just blank.* 
> 6. API /api/v1/clusters/young-hdp250/alert_definitions/44 shows blank too. 
> - It's happening because the PUT call is sent empty.   
>  !RM Web UI- Alert Definitioni.jpg|thumbnail! 
> {code}
> "critical" : { 
>           "text" : "Connection failed to {1} ({3})" 
>         }, 
>         "ok" : { 
>           "text" : "HTTP {0} response in {2:.3f}s" 
>         }, 
>         "warning" : { 
>           "text" : "" 
>         } 
> {code}
> *Workaround:*
> Manual update using curl command works. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to