c0a1fc2cbd
SQL Datasources: Reinstate SQL data source behavior around database selection when default configured databases already exist ( #65659 )
...
* badlm0mma/sql_datasource_update/ initial notes
* baldm0mma/sql_datasource_update/ solution
* baldm0mma/sql_datasource_update/ clean datasetSelector
* baldm0mma/sql_datasource_update/ clean up queryEditor.tsx
* baldm0mma/sql_datasource_update/ clewan up queryHeader.tsx
* baldm0mma/sql_datasource_update/ clean up tableSelector.tsx
* baldm0mma/sql_datasource_update/ clean up mysqlDatasource.ts
* baldm0mma/sql_datasource_update/ clean up configurationEditor.tsx
* baldm0mma/sql_datasource_update/ rem conlog from queryEditor.tsx
* baldm0mma/sql_datasource_update/ rem conlog from queryEditor.tsx
* baldm0mma/sql_datasource_update/ remove conlog in tableSelector.tsx
* baldm0mma/sql_datasource_update/ rem conlog in sqlDatasource.ts
* baldm0mma/sql_datasource_update/ update deafult database value in sqlDatasource.ts
* baldm0mma/sql_datasource_update/ update logic to accomidate no preconfig
* baldm0mma/sql_datasource_update/ update props
* baldm0mma/sql_datasource_update/ update prop names
* baldm0mma/sql_datasource_update/ update prop names in tableSelector
* baldm0mma/sql_datasource_update/ update annos in datasetSelector
* baldm0mma/sql_datasource_update/ update naming
* baldm0mma/sql_datasource_update/ update to standard langauae
* baldm0mma/sql_datasource_update/ update prop names
* baldm0mma/sql_datasource_update/ update annos in datasetSelector
* baldm0mma/sql_datasource_update/ remove unused import in tableSelector.tsx
* baldm0mma/sql_datasource_update/ remove addDefaultdataset
* baldm0mma/sql_datasource_update/ reset query when needed
* baldm0mma/sql_datasource_update/ update asymc return val
* baldm0mma/sql_datasource_update/ remove psql query editor
* baldm0mma/sql_datasource_update/ remove con logs in defaults.ts
* baldm0mma/sql_datasource_update/ revert postgres changes
* baldm0mma/sql_datasource_update/ update postgres naming
* baldm0mma/sql_datasource_update/ add altert
* baldm0mma/sql_datasource_update/ update annos and add alerts and alert logic
* baldm0mma/sql_datasource_update/ update postgres nomenclature
* baldm0mma/sql_datasource_update/ update annos and remove con logs
* baldm0mma/sql_datasource_update/ update nomenclature
* baldm0mma/sql_datasource_update/ drone fix
* baldm0mma/sql_datasource_update/ export and format
* baldm0mma/sql_datasource_update/ update docs for mysql datasource with dataset dropdown disable info
* baldm0mma/sql_datasource_update/ update mssql docs
* baldm0mma/sql_datasource_update/ update postgres docs and alert logic
* baldm0mma/sql_datasource_update/ add tests
* baldm0mma/sql_datasource_update/ update docs
* baldm0mma/sql_datasource_update/ update test names
* baldm0mma/sql_datasource_update/ update alert language
* baldm0mma/sql_datasource_update/ correct spelling
* baldm0mma/sql_datasource_update/ update postgres query builder image
* baldm0mma/sql_datasource_update/ update annos
* baldm0mma/sql_datasource_update/ update tests
* baldm0mma/sql_datasource_update/ docs updated
* baldm0mma/sql_datsource_update/ refactor determinePlaceholder
* Update public/app/features/plugins/sql/components/QueryEditor.tsx
spelling
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Update public/app/features/plugins/sql/components/QueryEditor.tsx
spelling
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* baldm0mma/sql_datasource_update/ remove superfluous cleanup data from tests
* baldm0mma/sql_datasource_update/ update spelling
* Update public/app/features/plugins/sql/components/SqlComponents.test.tsx
spelling
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* baldm0mma/sql_datasource_update/ add logic to prevent db call for tables if dataset it nullish
* baldm0mma/sql_datasource_update/ update alert tests
* baldm0mma/sql_datasource_update/ update button text
* baldm0mma/sql_datasource_update/ update tests to preferred standard
* baldm0mma/sql_datasource_update/add feature flag
* baldm0mma/sql_datasource_update/ update mssql docs
* baldm0mma/sql_datasource_update/ add feature flag to registry
* baldm0mma/sql_datasource_update/ adjust table and dataset dropdown logic
* baldm0mma/sql_datasource_update/ update testing to deal with feature flag
* baldm0mma/sql_datasource_update/ update wioth cascadeDisable
* baldm0mma/sql_datasource_update/ update naming
* baldm0mma/sql_datasource_update/ update tests to reflect enabled feature flag
* baldm0mma/sql_datasource_update/ update annotations
* baldm0mma/sql_datasource_update/ update annos in queryEd
* baldm0mma/sql_datasource_update/ update test names
* baldm0mma/sql_datasource_update/ update anno issues
* baldm0mma/slq_datasource_update/ add query to sqlDatasource with error
* baldm0mma/sql_datasource_update/ update docs language
* baldm0mma/sql_datasource_update/ remove notes to self
* baldm0mma/sql_datasource_update/ add QueryEditorFeatureFlag.utils.ts
* baldm0mma/sql_datasource_update/ update database into json
* baldm0mma/sql_datasource_update/ found file
* Update docs/sources/datasources/mssql/query-editor/index.md
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
* baldm0mma/sql_datasource_update/ update feature flag and toggles
* baldm0mma/sql_datasource_update/ add hasConfigIssue, update annos, rethink disable logic
* baldm0mma/sql_datasource_update/ update warning language
* baldm0mma/sql_datasource_update/ update button content
* baldm0mma/sql_datasource_update/ update jsonData logic in frontendsettings.go
* baldm0mma/sql_datasource_update/ update jsonData logic
* baldm0mma/sql_datasource_update/ update annos in frontendsettings.go
* baldm0mma/sql_datasource_update/ update sql editor docs
* baldm0mma/sql_datasource_update/ update mysql docs
* baldm0mma/sql_datasource_update/ update postgres docs
* baldm0mma/sql_datasource_update/ remove unused code in datasetSelector.tsx
* baldm0mma/sql_datasource_update/ update syntax conventions
* baldm0mma/sql_datasource_update/ add logs
* baldm0mma/sql_datasource_update/ remove unused code
* baldm0mma/sql_datasource_update/ remove conlogs
* baldm0mma/sql_datasource_update/ update tests
* baldm0mma/sql_datasource_update/ add second error to query
* baldm0mma/sql_datasource_update/ run make gen-cue
* baldm0mma/sql_database_update/ lint registry
* baldm0mma/sql_datasource_update/ update registry
* baldm0mma/sql_datasource_update/ upate datasource logic
* baldm0mma/sql_datasource_update/ add logs
* baldm0mma/sql_datasource_update/ add comms to self
* baldm0mma/sql_datasource_update/ comment out false pos tests, and add investigatory comments
* baldm0mma/sql_database_update/ update query error to only test for config change if query was made in "builder" mode
* baldm0mma/sql_datasource_update/ update annos in frontendsettings.go
* baldm0mma/sql_datasource_update/ update error logic to datasource
* baldm0mma/sql_datasource_update/ remove alerts from query editor
* baldm0mma/sql_datasource_update/ remove unused imports
* baldm0mma/sql_datasource_update/ update tests
* baldm0mma/sql_datasource_update/ remove comments
* baldm0mma/sql_datasource_update/ remove logs in queryGroup.tsx
* baldm0mma/sql_datasource_update/ remove outdated annotation in datasetSelector.tsx
* baldm0mma/sql_datasource_update/ remove superfluous test and update test description
* baldm0mma/sql_datasource_update/ remove feature flag
* baldm0mma/sql_datasource_update/ add back feature flag
* baldm0mma/sql_datasource_update/ update to enums
* baldm0mma/sql_datasource_update/ update panel caps
* baldm0mma/sql_datasource_update/ update dataset selector to default update the database correctly
* baldm0mma/sql_datasource_update/ move onChange into conditional
* baldm0mma/sql_datasource_update/ add logic for previous datasets choice
* baldm0mma/sql_datasource_update/ add back previous logic for assigning default datasets
* baldm0mma/sql_datasource_update/ update useEffect dep array
* baldm0mma/sql_datasource_update/ remove feature toggle
* baldm0mma/sql_datasource_update/ add feature toggle
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2023-06-06 10:28:52 -06:00
1fbac96bd4
SQL Datasources: Update behavior of default connection limits ( #66687 )
...
* Update behavior of defaults in connection limits
* Refactor to use config object instead
* Refactor remove unneeded function
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-04-28 13:23:08 +07:00
b24ba7b7ae
FieldValues: Use plain arrays instead of Vector (part 3 of 2) ( #66612 )
...
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-20 17:59:18 +03:00
6ffc0c3eda
SQL Datasources: Fix saving of max idle connections and max connection lifetime ( #66662 )
...
Add brackets around property name so that it's dynamic
2023-04-17 18:46:22 +07:00
92d92187d9
SQL Datasources: Update Max Connection and Max Idle Connection Defaults to 100 and add auto mode ( #65834 )
...
* Update connection configuration for SQL datasources
* Working auto state for connection numbers
* Add migration
* Use defaults from constants file
* Remove dead code
* Add tests and restructure useMigrateDatabaseField
* Update function names
* Update docs
* Make sure we don't continually issue updates
* Update docs
* Use onOptionsChnage in ConnectionLimits
* Update docs
* Clean up docs
* Update migration
* Fix default values in docs
* Fix spacing issue
* Fix test
* Update default values for SQL connections
* Include consts
* Allow override for default SQL datasource connection parameters
* Fix linter errors
* Remove extra @ts-ignore
* Centralize logic for default values
* Remove debugging
* Remove unecessary function
* Update configuration docs
* minor suggested change
* Fix comment misspelling
* Remove unecessary default setting code
* Update docs to indicate that code was included for backport version
* Remove dead code
---------
Co-authored-by: lwandz13 <larissa.wandzura@grafana.com>
2023-04-17 11:44:05 +03:00
02a8bc76d2
SQL Datasources: Fix variable throwing error if query returns no data ( #65937 )
...
* Fix SQL query variable throwing error if query returns no data
* Tests to verify that metricFindQuery returns properly and doesn't throw error
* Fix all codepaths that might throw errors because of undefined backendSrv response
2023-04-11 15:54:55 +03:00
bf687fff45
SQL Datasources: Prevent Call Stack Overflows with Large Numbers of Values for Variable ( #64937 )
...
* Push values with every map call to avoid hitting the maximum call stack size.
* Add test and refactor to for of
* Use native fill instead of lodash
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-03-22 14:50:54 +01:00
4f13e78d11
Chore: Avoid explicit React.FC<Props> when possible (round 2) ( #64749 )
2023-03-15 16:56:09 +02:00
62c30dea4d
MySQL: Quote identifiers that include special characters ( #61135 )
...
* SQL: toRawSQL required and escape table
* Fix autocomplete for MySQL
* Change the way we escape for builder
* Rework escape ident to be smart instead
* Fix A11y for alias
* Add first e2e test
* Add test for code editor
* Add doc
* Review comments
* Move functions to sqlUtil
2023-01-31 18:16:28 +01:00
92936d3a72
Chore: update @grafana/experimental to 1.1.0 ( #61820 )
...
The main goal is to bring in changes that address a11y issue #56561 .
This also fixes any ts errors.
2023-01-20 20:06:51 +00:00
c25fe34ac0
SQL Datasources: Use health check for config test ( #59867 )
...
* SQL Datasources: Use health check for config test
* Remove unnecessary test
* Fix test errors
* Revert mysql go driver update
* Use transform query error
* Use TransformQueryError from sql_engine
2022-12-19 17:17:52 +01:00
d65899de7b
SQL Datasources: Move database setting to jsonData ( #58649 )
...
* Datasource settings: Add deprecation notice for database field
* SQL Datasources: Migrate from settings.database to settings.jsonData.database
* Check jsonData first
* Remove comment from docs
2022-12-13 09:56:52 +01:00
71e4a8261d
SQL Datasources: Fix annotation migration ( #59438 )
2022-11-29 07:56:59 +01:00
75097b99fb
SQL: Fix code editor for SQL datasources ( #58116 )
...
* SQL: Fix code editor for sql datasources
* Fix: mysql completion with defaultdb
2022-11-23 10:36:07 +01:00
38f25a0bf5
MS/My/PostgresSQL: Migrate annotation query ( #58847 )
2022-11-21 19:46:04 +01:00
d33939da55
DataSourceWithBackend: Add plugin id to the request headers ( #58082 )
2022-11-14 19:35:50 -05:00
75e435fb00
SQL: Fix issue where testing the datasource would always be successful if the datasourceQueryMultiStatus
feature was enabled ( #58671 )
...
SQL Datasources: fix issue where testing the datasource connection would show success even when there was an error.
Co-authored-by: Victor Marin <victor.marin@grafana.com>
2022-11-11 22:41:38 +01:00
b1bfae0350
MySQL: make it possible to add CA cert without using tlsAuth ( #58226 )
2022-11-07 09:38:42 +01:00
26659baf8f
PostgreSQL: Migrate to React ( #52831 )
...
- Migrate Postgres query editor to react
- Add support for field aliasing in SELECT clauses to SQL based datasources
Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-11-02 11:30:35 +07:00
e5c68f40c2
Accessibility: enable rule jsx-a11y/label-has-associated-control
( #57964 )
...
* use labels correctly
* fix opentsdb labels
* fix unit tests
* use aria-label instead of data-testid
2022-11-01 14:37:58 +00:00
c0b778134e
Revert: Query editor components from grafana-ui ( #57436 )
...
* Revert: QueryEditor components from grafana-ui
* Use local version of experimental
* Use experimental for query editor components
* Fix type issues in MSSQL
* point to actual version of experimental package
* point to latest version of experimental
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-10-24 17:12:36 +02:00
e85917f041
Chore/React18: Update component prop types ( #56898 )
2022-10-14 10:24:32 +01:00
b374b01260
MSSQL/MySQL: Add correct refId when fetching variable query results ( #56919 )
2022-10-14 11:52:12 +03:00
902a230867
MSSQL/MySQL: Fix variable interpolation ( #56879 )
...
* MSSQL/MySQL: Fix variable interpolation
* Escape string vars
2022-10-14 11:52:08 +03:00
8950d86141
fix: some typos ( #56171 )
2022-10-04 18:43:49 -05:00
4c7732ad17
Chore: Upgrade Typescript to 4.8.2 ( #54901 )
...
* Chore: Upgrade typescript to 4.8.2
2022-09-09 16:17:58 +01:00
fe7add0bc6
ref experimental query editor ( #53061 )
...
* ref experimental query editor
2022-08-02 11:44:06 -04:00
de956fc3d8
Core code editor/builder components ( #52421 )
...
* migrate experimental to core grafana - update refs
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-07-20 12:50:08 -04:00
53933972b6
mysql query editor - angular to react ( #50343 )
...
mysql conversion to react
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-07-15 16:49:24 -04:00
35d98104ad
MSSQL: Migrate to React ( #51765 )
...
* Fix: sql plugins feature
* SQLDS: Use builtin annotation editor
Plus strict rule fixes
* MSSQL: Migrate query editor to React
* Make code editor work
* Make SQLOptions and SQLQuery in SQLDatasource and in Editor generic
* MSSQL: Fix ts issues
* Fix SQLDatasource refID
* Remove comment
* Revert "Make SQLOptions and SQLQuery in SQLDatasource and in Editor generic"
This reverts commit 1d15b4061a0a08a0a6fdbdac6cbf8336f0b4df0c.
* Fix ts issues without generic
* TS
2022-07-15 19:51:28 +02:00
9498ee3d54
SQL: Migrate (MS/My/Postgres)SQL configuration pages from Angular to React ( #51891 )
...
* Migrate SQL configuration pages from angular to react
* Move enums to types.ts and remove angular partials
* remove es lint disables and update betterer instead
* Fix automatically added type declarations
* Bump wor.. betterer ;)
* Export SecretInput component from grafana-ui
* Fix A11y issues
* Export SecretTextArea as well
* Fix typo
* Use const instead of var
* Fix typo in doc
* Add autoDetectFeatures to postgres config editor
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-07-14 13:29:08 +02:00
4155dc8eca
SQL: Fix couple of issues in SQLDatasource ( #52080 )
...
* Fix: sql plugins feature
(cherry picked from commit 035862bade2304567f59172db673e4edc3ac06e7)
* SQLDS: Use builtin annotation editor
Plus strict rule fixes
(cherry picked from commit fee2eb3716b501b769b45e137e4171652a43e970)
2022-07-12 14:11:54 +02:00
fa560d96b6
sql plugins - angular to react - base sql datasource ( #51655 )
...
* base sql datasource and components
2022-06-30 16:38:48 -04:00