rohan lukose
rohan lukose

Reputation: 101

sonar reference plugin widget not getting displayed iin dashboard

I am trying to create a custom sonar plugin by looking the code in sonar reference plugin.But the this reference plugin is not able to show the widget in sonar dashboard? The .erb file is

<div class="dashbox">
<h3><span title="<%= metric('random').description -%>"></span></h3>
<p>
<span class="big">
<%= format_measure('random') -%> <%= trend_icon(measure('random')) %>
</span>
</p>
<p><%= format_measure('message_key') -%></p>
<p>
<%= format_measure('ncloc', :suffix => ' lines', :url =>url_for_drilldown('ncloc'))    
-%>
</p>
</div>
<div class="dashbox">
<h3><%= message('example.help') -%></h3>
<p>
<%= message('example.jdbc_login') -%> : <%= configuration('sonar.jdbc.username')  
-%><br/>
<%= message('example.plugin_property') -%> : <%=  
configuration('sonar.example.myproperty') -%><br/>
</p>

<p>
<%= message('example.eastwood_image') -%> : <br/>
<%= gchart('cht=bhs&chco=FF0000,00FF00,0000FF&chs=200x125&chd=s:FOE,THE,Bar&chxt=x,y& 
chxl=1:|Dec|Nov|Oct|0:||20K||60K||100K|') -%>
</p>

<h3><%= message('example.widget_properties') -%></h3>
<table>
<tr>
<td>max: </td>
<td><%= widget_properties['max'] -%></td>
</tr>
<tr>
  <td>param1: </td>
  <td><%= widget_properties['param1'] -%></td>
</tr>
<tr>
  <td>param2: </td>
  <td><%= widget_properties['param2'] -%></td>
</tr>

Upvotes: 1

Views: 521

Answers (1)

ojblass
ojblass

Reputation: 21630

Just in case someone else runs into this you must configure the widget to be displayed. You will not have the rights to display the widget unless you are an administrative user.

Upvotes: 0

Related Questions