* Elasticsearch: Add support for serial diff pipeline aggregation
* Removing settings transsforms
* Removing unused deps
* removing unused dep
* Fixing type in test
* Adding backend support for serial_diff
* Change API to expect UIDs instead of ID
* Remove unnecessary transactions
When only one query is executed
* Modify API responses
* Cleanup tests
* Use globally orgID and UID for identifying alert definitions
Usage Stats: Calculate concurrent users as a histogram
Metric will help to understand if users are sharing their credentials or using one account for concurrent sessions. This will help to make more informed decisions when enforcing any license limitations on credentials usage.
* fall back to any architecture when getting plugin's checksum
* Update pkg/cmd/grafana-cli/commands/install_command.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* remove typo
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* use sha256 checksum instead of md5
* Chore: Rewrite ldap login test to standard library (#29998)
* Chore: Rewrite ldap login test to standard library
* Preserve original ldap enabled setting after test
* Chore: Rewrite models alert test to standard library (#30021)
* Chore: Rewrite models dashboard acl test to standard library (#30022)
* Chore: Rewrite models dashboards test to standard library (#30023)
* Chore: Rewrite login auth test to standard library (#29985)
* Chore: Rewrite login auth test to standard library
* Use assert.Empty when empty string expected
* Chore: Rewrite brute force login protection test to standard library (#29986)
* Update pkg/cmd/grafana-cli/services/api_client.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/cmd/grafana-cli/services/api_client.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* use sha256 checksum instead of md5
* Update pkg/cmd/grafana-cli/services/api_client.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/cmd/grafana-cli/services/api_client.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* grafana-cli: Remove MD5
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Emil Hessman <emil@hessman.se>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* SQLStore: customise the limit of retrieved datasources per organisation
* update all suggestions regarding nil or 0 as default
* Apply suggestions from code review
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* correct default.ini description + adding unittest
* Apply suggestions from code review
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
* modify unittest name
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
* Add fake TeamSyncService
* Change SyncTeams dispatch to direct method call
* Remove SyncTeamsCommand struct
* Move TeamSyncService to a separate package
* Remove context from SyncTeams args
* Add comments to teamsyncgroup package
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* Replace TeamSyncService with TeamSyncFunc
* Remove unnecessary error check
* Add a test
* Fix test input
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* PanelLibrary: Adds get to the API
* Refactor: adds tests for get and getAll and cleans up other tests
* Refactor: changed name on DTO
* Update pkg/services/librarypanels/api.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/database.go
* Always use cache: stop passing skipCache among ngalert functions
* Add updated column
* Scheduler initial draft
* Add retry on failure
* Allow settting/updating alert definition interval
Set default interval if no interval is provided during alert definition creation.
Keep existing alert definition interval if no interval is provided during alert definition update.
* Parameterise alerting.Ticker to run on custom interval
* Allow updating alert definition interval without having to provide the queries and expressions
* Add schedule tests
* Use xorm tags for having initialisms with consistent case in Go
* Add ability to pause/unpause the scheduler
* Add alert definition versioning
* Optimise scheduler to fetch alert definition only when it's necessary
* Change MySQL data column to mediumtext
* Delete alert definition versions
* Increase default scheduler interval to 10 seconds
* Fix setting OrgID on updates
* Add validation for alert definition name length
* Recreate tables
Adding an interface type for usage stats service allows us to not depend on the implementation outside of the package, for example when testing we can easily mock the service
The change allows to add external, additional metrics which will be reported with the rest of hardcoded metrics, allowing to add metrics without a need to change the service itself.