Commit Graph

285 Commits

Author SHA1 Message Date
Sven Klemm
ec0fd96f08 Use closure for calling interpolateVariable 2018-10-17 12:30:07 +02:00
Marcus Efraimsson
3932e4db5a
Merge remote-tracking branch 'origin/master' into concurrent-sql 2018-10-02 17:44:33 +02:00
Marcus Efraimsson
12230dfa71
ux: put connection limits under own section 2018-10-02 17:43:15 +02:00
Axel Pirek
dd09ece8c9 Make max open, max idle connections and connection max life time configurable 2018-10-02 13:42:06 +02:00
Sven Klemm
9dbdc29118 filter NULL values for column value suggestions 2018-09-26 10:56:25 +02:00
Sven Klemm
e07513bd65 Don't use unnest in queries for redshift compatibility 2018-09-19 10:59:25 +02:00
Marcus Efraimsson
3fe3f3741f
Merge pull request #13200 from svenklemm/postgres-query-builder-fixes
Fix query builder queries for interval start
2018-09-10 13:01:17 +02:00
Marcus Efraimsson
227bf85e5e
Merge pull request #13184 from svenklemm/postgres-interval_ms
Fix postgres quoting to handle non-string values
2018-09-10 12:43:10 +02:00
Sven Klemm
7c78b64a36 Document required order for time series queries (#13204) 2018-09-10 09:33:06 +02:00
Sven Klemm
116fb50530 Fix query builder queries for interval start
This changes the rate and increase queries to not calculate
a value when there is no previous value. This also adds an
order by metric column to prevent inconsistent series ordering
in the legend.
2018-09-08 08:28:15 +02:00
Sven Klemm
6b863e3b0f Fix quoting to handle non-string values 2018-09-07 10:21:10 +02:00
Marcus Efraimsson
26756f86aa
Merge pull request #13148 from svenklemm/postgres-min-interval
Add min time interval support for SQL datasources
2018-09-06 14:05:39 +02:00
Patrick O'Carroll
25f13bd3ad added only-arrow-functions rule and changed files to follow new rule (#13154) 2018-09-05 15:28:30 +02:00
Sven Klemm
e2c7b010ac fix test failures for timeInterval 2018-09-05 10:03:16 +02:00
Sven Klemm
a95453036b Add min time interval to postgres datasource 2018-09-05 09:46:22 +02:00
Patrick O'Carroll
0f326f18dc changed functions to arrowfunctions for only-arrow-functions rule (#13127) 2018-09-04 15:55:41 +02:00
Sven Klemm
de917dfc4d Merge branch 'master' into postgres-query-builder 2018-09-03 13:43:58 +02:00
Patrick O'Carroll
b8d82df97e added no-angle-bracket-type-assertion rule and updatet files to follow rule (#13115) 2018-09-03 11:30:44 +02:00
Sven Klemm
265d5daf57 Merge branch 'master' into postgres-query-builder 2018-08-31 19:02:46 +02:00
Patrick O'Carroll
abbb6f933c added jsdoc-format rule and fixed files that didn't follow new rule (#13107) 2018-08-31 16:40:43 +02:00
Sven Klemm
d5cdeebf23 reset metric column when changing table 2018-08-30 15:46:57 +02:00
Sven Klemm
1cac061448 fix timeFilter resetting when changing table 2018-08-30 15:39:01 +02:00
Marcus Efraimsson
5ceaa21e3b
when changing table, refresh panel once after columns have been changed 2018-08-30 15:11:54 +02:00
Sven Klemm
a06a6b6517 fix timecolumn handling when table changes 2018-08-30 14:25:27 +02:00
Sven Klemm
015909dbff set default for timeGroup in query builder to $__interval 2018-08-30 14:16:42 +02:00
Sven Klemm
483f6cc5e1 when changing table reset columns 2018-08-30 14:11:53 +02:00
Sven Klemm
be978d1a8f fix metric column suggestions 2018-08-30 14:09:47 +02:00
Sven Klemm
e2c3b6c6c5 fix suggestions for metric column 2018-08-30 13:05:16 +02:00
Sven Klemm
aadff18e94 hide Query Builder button for table panels 2018-08-29 18:38:18 +02:00
Sven Klemm
a87b27c7d3 check for correct quoting of multiple singlequotes 2018-08-29 16:50:59 +02:00
Sven Klemm
70daa56a31 Merge branch 'master' into postgres-query-builder 2018-08-29 14:44:23 +02:00
Patrick O'Carroll
a702603e7b changed var to const 2 (#13068)
* changed var to const

* fixed typo created in last commit

* added or empty object to options in prometheus/datasource
2018-08-29 14:27:29 +02:00
Sven Klemm
1ee91a637f remove min time interval from datasource config 2018-08-29 13:02:25 +02:00
Sven Klemm
0b74ff5cf1 remove unneeded queryOptions 2018-08-29 12:51:58 +02:00
Sven Klemm
7a5b5906ed fix quoting 2018-08-29 12:24:28 +02:00
Sven Klemm
bfac6303d0 strip quotes when auto adding alias 2018-08-29 12:16:07 +02:00
Sven Klemm
ab4fbff454 handle quoting properly for table suggestion 2018-08-29 12:12:11 +02:00
Sven Klemm
e9ab4feeb0 link to github instead 2018-08-29 09:58:08 +02:00
Sven Klemm
955e5afa45 recheck timecolumn when changing table 2018-08-29 09:51:01 +02:00
Sven Klemm
84ec1ce624 update filter macro on time column change 2018-08-29 09:04:33 +02:00
Sven Klemm
30fce34d9c make default mode for table panels raw editor 2018-08-28 12:10:55 +02:00
Sven Klemm
62d82920e6 improve description for timescaledb option 2018-08-27 23:20:17 +02:00
Sven Klemm
7177f19436 Merge branch 'master' into postgres-query-builder 2018-08-27 11:23:55 +02:00
Sven Klemm
da8696ed95 fix handling of variable interpolation for IN expresions 2018-08-26 22:43:03 +02:00
Torkel Ödegaard
9b978b7203
tslint: autofix of let -> const (#13033) 2018-08-26 17:14:40 +02:00
Sven Klemm
21e7b0b92d add min interval to postgres datasource 2018-08-25 18:14:39 +02:00
Sven Klemm
02c5d36c0b fix tableSegment and timeColumnSegment after table suggestion 2018-08-21 20:12:45 +02:00
Sven Klemm
e04127e430 unify quoting 2018-08-18 16:09:12 +02:00
Sven Klemm
49319fbdea prefill editor with first metric table 2018-08-18 13:21:08 +02:00
Sven Klemm
ff2564900f only allow 1 filter macro in where clause 2018-08-18 12:34:19 +02:00
Sven Klemm
c1890dbb6d fix timeColumnType assignment 2018-08-18 12:28:05 +02:00
Sven Klemm
9699d7a166 make suggested filter macro depend on type 2018-08-18 12:11:10 +02:00
Sven Klemm
18ce6fc280 use unixEpochGroup macro for unix timestamp 2018-08-18 12:04:32 +02:00
Sven Klemm
998bb6ebe3 Merge branch 'master' into postgres-query-builder 2018-08-18 11:54:39 +02:00
Marcus Efraimsson
313a8bd033
Merge pull request #12891 from svenklemm/unixepochgroup
add $__unixEpochGroup and $__unixEpochGroupAlias to sql datasources
2018-08-17 14:41:33 +02:00
Sven Klemm
8e4db8cc3a suggest operators depending on datatype 2018-08-17 10:38:23 +02:00
Sven Klemm
28f97a2450 update persisted parts on param change 2018-08-16 13:23:38 +02:00
Sven Klemm
e84a1cbcc5 persist datatype information 2018-08-16 12:50:32 +02:00
Sven Klemm
8ced29a0e7 Don't do value suggestions for numeric and timestamp 2018-08-16 11:48:36 +02:00
Sven Klemm
735c4abe6c rename postgres_query.jest.ts to .test.ts 2018-08-15 12:06:32 +02:00
Sven Klemm
907e8fd77c fix variable escaping 2018-08-15 11:37:30 +02:00
Sven Klemm
a2f4441f9d autodetect timescaledb when version >= 9.6 2018-08-15 10:42:15 +02:00
Sven Klemm
2d12801186 detect postgres version for saved datasources 2018-08-15 09:48:06 +02:00
Sven Klemm
2606f6e715 use pointer cursor for buttons in query editor 2018-08-15 09:21:17 +02:00
Sven Klemm
6d8ad3b076 require postgres 9.4+ for ordered set aggregate functions 2018-08-14 15:49:37 +02:00
Sven Klemm
9d022766ee add postgres version to datasource config 2018-08-14 15:45:55 +02:00
Sven Klemm
c90eb45cef only show first/last aggregate when timescaledb is enabled 2018-08-14 15:29:29 +02:00
Sven Klemm
e12d07dd68 keep jsonData in PostgresDatasource 2018-08-14 15:27:58 +02:00
Sven Klemm
5b3b0295e8 Merge branch 'master' into postgres-query-builder 2018-08-14 15:10:16 +02:00
Marcus Efraimsson
660530a3a6
Merge pull request #12914 from dehrax/12224-final
Karma to Jest: rename and cleanup
2018-08-14 12:55:23 +02:00
Sven Klemm
15c8ef6c95 Merge branch 'master' into postgres-query-builder 2018-08-14 12:51:03 +02:00
Tobias Skarhed
a65589a5fb Rename test files 2018-08-14 10:52:41 +02:00
Sven Klemm
bfe28ee061 Add $__unixEpochGroup macro to postgres datasource 2018-08-13 12:08:14 +02:00
Sven Klemm
c9bbdf244c get timecolumn datatype on timecolumn change 2018-08-13 11:29:35 +02:00
Sven Klemm
1dd8192d51 fix datatype query 2018-08-13 09:57:46 +02:00
Sven Klemm
a4a33d80db mention time_bucket in timescaledb tooltip 2018-08-09 17:30:46 +02:00
Sven Klemm
c3aad10047 change timescaledb to checkbox instead of select 2018-08-09 10:05:35 +02:00
Sven Klemm
b987aee7cf add timescaledb option to postgres datasource
This adds an option to the postgres datasource config for
timescaledb support. When set to auto it will check for
timescaledb when testing the datasource.

When this option is enabled the $__timeGroup macro will
use the time_bucket function from timescaledb to group
times by an interval.

This also passes the datasource edit control to testDatasource
to allow for setting additional settings, this might be useful
for other datasources aswell which have optional or version
dependant features which can be queried.
2018-08-09 10:05:35 +02:00
Sven Klemm
13d0fa4b9a add previous fill mode to query builder 2018-08-08 12:23:41 +02:00
Sven Klemm
3b6454ab88 Merge branch 'master' into postgres-query-builder 2018-08-08 12:09:17 +02:00
Sven Klemm
52c7edf2f4 rename last fillmode to previous 2018-08-07 21:11:51 +02:00
Sven Klemm
6d07d825e9 dont break default parameters for functions 2018-08-03 18:38:40 +02:00
Sven Klemm
e4ae8be9fa fix suggestion query 2018-08-03 14:09:41 +02:00
Sven Klemm
aa830211fe dont order for aggregate 2018-08-03 10:15:28 +02:00
Sven Klemm
dabfd88cd9 add moving average to query builder 2018-08-03 07:44:36 +02:00
Sven Klemm
0b57e88f9e adjust frontend test 2018-08-03 06:19:53 +02:00
Sven Klemm
2cae966e6c use $__timeGroupAlias macro 2018-08-02 21:40:15 +02:00
Sven Klemm
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
Sven Klemm
67edb9e9fe Merge remote-tracking branch 'upstream/master' into postgres-query-builder 2018-08-02 16:39:27 +02:00
Marcus Efraimsson
5cca478656
Merge pull request #12760 from svenklemm/postgres-timegroup
remove alias from postgres $__timeGroup macro

add $__timeGroupAlias macro to all sql datasources
2018-08-02 16:36:01 +02:00
Sven Klemm
7e9c9199c1 add warning when switching from raw sql mode 2018-08-02 10:15:53 +02:00
Sven Klemm
a221d9ec84 add more prominent button for switching edit mode 2018-08-02 09:50:21 +02:00
Sven Klemm
82c473e3af document $__timeGroupAlias 2018-08-01 21:23:00 +02:00
Brice Maron
bb7e583863 fix custom variable quoting in sql* query interpolations 2018-08-01 20:32:50 +02:00
Sven Klemm
43295f9c18 remove alias from postgres $__timeGroup macro 2018-08-01 08:50:19 +02:00
Sven Klemm
6613f11499 Merge remote-tracking branch 'upstream/master' into postgres-query-builder 2018-07-30 15:23:56 +02:00
Sven Klemm
ace999b13f rename special to windows 2018-07-29 15:56:22 +02:00
Sven Klemm
26ea88252b add first and last support 2018-07-29 15:00:13 +02:00
Sven Klemm
412bb6acab refactor function handling in query builder 2018-07-29 13:31:50 +02:00
Sven Klemm
5327580939 refactor column function handling 2018-07-28 21:41:23 +02:00