Quantcast

[sonar-dev] widget access to project, global properties?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] widget access to project, global properties?

Ann Campbell
How would I get to global properties from a widget? 

I've seen that on the Java side the context seems to hold the whole hierarchy of properties. But not so on the Ruby side for a widget(?)

Must those thing I need access to in a widget be set on that widget?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] widget access to project, global properties?

Carlos Fillol
Hi Ann,

You can read properties from ruby widgets this way:
<%
value = configuration('propertyName')                           # Global property
value = Property.value('propertyName', @project.id, '')  # Project property, setting '' as default value
value = widget_properties['propertyName']                    # Widget property
%>

I think there are some problems to get default values defined in java side. Take a look at this thread to get more info:

Regards,
______________________________________
Carlos Fillol Sendra (Linkedin)



2012/7/3 Ann Campbell <[hidden email]>
How would I get to global properties from a widget? 

I've seen that on the Java side the context seems to hold the whole hierarchy of properties. But not so on the Ruby side for a widget(?)

Must those thing I need access to in a widget be set on that widget?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] widget access to project, global properties?

Ann Campbell
Thanks Carlos!


On Wed, Jul 4, 2012 at 3:02 AM, Carlos Fillol <[hidden email]> wrote:
Hi Ann,

You can read properties from ruby widgets this way:
<%
value = configuration('propertyName')                           # Global property
value = Property.value('propertyName', @project.id, '')  # Project property, setting '' as default value
value = widget_properties['propertyName']                    # Widget property
%>

I think there are some problems to get default values defined in java side. Take a look at this thread to get more info:

Regards,
______________________________________
Carlos Fillol Sendra (Linkedin)



2012/7/3 Ann Campbell <[hidden email]>
How would I get to global properties from a widget? 

I've seen that on the Java side the context seems to hold the whole hierarchy of properties. But not so on the Ruby side for a widget(?)

Must those thing I need access to in a widget be set on that widget?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Loading...