SONAR-6331 fix for provisioned project

This commit is contained in:
Stas Vilchik 2015-10-27 15:10:49 +01:00
parent 631c474b50
commit cb9e3a7e2e
2 changed files with 12 additions and 1 deletions

View File

@ -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;
}

View File

@ -11,6 +11,10 @@
min-height: ~"calc(100vh - @{navbarGlobalHeight} - @{navbarContextHeight} - @{pageFooterHeight})";
}
.overview > .panel {
flex: 1;
}
.overview-main {
flex: 1;
box-sizing: border-box;