From: Stas Vilchik Date: Tue, 27 Oct 2015 14:10:49 +0000 (+0100) Subject: SONAR-6331 fix for provisioned project X-Git-Tag: 5.3-RC1~444 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cb9e3a7e2ed97bc471f3d38aa788426942914fdc;p=sonarqube.git SONAR-6331 fix for provisioned project --- diff --git a/server/sonar-web/src/main/js/apps/overview/main.js b/server/sonar-web/src/main/js/apps/overview/main.js index f8232b489c3..8062198e26e 100644 --- a/server/sonar-web/src/main/js/apps/overview/main.js +++ b/server/sonar-web/src/main/js/apps/overview/main.js @@ -7,6 +7,7 @@ import CoverageMain from './coverage/main'; import DuplicationsMain from './duplications/main'; import SizeMain from './size/main'; import Meta from './meta'; +import Empty from './general/empty'; import { getMetrics } from '../../api/metrics'; @@ -22,7 +23,9 @@ export const Overview = React.createClass({ }, componentDidMount () { - this.requestMetrics(); + if (this.props.hasSnapshots) { + this.requestMetrics(); + } }, componentWillUnmount () { @@ -55,6 +58,10 @@ export const Overview = React.createClass({ }, render () { + if (!this.props.hasSnapshots) { + return
; + } + if (!this.state.metrics) { return null; } diff --git a/server/sonar-web/src/main/less/pages/overview.less b/server/sonar-web/src/main/less/pages/overview.less index ae03ce7e647..82cb4ea1aee 100644 --- a/server/sonar-web/src/main/less/pages/overview.less +++ b/server/sonar-web/src/main/less/pages/overview.less @@ -11,6 +11,10 @@ min-height: ~"calc(100vh - @{navbarGlobalHeight} - @{navbarContextHeight} - @{pageFooterHeight})"; } +.overview > .panel { + flex: 1; +} + .overview-main { flex: 1; box-sizing: border-box;