727 Commits

Author SHA1 Message Date
30e72ca774 InfluxDB: Config Page v2 - Update link for feedback form (#107273)
Update link for feedback form
2025-06-26 19:41:33 +00:00
907e3efa55 InfluxDB: Add tracking events to v1 config page (#105911)
* Add tracking events to orginial influxdb config page

* Add tracking file

* Lint

* Remove unused import
2025-06-26 19:37:15 +00:00
8288e947a8 InfluxDB: Add an optional time range filter for tag queries in the query panel autocompleteInflux tag filter (#107195)
* InfluxDB: Add an optional time range filter for tag queries in the query panel autocomplete

* Betterer updates

* Update test

---------

Co-authored-by: Nikolay Tsvetkov <nikolay.cvetkov@gmail.com>
2025-06-25 21:37:02 +00:00
3503fc209e InfluxDB: Config page refresh (#103060) 2025-06-25 10:39:54 -06:00
24d7d8c358 Influx: Update flightsql language definition ID (#106901)
fix: replace flightsql languageDefinition.id `flightsql` with `sql`

Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
2025-06-18 13:34:51 +01:00
02d977e1af InfluxDB: Fix variable interpolation on adhoc filters (#104931)
Grafana frontend code sends adhoc filters to the backend in both the
`tags` and `adhocFilters` params.

The values in `tags` have dashboard variables interpolated, while those
in `adhocFilters` don't. This PR updates the frontend code to
also interpolate variables into the `adhocFilters` param.

The duplicated values are left as they are in `tags`, in case some other
spooky code at a distance relies on that.
2025-05-13 15:06:11 -04:00
8f4b2bbece InfluxDB: Fix regex for finding regexes in frontend code (#105194)
When interpolating variables in the frontend, we want to be sure to
escape special characters if the variable is used in a regex.

We used a regex to find regexes in raw queries, which contained a bug.
The regex treated any `/` character as the start of a regex. However,
InfluxQL (and most sql dialects) support using `/` as a division
operator.

This PR adds a check for `=~` or `!~` immediately preceding `/` as the
beginning of a regex, as per the InfluxQL spec for regexes:

https://docs.influxdata.com/influxdb/v2/reference/syntax/influxql/spec/#regular-expressions

Fixes https://github.com/grafana/support-escalations/issues/16219
2025-05-09 13:04:53 -04:00
519b75bd1e InfluxDB: Fix nested variable interpolation (#104067)
Validate query type
2025-04-16 11:54:45 +01:00
6822805c32 Grafana Runtime: Use package.json exports for internal code (#102100)
* refactor(frontend): update runtime import paths for grafana/runtime/src -> grafana/runtime

* feat(runtime): introduce internal api entrypoint and exports property

* refactor(frontend): update runtime imports to use internal entrypoint

* chore(betterer): update results file

* refactor(bookmarks): update runtime/unstable import

* chore(betterer): update results file

* test(frontend): fix failing tests due to mocking nested runtime imports

* test(datasourcesrv): fix failing tests due to mocks

* chore(alerting): clean up redundant import

* fix(packages): fix default require export pointing to types declaration file

* docs(packages): update readme related to exports

* chore(internationalization): fix import paths

* chore(betterer): update results file
2025-03-27 08:59:57 +01:00
1ca9910736 Grafana Data: Use package.json exports for internal code (#102696)
* refactor(frontend): rename all @grafana/data/src imports to @grafana/data

* feat(grafana-data): introduce internal entrypoint for sharing code only with grafana

* feat(grafana-data): add test entrypoint for data test utils usage in core

* refactor(frontend): update import paths to use grafana/data exports entrypoints

* docs(grafana-data): update comment in internal/index.ts

* refactor(frontend): prefer public namespaced exports over re-exporting via internal

* chore(frontend): fix a couple more weird paths that typescript complains about
2025-03-25 10:48:36 +01:00
5cd8547131 Revert "Grafana Data: Use package.json exports for internal code (#102286)
Revert "Grafana Data: Use package.json exports for internal code (#102036)"

This reverts commit 91116de790c6c59248abd262721c40f169be6661.
2025-03-17 12:26:59 +00:00
91116de790 Grafana Data: Use package.json exports for internal code (#102036)
* refactor(frontend): rename all @grafana/data/src imports to @grafana/data

* feat(grafana-data): introduce internal entrypoint for sharing code only with grafana

* feat(grafana-data): add test entrypoint for data test utils usage in core

* refactor(frontend): update import paths to use grafana/data exports entrypoints

* docs(grafana-data): update comment in internal/index.ts

* refactor(frontend): prefer public namespaced exports over re-exporting via internal
2025-03-17 11:27:17 +01:00
3f2eb087ea Plugins: Update all core plugins with raise issue and docs links (#101929)
* update all core plugins with raise issue and docs links

* fix plugin loader test, run prettier

* fix test

* update test results for api plugin tests
2025-03-12 14:15:46 +01:00
c9f563e576 Grafana UI: Use package.json exports for internal code (#101815)
* feat(grafana-ui): introduce development exports to prevent importing from grafana/ui/src

* refactor(theme-generation): move theme templates into scripts so themes continue to build

* refactor(frontend): replace  grafana/ui paths that use nested src with /internal or /unstable

* chore(betterer): update better results file

* feat(grafana-ui): support enterprise, remove Text component from internal

* docs(packages): update readme with exporting code conventions
2025-03-12 14:14:32 +01:00
8b3047ba1e InfluxDB: Improve handling of template variables contained in regular expressions (InfluxQL) (#100762)
* Improve handling of template vars in regex

* Review

* Minor update
2025-02-19 15:37:35 +00:00
5a7916133e Chore: Remove sqlQuerybuilderFunctionParameters feature toggle (#100809)
* chore: remove `sqlQuerybuilderFunctionParameters` ff

* Update packages/grafana-sql/src/components/visual-query-builder/SelectRow.tsx

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2025-02-19 15:38:27 +01:00
ecc9b0c10c partner data sources: remove experimental imports from datasources (#99370)
* remove experimental imports from datasources

* add plugin-ui deps

* remove

* trigger workflow

* Make versions of plugin-ui fixed

* Fix import in test

---------

Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2025-01-28 18:44:22 +07:00
be1505f2fb InfluxDB: adhoc filters can use template vars as values (#98567)
---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2025-01-10 09:49:28 +02:00
329a4605fb SQL Datasources: Make QueryEditor lazy loaded (#96179)
* feat(grafana-sql): make sqlqueryeditor lazy loaded

* feat(sql-datasources): switch out query editor for lazy query editor

* build(postgresql): put tsconfig jsx prop inside compilerOptions

* chore(sql-queryeditor): move lazy import out of component
2024-11-15 12:28:01 +01:00
0fae3579e8 Chore: improve some types (#95728)
* fix some typings

* fix some more

* more type fixes

* fix some graphite types

* few influx fixes
2024-11-05 09:57:30 +00:00
85c696c4ad SQL: Add macro support in select case (#88514)
* Feat: timeGroup macro handling in VQB

* Add tests

* Add functions to SQL ds

* Fix lint errors

* Add feature toggle

* Add rendering based on object

* Fix lint

* Fix CI failures

* Fix tests

* Address review comments

* Add docs

* Fix JSX runtime warnings

* Remove docs part that mentions suggest more macros

* Update docs/sources/shared/datasources/sql-query-builder-macros.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Add smoke test for this feature

* lint

* Add supported macros to influx

* Add setupTests.ts to include in tsconfig.json

* Import jest-dom instead of setupTests.ts

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-11-04 17:13:35 +01:00
94bbc081c8 Chore: Finish converting emotion styles to object syntax (#95399)
* convert some emotion styles to object syntax

* convert more styles to object syntax

* fix placeholder content
2024-10-25 14:50:28 +01:00
79a86b9e6a Chore: Improve typings (#93180)
* fix some any's/type assertions

* fix some more any/type assertions
2024-09-11 09:30:33 +01:00
c0df15dcde InfluxDB: Fix variable interpolation in influx db (#92988)
Fix variable interpolation in influx db
2024-09-09 15:35:30 +02:00
219f4776a2 run prettier 2024-07-23 14:45:54 +01:00
41ae376aa4 Influxdb: Fix toMetricFindValue function (#90514)
Improved toMetricFindValue to be quicker
2024-07-18 01:16:07 +03:00
47f8717149 React: Use new JSX transform (#88802)
* update eslint, tsconfig + esbuild to handle new jsx transform

* remove thing that breaks the new jsx transform

* remove react imports

* adjust grafana-icons build

* is this the correct syntax?

* try this

* well this was much easier than expected...

* change grafana-plugin-configs webpack config

* fixes

* fix lockfile

* fix 2 more violations

* use path.resolve instead of require.resolve

* remove react import

* fix react imports

* more fixes

* remove React import

* remove import React from docs

* remove another react import
2024-06-25 12:43:47 +01:00
ca1afff886 Chore: Remove deprecated Layout components (#89376)
* Removed depricated HorizontalLayout from PrometheusMetricsBrowser

* Removed commented import

* typo fix

* Removed depricated HorizontalLayout from RawInfluxQLEditor

* Replaced InlineFormLabel to InlineField in RawInlfuxEditor.tsx

* Removed depricated HorizontalLayout from GraphiteFunctionEditor

* Changed div to instead use stack

* Changed htmlFor attribute from selectElementId to aliasElementId

* Updated the betterer results

* Updated prettier write to the updated files

* Changed htmlFor label to fix the text
2024-06-24 20:59:41 +02:00
ceaf510a7d Chore: SCSS cleanup (#89355)
* remove/migrate normalize.scss

* fix typo

* migrate _explore styles

* make json-formatter styles global
2024-06-19 13:28:00 +01:00
a9736cf7dc InfluxDB: Fix query builder produces invalid SQL query when using wildcard column name (#89032)
* influx: changes to not wrap * with double quotes for column name

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

* added unit test for https://github.com/grafana/grafana/issues/88008

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

---------

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>
2024-06-19 08:39:53 +02:00
e5a50a7db8 InfluxDB: Fix sending range info on variable editor (#89347)
send range info in range field
2024-06-19 08:23:21 +02:00
f458e57523 InfluxDB: Fix custom variable support (#88642)
* fix variable support

* prettier
2024-06-03 23:47:27 +03:00
c73bbf19a1 InfluxDB: Introduce maxDataPoints setting for flux variable query editor (#87935)
* Introduce custom variable support

* Remove comment lines

* introduce maxDataPoints

* fix tests

* update

* fix unit tests

* remove new line
2024-06-03 12:09:33 +03:00
9bdfb6ee13 InfluxDB: Introduce custom variable support (#87903)
* Introduce custom variable support

* Remove comment lines

* betterer
2024-05-21 13:46:41 +02:00
4fef6ff30d Chore: Use TemplateSrv from @grafana/runtime in influxdb datasource (#87813)
use templatesrv from @grafana/runtime
2024-05-15 12:42:09 +02:00
396e75dadf Chore: Type improvements (#87634)
* improve typings in opentsdb datasource

* couple of influx improvements

* couple more

* more

* more more more

* 3 more

* changes to variables/inspect/utils

* some graphite improvements
2024-05-10 17:28:44 +01:00
4cc6b53a6d Chore: InfluxDB unit testing overhaul (#86586)
* move mocks into the __mocks__ folder

* refactor datasource.test.ts

* refactor datasource_backend_mode.test.ts

* add dbName tests

* prettier

* betterer
2024-04-30 09:59:42 -04:00
842c8dd206 InfluxDB: Fix interpolating field keys in influxql (#86401)
* interpolate field keys

* use scopedVars
2024-04-18 19:14:29 -04:00
28a683cf28 InfluxDB: Remove influxdbSqlSupport feature toggle (#86518)
Remove influxdbSqlSupport feature toggle
2024-04-18 16:29:27 +02:00
635d85db7a InfluxDB: Fix interpolation for floating point number values (#86396)
return number as it is
2024-04-18 11:21:41 +02:00
1ffe858e06 chore: remove repetitive words (#86412)
Signed-off-by: TechVest <techdashen@qq.com>
2024-04-17 13:08:00 +01:00
b3cff22db3 Chore: Improve types (#85659)
* fixing some types

* more type fixes

* few more

* last couple

* tiny tweak
2024-04-08 09:56:21 +01:00
64236a3923 InfluxDB: Fix measurement interpolation on visual query builder (#85423)
* fix measurement interpolation

* fix unit test

* fix unit test 2
2024-04-02 12:29:49 +02:00
582b252488 Add optional queries parameter to DataSourceGetTagValuesOptions (#85436)
Add optional `queries` parameter to `getTagKeysOptions`
2024-04-02 13:22:37 +03:00
076dd53a40 Chore: Remove gf-form from InfluxDB Annotation Query Editor (#84809)
Chore: Remove gf-form from Annotation Query Editor - Influx DB
2024-03-23 00:52:40 +01:00
5c146c7832 InfluxDB: Fix querying with template variables without using regex operator (#84953)
* remove regex wrappers if the operator is not a regex operator

* fix import
2024-03-22 16:14:11 +01:00
41bf6a92fd Influx: Replace pre-calculated $__interval values for backend interpolation (#84975) 2024-03-22 12:48:41 +01:00
15122bc71c InfluxDB: Fix for wrong query generated with template variable and non regex operator on frontend mode (#84175)
* fix for wrong query generated for influxdb. see:https://github.com/grafana/grafana/issues/81517

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

* added unit tests

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

* fixed linting

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

* addressed review comments

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

* fixed linting issue

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

---------

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>
2024-03-21 20:42:53 +01:00
297d73a7df InfluxDB: Add configuration option for enabling insecure gRPC connections (#83834)
* InfluxDB: add configuration option for enabling insecure gRPC connections

* fix: add insecureGrpc to InfluxOptions

* rename options label 'gRPC' -> 'Connection'

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* update docs: rename options label 'gRPC' -> 'Connection'

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* default insecure connection boolean to false in frontend

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* run prettier:write

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-03-12 13:36:11 +01:00
dc4c539d46 InfluxDB: Fix sql query generation by adding quotes around the identifiers (#83765)
* Quote the identifiers

* wrap where filter with quotes

* fix query generation
2024-03-05 11:22:33 +01:00