Commit Graph

67 Commits

Author SHA1 Message Date
Sven Klemm
0f931f9e5e Merge remote-tracking branch 'upstream/master' into macroengine-interpolate 2018-03-01 18:01:54 +01:00
Sven Klemm
ebbc079853 improve error message for invalid/unknown datatypes (#10834) 2018-02-14 15:21:00 +01:00
Sven Klemm
6cdd901ec6 fix typo 2017-12-10 12:40:09 +01:00
Sven Klemm
c1282e8ea8 implement missing value fill functionality for postgres 2017-12-10 11:42:55 +01:00
Sven Klemm
e2a3590d8b allow optional 3rd argument to timeGroup to control filling missing
values
2017-12-10 09:59:33 +01:00
Sven Klemm
b86a42fffe pass tsdbQuery to transformToTimeSeries and transformToTable to get
access to selected frontend timerange
2017-12-09 20:35:00 +01:00
Sven Klemm
b6df91d56b pass Query to MacroEngine Interpolate 2017-12-08 23:30:33 +01:00
Sven Klemm
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
Sven Klemm
c80eadcdf4 handle native postgres datetime types in annotation queries (#9986) 2017-12-06 18:12:24 +01:00
Sven Klemm
373389c920 treat any text column in timeseries query as metric name unless column (#9985)
named metric is present
2017-12-06 18:04:33 +01:00
Sven Klemm
26ab25b7c0 dont loose subsecond precision when dealing with timestamp or (#9851)
timestamptz
2017-11-15 14:50:32 +01:00
Sven Klemm
9e6a7dcb90 properly escape components of connection string (#9850) 2017-11-15 10:55:08 +01:00
Sven Klemm
108f582ec4 sync documentation, add remark about to_timestamp and redshift (#9841) 2017-11-14 11:33:55 +01:00
Sven Klemm
a503c1d39c change default sslmode for postgres to verify-full (#9736) 2017-10-31 13:55:32 +01:00
Sven Klemm
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
Sven Klemm
b2d880c6de modify $__timeGroup macro so it can be used in select clause (#9527)
* modify $__timeGroup macro so it can be used in select clause

* fix $__interval_ms for postgres datasource

* use $__timeGroup macro in documentation

* fix annotation template query
remove title since its no longer used and add tags instead

* change __timeFilter macro to work on postgresql < 8.1 and redshift
2017-10-18 18:10:01 +02:00
Daniel Lee
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