aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-10-27 15:10:49 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-10-27 15:10:49 +0100
commitcb9e3a7e2ed97bc471f3d38aa788426942914fdc (patch)
tree0e5a63e59b4d3c44cf90b4dfc90afa219c431501 /server
parent631c474b504dabbf68cf39b836407675ef59e725 (diff)
downloadsonarqube-cb9e3a7e2ed97bc471f3d38aa788426942914fdc.tar.gz
sonarqube-cb9e3a7e2ed97bc471f3d38aa788426942914fdc.zip
SONAR-6331 fix for provisioned project
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main.js9
-rw-r--r--server/sonar-web/src/main/less/pages/overview.less4
2 files changed, 12 insertions, 1 deletions
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 <div className="overview"><Empty/></div>;
+ }
+
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;