diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-17 15:23:42 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-19 09:06:13 +0200 |
commit | dd40c169e7f8c81373c5beb2993ed993e3ac420f (patch) | |
tree | 285b902007ae0a33e704fd3f2d8d91a4ebff8baa /server | |
parent | 41d9a2b483a2ea667d1ca96ce98029dc75b1ed63 (diff) | |
download | sonarqube-dd40c169e7f8c81373c5beb2993ed993e3ac420f.tar.gz sonarqube-dd40c169e7f8c81373c5beb2993ed993e3ac420f.zip |
SONAR-9640 Reorder coverage and duplications graphs on the project activity page
Diffstat (limited to 'server')
3 files changed, 9 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.js b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.js index 960b925b21e..50f1288ce87 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.js @@ -187,8 +187,8 @@ describe('getDisplayedHistoryMetrics', () => { 'vulnerabilities' ]); expect(utils.getDisplayedHistoryMetrics('coverage', customMetrics)).toEqual([ - 'uncovered_lines', - 'lines_to_cover' + 'lines_to_cover', + 'uncovered_lines' ]); }); it('should return all custom metrics for the custom graph', () => { @@ -208,8 +208,8 @@ describe('getHistoryMetrics', () => { 'sqale_rating' ]); expect(utils.getHistoryMetrics('coverage', customMetrics)).toEqual([ - 'uncovered_lines', 'lines_to_cover', + 'uncovered_lines', 'coverage' ]); expect(utils.getHistoryMetrics('custom', customMetrics)).toEqual(customMetrics); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/utils.js b/server/sonar-web/src/main/js/apps/projectActivity/utils.js index 54fcea9b53c..455b2c04652 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/utils.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/utils.js @@ -40,8 +40,8 @@ export const DEFAULT_GRAPH = 'issues'; export const GRAPH_TYPES = ['issues', 'coverage', 'duplications', 'custom']; export const GRAPHS_METRICS_DISPLAYED = { issues: ['bugs', 'code_smells', 'vulnerabilities'], - coverage: ['uncovered_lines', 'lines_to_cover'], - duplications: ['duplicated_lines', 'ncloc'] + coverage: ['lines_to_cover', 'uncovered_lines'], + duplications: ['ncloc', 'duplicated_lines'] }; export const GRAPHS_METRICS = { issues: GRAPHS_METRICS_DISPLAYED['issues'].concat([ @@ -125,7 +125,8 @@ export function generateSeries( type: metric ? metric.type : 'INT' }; }), - serie => displayedMetrics.indexOf(serie.name) + serie => + displayedMetrics.indexOf(serie.name === 'covered_lines' ? 'uncovered_lines' : serie.name) ); } diff --git a/server/sonar-web/src/main/less/components/graphics.less b/server/sonar-web/src/main/less/components/graphics.less index 0ce81a6a6c8..944c0c3540e 100644 --- a/server/sonar-web/src/main/less/components/graphics.less +++ b/server/sonar-web/src/main/less/components/graphics.less @@ -101,8 +101,8 @@ /* * Line Chart */ -@defaultSerieColor: @darkBlue; -@serieColor1: @blue; +@defaultSerieColor: @blue; +@serieColor1: @darkBlue; @serieColor2: #24c6e0; .line-chart { |