From 8de7cbc9b0565e43a17bdbf2b0fc886a3c248c4f Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 1 Mar 2016 12:25:49 +0100 Subject: [PATCH] fix widgets resizing on the overview page --- .../src/main/js/apps/overview/components/domain-treemap.js | 5 ++++- .../main/js/apps/overview/components/ncloc-distribution.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js b/server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js index 635c0cb41e6..3addeefc02b 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js +++ b/server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js @@ -133,10 +133,13 @@ export class DomainTreemap extends React.Component { const canBeClicked = node => node.qualifier !== 'FIL' && node.qualifier !== 'UTS'; + // FIXME remove this magic number + const height = HEIGHT - 35; + return ; diff --git a/server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js b/server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js index 3be2cab002b..5e3c3ccb31e 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js +++ b/server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js @@ -104,6 +104,9 @@ export const NclocDistribution = React.createClass({ }, render () { + const componentsCount = this.state.components ? this.state.components.length : 1; + const height = componentsCount * 25; + return

{translate('overview.chart.components')}

@@ -111,7 +114,7 @@ export const NclocDistribution = React.createClass({ {translateWithParameters('overview.chart.legend.size_x', translate('metric.ncloc.name'))}
-
+
{this.renderBarChart()}
; -- 2.39.5