Commit Graph

3258 Commits

Author SHA1 Message Date
Daniel Lee
533f3a9e8c settings: fixes test
For some reason, the url parse does not fail anymore for curly
braces. Add a colon in the first segment to make sure the url
parse fails.
2018-04-03 19:09:49 +02:00
bergquist
45d9bfca97 print to stderr since logger might not exist 2018-03-28 22:51:21 +02:00
bergquist
2ccbf12d1c settings: return error instead of ignoring it
closes #11281
2018-03-28 22:32:58 +02:00
Carl Bergquist
0a1bc53f3a
Merge pull request #11406 from bergquist/gomail
tech: migrates to none deprecated mail lib
2018-03-28 14:19:39 +02:00
Carl Bergquist
f009443a6f
Merge pull request #11330 from digineo/auth-ipv6
Support IPv6 in Auth proxy white list
2018-03-28 14:17:43 +02:00
Daniel Lee
4b6fd675e2
Merge pull request #11390 from bergquist/notifiers_default_value
Default value for uploading images in alert notifiers
2018-03-28 13:06:09 +02:00
Daniel Lee
208cbd1189
Merge pull request #11405 from bergquist/alert_link
alert: fixes broken link back to grafana
2018-03-28 13:00:32 +02:00
bergquist
d29563ff8e alerting: bad default state for notifiers
when we made image upload optional we didnt
show the default value properly in the UI. Which
caused confusing. This commit apply the default
values to existing notifiers in the edit pages
and reverts back to using uploadimage=true as the
default value.
2018-03-28 12:52:39 +02:00
Daniel Lee
68833fa978 dashboard: allow alerts to be saved for new/provisioned dashboards
This changes the logic for the alert validation in the extractor. Validation
is executed twice, once before attempting to save the alerts and once after
saving the dashboard while saving the alerts to the db. The first validation
will not require that the alert has a dashboard id which allows new dashboards
with alerts to be saved.

Fixes #11247
2018-03-28 11:32:05 +02:00
bergquist
9e2e6fc586 add fallback for gravatar in org/admin view
closes #11095
2018-03-27 22:52:29 +02:00
bergquist
f2755982c3 tech: migrates to none deprecated mail lib
gomail is missing a maintainer so we are
switching to an active fork

ref https://github.com/go-gomail/gomail/issues/108

closes #7189
2018-03-27 21:53:46 +02:00
bergquist
5596707531 alert: fixes broken link back to grafana
If Grafana was configured to use a subpath it
was included twice in the link from the
alert notification back to Grafana.

closes #11403
2018-03-27 20:26:51 +02:00
Leonard Gram
a40e209a91
Merge pull request #11379 from bergquist/provisioning_override_id
provisioning: removes id from dashboard.json
2018-03-27 14:57:00 +02:00
bergquist
b61bc72e2a provisioning: removes id from dashboard.json
if dashboard json files contains `id` we
will just remove it form the dashboard model
before importing it into the database.

