You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Andrii Babiichuk (JIRA)" <ji...@apache.org> on 2014/02/11 17:41:36 UTC

[jira] [Commented] (AMBARI-4606) Selecting Storm during install breaks configs (with App.supports.appTimelineServer turned on)

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

Andrii Babiichuk commented on AMBARI-4606:
------------------------------------------

+1 for the patch

> Selecting Storm during install breaks configs (with App.supports.appTimelineServer turned on)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-4606
>                 URL: https://issues.apache.org/jira/browse/AMBARI-4606
>             Project: Ambari
>          Issue Type: Task
>          Components: client
>    Affects Versions: 1.5.0
>            Reporter: Denys Buzhor
>            Assignee: Denys Buzhor
>             Fix For: 1.5.0
>
>         Attachments: AMBARI-4606.patch
>
>
> During install I selected Storm service (had jobs and timeline server flags turned on). Coming into the configurations page I hit an exception in {{app/utils/config.js}} file's {{#tweakDynamicDefaults()}} function. Specifically at line 
> {code}
> if (typeof(config == "string") && config.defaultValue.indexOf("{firstHost}") >= 0) 
> {code}
> where {{config.defaultValue}} was type boolean instead of type 'string'.
> There are 2 problems here:
> 1. AMBARI-4287 introduced a change where global configs with default value  of string 'true' or 'false' are converted to booleans. 
> {code}
>  if (configData.displayType === 'checkbox') {
>         configData.value = configData.defaultValue = configData.value === 'true'; // convert {String} value to {Boolean}
>       }
> {code}
> We should make sure that all usages of {{config.defaultValue}} account for this change in behavior. Would be best to stay on 'string'.
> 2. Where the exception is thrown, the logic of the if() statement is incorrect and should be changed to
> {code}
> if (typeof(config.defaultValue) == "string" && config.defaultValue.indexOf("{firstHost}") >= 0) 
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)