summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-23 11:34:26 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-23 11:34:26 +0000
commit3036e03d270ab85f197a930c851cd06f4a87ecaa (patch)
tree9273ee11925f085ad59f9b69eaa23c45c60948c1 /plugins
parentc6d744a50d661ca5fb1f6846fb9880e4c9484f0d (diff)
downloadsonarqube-3036e03d270ab85f197a930c851cd06f4a87ecaa.tar.gz
sonarqube-3036e03d270ab85f197a930c851cd06f4a87ecaa.zip
the violations tab must reuse the period selected in violations drilldown
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java
index 99de6907d55..546dc433bf2 100644
--- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java
+++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java
@@ -52,6 +52,7 @@ public class ViolationsViewer extends Page {
private List<Date> dateFilters = new ArrayList<Date>();
private CheckBox expandCheckbox = null;
private String defaultFilter;
+ private int defaultPeriodIndex = -1;
// source
private ViolationsPanel sourcePanel;
@@ -145,6 +146,9 @@ public class ViolationsViewer extends Page {
dateFilters.add(date);
}
}
+ if (defaultPeriodIndex > -1) {
+ periodBox.setSelectedIndex(defaultPeriodIndex);
+ }
}
private Date getCurrentDateFilter() {
@@ -164,6 +168,10 @@ public class ViolationsViewer extends Page {
if (defaultFilter == null) {
defaultFilter = Configuration.getRequestParameter("priority");
}
+ String period = Configuration.getRequestParameter("period");
+ if (period != null && !"".equals(period)) {
+ defaultPeriodIndex = Integer.valueOf(period);
+ }
}
private void loadRuleSeverities() {