11// Libraries
22import React , { FC , useContext } from 'react'
3- import {
4- Panel ,
5- ComponentSize ,
6- InfluxColors ,
7- QuestionMarkTooltip ,
8- } from '@influxdata/clockface'
3+ import { Panel , ComponentSize , InfluxColors } from '@influxdata/clockface'
94
105// Components
116import { View } from 'src/visualization'
127import { UsageContext } from 'src/usage/context/usage'
138
14- // Constants
15- const QUERY_COUNT_VECTOR_NAME = 'Query Count'
16-
179// Types
1810import {
1911 SingleStatViewProperties ,
@@ -47,10 +39,6 @@ const UsageSingleStat: FC<Props> = ({
4739 decimalPlaces : { isEnforced : false , digits : 0 } ,
4840 }
4941
50- // Adjusts table properties to warn user that only flux queries are included in the Query Count.
51- const isQueryCount : Boolean = usageVector . name === QUERY_COUNT_VECTOR_NAME
52- const vectorName = isQueryCount ? 'Query Count (Flux Only)' : usageVector . name
53-
5442 const error = fromFluxResult ?. table ?. columns ?. error ?. data ?. [ 0 ]
5543
5644 return (
@@ -63,14 +51,9 @@ const UsageSingleStat: FC<Props> = ({
6351 size = { ComponentSize . ExtraSmall }
6452 testID = "usage-single-stat--header"
6553 >
66- < h5 >
67- { `${ vectorName } ${
68- usageVector . unit !== '' ? `(${ usageVector . unit } )` : ''
69- } `}
70- { isQueryCount && (
71- < QuestionMarkTooltip tooltipContents = { queryCountWarning } />
72- ) }
73- </ h5 >
54+ < h5 > { `${ usageVector . name } ${
55+ usageVector . unit !== '' ? `(${ usageVector . unit } )` : ''
56+ } `} </ h5 >
7457 </ Panel . Header >
7558 < Panel . Body className = "panel-body--size" style = { { height : 300 / length } } >
7659 < View
@@ -85,8 +68,4 @@ const UsageSingleStat: FC<Props> = ({
8568 )
8669}
8770
88- const queryCountWarning = (
89- < p > SQL and InfluxQL query counts are not displayed.</ p >
90- )
91-
9271export default UsageSingleStat
0 commit comments