Katarina Yang
5bab02c7ef
Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactional… ( #43823 )
...
* Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactionalDBSession in user files
* update milesone
2022-01-10 11:28:41 -05:00
J Guerreiro
a1b8b5d123
Usage stats: Count API keys ( #42883 )
...
* Stats: add api key count to usage stats
* Chore: correctly capitalize struct member
2021-12-22 17:37:45 +01:00
idafurjes
47f6bb3583
Chore: Add context to org ( #40685 )
...
* Add context to org
* Rebase
* Fix rebase
2021-11-03 11:31:56 +01:00
idafurjes
f4f0d74838
Chore: Add context to user ( #39649 )
...
* Add context to user
* Add context for enterprise
* Add context for UpdateUserLastSeenAtCommand
* Remove xorm
2021-10-04 15:46:09 +02:00
idafurjes
b255c1b992
Chore: Add context to star and stats ( #39591 )
...
* Add context to star and stats
* Use WithTransactionalDbSession
* Add additional ctx
* Remove convey
* Fix star handler name
* Use WithDbSession, use DispatchCtx
* Remove xorm from star
2021-09-28 17:54:45 +02:00
idafurjes
65ebb04cf3
Chore: Add context to org users ( #39526 )
...
* Add context to org users
* Fix go lint
* Roll back xorm refactor
* Use WithTransactionalDbSession
* Update sqlstore.go
Fix typo
* Update org_users.go
Fix typo
2021-09-27 16:43:16 +02:00
Dimitris Sotirakis
f5ecf5c2d9
Cast fields to int64 ( #39179 )
2021-09-14 14:57:12 +02:00
Serge Zaitsev
643c7fa0cb
Chore: update all +build statements ( #38782 )
2021-09-01 17:38:56 +03:00
Hugo Häggmark
7204a64717
LibraryElements: Creates usage stats for panels and variables ( #34476 )
...
* LibraryPanels: Adds usage collection
* Refactor: renames Panel and Variable consts
* Chore: initialize stats
* Refactor: moves library element migrations to migration namespace
2021-05-24 06:11:01 +02:00
Arve Knudsen
87c3a2b790
PluginManager: Make Plugins, Renderer and DataSources non-global ( #31866 )
...
* PluginManager: Make Plugins and DataSources non-global
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Replace outdated command
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DashboardService: Ensure it gets constructed with necessary parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix build
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DashboardService: Ensure it gets constructed with necessary parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove dead code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove FocusConvey
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove dead code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo interface changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Backend: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Rename to DataSourceCount
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Consolidate dashboard interfaces into one
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix dashboard integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-17 16:06:10 +01:00
Vardan Torosyan
1d399b89ea
Usage Stats: Remove unused method for getting user stats ( #30074 )
...
* Usage Stats: Remove unused method for getting user stats
This was used in enterprise codebase, but is not longer in use, thus can be safely removed.
* Force refresh user stats in tests
2021-01-26 14:13:25 +01: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
Emil Tullstedt
10141c5e6c
Stats: Use more efficient SQL and add timeouts ( #27390 )
2020-09-08 09:52:08 +02:00
Emil Tullstedt
954a2811b3
Stats: Stop counting the same user multiple times ( #26777 )
...
* Stats: Cache based stats implementation
* Stats: Correct logic and add larger scale test
* Stats: linter
* Stats: SQL implementation
* Stats: cleanup SQL
* Stats: Tab -> Spaces
* Update pkg/services/sqlstore/stats.go
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
* Stats: Quote 'user' table with dialect.Quote
* Stats: Ensure test is run as integration test
* Stats: Use boolean value
...because if (v) { true } else { false } is unnecessary at best.
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-08-24 11:23:14 +02:00
Agnès Toulet
ea3d368e91
Core: add active users stat ( #22563 )
...
* Stats: add active user count query
* License: add info in settings
* Stats: Retrieve active users stats for different roles
+ Clean files and tests
* Stats: add dialect.Quote in queries
* Stats: improve tests (require instead of assert)
* Stats: improve tests (require instead of assert)
2020-03-05 12:34:44 +01:00
Sofia Papagiannaki
0b7a5d4ed1
SQLStore: Test admins/editors/viewers stats validity ( #20751 )
...
* Test admins/editors/viewers stats validity
* Use standard testing library instead of Convey
2019-12-02 10:14:20 +02:00
Carl Bergquist
eb8af01a8a
admin: add more stats about roles ( #16667 )
...
closes #14967
2019-04-24 13:18:16 +02:00
Carl Bergquist
b070784b8a
adds usage stats for alert notifiers ( #13173 )
2018-09-06 21:03:09 +02:00
bergquist
629eab0b1e
bus: dont mix ctx/classic handlers
2018-06-15 12:46:20 +02:00
Marcus Efraimsson
fbc44025dc
add usage stats for datasource access mode
2018-05-25 16:06:35 +02:00
Marcus Efraimsson
2ea5b6fe33
add additional usage stats metrics
...
nr of folders
nr of folder permissions
nr of dashboard permissions
nr of snapshots
nr of teams
nr of provisioned dashboards
2018-05-25 14:33:37 +02:00