Oleg Nechiporenko created AMBARI-13939:
------------------------------------------

             Summary: Implement Em.computed macros
                 Key: AMBARI-13939
                 URL: https://issues.apache.org/jira/browse/AMBARI-13939
             Project: Ambari
          Issue Type: Task
          Components: ambari-web
    Affects Versions: 2.2.0
            Reporter: Oleg Nechiporenko
            Assignee: Oleg Nechiporenko
             Fix For: 2.2.0


Ember v1.0.0 has three macros for {{Em.computed}}:
* not
* empty
* bool

{{Em.computed}} may be extended with a lot of other macros that will make code 
to be easier to understand:
||Name (Em.computed.*)||Description||
|equal|A computed property that returns true if the provided dependent property 
is equal to the given value (already implemented)|
|notEqual|A computed property that returns true if the provided dependent 
property is not equal to the given value|
|equalProperties|A computed property that returns true if provided dependent 
properties are equal to the each other|
|notEqualProperties|A computed property that returns true if provided dependent 
properties are not equal to the each other|
|groupBy|A computed property that returns grouped collection's items by 
propertyName-value|
|filterByMany|A computed property that returns filtered collection by 
propertyName values-list. Wrapper to filterProperty-method that allows using 
list of values to filter|
|rejectMany|A computed property that returns collection without elements with 
value that is in the list of values to reject|
|ifThenElse|A computed property that returns trueValue if dependent value is 
true and falseValue otherwise|
|and|A computed property that is equal to the logical 'and'|
|or|A computed property that is equal to the logical 'or'|
|sumProperties|A computed property that returns sum on the dependent properties 
values|
|gte| A computed property that returns true if dependent value is greater or 
equal to the needed value|
|gteProperties|A computed property that returns true if first dependent 
property is greater or equal to the second dependent property|
|lte|A computed property that returns true if dependent property is less or 
equal to the needed value|
|lteProperties|A computed property that returns true if first dependent 
property is less or equal to the second dependent property|
|gt|A computed property that returns true if dependent value is greater than 
the needed value|
|gtProperties|A computed property that returns true if first dependent property 
is greater than the second dependent property|
|lt|A computed property that returns true if dependent value is less than the 
needed value|
|ltProperties|A computed property that returns true if first dependent property 
is less than the second dependent property|
|match|A computed property that returns true if dependent property is match to 
the needed regular expression|
|someBy|A computed property that returns true of some collection's item has 
property with needed value|
|everyBy|A computed property that returns true of all collection's items have 
property with needed value|
|mapBy|A computed property that returns array with values of named property on 
all items in the collection|
|filterBy|A computed property that returns array with collection's items that 
have needed property value|
|findBy|A computed property that returns first collection's item that has 
needed property value|
|alias|A computed property that returns value equal to the dependent. Should be 
used as 'short-name' for deeply-nested values|
|existsIn|A computed property that returns true if dependent property exists in 
the needed values|



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

Reply via email to