diff --git a/ui/src/shared/components/SingleStatTransform.tsx b/ui/src/shared/components/SingleStatTransform.tsx index 54e59e2218..593bc970f3 100644 --- a/ui/src/shared/components/SingleStatTransform.tsx +++ b/ui/src/shared/components/SingleStatTransform.tsx @@ -2,12 +2,18 @@ import React, {PureComponent} from 'react' import _ from 'lodash' +// Components +import EmptyGraphMessage from 'src/shared/components/EmptyGraphMessage' + // Parsing import getLastValues from 'src/shared/parsing/flux/fluxToSingleStat' // Types import {FluxTable} from 'src/types' +const NON_NUMERIC_ERROR = + 'Could not display single stat because your values are non-numeric' + interface Props { tables: FluxTable[] children: (stat: number) => JSX.Element @@ -18,11 +24,7 @@ export default class SingleStatTransform extends PureComponent { const lastValue = +this.lastValue if (!_.isFinite(lastValue)) { - return ( -
- Could not display single stat because your values are non-numeric -
- ) + return } return this.props.children(lastValue)