File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
src/homepageExperience/components/steps/cli Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 1+ // Libraries
12import React from 'react'
23
4+ // Components
35import CodeSnippet from 'src/shared/components/CodeSnippet'
6+
7+ // Constants
8+ import { DEFAULT_BUCKET } from 'src/writeData/components/WriteDataDetailsContext'
9+
10+ // Utils
411import { event } from 'src/cloud/utils/reporting'
512import { SafeBlankLink } from 'src/utils/SafeBlankLink'
613
714const logCopyCodeSnippet = ( ) => {
815 event ( 'firstMile.cliWizard.executeQuery.code.copied' )
916}
1017
11- export const ExecuteQuery = ( ) => {
12- const query = `influx query 'from(bucket:"sample-bucket") |> range(start:-10m)' --raw`
18+ type OwnProps = {
19+ bucket : string
20+ }
21+
22+ export const ExecuteQuery = ( props : OwnProps ) => {
23+ const { bucket} = props
24+ const bucketName = bucket === DEFAULT_BUCKET ? 'sample-bucket' : bucket
25+ const query = `influx query 'from(bucket:"${ bucketName } ") |> range(start:-10m)' --raw`
1326
1427 const fluxExample = `from(bucket: “weather-data”)
1528 |> range(start: -10m)
@@ -35,9 +48,9 @@ export const ExecuteQuery = () => {
3548 language = "properties"
3649 > </ CodeSnippet >
3750 < p style = { { marginTop : '60px' } } >
38- Let's write a Flux query in the InfluxCLI to read back all of the data
39- you wrote in the previous step. Copy the code snippet below into the
40- InfluxCLI .
51+ Let's write a Flux query in the InfluxDB CLI to read back all of the
52+ data you wrote in the previous step. Copy the code snippet below into
53+ the InfluxDB CLI .
4154 </ p >
4255 < CodeSnippet
4356 text = { query }
You can’t perform that action at this time.
0 commit comments