Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: revert messaging regarding query count sources #6941

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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