From: Stas Vilchik Date: Wed, 24 Feb 2016 13:24:28 +0000 (+0100) Subject: fix widgets resizing on the overview page X-Git-Tag: 5.5-M5~10^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f0c7c0b41a8f9d1e47710a5bd53ac5bc0987d05d;p=sonarqube.git fix widgets resizing on the overview page --- diff --git a/server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js b/server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js index daa9b8141bd..a60be02070f 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js +++ b/server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js @@ -59,7 +59,7 @@ export const ComplexityDistribution = React.createClass({ }, render () { - return
+ return
{this.renderBarChart()}
; } diff --git a/server/sonar-web/src/main/js/apps/overview/components/domain-bubble-chart.js b/server/sonar-web/src/main/js/apps/overview/components/domain-bubble-chart.js index 6554987adf6..ddc46fb99ed 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/domain-bubble-chart.js +++ b/server/sonar-web/src/main/js/apps/overview/components/domain-bubble-chart.js @@ -154,7 +154,7 @@ export class DomainBubbleChart extends React.Component {
-
+
{this.state.yMetric.name}
diff --git a/server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js b/server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js index 269389b22d2..fe497ecb389 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js +++ b/server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js @@ -151,7 +151,7 @@ export const DomainTimeline = React.createClass({ let formatValue = (value) => formatMeasure(value, metricType); let formatYTick = (tick) => formatMeasure(tick, getShortType(metricType)); - return
+ return
-
+
{this.renderTreemap()}
; diff --git a/server/sonar-web/src/main/js/apps/overview/components/language-distribution.js b/server/sonar-web/src/main/js/apps/overview/components/language-distribution.js index 51b31680074..01685ca3de0 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/language-distribution.js +++ b/server/sonar-web/src/main/js/apps/overview/components/language-distribution.js @@ -74,7 +74,10 @@ export const LanguageDistribution = React.createClass({ }, render () { - return
+ const count = this.props.distribution.split(';').length; + const height = count * 25; + + return
{this.renderBarChart()}
; } 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 dfe8cff2dbc..3be2cab002b 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 @@ -111,7 +111,7 @@ export const NclocDistribution = React.createClass({ {translateWithParameters('overview.chart.legend.size_x', translate('metric.ncloc.name'))}
-
+
{this.renderBarChart()}
; diff --git a/server/sonar-web/src/main/less/pages/overview.less b/server/sonar-web/src/main/less/pages/overview.less index 64e16df4a2c..35a9a7c7a02 100644 --- a/server/sonar-web/src/main/less/pages/overview.less +++ b/server/sonar-web/src/main/less/pages/overview.less @@ -419,6 +419,10 @@ padding-top: 10px; padding-bottom: 15px; + svg { + position: absolute; + } + .bar-chart-bar { fill: @blue; } @@ -444,6 +448,10 @@ box-sizing: border-box; background-color: #fff; + svg { + position: absolute; + } + .line-chart-path { fill: none; stroke: @blue; @@ -523,6 +531,9 @@ } .overview-treemap { + & > div { + position: absolute; + } } .overview-chart-placeholder { @@ -534,9 +545,12 @@ .overview-bubble-chart { padding: 10px; border: 1px solid @barBorderColor; - box-sizing: border-box; background-color: #fff; + svg { + position: absolute; + } + .bubble-chart-bubble { fill: @blue; fill-opacity: 0.2;