aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-04-08 11:34:59 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-04-08 11:34:59 +0200
commit11d0c8063cd6a27698465acecff1f41644e42c7e (patch)
tree4ccbb309661de7f0d54d7b497aeb3e035ae85199
parent3db734c2a9f3994a4751cf631ff8bace529acdc4 (diff)
downloadsonarqube-11d0c8063cd6a27698465acecff1f41644e42c7e.tar.gz
sonarqube-11d0c8063cd6a27698465acecff1f41644e42c7e.zip
SONAR-7402 make it possible to see more about domain on the overview page
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/code-smells.js13
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/coverage.js29
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/duplications.js13
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/risk.js19
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/structure.js13
-rw-r--r--server/sonar-web/src/main/less/pages/overview.less10
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties3
7 files changed, 75 insertions, 25 deletions
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 <Domain>
- <DomainHeader component={this.props.component}
- title={translate('overview.domain.code_smells')}/>
+ <div className="overview-card-header">
+ <div className="overview-title">
+ <a href={domainUrl}>
+ {translate('metric.code_smells.name')}
+ </a>
+ </div>
+ </div>
<DomainPanel>
<DomainNutshell>
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 <Domain>
- <DomainHeader component={this.props.component}
- title={translate('overview.domain.coverage')}/>
+ <div className="overview-card-header">
+ <div className="overview-title">
+ <a href={domainUrl}>
+ {translate('metric.coverage.name')}
+ </a>
+ </div>
+ </div>
<DomainPanel>
<DomainNutshell>
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 <Domain>
- <DomainHeader component={this.props.component}
- title={translate('overview.domain.duplications')}/>
+ <div className="overview-card-header">
+ <div className="overview-title">
+ <a href={domainUrl}>
+ {translate('overview.domain.duplications')}
+ </a>
+ </div>
+ </div>
<DomainPanel>
<DomainNutshell>
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 <div className="overview-card overview-card-special">
- <DomainHeader component={this.props.component}
- title={translate('overview.domain.risk')}/>
+ <div className="overview-card-header">
+ <div className="overview-title">
+ <a href={bugsDomainUrl}>
+ {translate('metric.bugs.name')}
+ </a>
+ {' & '}
+ <a href={vulnerabilitiesDomainUrl}>
+ {translate('metric.vulnerabilities.name')}
+ </a>
+ </div>
+ </div>
<DomainPanel>
<DomainNutshell>
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 <Domain>
- <DomainHeader component={this.props.component}
- title={translate('overview.domain.structure')}/>
+ <div className="overview-card-header">
+ <div className="overview-title">
+ <a href={domainUrl}>
+ {translate('overview.domain.structure')}
+ </a>
+ </div>
+ </div>
<DomainPanel>
<DomainNutshell>
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