ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yusaku Sako (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-5940) Views: parameterization of view parameters
Date Sat, 15 Nov 2014 00:48:34 GMT

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

Yusaku Sako updated AMBARI-5940:
--------------------------------
    Fix Version/s:     (was: 1.7.0)
                   2.0.0

> Views: parameterization of view parameters
> ------------------------------------------
>
>                 Key: AMBARI-5940
>                 URL: https://issues.apache.org/jira/browse/AMBARI-5940
>             Project: Ambari
>          Issue Type: Task
>    Affects Versions: 1.6.0
>            Reporter: Shivani Gupta
>             Fix For: 2.0.0
>
>
> In a lot of cases, folks will want to use viewContext.getUsername with their view instances
parameters. Right now, we leave that logic + code to the view developer. We should support
parametrization of view instance params to handle this, and provide username as the first
supported param.
> For example, say I have a parameter "view.path" : "/tmp/some/path"
> In my view, I want to append username, so I have logic in my view code to get view.path
and + viewContext.getUsername()
> viewContext.getProperties().get("view.path") + "/" + viewContext.getUsername()
> resulting in /tmp/some/path/horton
> If views support parametrization, i could do this:
> "view.path" : "/tmp/some/path/$
> {username}
> "
> then all I need to do viewContext.getProperties().get("view.path");
> which returns /tmp/some/path/horton



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

Mime
View raw message