1 #set( $symbol_pound = '#' )
2 #set( $symbol_dollar = '$' )
3 #set( $symbol_escape = '\' )
6 import org.sonar.api.web.*;
8 @UserRole(UserRole.USER)
9 @Description("Show how to use Ruby Widget API")
11 @WidgetProperty(key="param1",
12 description="This is a mandatory parameter",
15 @WidgetProperty(key="max",
16 description="max threshold",
17 type=WidgetPropertyType.INTEGER,
20 @WidgetProperty(key="param2",
21 description="This is an optional parameter"
23 @WidgetProperty(key="floatprop",
24 description="test description"
27 public class SampleDashboardWidget extends AbstractRubyTemplate implements RubyRailsWidget {
29 public String getId() {
33 public String getTitle() {
38 protected String getTemplatePath() {
39 return "/sample_dashboard_widget.html.erb";