Commit Graph

800 Commits

Author SHA1 Message Date
Dan Cech 33760b5c3b make sure user's default org is kept up to date 2018-04-17 16:51:05 -04:00
Dan Cech 52503d9cb5 refactor authproxy & ldap integration, address comments 2018-04-17 14:06:25 -04:00
Dan Cech daeba40b3b tests for user auth module 2018-04-17 14:06:25 -04:00
Dan Cech e53e039b1b restructure GetUserByAuthInfo 2018-04-17 14:06:25 -04:00
Dan Cech c4168c2396 error handling 2018-04-17 14:06:25 -04:00
Dan Cech 65847da1df use Result in GetAuthInfoQuery 2018-04-17 14:06:25 -04:00
Dan Cech e53315dce8 cleanup 2018-04-17 14:06:25 -04:00
Dan Cech 23f163e8cf fixes 2018-04-17 14:06:25 -04:00
Dan Cech 1c5afa731f shared library for managing external user accounts 2018-04-17 14:06:25 -04:00
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
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 bc8353ae14 Merge branch 'master' into dashboard-acl-ux2 2018-04-16 21:19:01 +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 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 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
Daniel Lee 32264c61c4 Merge branch 'master' into dashboard-acl-ux2 2018-03-29 11:32:24 +02:00
bergquist 627df67992 dashboards: reject updates of provisioned dashboards 2018-03-27 15:12:47 +02:00
bergquist d6faa3d06f provisioning: improve UX when saving provisioned dashboards 2018-03-26 15:08:46 +02: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
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
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
Daniel Lee 1cef373d16 Merge remote-tracking branch 'upstream/master' into update-xorm 2018-03-20 19:21:58 +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
Daniel Lee 5a3ba68a9c database: fixes after xorm update 2018-03-16 00:09:29 +01:00
Daniel Lee 1c20126f87 database: update xorm to v0.6.4 and xorm core to v0.5.7 2018-03-16 00:02:50 +01:00
Marcus Efraimsson ef3588c1f8 docker: mssql and mssql tests blocks with common build context 2018-03-15 09:49:53 +01:00
Marcus Efraimsson 57d46a706c mssql datasource: additional data type tests 2018-03-13 19:54:29 +01:00
Marcus Efraimsson d4beee2bb0 Merge branch 'master' into mssql_datasource 2018-03-13 16:03:02 +01:00
bergquist 061a418f0f style: dont expose func outside package 2018-03-13 11:24:10 +01:00
bergquist ff6108051d removes unused variables 2018-03-07 16:40:24 +01:00
Carl Bergquist 3f6e525755 Merge pull request #10942 from grafana/pausing_alerts_updates_timestamp
Pausing/un alerts now updates new_state_date
2018-03-07 15:40:12 +01:00
Daniel Lee 3b836c9c5f Merge pull request #10996 from grafana/snapshot_permissions
Snapshot fixes and changes to snapshot list
2018-02-23 09:17:59 +01:00
Daniel Lee fe49182b9d snapshots: fixes cleanup of old snapshots
Snapshot cleanup did not work due to time.Now syntax error. Added test
for it as well to catch any future errors.

Added error and debug logging so that it is possible to see any errors in the future.

Removed an unused configuration value and deprecated the remove expired snapshots
setting.
2018-02-22 16:12:16 +01:00
Marcus Efraimsson 3f588b4c48 dashboards: created/updated and createdby/updatedby should be set before save
If creating a new folder/dashboard created/updated and createdby/updatedby should always be set.
If updating an existing folder/dashboard updated and updatedby should always be set.
2018-02-22 11:54:28 +01:00
Daniel Lee 7d9a9fa29c snapshots: change to snapshot list query
Admins can see all snapshots. Other roles can only see their own
snapshots.

Added permission check for deleting snapshots - admins can delete
any snapshot, other roles can delete their own snapshots or
snapshots that they have access to via dashboard permissions.
2018-02-21 13:39:08 +01:00
Marcus Efraimsson 02278f90a7 dashboards: make fake dashboard guardian available to other packages 2018-02-20 18:08:19 +01:00
Marcus Efraimsson 39aba03483 dashboards: created date should be set when creating a folder/dashboard 2018-02-20 13:54:31 +01:00