From: simonbrandhof Date: Thu, 23 Dec 2010 11:34:26 +0000 (+0000) Subject: the violations tab must reuse the period selected in violations drilldown X-Git-Tag: 2.6~233 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3036e03d270ab85f197a930c851cd06f4a87ecaa;p=sonarqube.git the violations tab must reuse the period selected in violations drilldown --- 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 dateFilters = new ArrayList(); 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() {