ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Nechiporenko (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-15515) Improve Em.computed.getByKey
Date Thu, 24 Mar 2016 09:41:25 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-15515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Nechiporenko updated AMBARI-15515:
---------------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> Improve Em.computed.getByKey
> ----------------------------
>
>                 Key: AMBARI-15515
>                 URL: https://issues.apache.org/jira/browse/AMBARI-15515
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-web
>    Affects Versions: 2.4.0
>            Reporter: Oleg Nechiporenko
>            Assignee: Oleg Nechiporenko
>             Fix For: 2.4.0
>
>         Attachments: AMBARI-15515.patch
>
>
> * Should handle default value when there is no key in the object
> {noformat}
> var o = Em.Object.create({
>     p1: {a: 1, b: 2, c: 3},
>     p2: 'd',
>     p3: Em.computed.getByKey('p1', 'p2', 100500)
> });
> console.log(o.get('p3')); // 100500 - default value is returned, because there is no
key `d` in the `p1`
> {noformat}
> * {{App.TestAliases.testAsComputedGetByKey}} should supports checking default value and
should be able to process provided map instead of traversing throw tested object
> * {{App.TestAliases.testAsComputedGetByKey}} should use `to.be.eql` instead of `to.be.equal`
(`equal` doesn't work for objects, arrays etc)



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

Mime
View raw message