From: Stas Vilchik Date: Fri, 8 Apr 2016 09:34:59 +0000 (+0200) Subject: SONAR-7402 make it possible to see more about domain on the overview page X-Git-Tag: 5.5-RC2~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=11d0c8063cd6a27698465acecff1f41644e42c7e;p=sonarqube.git SONAR-7402 make it possible to see more about domain on the overview page --- diff --git a/server/sonar-web/src/main/js/apps/overview/main/code-smells.js b/server/sonar-web/src/main/js/apps/overview/main/code-smells.js index 95fae43f517..d731a4c84d8 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/code-smells.js +++ b/server/sonar-web/src/main/js/apps/overview/main/code-smells.js @@ -22,7 +22,6 @@ import React from 'react'; import { Domain, - DomainHeader, DomainPanel, DomainNutshell, DomainLeak, @@ -91,9 +90,17 @@ export const CodeSmells = React.createClass({ const { snapshotDate } = this.props.component; const formattedSnapshotDate = moment(snapshotDate).format('LLL'); + const domainUrl = window.baseUrl + '/component_measures/domain/Maintainability?id=' + + encodeURIComponent(this.props.component.key); + return - +
+
+ + {translate('metric.code_smells.name')} + +
+
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 8f7709438df..4d619bbf379 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 @@ -19,14 +19,15 @@ */ import React from 'react'; -import { Domain, - DomainHeader, - DomainPanel, - DomainNutshell, - DomainLeak, - MeasuresList, - Measure, - DomainMixin } from './components'; +import { + Domain, + DomainPanel, + DomainNutshell, + DomainLeak, + MeasuresList, + Measure, + DomainMixin +} from './components'; import { DrilldownLink } from '../../../components/shared/drilldown-link'; import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin'; import { DonutChart } from '../../../components/charts/donut-chart'; @@ -103,9 +104,17 @@ export const GeneralCoverage = React.createClass({ { value: 100 - this.props.measures[coverageMetric], fill: '#d4333f' } ]; + const domainUrl = window.baseUrl + '/component_measures/domain/Tests?id=' + + encodeURIComponent(this.props.component.key); + 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 8077c4d97c4..22162b18718 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 @@ -20,7 +20,6 @@ import React from 'react'; import { Domain, - DomainHeader, DomainPanel, DomainNutshell, DomainLeak, @@ -75,9 +74,17 @@ export const GeneralDuplications = React.createClass({ { value: Math.max(0, 20 - this.props.measures['duplicated_lines_density']), fill: '#e6e6e6' } ]; + const domainUrl = window.baseUrl + '/component_measures/domain/Duplication?id=' + + encodeURIComponent(this.props.component.key); + return - + diff --git a/server/sonar-web/src/main/js/apps/overview/main/risk.js b/server/sonar-web/src/main/js/apps/overview/main/risk.js index d6cf8f95e02..d6942d02056 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/risk.js +++ b/server/sonar-web/src/main/js/apps/overview/main/risk.js @@ -21,7 +21,6 @@ import moment from 'moment'; import React from 'react'; import { - DomainHeader, DomainPanel, DomainNutshell, DomainLeak, @@ -92,9 +91,23 @@ export const Risk = React.createClass({ const bugs = this.props.measures['bugs'] || 0; const vulnerabilities = this.props.measures['vulnerabilities'] || 0; + const bugsDomainUrl = window.baseUrl + '/component_measures/domain/Reliability?id=' + + encodeURIComponent(this.props.component.key); + const vulnerabilitiesDomainUrl = window.baseUrl + '/component_measures/domain/Security?id=' + + encodeURIComponent(this.props.component.key); + return
- + diff --git a/server/sonar-web/src/main/js/apps/overview/main/structure.js b/server/sonar-web/src/main/js/apps/overview/main/structure.js index 2f431e63227..fe0e43bd5e1 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/structure.js +++ b/server/sonar-web/src/main/js/apps/overview/main/structure.js @@ -20,7 +20,6 @@ import React from 'react'; import { Domain, - DomainHeader, DomainPanel, DomainNutshell, DomainLeak, @@ -69,9 +68,17 @@ export const GeneralStructure = React.createClass({ }, render () { + const domainUrl = window.baseUrl + '/component_measures/domain/Size?id=' + + encodeURIComponent(this.props.component.key); + return - + diff --git a/server/sonar-web/src/main/less/pages/overview.less b/server/sonar-web/src/main/less/pages/overview.less index de53c77286e..4970d78111b 100644 --- a/server/sonar-web/src/main/less/pages/overview.less +++ b/server/sonar-web/src/main/less/pages/overview.less @@ -88,6 +88,16 @@ font-size: 14px; letter-spacing: 0.05em; } + + & > a { + border-bottom-color: #d0d0d0; + color: @baseFontColor; + + &:hover, &:focus { + border-bottom-color: @lightBlue; + color: @blue; + } + } } /* 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 1fdfa23b98d..1ad63828b94 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -3122,9 +3122,6 @@ overview.gate.view.no_alert=The view has passed the quality gate. overview.gate.view.warnings=The view has warnings on the following quality gate conditions: {0}. overview.gate.view.errors=The view failed the quality gate on the following conditions: {0}. -overview.domain.risk=Bugs & Vulnerabilities -overview.domain.code_smells=Code Smells -overview.domain.coverage=Coverage overview.domain.duplications=Duplications overview.domain.structure=Structure