diff --git a/src/components/SummaryPanel/ErrorRatePieChart.tsx b/src/components/SummaryPanel/ErrorRatePieChart.tsx deleted file mode 100644 index 2ff1918e0f..0000000000 --- a/src/components/SummaryPanel/ErrorRatePieChart.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import * as React from 'react'; -import { PieChart } from 'patternfly-react'; - -type ErrorRatePieChartPropType = { - percent2xx: number; - percent3xx: number; - percent4xx: number; - percent5xx: number; - width?: number; - height?: number; - showLegend?: boolean; - legendPos?: string; // e.g. right, left -}; - -export default class ErrorRatePieChart extends React.Component { - static defaultProps: ErrorRatePieChartPropType = { - percent2xx: 0, - percent3xx: 0, - percent4xx: 0, - percent5xx: 0, - width: 230, - height: 110, - showLegend: true, - legendPos: 'bottom' - }; - - constructor(props: ErrorRatePieChartPropType) { - super(props); - } - - render() { - return ( - - ); - } -} diff --git a/src/components/SummaryPanel/InOutRateChart.tsx b/src/components/SummaryPanel/InOutRateChart.tsx new file mode 100644 index 0000000000..b7a136378a --- /dev/null +++ b/src/components/SummaryPanel/InOutRateChart.tsx @@ -0,0 +1,77 @@ +import * as React from 'react'; +import { StackedBarChart } from 'patternfly-react'; + +type InOutRateChartPropType = { + percent2xxIn: number; + percent3xxIn: number; + percent4xxIn: number; + percent5xxIn: number; + percent2xxOut: number; + percent3xxOut: number; + percent4xxOut: number; + percent5xxOut: number; + width?: number; + height?: number; + showLegend?: boolean; + legendPos?: string; // e.g. right, left +}; + +export default class InOutRateChart extends React.Component { + static defaultProps: InOutRateChartPropType = { + percent2xxIn: 0, + percent3xxIn: 0, + percent4xxIn: 0, + percent5xxIn: 0, + percent2xxOut: 0, + percent3xxOut: 0, + percent4xxOut: 0, + percent5xxOut: 0, + height: 150, + showLegend: true, + legendPos: 'bottom' + }; + + constructor(props: InOutRateChartPropType) { + super(props); + } + + render() { + return ( + + ); + } +} diff --git a/src/components/SummaryPanel/InOutRateTable.tsx b/src/components/SummaryPanel/InOutRateTable.tsx index 27a19b0c53..a2896b1727 100644 --- a/src/components/SummaryPanel/InOutRateTable.tsx +++ b/src/components/SummaryPanel/InOutRateTable.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import ErrorRatePieChart from './ErrorRatePieChart'; +import InOutRateChart from './InOutRateChart'; type InOutRateTablePropType = { title: string; @@ -66,25 +66,21 @@ export default class InOutRateTable extends React.Component{percentOutSuccess.toFixed(2)} {percentOutErr.toFixed(2)} + + + + - - - - - - diff --git a/src/components/SummaryPanel/RateChart.tsx b/src/components/SummaryPanel/RateChart.tsx new file mode 100644 index 0000000000..79f466be47 --- /dev/null +++ b/src/components/SummaryPanel/RateChart.tsx @@ -0,0 +1,69 @@ +import * as React from 'react'; +import { StackedBarChart } from 'patternfly-react'; + +type RateChartPropType = { + percent2xx: number; + percent3xx: number; + percent4xx: number; + percent5xx: number; + width?: number; + height?: number; + showLegend?: boolean; + legendPos?: string; // e.g. right, left +}; + +export default class RateChart extends React.Component { + static defaultProps: RateChartPropType = { + percent2xx: 0, + percent3xx: 0, + percent4xx: 0, + percent5xx: 0, + height: 100, + showLegend: true, + legendPos: 'bottom' + }; + + constructor(props: RateChartPropType) { + super(props); + } + + render() { + return ( + + ); + } +} diff --git a/src/components/SummaryPanel/RateTable.tsx b/src/components/SummaryPanel/RateTable.tsx index c5d7980f71..89d7f160d3 100644 --- a/src/components/SummaryPanel/RateTable.tsx +++ b/src/components/SummaryPanel/RateTable.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import ErrorRatePieChart from './ErrorRatePieChart'; +import RateChart from './RateChart'; type RateTablePropType = { title: string; @@ -43,12 +43,7 @@ export default class RateTable extends React.Component {
In - -
Out - +
- + ); }