* chore: remove unused test helper from sqlstore
TimeNow() is no longer used in any tests in this package.
* chore: move sqlstore.SQLBuilder to the infra/db package
This required some minor refactoring; we need to be a little more explicit about passing around the dialect and engine. On the other hand, that's a few fewer uses of the `dialect` global constant!
* chore: move UserDeletions into the only package using it
* cleanup around moving sqlbuilder
* remove dialect and sqlog global vars
* rename userDeletions to serviceAccountDeletions
* Refactor parse query to functions
* Move parsing to new file
* Create empty result variable and use it when returning early
* Fix linting
* Revert "Create empty result variable and use it when returning early"
This reverts commit 36a503f66e.
* Add `RoleMenuGroupsSection` component
* Add plugin roles data structures
* Use `RoleMenuGroupsSection` for rendering roles
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Set Dashboard and Panel IDs on rule group replacement
* fix comments and abbreviate test variable name
* Update pkg/services/ngalert/provisioning/alert_rules.go
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
* Update config store to split between active and history tables
* Migrations to fix up indexes
* Implement migration from old format to new
* Move add migrations call
* Delete duplicated rows
* Explicitly map fields
* Quote the column name because it's a reserved word
* Lift migrations to top
* Geomap: Add color gradients to route layer
* Add support for all color schemes
* Address PR feedback: remove ! from verified object
* Add arrow support and simplify color functions
* Simplify and clean-up code
* Remove line width slider and drive width by size
* Drive arrow size based on size
* Allow arrows for fixed color
* Add gdev dashboard
* Use square line caps only when arrows are active
* Apply size to width for fixed color and size
* Handle arrows when size and color are fixed
* Add tags to gdev dashboard
* Fix null error in backend test for gdev dashboard
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* introduce Logger interface local to channles + implementaton that wraps the Grafana logger
* make NewFactoryConfig accept LoggerFactory
* add logger field to FactoryConfig
* update usages of log.Logger to internal interface
* Guardian: Use dashboard UID instead of ID
* Apply suggestions from code review
Introduce several guardian constructors and each time use
the most appropriate one.
Grafana would forward the X-Grafana-User header to backend plugin request when
dataproxy.send_user_header is enabled. In addition, X-Grafana-User will be automatically
forwarded in outgoing HTTP requests for core/builtin HTTP datasources.
Use grafana-plugin-sdk-go v0.147.0.
Fixes#47734
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* refactor header
* split left and right header actions
* cleanup
* fix broken tests
* move MetricsQueryEditor tests to QueryEditor tests
* fix mock imports
* remove no longer used onRunQuery func
* move run queries button
* apply defaults also when changing query type
* remove not used prop
* Add support for transformations
* Add tests for data transformers
* Provide replace function to transformations
* Unsubscribe from existing transformations stream if new data comes in
* ProxyUtil: Populate X-Grafana-Referer header
* ProxyUtil: Move Referer/Origin header removal
So that the removal and setting X-Grafana-Referer logic applies to all
proxied requests and not just datasource proxy.
* ProxyUtil: Test to guard against multiline headers
* ProxyUtil: Explicitly check injected header isn't parsed
* Move and rename genversions.go and tests
* Fix lint - bring back cli.Exit
* Move package.json and fix tests
* Add necessary env vars for promote event
* fix DataSourceAddButton component
This component implicitly returned `false` when `canCreateDataSource`
was false, and that way it didn't qualify as a function component.
We fixed it to explicitly return null in this case.
* DataSourceAddButton: update function signature
This is more consistent with other code in this codebase.
* Enable editing evaluation interval in alert form when creating a new group
* Disable group when no folder selected and focus on group when clicking add new
* Improve group selector showing interval as a description for each option
* Fix evaluate every input and label aligment
* Fix columns width in EditRuleGroupModal rules table
* Reduce amount of space in the evaluation behaviour section