aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-06-04 11:47:58 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-06-04 11:47:58 +0600
commit0b783d625a793bd0907d90021fc00b10bad446d7 (patch)
treede7c5a985b9f123b2781fa4f4b82a876a142106c /sonar-server
parentf5bfa86e0f4c92d61f66dc965010db78823ebdad (diff)
downloadsonarqube-0b783d625a793bd0907d90021fc00b10bad446d7.tar.gz
sonarqube-0b783d625a793bd0907d90021fc00b10bad446d7.zip
SONAR-5209 Issues tab
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/coffee/component-viewer/header.coffee4
-rw-r--r--sonar-server/src/main/coffee/component-viewer/main.coffee4
-rw-r--r--sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs6
-rw-r--r--sonar-server/src/main/hbs/issues/issue.hbs2
-rw-r--r--sonar-server/src/main/js/common/handlebars-extensions.js4
5 files changed, 15 insertions, 5 deletions
diff --git a/sonar-server/src/main/coffee/component-viewer/header.coffee b/sonar-server/src/main/coffee/component-viewer/header.coffee
index a339fb9393a..0b2057032e7 100644
--- a/sonar-server/src/main/coffee/component-viewer/header.coffee
+++ b/sonar-server/src/main/coffee/component-viewer/header.coffee
@@ -36,7 +36,7 @@ define [
'click .js-filter-current-issue': 'filterByCurrentIssue'
'click .js-filter-all-issues': 'filterByAllIssues'
'click .js-filter-rule': 'filterByRule'
- 'click .js-filter-resolved-issues': 'filterByResolvedIssues'
+ 'click .js-filter-fixed-issues': 'filterByFixedIssues'
'click .js-filter-unresolved-issues': 'filterByUnresolvedIssues'
'click .js-filter-false-positive-issues': 'filterByFalsePositiveIssues'
'click .js-filter-BLOCKER-issues': 'filterByBlockerIssues'
@@ -149,7 +149,7 @@ define [
# Issues
filterByCurrentIssue: (e) -> @filterLines e, 'filterByCurrentIssue'
filterByAllIssues: (e) -> @filterLines e, 'filterByAllIssues'
- filterByResolvedIssues: (e) -> @filterLines e, 'filterByResolvedIssues'
+ filterByFixedIssues: (e) -> @filterLines e, 'filterByFixedIssues'
filterByUnresolvedIssues: (e) -> @filterLines e, 'filterByUnresolvedIssues'
filterByFalsePositiveIssues: (e) -> @filterLines e, 'filterByFalsePositiveIssues'
diff --git a/sonar-server/src/main/coffee/component-viewer/main.coffee b/sonar-server/src/main/coffee/component-viewer/main.coffee
index 6151a9207f3..f44c5014563 100644
--- a/sonar-server/src/main/coffee/component-viewer/main.coffee
+++ b/sonar-server/src/main/coffee/component-viewer/main.coffee
@@ -312,7 +312,7 @@ define [
filterByAllIssues: -> @filterByIssues -> true
# Resolved Issues
- filterByResolvedIssues: -> @filterByIssues (issue) -> !!issue.resolution
+ filterByFixedIssues: -> @filterByIssues (issue) -> issue.resolution == 'FIXED'
# Unresolved Issues
filterByUnresolvedIssues: -> @filterByIssues (issue) -> !issue.resolution
@@ -321,7 +321,7 @@ define [
filterByFalsePositiveIssues: -> @filterByIssues (issue) -> issue.resolution == 'FALSE-POSITIVE'
# Rule
- filterByRule: (rule) -> @filterByIssues (issue) -> issue.rule == rule
+ filterByRule: (rule) -> @filterByIssues (issue) -> issue.rule == rule && !issue.resolution
# Severity
filterByBlockerIssues: -> @filterByIssues (issue) -> issue.severity == 'BLOCKER' && !issue.resolution
diff --git a/sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs b/sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs
index 684f7108704..ba2ff445156 100644
--- a/sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs
+++ b/sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs
@@ -48,6 +48,12 @@
<i class="icon-chevron-right"></i>
</a></li>
{{/if}}
+ {{#if component.measures.fIssues}}
+ <li><a class="item js-filter-fixed-issues">
+ <span>{{t 'component_viewer.issues.fixed_issues'}}</span>
+ <i class="icon-chevron-right"></i>
+ </a></li>
+ {{/if}}
<li><a class="item js-filter-false-positive-issues">
<span>{{t 'component_viewer.issues.false_positive_issues'}}</span>
<span class="number">{{component.msr.false_positive_issues}}</span>
diff --git a/sonar-server/src/main/hbs/issues/issue.hbs b/sonar-server/src/main/hbs/issues/issue.hbs
index 02de98970ca..cca057a77dd 100644
--- a/sonar-server/src/main/hbs/issues/issue.hbs
+++ b/sonar-server/src/main/hbs/issues/issue.hbs
@@ -126,7 +126,7 @@
<h4>
<i class="icon-comment"></i>
<b>{{userName}}</b>
- ({{fCreatedAge}})
+ ({{fromNow createdAt}})
{{#if updatable}}
&nbsp;&nbsp;
diff --git a/sonar-server/src/main/js/common/handlebars-extensions.js b/sonar-server/src/main/js/common/handlebars-extensions.js
index 69e7407f7d4..b893a35a513 100644
--- a/sonar-server/src/main/js/common/handlebars-extensions.js
+++ b/sonar-server/src/main/js/common/handlebars-extensions.js
@@ -184,6 +184,10 @@ define(['handlebars', 'moment'], function (Handlebars, moment) {
return moment(date).format('LLL');
});
+ Handlebars.registerHelper('fromNow', function(date) {
+ return moment(date).fromNow();
+ });
+
Handlebars.registerHelper('pluginActions', function(actions, options) {
var pluginActions = _.difference(actions, defaultActions);
return pluginActions.reduce(function(prev, current) {