ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Nechiporenko (JIRA)" <>
Subject [jira] [Created] (AMBARI-15515) Improve Em.computed.getByKey
Date Tue, 22 Mar 2016 14:55:25 GMT
Oleg Nechiporenko created AMBARI-15515:

             Summary: Improve Em.computed.getByKey
                 Key: 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

* Should handle default value when there is no key in the object
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`

* {{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 `` instead of ``
(`equal` doesn't work for objects, arrays etc)

This message was sent by Atlassian JIRA

View raw message