From 9db25c335e20046334f2c594ca7c7c591a487e53 Mon Sep 17 00:00:00 2001 From: Russ Savage Date: Mon, 24 Feb 2020 14:41:34 -0800 Subject: [PATCH 1/6] fix(fluxFunctions): fix category on fromRange --- ui/src/shared/constants/fluxFunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/shared/constants/fluxFunctions.ts b/ui/src/shared/constants/fluxFunctions.ts index 084088d572d..9345207a512 100644 --- a/ui/src/shared/constants/fluxFunctions.ts +++ b/ui/src/shared/constants/fluxFunctions.ts @@ -3274,7 +3274,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ desc: 'Filters input data by measurement.', example: 'query.fromRange(bucket: "example-bucket", start: v.timeRangeStart)', - category: 'Input', + category: 'Inputs', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/experimental/query/fromrange/', }, From 4a0c6c64f92baaca2c3b12a8000a15758228c29d Mon Sep 17 00:00:00 2001 From: Russ Savage Date: Mon, 24 Feb 2020 15:01:32 -0800 Subject: [PATCH 2/6] fix(fluxFunctions): update to use example-bucket --- ui/src/shared/constants/fluxFunctions.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/src/shared/constants/fluxFunctions.ts b/ui/src/shared/constants/fluxFunctions.ts index 9345207a512..7bddb1acdfb 100644 --- a/ui/src/shared/constants/fluxFunctions.ts +++ b/ui/src/shared/constants/fluxFunctions.ts @@ -17,7 +17,7 @@ export const FROM: FluxToolbarFunction = { package: '', desc: 'Used to retrieve data from an InfluxDB data source. It returns a stream of tables from the specified bucket. Each unique series is contained within its own table. Each record in the table represents a single point in the series.', - example: 'from(bucket: "telegraf")', + example: 'from(bucket: "example-bucket")', category: 'Inputs', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/built-in/inputs/from/', @@ -4805,7 +4805,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ ], package: '', desc: 'The `to()` function writes data to an InfluxDB v2.0 bucket.', - example: 'to(bucket:"my-bucket", org:"my-org")', + example: 'to(bucket: "example-bucket", org: "example-org")', category: 'Outputs', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/built-in/outputs/to/', @@ -5002,7 +5002,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ ], package: 'influxdata/influxdb/v1', desc: 'Returns a list of tag keys for a specific measurement.', - example: 'v1.measurementTagKeys(bucket: "telegraf", measurement: "mem")', + example: 'v1.measurementTagKeys(bucket: "example-bucket", measurement: "mem")', category: 'Transformations', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys/', @@ -5030,7 +5030,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ package: 'influxdata/influxdb/v1', desc: 'Returns a list of tag values for a specific measurement.', example: - 'v1.measurementTagValues(bucket: "telegraf", measurement: "mem", tag: "host")', + 'v1.measurementTagValues(bucket: "example-bucket", measurement: "mem", tag: "host")', category: 'Transformations', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues/', @@ -5046,7 +5046,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ ], package: 'influxdata/influxdb/v1', desc: 'Returns a list of measurements in a specific bucket.', - example: 'v1.measurements(bucket: "telegraf")', + example: 'v1.measurements(bucket: "example-bucket")', category: 'Transformations', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/influxdb-v1/measurements/', @@ -5074,7 +5074,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ ], package: 'influxdata/influxdb/v1', desc: 'Returns a list of tag keys for all series that match the predicate.', - example: 'v1.tagKeys(bucket: "telegraf")', + example: 'v1.tagKeys(bucket: "example-bucket")', category: 'Transformations', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys/', @@ -5107,7 +5107,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ ], package: 'influxdata/influxdb/v1', desc: 'Returns a list of unique values for a given tag.', - example: 'v1.tagValues(bucket: "telegraf")', + example: 'v1.tagValues(bucket: "example-bucket")', category: 'Transformations', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues/', From f13abecc5149f6d58d20796282669fec22893993 Mon Sep 17 00:00:00 2001 From: Russ Savage Date: Mon, 24 Feb 2020 15:15:52 -0800 Subject: [PATCH 3/6] fix(fluxFunctions): run prettier --- ui/src/shared/constants/fluxFunctions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/shared/constants/fluxFunctions.ts b/ui/src/shared/constants/fluxFunctions.ts index 7bddb1acdfb..c7a1ced0e02 100644 --- a/ui/src/shared/constants/fluxFunctions.ts +++ b/ui/src/shared/constants/fluxFunctions.ts @@ -5002,7 +5002,8 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ ], package: 'influxdata/influxdb/v1', desc: 'Returns a list of tag keys for a specific measurement.', - example: 'v1.measurementTagKeys(bucket: "example-bucket", measurement: "mem")', + example: + 'v1.measurementTagKeys(bucket: "example-bucket", measurement: "mem")', category: 'Transformations', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys/', From 9b04aa64d868afc2bb5b5748b577308e8c286f12 Mon Sep 17 00:00:00 2001 From: Russ Savage Date: Mon, 24 Feb 2020 15:34:08 -0800 Subject: [PATCH 4/6] fix(fluxFunctions): update description for experimental/query functions --- ui/src/shared/constants/fluxFunctions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/src/shared/constants/fluxFunctions.ts b/ui/src/shared/constants/fluxFunctions.ts index c7a1ced0e02..d155544d9ff 100644 --- a/ui/src/shared/constants/fluxFunctions.ts +++ b/ui/src/shared/constants/fluxFunctions.ts @@ -3271,7 +3271,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ }, ], package: 'experimental/query', - desc: 'Filters input data by measurement.', + desc: 'Returns all data from a specified bucket within given time bounds.', example: 'query.fromRange(bucket: "example-bucket", start: v.timeRangeStart)', category: 'Inputs', @@ -3313,7 +3313,8 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ }, ], package: 'experimental/query', - desc: 'Filters input data by measurement.', + desc: + 'Queries data from a specified bucket within given time bounds, filters data by measurement, field, and optional predicate expressions.', example: 'query.inBucket(bucket: "example-bucket", start: v.timeRangeStart, measurement: "measurement_name", fields: ["field_name"], predicate: (r) => r.host == "host1")', category: 'Input', From 54c92c18187097bf370c15187c80bc7b4858e0ad Mon Sep 17 00:00:00 2001 From: Russ Savage Date: Mon, 24 Feb 2020 15:37:10 -0800 Subject: [PATCH 5/6] fix(fluxFunctions): update category for inBucket --- ui/src/shared/constants/fluxFunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/shared/constants/fluxFunctions.ts b/ui/src/shared/constants/fluxFunctions.ts index d155544d9ff..eb7515c602a 100644 --- a/ui/src/shared/constants/fluxFunctions.ts +++ b/ui/src/shared/constants/fluxFunctions.ts @@ -3317,7 +3317,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ 'Queries data from a specified bucket within given time bounds, filters data by measurement, field, and optional predicate expressions.', example: 'query.inBucket(bucket: "example-bucket", start: v.timeRangeStart, measurement: "measurement_name", fields: ["field_name"], predicate: (r) => r.host == "host1")', - category: 'Input', + category: 'Inputs', link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/experimental/query/inbucket/', }, From b04e587c64f75faeebec49670b793aba4c6c9326 Mon Sep 17 00:00:00 2001 From: Russ Savage Date: Mon, 24 Feb 2020 15:46:05 -0800 Subject: [PATCH 6/6] chore(changelog): update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93134404474..77a952ba626 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## v2.0.0-beta.5 [unreleased] ### Features +1. [16991](https://github.com/influxdata/influxdb/pull/16991): Update Flux functions list for v0.61 ### Bug Fixes 1. [16919](https://github.com/influxdata/influxdb/pull/16919): Sort dashboards on homepage alphabetically