ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrii Tkach (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-15515) Improve Em.computed.getByKey
Date Tue, 22 Mar 2016 14:59:25 GMT

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

Andrii Tkach commented on AMBARI-15515:
---------------------------------------

+1 for the patch

> 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