Karsten Weiss
be2d635078
Simplify error returns (gosimple)
...
This fixes:
pkg/api/avatar/avatar.go:261:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/log/file.go:102:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/metrics/graphitebridge/graphite.go:298:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/provisioning/provisioning.go:23:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:351:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:435:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/stats.go:22:2: 'if err != nil { return err }; return err' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/team.go:213:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
2018-04-16 21:04:57 +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
ryan
66d020eb7e
skip migration if it is a big number
2018-04-05 09:51:08 +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
ryan
a0a6fa6fa5
remove constraint from sqlstore
2018-03-23 11:47:07 +01:00
ryan
a5588b6957
Merge remote-tracking branch 'origin/annotations-created' into annotations-created
...
* origin/annotations-created:
dooh
2018-03-23 11:44:21 +01:00
ryan
4ed1ec5174
Merge remote-tracking branch 'grafana/master' into annotations-created
...
* grafana/master: (30 commits)
changelog: adds note about closing #11278
docs: spelling
docs: add intro paragraph to provisioning page
Cleanup CircleCI V2 Conversion
changelog: notes for #1271 and #2740
graph: minor fixes to y-axes alignment feature
added save icon to save buttons
removed trash can icon from save buttons
Return actual user ID in UserProfileDTO
dashboard version cleanup: more tests and refactor
minor refactor of dashboard version cleanup
refactor: dashboard version cleanup
limit number of rows deleted by dashboard version cleanup
fix dashboard version cleanup on large datasets
Allocated to a separate alignment block. Replaced the attribute of the second axis by the attribute of the axes.
Fixed unit test.
Changed the way this feature was activated. And changed tolltip.
Added validation of input parameters.
Resolved conflict
Corrected work for graphs created before this feature.
...
2018-03-23 11:38:43 +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
Ryan McKinley
164ddb16c9
dooh
2018-03-22 20:48:40 +01:00
ryan
0c7294593c
update the updated column!
2018-03-22 20:05:04 +01:00
ryan
d554c6f9be
using circle as my tester
2018-03-22 19:44:47 +01:00
ryan
fa021b547a
using circle as my tester
2018-03-22 19:39:30 +01:00
ryan
db91033b6e
adding tests, but they arent running locally
2018-03-22 19:33:33 +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
ryan
20353db966
convert epoch to milliseconds
2018-03-22 16:21:47 +01:00
ryan
a2bbd89a9e
adding updated column
2018-03-22 15:52:09 +01:00
Alexander Zobnin
0ffcea08c7
dashboard version cleanup: more tests and refactor
2018-03-22 15:18:05 +03:00
ryan
3898ea02e6
adding created column
2018-03-22 02:22:58 +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
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
Marcus Efraimsson
fce1e3f7f1
Merge branch 'master' into 10630_folder_api
2018-02-19 13:32:45 +01:00