From 36177b204dc28b2d5aaf1cda04eda0089a925147 Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 21 Feb 2017 16:27:40 -0800 Subject: [PATCH] Remove height prop from line graphs --- ui/src/shared/components/LayoutRenderer.js | 33 +++++----------------- ui/src/shared/components/LineGraph.js | 3 +- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/ui/src/shared/components/LayoutRenderer.js b/ui/src/shared/components/LayoutRenderer.js index 5b49a71427..1eea30268e 100644 --- a/ui/src/shared/components/LayoutRenderer.js +++ b/ui/src/shared/components/LayoutRenderer.js @@ -10,9 +10,7 @@ const RefreshingLineGraph = AutoRefresh(LineGraph); const RefreshingSingleStat = AutoRefresh(SingleStat); const { - children, arrayOf, - node, number, shape, string, @@ -114,9 +112,12 @@ export const LayoutRenderer = React.createClass({ } return ( - - - +
+

{cell.name}

+
+ +
+
); }); }, @@ -147,24 +148,4 @@ export const LayoutRenderer = React.createClass({ }, }); -const Wrapper = React.createClass({ - propTypes: { - children: node.isRequired, - }, - render() { - const that = this; - const newChildren = React.Children.map(this.props.children, (child) => { - return React.cloneElement(child, { - height: that.props.style.height, - }) - }) - - return ( -
- {newChildren} -
- ); - } -}); - -export default LayoutRenderer; +export default LayoutRenderer; \ No newline at end of file diff --git a/ui/src/shared/components/LineGraph.js b/ui/src/shared/components/LineGraph.js index cfd38b73f7..18cee048e6 100644 --- a/ui/src/shared/components/LineGraph.js +++ b/ui/src/shared/components/LineGraph.js @@ -25,7 +25,6 @@ export default React.createClass({ y: arrayOf(number), y2: arrayOf(number), }), - height: string, title: string, isFetchingInitially: bool, isRefreshing: bool, @@ -105,7 +104,7 @@ export default React.createClass({
{isRefreshing ? this.renderSpinner() : null}