Commit Graph

15 Commits

Author SHA1 Message Date
Marcus Efraimsson
1e4a660ea7
Chore: Propagate context for quotas (#39205)
Propagate context for quotas and queries/commands.

Ref #36734
2021-09-20 17:05:30 +02:00
Serge Zaitsev
643c7fa0cb
Chore: update all +build statements (#38782) 2021-09-01 17:38:56 +03:00
Conor Evans
83abaa8bdf
Quota: Do not count folders towards dashboard quota (#32519)
For dashboard quota fix so that folders are not counted as dashboards.

Fixes #31317

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-05-12 23:44:46 +02:00
Sofia Papagiannaki
540f110220
[Alerting]: Extend quota service to optionally set limits on alerts (#33283)
* Quota: Extend service to set limit on alerts

* Add test for applying quota to alert rules

* Apply suggestions from code review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Get used alert quota only if naglert is enabled

* Set alert limit to zero if nglalert is not enabled
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-05-04 19:16:28 +03:00
Sofia Papagiannaki
4937f0daab
SQLStore: Run tests as integration tests (#28265)
* sqlstore: Run tests as integration tests

* Truncate database instead of re-creating it on each test

* Fix test description

See https://github.com/grafana/grafana/pull/12129

* Fix lint issues

* Fix postgres dialect after review suggestion

* Rename and document functions after review suggestion

* Add periods

* Fix auto-increment value for mysql dialect

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-10-16 10:46:14 +03:00
Arve Knudsen
a5d9196a53
Chore/fix lint issues (#27704)
* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-22 16:22:19 +02:00
Arve Knudsen
41d432b5ae
Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Arve Knudsen
07582a8e85
Chore: Fix various spelling errors in back-end code (#25241)
* Chore: Fix various spelling errors in back-end code
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>>
2020-06-01 17:11:25 +02:00
Carl Bergquist
f9962eabff
chore: avoid aliasing imports in services (#22499) 2020-02-29 13:35:15 +01:00
moznion
4397ee61d0
Put issue number to test code 2018-12-05 22:47:41 +09:00
moznion
d1e1cde00e
Fix bug what updating user quota doesn't work
Reason is same as 061e06c226
2018-12-05 22:29:07 +09:00
moznion
061e06c226
Fix bug what updating org quota doesn't work
3c330c8e4c/pkg/services/sqlstore/quota.go (L106)

In the real use case, `has` that is described by the above code is always `false` because it includes `Updated` in a query.

So this commit fixes this issue.
2018-12-05 22:19:40 +09:00
Torkel Ödegaard
6c0752473a
Sqlstore refactor (#11908)
* refactor: tracing service refactoring

* refactor: sqlstore to instance service

* refactor: sqlstore & registory priority

* refactor: sqlstore refactor wip

* sqlstore: progress on getting tests to work again

* sqlstore: progress on refactoring and getting tests working

* sqlstore: connection string fix

* fix: not sure why this test is not working and required changing expires

* fix: updated grafana-cli
2018-05-18 11:10:10 +02:00
Daniel Lee
5a3ba68a9c database: fixes after xorm update 2018-03-16 00:09:29 +01:00
woodsaj
b7de847236 add unittests for quota sqltore methods. 2015-09-15 17:10:46 +08:00