diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java | 8 |
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() { |