closes #11138
2018-03-26 13:17:39 +02:00
Julian Kornberger
391868c5d6 Use net.SplitHostPort to support IPv6
- Add some tests
- Make error message more helpful
2018-03-26 02:48:25 +02:00
Carl Bergquist
980e078222
Merge pull request #11326 from bergquist/more_traces
dataproxy: adds dashboardid and panelid as tags
2018-03-23 17:13:15 +01:00
Julian Kornberger
6f363153d7 Adjust permissions of unix socket
fixes #8358
2018-03-23 16:09:04 +01:00
Daniel Lee
e84f746d1d
Merge pull request #11348 from grafana/11306-sql-table-time
Postgres, MySQL, MSSQL minor refactoring/unification
2018-03-23 14:23:31 +01:00
Carl Bergquist
8d7fa644de
Merge pull request #11352 from digineo/golint
Make golint happier
2018-03-23 13:35:11 +01:00
Carl Bergquist
8db09d7556
Merge pull request #11290 from Thib17/retry
Alerting: Add retry mechanism
2018-03-23 13:17:24 +01:00
Carl Bergquist
f0d77804da
Merge pull request #11329 from alexanderzobnin/fix-11278
fix dashboard version cleanup on large datasets
2018-03-23 10:53:51 +01:00
Julian Kornberger
0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
Marcus Efraimsson
b818e9f619 Merge branch 'master' into 11306-sql-table-time 2018-03-22 16:45:33 +01:00
Marcus Efraimsson
f0f41c2a8e mysql: skip tests by default 2018-03-22 16:44:55 +01:00
Gerben Meijer
e722732021 Return actual user ID in UserProfileDTO
This fixes calls to /api/user where ID is currently always 0
2018-03-22 16:30:04 +01:00
Marcus Efraimsson
f5654f88e2 mysql: fix precision for the time column in table/annotation query mode
Use the ConvertSqlTimeColumnToEpochMs function to convert any native
datetime data type or epoch time (millisecond precision).
Refactored mysql implementation to make it more similar to postgres
and mssql implementations.
Added $__timeEpoch macro function with same implementation as $__time.
Added possibility to use a time column named time in addition to
the currectly supported time_sec.
Additional tests and update of existing.
Added test dashboard.
2018-03-22 15:40:46 +01:00
Marcus Efraimsson
66c03f84f5 postgres: fix precision for the time column in table/annotation query mode
Use the ConvertSqlTimeColumnToEpochMs function to convert any native
datetime data type or epoch time (millisecond precision).
Additional tests and update of existing due to timezone issues
running postgres on UTC and dev environment on non-utc.
Added test dashboard.
2018-03-22 15:32:33 +01:00
Marcus Efraimsson
b69ebee066 mssql: fix precision for the time column in table/annotation query mode
Use the ConvertSqlTimeColumnToEpochMs function to convert any native
datetime data type or epoch time (millisecond precision).
Additional tests and update of existing due to timezone issues
running MSSQL on UTC and dev environment on non-utc.
Update stored procedures test to handle more parameters.
Update test dashboard.
2018-03-22 15:23:12 +01:00
Marcus Efraimsson
b0076d4f65 mssql: remove UTC conversion in macro functions
Removes the macro function . Macro functions should not do UTC/timezone conversion - they should
work in the same way as postgres and mysql datasource implementations.
Grafana and Microsft SQL Server should be run on servers with UTC timezones.
2018-03-22 14:55:44 +01:00
Marcus Efraimsson
3ccadff800 mssql: fix timeGroup macro so that it properly creates correct groups
Earlier the division of interval was done using whole numbers resulting in that important information
was lost/too many time series merged to the same group. Now using division of floating point and rounding
up to solve the problem
2018-03-22 14:49:40 +01:00
Alexander Zobnin
0ffcea08c7 dashboard version cleanup: more tests and refactor 2018-03-22 15:18:05 +03:00
Julian Kornberger
7aab6a8887 Make golint happier 2018-03-22 12:40:21 +01:00
Thibault Chataigner
38bdb8dfb3 Alerting: move getNewState to EvalContext
This fix alert state update when several evaluation attempts are needed

Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2018-03-21 20:59:39 +01:00
Alexander Zobnin
2ade0881b1 minor refactor of dashboard version cleanup 2018-03-21 22:48:17 +03:00
Alexander Zobnin
3f85fcce2d refactor: dashboard version cleanup 2018-03-21 21:01:15 +03:00
Alexander Zobnin
f976b690ca limit number of rows deleted by dashboard version cleanup 2018-03-21 20:26:27 +03:00
Alexander Zobnin
fc2d1d6ca9 fix dashboard version cleanup on large datasets 2018-03-21 17:23:05 +03:00
bergquist
519fd8b2ba graphite: adds more traces for alerting 2018-03-21 13:16:59 +01:00
Marcus Efraimsson
42299eb328 Merge branch 'master' into 11306-sql-table-time 2018-03-21 12:08:48 +01:00
Marcus Efraimsson
3cb0bc3da1 sql datasource: extract common logic for converting time column to epoch time in ms 2018-03-21 11:20:15 +01:00
bergquist
f142548969 dataproxy: adds dashboardid and panelid as tags
closes #11315
2018-03-20 22:23:28 +01:00
Thibault Chataigner
5d23e7710b Alerting: Add retry mechanism and its unitests
Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2018-03-20 21:01:56 +01:00
Daniel Lee
92388f7faf session: update defaults for ConnMaxLifetime
to be the same as the 5.0.3 release defaults
2018-03-20 19:31:01 +01:00
Daniel Lee
1cef373d16 Merge remote-tracking branch 'upstream/master' into update-xorm 2018-03-20 19:21:58 +01:00
Daniel Lee
e5e9d3c2f3 mssql: adds test for time should be ms in table mode 2018-03-20 14:42:29 +01:00
Daniel Lee
ae4c6e4648 mssql: fix precision for time column in table mode
ref #11306
2018-03-20 12:59:40 +01:00
Carl Bergquist
f64c6e490a
Merge pull request #11258 from mitjaziv/hide-credentials
add regex search/replace of username/password in urls
2018-03-20 09:37:09 +01:00
Marcus Efraimsson
192e913b7b mssql: add integration test to verify stored procedure usage 2018-03-19 19:56:34 +01:00
Marcus Efraimsson
8f6626e805 mssql: encrypt password in database 2018-03-19 17:32:51 +01:00
Marcus Efraimsson
449a307575 mssql: remove dynamic construction of metric column and other columns
This seems like a niche feature which can be solved by defining multiple queries. In the future
we'll probably add support for defining series name by alias field similar to how other datasources
have solved that, e.g. prometheus.
2018-03-19 17:14:01 +01:00