Commit Graph

1371 Commits

Author SHA1 Message Date
Marcus Efraimsson
d7688241c6
Merge branch 'master' into readonly_dashboards 2018-04-17 16:27:51 +02:00
Daniel Lee
26bb22bffa
Merge pull request #11554 from grafana/11553_viewer_general_access
User with org viewer role permission fixes
2018-04-17 13:50:45 +02:00
Daniel Lee
b3acbb9995
Merge pull request #11526 from grafana/11173_folder_admin
A folder admin should be able to add permissions for folder/its dashboards
2018-04-17 13:42:38 +02:00
Marcus Efraimsson
8a5cb088d3
Merge branch 'master' into readonly_dashboards 2018-04-17 10:50:04 +02:00
Dan Cech
e07de80b75 Fix issues with metric reporting (#11518)
* report active users in graphite stats

* use bus to publish system stats

* metrics: avoid using events unless we have to

this commit also changes the default interval
for updating the stats gauges. Seems like the old values
was a product of previous metrics implementation
2018-04-17 10:20:01 +02:00
Marcus Efraimsson
92768d5a2b
Merge branch 'master' into dashboard-acl-ux2 2018-04-17 09:19:36 +02:00
Marcus Efraimsson
bc8353ae14
Merge branch 'master' into dashboard-acl-ux2 2018-04-16 21:19:01 +02:00
Mario Trangoni
ce941a004d fix unconvert issues 2018-04-16 20:04:58 +02:00
Daniel Lee
34455c0598
Merge pull request #11583 from grafana/11556-org-switch-order
ordered user orgs alphabeticaly
2018-04-16 17:09:36 +02:00
Daniel Lee
ee303c03e9
Merge pull request #11550 from grafana/sql_ts_precision
sql tsdb: fix precision and data type support for time columns
2018-04-16 11:04:46 +02:00
Mario Trangoni
91fb2e07ce pkg: fix codespell issues 2018-04-13 20:31:29 +02:00
Marcus Efraimsson
ff4e38c1d8
provisioned dashboard validation should be made when importing a dashboard
Had to add the validate before save command before validating provisioned dashboard
so that the import would get a proper dashboard id
2018-04-13 17:54:41 +02:00
Marcus Efraimsson
79d8937ce5
provisioned dashboard validation should not be made from provisioning service
Provisioned dashboard validation should not be made when creating/updating a folder or
when provisioning service are trying to provision/create/update dashboard
2018-04-13 17:45:32 +02:00
Marcus Efraimsson
4a26797cdd
Merge branch 'master' into readonly_dashboards 2018-04-13 17:03:00 +02:00
Patrick O'Carroll
9ad8a77a21 ordered user orgs alphabeticaly fixes #11556 2018-04-13 14:53:36 +02:00
flopp999
74f570fdf4
change annotation limit from 10 to 100 2018-04-12 17:38:10 +02:00
Marcus Efraimsson
b4863002c9
permission: fix user with org viewer save/move permissions
User with org viewer role should not be able to save/move dashboards
in/to general folder.
2018-04-11 00:23:50 +02:00
bergquist
93e1546f73 alerting: handle invalid json format
closes #11003
2018-04-10 22:22:12 +02:00
bergquist
949484b949 provisioning: simplify db query
the GetProvisionedDashboardQuery wasent used for anything
else than check if a dashboard is provisioned or not. So
we simplified this query to make it more maintainable.
2018-04-10 12:30:37 +02:00
Marcus Efraimsson
0317ecbf0d
postgres: support running multiple postgres integration tests
Makes it possible to run mysql integration tests for both
grafana config db and tsdb at the same time using
GRAFANA_TEST_DB=postgres go test ./pkg/...
2018-04-10 11:08:30 +02:00
Marcus Efraimsson
5c120c2c11
mysql: mysql tests should use a db server with UTC
To get rid of issues involving date/time when testing.
Also, makes it possible to run mysql integration tests for both
grafana config db and tsdb at the same time using
GRAFANA_TEST_DB=mysql go test ./pkg/...
2018-04-10 10:58:45 +02:00
bergquist
77e7887e5e provisioning: check provisiong before saveCmd 2018-04-10 09:35:54 +02:00
Marcus Efraimsson
f3e1557761
guardian: when updating permissions should verify existing permissions
Before in CheckPermissionBeforeUpdate, access was verified for updated
permissions. Now access is verified for existing permissions.
Refactored guardian tests to cover more test cases for org admin, editor
and viewer roles
2018-04-08 15:06:22 +02:00
Marcus Efraimsson
6bbeb723ca Merge branch 'master' into readonly_dashboards 2018-04-05 20:30:27 +02:00
Daniel Lee
32264c61c4 Merge branch 'master' into dashboard-acl-ux2 2018-03-29 11:32:24 +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
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
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
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
627df67992 dashboards: reject updates of provisioned dashboards 2018-03-27 15:12:47 +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
d6faa3d06f provisioning: improve UX when saving provisioned dashboards 2018-03-26 15:08:46 +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
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
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
Alexander Zobnin
0ffcea08c7 dashboard version cleanup: more tests and refactor 2018-03-22 15:18:05 +03: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
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
1cef373d16 Merge remote-tracking branch 'upstream/master' into update-xorm 2018-03-20 19:21:58 +01:00
Marcus Efraimsson
d26d8c713e Merge branch 'master' into mssql_datasource 2018-03-16 15:19:19 +01:00
Daniel Lee
3ca1e06509 session: fork Macaron mysql session middleware
This changes forks the mysql part of the Macaron session middleware.

In the forked mysql file:

- takes in a config setting for SetConnMaxLifetime (this solves wait_timeout
problem if it is set to a shorter interval than wait_timeout)
- removes the panic when an error is returned in the Exist function.
- retries the exist query once
- retries the GC query once
2018-03-16 01:19:28 +01:00
Daniel Lee
9cdd7cb04c database: expose SetConnMaxLifetime as config setting
For MySQL, setting this to be shorter than the wait_timeout MySQL setting
solves the issue with connection errors after the session has timed out for
the connection to the database via xorm.
2018-03-16 01:09:00 +01:00