diff options
9 files changed, 34 insertions, 24 deletions
diff --git a/sonar-server/src/main/coffee/component-viewer/mixins/main-coverage.coffee b/sonar-server/src/main/coffee/component-viewer/mixins/main-coverage.coffee index 607cc1e42bf..0c1fe45ac01 100644 --- a/sonar-server/src/main/coffee/component-viewer/mixins/main-coverage.coffee +++ b/sonar-server/src/main/coffee/component-viewer/mixins/main-coverage.coffee @@ -51,7 +51,6 @@ define [], () -> if @settings.get('issues') && !@state.get('hasIssues') requests.push @requestIssues @key $.when.apply($, requests).done => - @filterByUnresolvedIssues() @_filterByCoverage(predicate) @@ -60,7 +59,6 @@ define [], () -> if @settings.get('issues') && !@state.get('hasIssues') requests.push @requestIssues @key $.when.apply($, requests).done => - @filterByUnresolvedIssues() @_filterByCoverage(predicate) diff --git a/sonar-server/src/main/coffee/component-viewer/mixins/main-duplications.coffee b/sonar-server/src/main/coffee/component-viewer/mixins/main-duplications.coffee index 4a2986e80a8..15c651fc44d 100644 --- a/sonar-server/src/main/coffee/component-viewer/mixins/main-duplications.coffee +++ b/sonar-server/src/main/coffee/component-viewer/mixins/main-duplications.coffee @@ -53,7 +53,6 @@ define [], () -> if @settings.get('issues') && !@state.get('hasIssues') requests.push @requestIssues @key $.when.apply($, requests).done => - @filterByUnresolvedIssues() @_filterByDuplications() diff --git a/sonar-server/src/main/coffee/component-viewer/mixins/main-issues.coffee b/sonar-server/src/main/coffee/component-viewer/mixins/main-issues.coffee index 32aabd46c0a..b60f4ca27be 100644 --- a/sonar-server/src/main/coffee/component-viewer/mixins/main-issues.coffee +++ b/sonar-server/src/main/coffee/component-viewer/mixins/main-issues.coffee @@ -19,7 +19,9 @@ define [ extra_fields: 'actions,transitions,assigneeName,actionPlanName' $.get API_ISSUES, options, (data) => @state.set 'hasIssues', true - @source.set issues: data.issues, activeIssues: data.issues + @source.set + issues: data.issues + activeIssues: data.issues.filter (issue) -> !issue.resolution showIssues: (store = false, issue) -> diff --git a/sonar-server/src/main/coffee/component-viewer/mixins/main-scm.coffee b/sonar-server/src/main/coffee/component-viewer/mixins/main-scm.coffee index 48def232547..23c899f185f 100644 --- a/sonar-server/src/main/coffee/component-viewer/mixins/main-scm.coffee +++ b/sonar-server/src/main/coffee/component-viewer/mixins/main-scm.coffee @@ -52,7 +52,6 @@ define [], () -> if @settings.get('issues') && !@state.get('hasIssues') requests.push @requestIssues @key $.when.apply($, requests).done => - @filterByUnresolvedIssues() @_filterBySCM() diff --git a/sonar-server/src/main/coffee/dashboard/file-app.coffee b/sonar-server/src/main/coffee/dashboard/file-app.coffee index e7354ccbaef..c005663cd5c 100644 --- a/sonar-server/src/main/coffee/dashboard/file-app.coffee +++ b/sonar-server/src/main/coffee/dashboard/file-app.coffee @@ -20,12 +20,15 @@ requirejs.config requirejs [ 'backbone.marionette' 'component-viewer/main' + 'drilldown/conf' ], ( Marionette ComponentViewer + MetricConf ) -> $ = jQuery + App = new Marionette.Application() @@ -43,7 +46,17 @@ requirejs [ App.addInitializer -> viewer = App.requestComponentViewer() - viewer.open(window.fileKey).done -> viewer.showAllLines() + if window.metric? + metricConf = MetricConf[window.metric] + if metricConf? + activeHeaderTab = metricConf.tab + activeHeaderItem = metricConf.item + viewer.open(window.fileKey).done -> + if activeHeaderTab? && activeHeaderItem? + viewer.state.set activeHeaderTab: activeHeaderTab, activeHeaderItem: activeHeaderItem + viewer.headerView.render() + else + viewer.showAllLines() # Message bundles diff --git a/sonar-server/src/main/coffee/drilldown/app.coffee b/sonar-server/src/main/coffee/drilldown/app.coffee index e95c2c2136b..cc7ab15b194 100644 --- a/sonar-server/src/main/coffee/drilldown/app.coffee +++ b/sonar-server/src/main/coffee/drilldown/app.coffee @@ -71,6 +71,11 @@ requirejs [ viewer.open(key).done -> if activeHeaderTab? && activeHeaderItem? viewer.state.set activeHeaderTab: activeHeaderTab, activeHeaderItem: activeHeaderItem + viewer.render() + else if activeHeaderTab? + viewer.state.set activeHeaderTab: activeHeaderTab + viewer.headerView.render() + viewer.showAllLines() else if drilldown.period? viewer.enablePeriod drilldown.period, 'issues' else diff --git a/sonar-server/src/main/coffee/drilldown/conf.coffee b/sonar-server/src/main/coffee/drilldown/conf.coffee index d85ec989fde..730ebb88a0f 100644 --- a/sonar-server/src/main/coffee/drilldown/conf.coffee +++ b/sonar-server/src/main/coffee/drilldown/conf.coffee @@ -73,4 +73,12 @@ define 'duplicated_lines': { tab: 'duplications', item: '.js-filter-duplications' } 'duplicated_blocks': { tab: 'duplications', item: '.js-filter-duplications' } 'duplicated_files': { tab: 'duplications', item: '.js-filter-duplications' } - 'duplicated_lines_density': { tab: 'duplications', item: '.js-filter-duplications' }
\ No newline at end of file + 'duplicated_lines_density': { tab: 'duplications', item: '.js-filter-duplications' } + + + # Tests + 'test_success_density': { tab: 'tests', item: null } + 'skipped_tests': { tab: 'tests', item: null } + 'test_failures': { tab: 'tests', item: null } + 'test_errors': { tab: 'tests', item: null } + 'test_execution_time': { tab: 'tests', item: null }
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb index a65dc801b75..5d4a6cf741e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb @@ -34,6 +34,7 @@ class DashboardController < ApplicationController @hide_sidebar = true @file = @resource @project = @snapshot.parent.project + @metric=params[:metric] render :action => 'no_dashboard' end end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb index c588a50d1e0..8802eb19301 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb @@ -2,26 +2,11 @@ <script data-main="<%= ApplicationController.root_context -%>/js/dashboard/file-app" src="<%= ApplicationController.root_context -%>/js/require.js"></script> <% end %> -<%= render :partial => 'gwt/base', :locals => {:resource => nil, :popup => false, :metric => nil} -%> -<%= render :partial => 'gwt/resource_viewers' -%> - <div class="marginbottom10"></div> <div id="accordion-panel"></div> <script type="text/javascript"> - - // see if an anchor has been passed - var anchor; - var stripped_url = document.location.toString().split("#"); - if (stripped_url.length > 1) { - anchor = stripped_url[1]; - } - window.fileKey = '<%= @file.key -%>'; - - // refresh page after issues bulk change - function onBulkIssues(){ - resourceViewerOnBulkIssues(); - } - + window.metric = '<%= @metric -%>'; + document.getElementById('crumbs').remove(); </script> |