diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-07 16:17:50 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-07 16:17:50 +0000 |
commit | 0cd519b35d499f60fceec66f08dc7ca80301f127 (patch) | |
tree | 8c9a547da0ee1ce5c1bf20e9d139f1f705b42bec /plugins/sonar-core-gwt/src | |
parent | c1cfffea2098a53ab078deb9bebe47b627c389cf (diff) | |
download | sonarqube-0cd519b35d499f60fceec66f08dc7ca80301f127.tar.gz sonarqube-0cd519b35d499f60fceec66f08dc7ca80301f127.zip |
SONAR-1937 add the field 'age' to violations web service + display the select box to filter violations by period
Diffstat (limited to 'plugins/sonar-core-gwt/src')
-rw-r--r-- | plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java index 772325dfa83..14cf189a9f0 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java @@ -139,13 +139,16 @@ public class ViolationsPanel extends SourcePanel { @Override public String getColumn4() { + String age = ""; + if (violation.getAge()!=null && violation.getAge()>0) { + age = " <span class='note'>(" + violation.getAge() + " days)</span>"; + } return "<div class=\"warn\">" + Icons.forPriority(violation.getPriority()).getHTML() + "</img> " - + Utils.formatDate(violation.getCreatedAt()) + " <a href=\"" + Links.urlForRule(violation.getRuleKey(), false) + "\" onclick=\"window.open(this.href,'rule','height=800,width=900,scrollbars=1,resizable=1');return false;\" title=\"" + violation.getRuleKey() + "\"><b>" + Utils.escapeHtml(violation.getRuleName()) + "</b></a> : " - + Utils.escapeHtml(violation.getMessage()) + "</div>"; + + Utils.escapeHtml(violation.getMessage()) + age + "</div>"; } } |