Skip to content

Commit

Permalink
fix(ui/flux): correct map example (#14379)
Browse files Browse the repository at this point in the history
  • Loading branch information
121watts authored Jul 18, 2019
1 parent 8fe429a commit fa79779
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
color: $c-viridian;
}
.cm-object {
color: $c-honeydew;
color: $c-comet;
}
.cm-null {
color: $c-dreamsicle;
Expand Down
8 changes: 4 additions & 4 deletions ui/src/shared/constants/codeMirrorModes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export const modeFlux = {
regex: /[|][>]/,
token: 'pipe-forward',
},
{
regex: /({.+:.+})/,
token: 'object',
},
{
regex: /\w+(?=[(])/,
token: 'function',
Expand Down Expand Up @@ -59,10 +63,6 @@ export const modeFlux = {
regex: /0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,
token: 'number',
},
{
regex: /({.+:.+})/,
token: 'object',
},
{
regex: /\/\/.*/,
token: 'comment',
Expand Down
2 changes: 1 addition & 1 deletion ui/src/shared/constants/fluxFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [
],
package: '',
desc: 'Applies a function to each record in the input tables.',
example: 'map(fn: (r) => ({ r with _value: r._value * r._value }))',
example: 'map(fn: (r) => ({ _value: r._value * r._value }))',
category: 'Transformations',
link:
'https://v2.docs.influxdata.com/v2.0/reference/flux/functions/built-in/transformations/map/',
Expand Down

0 comments on commit fa79779

Please sign in to comment.