aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/coffee/component-viewer/main.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server/src/main/coffee/component-viewer/main.coffee')
-rw-r--r--sonar-server/src/main/coffee/component-viewer/main.coffee17
1 files changed, 12 insertions, 5 deletions
diff --git a/sonar-server/src/main/coffee/component-viewer/main.coffee b/sonar-server/src/main/coffee/component-viewer/main.coffee
index 68a95f0f34c..8dd9ad705e1 100644
--- a/sonar-server/src/main/coffee/component-viewer/main.coffee
+++ b/sonar-server/src/main/coffee/component-viewer/main.coffee
@@ -184,7 +184,7 @@ define [
measures = @component.get 'measures'
measuresList.forEach (m) ->
key = m.key.substr(4)
- variation = "var#{period}"
+ variation = "fvar#{period}"
measures[key] = m[variation]
@component.set 'measures', measures
@@ -251,15 +251,22 @@ define [
@sourceView.render()
+ hideAllLines: ->
+ @sourceView.resetShowBlocks()
+ @sourceView.render()
+
+
enablePeriod: (periodKey, scope = 'scm') ->
period = if periodKey == '' then null else @periods.findWhere key: periodKey
@state.set 'period', period
$.when(@requestMeasures(@key, period?.get('key')), @requestIssuesPeriod(@key, period?.get('key')), @requestSCM(@key)).done =>
- @headerView.render()
if scope == 'issues'
- @filterByUnresolvedIssues() unless @state.get('activeHeaderItem')
- else
- @filterBySCM()
+ @state.set 'activeHeaderItem', '.js-filter-unresolved-issues'
+ @headerView.render()
+ else if scope == 'coverage'
+ @state.set 'activeHeaderItem', '.js-filter-lines-to-cover'
+ @headerView.render()
+ else @filterBySCM()
addTransition: (transition, options) ->