83 Commits

Author SHA1 Message Date
7c499ffdd8 MySQL, Postgres: Update raw sql when query builder updates (#19209)
Raw sql now updates when changing query using 
graphical query editor for mysql and postgres.

Fixes #19063
2019-09-24 20:47:21 +02:00
140ecbcf79 QueryProcessing: Observable query interface and RxJS for query & stream processing (#18899)
* I needed to learn some rxjs and understand this more, so just playing around

* Updated

* Removed all the complete calls

* Refactoring

* StreamHandler -> observable start

* progress

* simple singal works

* Handle update time range

* added error handling

* wrap old function

* minor changes

* handle data format in the subscribe function

* Use replay subject to return last value to subscribers

* Set loading state after no response in 50ms

* added missing file

* updated comment

* Added cancelation of network requests

* runRequest: Added unit test scenario framework

* Progress on tests

* minor refactor of unit tests

* updated test

* removed some old code

* Shared queries work again, and also became so much simplier

* unified query and observe methods

* implict any fix

* Fixed closed subject issue

* removed comment

* Use last returned data for loading state

* WIP: Explore to runRequest makover step1

* Minor progress

* Minor progress on explore and runRequest

* minor progress

* Things are starting to work in explore

* Updated prometheus to use new observable query response, greatly simplified code

* Revert refId change

* Found better solution for key/refId/requestId problem

* use observable with loki

* tests compile

* fix loki query prep

* Explore: correct first response handling

* Refactorings

* Refactoring

* Explore: Fixes LoadingState and GraphResults between runs (#18986)

* Refactor: Adds state to DataQueryResponse

* Fix: Fixes so we do not empty results before new data arrives
Fixes: #17409

* Transformations work

* observable test data

* remove single() from loki promise

* Fixed comment

* Explore: Fixes failing Loki and Prometheus unit tests (#18995)

* Tests: Makes datasource tests work again

* Fix: Fixes loki datasource so highligthing works

* Chore: Runs Prettier

* Fixed query runner tests

* Delay loading state indication to 200ms

* Fixed test

* fixed unit tests

* Clear cached calcs

* Fixed bug getProcesedDataFrames

* Fix the correct test is a better idea

* Fix: Fixes so queries in Explore are only run if Graph/Table is shown (#19000)

* Fix: Fixes so queries in Explore are only run if Graph/Table is shown
Fixes: #18618

* Refactor: Removes unnecessary condition

* PanelData: provide legacy data only when needed  (#19018)

* no legacy

* invert logic... now compiles

* merge getQueryResponseData and getDataRaw

* update comment about query editor

* use single getData() function

* only send legacy when it is used in explore

* pre process rather than post process

* pre process rather than post process

* Minor refactoring

* Add missing tags to test datasource response

* MixedDatasource: Adds query observable pattern to MixedDatasource (#19037)

* start mixed datasource

* Refactor: Refactors into observable parttern

* Tests: Fixes tests

* Tests: Removes console.log

* Refactor: Adds unique requestId
2019-09-12 17:28:46 +02:00
4e27ba9646 noImplicitAny: Sub 3000 errors (#17821)
* noImplicitAny Stackdriver

* Sub 3000 noImplicitAny

* Update error count limit

* Add DataQueryRequest type
2019-07-01 11:11:57 +02:00
7eabc282e9 Chore: Adds typings to lodash (#16590) 2019-04-15 12:11:52 +02:00
f608340c35 Add delta window function to postgres query builder
Unlike the increase function delta doesn't check for resets
and can go negative. This is similar to the prometheus delta
function.
2018-10-31 19:26:18 +01:00
25f13bd3ad added only-arrow-functions rule and changed files to follow new rule (#13154) 2018-09-05 15:28:30 +02:00
265d5daf57 Merge branch 'master' into postgres-query-builder 2018-08-31 19:02:46 +02:00
abbb6f933c added jsdoc-format rule and fixed files that didn't follow new rule (#13107) 2018-08-31 16:40:43 +02:00
d5cdeebf23 reset metric column when changing table 2018-08-30 15:46:57 +02:00
1cac061448 fix timeFilter resetting when changing table 2018-08-30 15:39:01 +02:00
5ceaa21e3b when changing table, refresh panel once after columns have been changed 2018-08-30 15:11:54 +02:00
a06a6b6517 fix timecolumn handling when table changes 2018-08-30 14:25:27 +02:00
015909dbff set default for timeGroup in query builder to $__interval 2018-08-30 14:16:42 +02:00
483f6cc5e1 when changing table reset columns 2018-08-30 14:11:53 +02:00
7a5b5906ed fix quoting 2018-08-29 12:24:28 +02:00
bfac6303d0 strip quotes when auto adding alias 2018-08-29 12:16:07 +02:00
955e5afa45 recheck timecolumn when changing table 2018-08-29 09:51:01 +02:00
84ec1ce624 update filter macro on time column change 2018-08-29 09:04:33 +02:00
30fce34d9c make default mode for table panels raw editor 2018-08-28 12:10:55 +02:00
7177f19436 Merge branch 'master' into postgres-query-builder 2018-08-27 11:23:55 +02:00
9b978b7203 tslint: autofix of let -> const (#13033) 2018-08-26 17:14:40 +02:00
21e7b0b92d add min interval to postgres datasource 2018-08-25 18:14:39 +02:00
02c5d36c0b fix tableSegment and timeColumnSegment after table suggestion 2018-08-21 20:12:45 +02:00
49319fbdea prefill editor with first metric table 2018-08-18 13:21:08 +02:00
ff2564900f only allow 1 filter macro in where clause 2018-08-18 12:34:19 +02:00
c1890dbb6d fix timeColumnType assignment 2018-08-18 12:28:05 +02:00
9699d7a166 make suggested filter macro depend on type 2018-08-18 12:11:10 +02:00
8e4db8cc3a suggest operators depending on datatype 2018-08-17 10:38:23 +02:00
28f97a2450 update persisted parts on param change 2018-08-16 13:23:38 +02:00
e84a1cbcc5 persist datatype information 2018-08-16 12:50:32 +02:00
8ced29a0e7 Don't do value suggestions for numeric and timestamp 2018-08-16 11:48:36 +02:00
6d8ad3b076 require postgres 9.4+ for ordered set aggregate functions 2018-08-14 15:49:37 +02:00
c90eb45cef only show first/last aggregate when timescaledb is enabled 2018-08-14 15:29:29 +02:00
c9bbdf244c get timecolumn datatype on timecolumn change 2018-08-13 11:29:35 +02:00
6d07d825e9 dont break default parameters for functions 2018-08-03 18:38:40 +02:00
dabfd88cd9 add moving average to query builder 2018-08-03 07:44:36 +02:00
7e9c9199c1 add warning when switching from raw sql mode 2018-08-02 10:15:53 +02:00
ace999b13f rename special to windows 2018-07-29 15:56:22 +02:00
26ea88252b add first and last support 2018-07-29 15:00:13 +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
97f24733f5 remove tableschema from query builder ui 2018-07-27 10:58:08 +02:00
9f0b4e0aa7 add groupby when adding first aggregate 2018-07-18 13:29:47 +02:00
b28bf1a4f9 rename PostgresQueryBuilder to PostgresMetaQuery 2018-07-15 17:12:03 +02:00
2fcb09b23d filter datatype for groupby suggestions 2018-07-15 16:23:47 +02:00
f85c9c012e refactor adding sqlPart 2018-07-15 12:26:22 +02:00
f48060a1bb remove render code from sql_part 2018-07-15 09:53:22 +02:00
fa66645b0f refactor PostgresQuery 2018-07-15 09:36:49 +02:00
844beb660d refactor PostgresQueryCtrl 2018-07-14 21:00:06 +02:00