aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-plugin/src
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-10-05 16:39:24 +0200
committerDavid Gageot <david@gageot.net>2012-10-05 16:39:24 +0200
commit6832c22f97682db56ed6dd3506b5d62de56ae2d6 (patch)
treee622960fd6115adf98896d5edfbd34159c6f93c2 /plugins/sonar-core-plugin/src
parentd6ca1d42ff5ad857ac04b4479732bd91d84e5076 (diff)
downloadsonarqube-6832c22f97682db56ed6dd3506b5d62de56ae2d6.tar.gz
sonarqube-6832c22f97682db56ed6dd3506b5d62de56ae2d6.zip
SONAR-3650 Hide "New_.*" metrics in the property lists of the History widgets
Diffstat (limited to 'plugins/sonar-core-plugin/src')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimeMachineWidget.java22
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java22
2 files changed, 21 insertions, 23 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimeMachineWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimeMachineWidget.java
index 47f2f63c562..564ffed857f 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimeMachineWidget.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimeMachineWidget.java
@@ -26,21 +26,21 @@ import org.sonar.api.web.WidgetProperties;
import org.sonar.api.web.WidgetProperty;
import org.sonar.api.web.WidgetPropertyType;
-@WidgetCategory({"History"})
+@WidgetCategory("History")
@WidgetProperties({
@WidgetProperty(key = "title", type = WidgetPropertyType.STRING),
@WidgetProperty(key = "numberOfColumns", type = WidgetPropertyType.INTEGER, defaultValue = "3"),
@WidgetProperty(key = "displaySparkLine", type = WidgetPropertyType.BOOLEAN),
- @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC, defaultValue = "ncloc"),
- @WidgetProperty(key = "metric2", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric3", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric4", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric5", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric6", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric7", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric8", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric9", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric10", type = WidgetPropertyType.METRIC)
+ @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC, defaultValue = "ncloc", options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric2", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric3", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric4", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric5", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric6", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric7", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric8", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric9", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric10", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"})
})
public class TimeMachineWidget extends AbstractRubyTemplate implements RubyRailsWidget {
public String getId() {
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java
index 7ecc27de672..5d8c0e303be 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java
@@ -26,17 +26,15 @@ import org.sonar.api.web.WidgetProperties;
import org.sonar.api.web.WidgetProperty;
import org.sonar.api.web.WidgetPropertyType;
-@WidgetCategory({ "History" })
-@WidgetProperties(
- {
- @WidgetProperty(key = "chartTitle", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC, defaultValue = "ncloc"),
- @WidgetProperty(key = "metric2", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "metric3", type = WidgetPropertyType.METRIC),
- @WidgetProperty(key = "hideEvents", type = WidgetPropertyType.BOOLEAN),
- @WidgetProperty(key = "chartHeight", type = WidgetPropertyType.INTEGER, defaultValue = "80")
- }
-)
+@WidgetCategory("History")
+@WidgetProperties({
+ @WidgetProperty(key = "chartTitle", type = WidgetPropertyType.STRING),
+ @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC, defaultValue = "ncloc", options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric2", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "metric3", type = WidgetPropertyType.METRIC, options = {"key:^(?!new_).*"}),
+ @WidgetProperty(key = "hideEvents", type = WidgetPropertyType.BOOLEAN),
+ @WidgetProperty(key = "chartHeight", type = WidgetPropertyType.INTEGER, defaultValue = "80")
+})
public class TimelineWidget extends AbstractRubyTemplate implements RubyRailsWidget {
public String getId() {
return "timeline";
@@ -50,4 +48,4 @@ public class TimelineWidget extends AbstractRubyTemplate implements RubyRailsWid
protected String getTemplatePath() {
return "/org/sonar/plugins/core/widgets/timeline.html.erb";
}
-} \ No newline at end of file
+}