45 Commits

Author SHA1 Message Date
6958de846c Accessibility Fixes for Several SQL Based Query Editors (#43981)
* Fix postgres QE a11y label issue

* Add aria-label to query-editor

* Remove unecessary element ID.

* Use aria-labeledby instead of aria-label

* Prefer aria-labelby with dynamic ids

* Prefer "for" over aria-labeledby

* Prefer "for" over aria-labeledby for MSSQL QE
2022-01-19 15:56:33 -06:00
e4672906f0 SqlDataSources: Fixes the Show Generated SQL button in query editors (#31236)
* SqlDataSources: Fixes the Show Generated SQL button in query editors

* No need to protect against duplicate events now that the event emitter is isolated for each editor
2021-02-16 13:10:40 +01:00
2a6ac88a73 QueryInspector: add common way to show the raw query (#25204) 2020-05-29 11:06:33 -07:00
6937f3549b @grafana/ui: Various smaller Icon updates (#23588)
* Remove icon types duplicates, update getAllIcons

* Update Explore-related icons, positioning

* Update Getting started icons

* Update navmodel

* Style adjustments, css changes

* Update tests

* Updatee icon name in test file
2020-04-16 13:49:58 +02:00
1c58202b26 @grafana/ui: Replace various icons using Icon component (#23442)
* Replace icons in dashboard and settings

* Replace icons in alerting

* Update batch of icons

* Implement icons accross various files

* Style updates

* Search: Fix recent and starred icons

* Update styling and details

* Replace new icon created by unicons

* Fix e2e test, styling

* Minor styling updates

Co-authored-by: Clarity-89 <homes89@ukr.net>
2020-04-12 22:20:02 +02:00
e76655df43 graph: fixes click after scroll in series override menu
Makes changes to dropdown-typeahead2 so that a css
class for the button can be passed in. Means it can
be used instead of dropdown-typeahead.

Switches to using dropdown-typeahead2 for series_overrides
directive and for the influxdb, mysql and postgres datasources
as it already contains a fix for this issue.

This commit also fixes the index property which
was set using an incorrectly spelled length property in the
series_overrides directive.

Closes #15621
2019-02-25 02:11:28 +01:00
3a53f75ebb update inline documentation 2019-01-28 19:52:35 +01:00
7c78b64a36 Document required order for time series queries (#13204) 2018-09-10 09:33:06 +02:00
aadff18e94 hide Query Builder button for table panels 2018-08-29 18:38:18 +02:00
998bb6ebe3 Merge branch 'master' into postgres-query-builder 2018-08-18 11:54:39 +02:00
2606f6e715 use pointer cursor for buttons in query editor 2018-08-15 09:21:17 +02:00
bfe28ee061 Add $__unixEpochGroup macro to postgres datasource 2018-08-13 12:08:14 +02:00
3b6454ab88 Merge branch 'master' into postgres-query-builder 2018-08-08 12:09:17 +02:00
52c7edf2f4 rename last fillmode to previous 2018-08-07 21:11:51 +02:00
bfc66a7ed0 add fillmode "last" to sql datasource
This adds a new fill mode last (last observation carried forward) for grafana
to the sql datasources. This fill mode will fill in the last seen value in a
series when a timepoint is missing or NULL if no value for that series has
been seen yet.
2018-08-02 20:35:09 +02:00
67edb9e9fe Merge remote-tracking branch 'upstream/master' into postgres-query-builder 2018-08-02 16:39:27 +02:00
a221d9ec84 add more prominent button for switching edit mode 2018-08-02 09:50:21 +02:00
82c473e3af document $__timeGroupAlias 2018-08-01 21:23:00 +02:00
43295f9c18 remove alias from postgres $__timeGroup macro 2018-08-01 08:50:19 +02:00
6613f11499 Merge remote-tracking branch 'upstream/master' into postgres-query-builder 2018-07-30 15:23:56 +02:00
412bb6acab refactor function handling in query builder 2018-07-29 13:31:50 +02:00
5327580939 refactor column function handling 2018-07-28 21:41:23 +02:00
6ca7a03975 consistent nameing fro group and select 2018-07-28 12:53:36 +02:00
7905c29875 adjust metric prefix code to sql engine refactor 2018-07-27 15:34:04 +02:00
97f24733f5 remove tableschema from query builder ui 2018-07-27 10:58:08 +02:00
b49d10104e add popover for metric column 2018-07-15 19:13:19 +02:00
f85c9c012e refactor adding sqlPart 2018-07-15 12:26:22 +02:00
d7ed706e12 refactor PostgresQueryCtrl and PostgresQuery 2018-07-14 20:28:34 +02:00
c604651092 fix group by ui 2018-07-05 10:19:22 +02:00
ced0a5828f rearrange elements of query builder 2018-07-04 11:56:26 +02:00
410449b5e7 use sqlPart for ui parts 2018-06-30 11:11:34 +02:00
a5bcd8eac0 fix metric column when using group by 2018-05-21 12:10:18 +02:00
de9a117dc6 use sql part component 2018-05-21 11:04:52 +02:00
1dd2bce054 Merge remote-tracking branch 'upstream/master' into postgres-query-builder 2018-05-05 13:33:54 +02:00
3a5d1f4594 tsdb: update query and annotation editor help texts for postgres
In addition to closing #11578
2018-04-16 23:56:14 +02:00
0b358ff5f3 remove limit 2018-03-10 22:39:42 +01:00
ef18eb7fcb add where constraint handling 2018-02-08 10:25:32 +01:00
c65a964cdd add metric column selector 2018-02-03 18:03:00 +01:00
4dbd83fac1 add groupby to querybuilder
remove unused aggregations
2018-01-31 15:32:32 +01:00
a59e052a0f more query builder components 2018-01-30 14:08:10 +01:00
33ac22bfdb start query builder ui 2018-01-21 22:08:18 +01:00
ce809de1ed postgres: change $__timeGroup macro to include "AS time" column alias (#10119)
* change $__timeGroup macro to include column alias

* update docs and help text for $__timeGroup macro
2017-12-08 15:14:10 +01:00
108f582ec4 sync documentation, add remark about to_timestamp and redshift (#9841) 2017-11-14 11:33:55 +01:00
34da0711ab add __timeGroup macro for mysql (#9596)
* add __timeGroup macro for mysql

* put example __timeGroup query in frontend help

* do __timeGroup interval parsing in go similar to mysql

* ignore whitespace around interval
2017-10-27 11:26:25 +02:00
d1c9760fa8 Postgres Data Source (#9475)
* add postgresql datasource

* add rest of files for postgres datasource

* fix timeseries query, remove unused code

* consistent naming, refactoring

* s/mysql/postgres/

* s/mysql/postgres/

* couple more tests

* tests for more datatypes

* fix macros for postgres

* add __timeSec macro

* add frontend for postgres datasource

* adjust documentation

* fix formatting

* add proper plugin description

* merge editor changes from mysql

* port changes from mysql datasource

* set proper defaultQuery for postgres

* add time_sec to timeseries query
accept int for value for timeseries query

* revert allowing time_sec and handle int or float values as unix
timestamp for "time" column

* fix tslint error

* handle decimal values in timeseries query

* allow setting sslmode for postgres datasource

* use type switch for handling data types

* fix value for timeseries query

* refactor timeseries queries to make them more flexible

* remove debug statement from inner loop in type conversion

* use plain for loop in getTypedRowData

* fix timeseries queries

* adjust postgres datasource to tsdb refactoring

* adjust postgres datasource to frontend changes

* update lib/pq to latest version

* move type conversion to getTypedRowData

* handle address types cidr, inet and macaddr

* adjust response parser and docs for annotations

* convert unknown types to string

* add documentation for postgres datasource

* add another example query with metric column

* set more helpful default query

* update help text in query editor

* handle NULL in value column of timeseries query

* add __timeGroup macro

* add test for __timeGroup macro

* document __timeGroup and set proper default query for annotations

* fix typos in docs

* add postgres to list of datasources

* add postgres to builtInPlugins

* mysql: refactoring as prep for merging postgres

Refactors out the initialization of the xorm engine and the query logic
for an sql data source.

* mysql: rename refactoring + test update

* postgres:refactor to use SqlEngine(same as mysql)

Refactored to use a common base class with the MySql data source.

Other changes from the original PR:
- Changed time column to be time_sec to allow other time units in the
future and to be the same as MySQL
- Changed integration test to test the main Query method rather than
the private transformToTable method
- Changed the __timeSec macro name to __timeEpoch
- Renamed PostgresExecutor to PostgresQueryEndpoint

Fixes #9209 (the original PR)

* postgres: encrypt password on config page

With some other cosmetic changes to the config page:
- placeholder texts
- reset button for the password after it has been encrypted.
- default value for the sslmode field.

* postgres: change back col name to time from time_sec

* postgres mysql: remove annotation title

Title has been removed from annotations

* postgres: fix images for docs page

* postgres mysql: fix specs
2017-10-10 15:19:14 +02:00