ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siddharth Wagle (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-6231) Views: parameterization of view parameters
Date Fri, 20 Jun 2014 21:36:24 GMT
Siddharth Wagle created AMBARI-6231:
---------------------------------------

             Summary: Views: parameterization of view parameters
                 Key: AMBARI-6231
                 URL: https://issues.apache.org/jira/browse/AMBARI-6231
             Project: Ambari
          Issue Type: Task
          Components: controller
    Affects Versions: 1.7.0
            Reporter: Siddharth Wagle
            Assignee: Siddharth Wagle
             Fix For: 1.7.0
         Attachments: AMBARI-5940.patch

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");



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message