Skip to content

Commit

Permalink
chore: revert messaging regarding query count sources
Browse files Browse the repository at this point in the history
retrigger ci
  • Loading branch information
david-rusnak authored and wdoconnell committed Sep 9, 2024
1 parent 7ffd3cc commit 6907740
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/cloud/usage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Organization} from '../../../src/types'

const statHeaders = [
'Data In (MB)',
'Query Count (Flux Only) ?',
'Query Count',
'Storage (GB-hr)',
'Data Out (GB)',
]
Expand Down
29 changes: 4 additions & 25 deletions src/usage/UsageSingleStat.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
// Libraries
import React, {FC, useContext} from 'react'
import {
Panel,
ComponentSize,
InfluxColors,
QuestionMarkTooltip,
} from '@influxdata/clockface'
import {Panel, ComponentSize, InfluxColors} from '@influxdata/clockface'

// Components
import {View} from 'src/visualization'
import {UsageContext} from 'src/usage/context/usage'

// Constants
const QUERY_COUNT_VECTOR_NAME = 'Query Count'

// Types
import {
SingleStatViewProperties,
Expand Down Expand Up @@ -47,10 +39,6 @@ const UsageSingleStat: FC<Props> = ({
decimalPlaces: {isEnforced: false, digits: 0},
}

// Adjusts table properties to warn user that only flux queries are included in the Query Count.
const isQueryCount: Boolean = usageVector.name === QUERY_COUNT_VECTOR_NAME
const vectorName = isQueryCount ? 'Query Count (Flux Only)' : usageVector.name

const error = fromFluxResult?.table?.columns?.error?.data?.[0]

return (
Expand All @@ -63,14 +51,9 @@ const UsageSingleStat: FC<Props> = ({
size={ComponentSize.ExtraSmall}
testID="usage-single-stat--header"
>
<h5>
{`${vectorName} ${
usageVector.unit !== '' ? `(${usageVector.unit})` : ''
}`}
{isQueryCount && (
<QuestionMarkTooltip tooltipContents={queryCountWarning} />
)}
</h5>
<h5>{`${usageVector.name} ${
usageVector.unit !== '' ? `(${usageVector.unit})` : ''
}`}</h5>
</Panel.Header>
<Panel.Body className="panel-body--size" style={{height: 300 / length}}>
<View
Expand All @@ -85,8 +68,4 @@ const UsageSingleStat: FC<Props> = ({
)
}

const queryCountWarning = (
<p>SQL and InfluxQL query counts are not displayed.</p>
)

export default UsageSingleStat

0 comments on commit 6907740

Please sign in to comment.