From 1b46233a42f2f36f8e4dace604dbe88510966ace Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 9 Dec 2015 09:50:19 +0100 Subject: [PATCH] normalize overview pages urls and titles --- .../test_it_coverage_on_project_overview.html | 2 +- .../test_overall_coverage_on_project_overview.html | 2 +- .../test_ut_coverage_on_project_overview.html | 2 +- .../main/js/apps/overview/domains/debt-domain.js | 2 +- .../{size-domain.js => structure-domain.js} | 4 ++-- .../src/main/js/apps/overview/main/coverage.js | 6 ++++-- .../js/apps/overview/main/{issues.js => debt.js} | 8 +++++--- .../src/main/js/apps/overview/main/duplications.js | 5 +++-- .../src/main/js/apps/overview/main/main.js | 8 ++++---- .../apps/overview/main/{size.js => structure.js} | 8 +++++--- .../src/main/js/apps/overview/overview.js | 14 +++++++------- .../js/main/nav/component/component-nav-menu.js | 6 +++--- .../main/resources/org/sonar/l10n/core.properties | 2 +- 13 files changed, 38 insertions(+), 31 deletions(-) rename server/sonar-web/src/main/js/apps/overview/domains/{size-domain.js => structure-domain.js} (98%) rename server/sonar-web/src/main/js/apps/overview/main/{issues.js => debt.js} (93%) rename server/sonar-web/src/main/js/apps/overview/main/{size.js => structure.js} (90%) diff --git a/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_it_coverage_on_project_overview.html b/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_it_coverage_on_project_overview.html index db38e860191..f5788966cbd 100644 --- a/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_it_coverage_on_project_overview.html +++ b/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_it_coverage_on_project_overview.html @@ -26,7 +26,7 @@ open - /sonar/overview/tests?id=project-for-overview-it-coverage + /sonar/overview/coverage?id=project-for-overview-it-coverage diff --git a/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_overall_coverage_on_project_overview.html b/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_overall_coverage_on_project_overview.html index 9d5fd67fee2..96b6bba216f 100644 --- a/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_overall_coverage_on_project_overview.html +++ b/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_overall_coverage_on_project_overview.html @@ -26,7 +26,7 @@ open - /sonar/overview/tests?id=project-for-overview-overall-coverage + /sonar/overview/coverage?id=project-for-overview-overall-coverage diff --git a/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_ut_coverage_on_project_overview.html b/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_ut_coverage_on_project_overview.html index fd88d0fc0aa..1dd3c9ccd27 100644 --- a/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_ut_coverage_on_project_overview.html +++ b/it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_ut_coverage_on_project_overview.html @@ -26,7 +26,7 @@ open - /sonar/overview/tests?id=project-for-overview-ut-coverage + /sonar/overview/coverage?id=project-for-overview-ut-coverage diff --git a/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js index 4ee8ce45476..d87d3dc5e70 100644 --- a/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js +++ b/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js @@ -27,7 +27,7 @@ const KNOWN_METRICS = ['violations', 'sqale_index', 'sqale_rating', 'sqale_debt_ 'critical_violations', 'major_violations', 'minor_violations', 'info_violations', 'confirmed_issues']; -export const IssuesMain = React.createClass({ +export const DebtMain = React.createClass({ mixins: [TooltipsMixin], getInitialState() { diff --git a/server/sonar-web/src/main/js/apps/overview/domains/size-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js similarity index 98% rename from server/sonar-web/src/main/js/apps/overview/domains/size-domain.js rename to server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js index 05a23ae3d51..3c1563bde01 100644 --- a/server/sonar-web/src/main/js/apps/overview/domains/size-domain.js +++ b/server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js @@ -12,7 +12,7 @@ import { filterMetrics, filterMetricsForDomains } from '../helpers/metrics'; import { DomainLeakTitle } from '../main/components'; -export const SizeMain = React.createClass({ +export const StructureMain = React.createClass({ mixins: [TooltipsMixin], getInitialState() { @@ -149,7 +149,7 @@ export const SizeMain = React.createClass({ return
-
{window.t('overview.domain.size')}
+
{window.t('overview.domain.structure')}
{this.renderLegend()}
diff --git a/server/sonar-web/src/main/js/apps/overview/main/coverage.js b/server/sonar-web/src/main/js/apps/overview/main/coverage.js index 07aaff0c383..7755cb28df7 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/coverage.js +++ b/server/sonar-web/src/main/js/apps/overview/main/coverage.js @@ -85,9 +85,11 @@ export const GeneralCoverage = React.createClass({ ]; return - + - + diff --git a/server/sonar-web/src/main/js/apps/overview/main/issues.js b/server/sonar-web/src/main/js/apps/overview/main/debt.js similarity index 93% rename from server/sonar-web/src/main/js/apps/overview/main/issues.js rename to server/sonar-web/src/main/js/apps/overview/main/debt.js index 86a145596e2..490eadc22c8 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/issues.js +++ b/server/sonar-web/src/main/js/apps/overview/main/debt.js @@ -18,7 +18,7 @@ import { getMetricName } from '../helpers/metrics'; import { formatMeasure } from '../../../helpers/measures'; -export const GeneralIssues = React.createClass({ +export const GeneralDebt = React.createClass({ propTypes: { leakPeriodLabel: React.PropTypes.string, leakPeriodDate: React.PropTypes.object @@ -56,9 +56,11 @@ export const GeneralIssues = React.createClass({ render () { return - + - + diff --git a/server/sonar-web/src/main/js/apps/overview/main/duplications.js b/server/sonar-web/src/main/js/apps/overview/main/duplications.js index 64cafcf8932..6240df80417 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/duplications.js +++ b/server/sonar-web/src/main/js/apps/overview/main/duplications.js @@ -57,10 +57,11 @@ export const GeneralDuplications = React.createClass({ ]; return - - + diff --git a/server/sonar-web/src/main/js/apps/overview/main/main.js b/server/sonar-web/src/main/js/apps/overview/main/main.js index 39e17057257..81eabb769f4 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/main.js +++ b/server/sonar-web/src/main/js/apps/overview/main/main.js @@ -2,10 +2,10 @@ import _ from 'underscore'; import moment from 'moment'; import React from 'react'; -import { GeneralIssues } from './issues'; +import { GeneralDebt } from './debt'; import { GeneralCoverage } from './coverage'; import { GeneralDuplications } from './duplications'; -import { GeneralSize } from './size'; +import { GeneralStructure } from './structure'; import { CoverageSelectionMixin } from '../components/coverage-selection-mixin'; import { getPeriodLabel, getPeriodDate } from './../helpers/periods'; import { getMeasuresAndVariations } from '../../../api/measures'; @@ -146,11 +146,11 @@ export default React.createClass({ let props = _.extend({}, this.props, this.state); return
- + - +
; } }); diff --git a/server/sonar-web/src/main/js/apps/overview/main/size.js b/server/sonar-web/src/main/js/apps/overview/main/structure.js similarity index 90% rename from server/sonar-web/src/main/js/apps/overview/main/size.js rename to server/sonar-web/src/main/js/apps/overview/main/structure.js index d1138a87f13..a823614a498 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/size.js +++ b/server/sonar-web/src/main/js/apps/overview/main/structure.js @@ -15,7 +15,7 @@ import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures import { LanguageDistribution } from '../components/language-distribution'; -export const GeneralSize = React.createClass({ +export const GeneralStructure = React.createClass({ propTypes: { leakPeriodLabel: React.PropTypes.string, leakPeriodDate: React.PropTypes.object @@ -51,9 +51,11 @@ export const GeneralSize = React.createClass({ render () { return - + - + {this.renderLanguageDistribution()} diff --git a/server/sonar-web/src/main/js/apps/overview/overview.js b/server/sonar-web/src/main/js/apps/overview/overview.js index 8301fd6add4..706f8b68d2e 100644 --- a/server/sonar-web/src/main/js/apps/overview/overview.js +++ b/server/sonar-web/src/main/js/apps/overview/overview.js @@ -3,10 +3,10 @@ import React from 'react'; import Gate from './gate/gate'; import GeneralMain from './main/main'; import Meta from './meta'; -import { SizeMain } from './domains/size-domain'; +import { StructureMain } from './domains/structure-domain'; import { DuplicationsMain } from './domains/duplications-domain'; import { CoverageMain } from './domains/coverage-domain'; -import { IssuesMain } from './domains/debt-domain'; +import { DebtMain } from './domains/debt-domain'; import { getMetrics } from '../../api/metrics'; import { RouterMixin } from '../../components/router/router'; @@ -45,7 +45,7 @@ export const Overview = React.createClass({ renderSize () { return
- +
; }, @@ -63,7 +63,7 @@ export const Overview = React.createClass({ renderIssues () { return
- +
; }, @@ -74,13 +74,13 @@ export const Overview = React.createClass({ switch (this.state.route) { case '': return this.renderMain(); - case '/size': + case '/structure': return this.renderSize(); case '/duplications': return this.renderDuplications(); - case '/tests': + case '/coverage': return this.renderTests(); - case '/issues': + case '/debt': return this.renderIssues(); default: throw new Error('Unknown route: ' + this.state.route); diff --git a/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js b/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js index bffbb2ba094..b55e44cc2b3 100644 --- a/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js +++ b/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js @@ -14,10 +14,10 @@ import { const FIXED_DASHBOARDS = [ { link: '', name: 'overview.page' }, - { link: '/issues', name: 'overview.domain.debt' }, - { link: '/tests', name: 'overview.domain.coverage' }, + { link: '/debt', name: 'overview.domain.debt' }, + { link: '/coverage', name: 'overview.domain.coverage' }, { link: '/duplications', name: 'overview.domain.duplications' }, - { link: '/size', name: 'overview.domain.size' } + { link: '/structure', name: 'overview.domain.structure' } ]; const SETTINGS_URLS = [ diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 033d44b6fd4..01d36315595 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -3146,7 +3146,7 @@ overview.gate.view.errors=The view failed the quality gate on the following cond overview.domain.debt=Technical Debt overview.domain.coverage=Coverage overview.domain.duplications=Duplications -overview.domain.size=Size +overview.domain.structure=Structure overview.chart.files=Files overview.chart.files.limit_message=Only {0} files are displayed. -- 2.39.5