diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-04-13 09:16:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-13 09:16:13 +0200 |
commit | ee72d1678ac7d13fc093ebb90115eb807f7a2568 (patch) | |
tree | a8dfa8420c7190522386c3ae085575e98e9a6932 /server/sonar-web | |
parent | 0541ecafd7c57bc6edb4d89329d176e242704a8c (diff) | |
download | sonarqube-ee72d1678ac7d13fc093ebb90115eb807f7a2568.tar.gz sonarqube-ee72d1678ac7d13fc093ebb90115eb807f7a2568.zip |
apply feedback on projects visualizations (#1928)
* update visualizations descriptions
* do not filter provisioned projects out
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/js/apps/projects/styles.css | 3 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/projects/visualizations/QualityModel.js | 56 |
2 files changed, 30 insertions, 29 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/styles.css b/server/sonar-web/src/main/js/apps/projects/styles.css index 1f9a2fc8477..45f8cd2663b 100644 --- a/server/sonar-web/src/main/js/apps/projects/styles.css +++ b/server/sonar-web/src/main/js/apps/projects/styles.css @@ -199,9 +199,10 @@ .projects-visualizations-footer { margin-top: 8px; - padding: 15px 0; + padding: 15px 60px; border-top: 1px solid #e6e6e6; font-size: 12px; + line-height: 1.4; text-align: center; } diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/QualityModel.js b/server/sonar-web/src/main/js/apps/projects/visualizations/QualityModel.js index ada545c4dfc..1f8e04e3480 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/QualityModel.js +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/QualityModel.js @@ -56,11 +56,11 @@ export default class QualityModel extends React.PureComponent { getTooltip( project: Project, - x: number, + x: ?number, y: ?number, - size: number, - color1: number, - color2: number + size: ?number, + color1: ?number, + color2: ?number ) { const fullProjectName = this.props.displayOrganizations && project.organization ? `${project.organization.name} / <strong>${project.name}</strong>` @@ -77,30 +77,30 @@ export default class QualityModel extends React.PureComponent { } render() { - const items = this.props.projects - .filter( - ({ measures }) => - measures[X_METRIC] != null && - measures[SIZE_METRIC] != null && - measures[COLOR_METRIC_1] != null && - measures[COLOR_METRIC_2] != null - ) - .map(project => { - const x = Number(project.measures[X_METRIC]); - const y = project.measures[Y_METRIC] != null ? Number(project.measures[Y_METRIC]) : null; - const size = Number(project.measures[SIZE_METRIC]); - const color1 = Number(project.measures[COLOR_METRIC_1]); - const color2 = Number(project.measures[COLOR_METRIC_2]); - return { - x, - y: y || 0, - size, - color: RATING_COLORS[Math.max(color1, color2) - 1], - key: project.key, - tooltip: this.getTooltip(project, x, y, size, color1, color2), - link: getProjectUrl(project.key) - }; - }); + const items = this.props.projects.map(project => { + const x = project.measures[X_METRIC] != null ? Number(project.measures[X_METRIC]) : null; + const y = project.measures[Y_METRIC] != null ? Number(project.measures[Y_METRIC]) : null; + const size = project.measures[SIZE_METRIC] != null + ? Number(project.measures[SIZE_METRIC]) + : null; + const color1 = project.measures[COLOR_METRIC_1] != null + ? Number(project.measures[COLOR_METRIC_1]) + : null; + const color2 = project.measures[COLOR_METRIC_2] != null + ? Number(project.measures[COLOR_METRIC_2]) + : null; + return { + x: x || 0, + y: y || 0, + size: size || 0, + color: color1 != null && color2 != null + ? RATING_COLORS[Math.max(color1, color2) - 1] + : undefined, + key: project.key, + tooltip: this.getTooltip(project, x, y, size, color1, color2), + link: getProjectUrl(project.key) + }; + }); const formatXTick = tick => formatMeasure(tick, X_METRIC_TYPE); const formatYTick = tick => formatMeasure(tick, Y_METRIC_TYPE); return ( |