ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Nechiporenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-13971) Implement Em.computed macros (2)
Date Thu, 19 Nov 2015 15:28:10 GMT

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

Oleg Nechiporenko commented on AMBARI-13971:
--------------------------------------------

  10412 tests complete (14 seconds)
  115 tests pending

> Implement Em.computed macros (2)
> --------------------------------
>
>                 Key: AMBARI-13971
>                 URL: https://issues.apache.org/jira/browse/AMBARI-13971
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-web
>    Affects Versions: 2.2.0
>            Reporter: Oleg Nechiporenko
>            Assignee: Oleg Nechiporenko
>             Fix For: 2.2.0
>
>         Attachments: AMBARI-13971.patch
>
>
> ||Name (Em.computed.*)||Description||
> |notExistsIn|A computed property that returns true if dependent property doesn't exist
in the needed values|
> |percents|A computed property that returns result of calculation {{dependentProperty1/dependentProperty2
* 100}}. If accuracy is 0 (by default), result is rounded to integer. Otherwise - result is
float with provided accuracy|
> |formatRole|A computed property that returns result of {{App.format.role}} for dependent
value|
> |sumBy|A computed property that returns sum of the named property in the each collection's
item|
> |i18nFormat|A computed property that returns I18n-string formatted with dependent properties|
> |concat|A computed property that returns dependent values joined with separator|
> |firstNotBlank|A computed property that returns first not blank value from dependent
values. Based on {{Ember.isBlank}}. Dependent values order affects the result|
> Add ability for {{`or`}}, {{`and`}} macros to handle dependent keys with inversion. Example:
> {code}
> var a = Em.Object.create({
>   prop1: true,
>   prop2: true,
>   prop3: true,
>   prop4: Em.computed.and('prop1', '!prop2', 'prop3')
> });
> a.get('prop4'); // `false`, because `prop2` is taken inverted
> {code}



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

Mime
View raw message