Hide scatterplot
@@ -135,15 +135,6 @@ export default class Deployments extends React.Component {
renderPageContents() {
let leastHealthyDeployments = this.getLeastHealthyDeployments(this.state.metrics);
- let scatterplotData = _.reduce(this.state.metrics, (mem, datum) => {
- if (!_.isNil(datum.successRate) && !_.isNil(datum.latency)) {
- mem.push(datum);
- }
- return mem;
- }, []);
-
- let slowestNode = _.maxBy(scatterplotData, 'latency.P99');
- let fastestNode = _.minBy(scatterplotData, 'latency.P99');
return (
<div className="clearfix">
@@ -162,9 +153,38 @@ export default class Deployments extends React.Component {
})
}
</Row>
- <Row gutter={rowGutter}>
- { _.isEmpty(scatterplotData) ? null :
- <div className="deployments-scatterplot">
+ {/* <Row gutter={rowGutter}>
+ { this.renderScatterplot() }
+ </Row> */}
+ <div className="deployments-list">
+ <TabbedMetricsTable
+ resource="deployment"
+ lastUpdated={this.state.lastUpdated}
+ metrics={this.state.metrics}
+ hideSparklines={this.state.limitSparklineData}
+ metricsWindow={this.state.metricsWindow}
+ pathPrefix={this.props.pathPrefix} />
+ </div>
+ </div>
+ );
+ }
+
+ renderScatterplot() {
+ let scatterplotData = _.reduce(this.state.metrics, (mem, datum) => {
+ if (!_.isNil(datum.successRate) && !_.isNil(datum.latency)) {
+ mem.push(datum);
+ }
+ return mem;
+ }, []);
+
+ let slowestNode = _.maxBy(scatterplotData, 'latency.P99');
+ let fastestNode = _.minBy(scatterplotData, 'latency.P99');
+
+ if (_.isEmpty(scatterplotData)) {
+ return null;
+ }
+
+ return (<div className="deployments-scatterplot">
<div className="scatterplot-info">
<div className="subsection-header">Success rate vs p99 latency</div>
</div>
@@ -184,20 +204,7 @@ export default class Deployments extends React.Component {
containerClassName="scatterplot-chart" />
</div></Col>
</Row>
- </div>
- }
- </Row>
- <div className="deployments-list">
- <TabbedMetricsTable
- resource="deployment"
- lastUpdated={this.state.lastUpdated}
- metrics={this.state.metrics}
- hideSparklines={this.state.limitSparklineData}
- metricsWindow={this.state.metricsWindow}
- pathPrefix={this.props.pathPrefix} />
- </div>
- </div>
- );
+ </div>);
}
render() {
