* FrontendService: Add tracing and logging middleware
* tests!
* middleware tests
* context middleware test
* revert http_server back to previous version
* fix lint
* fix test
* use http.NotFound instead of custom http handler
* use existing tracer for package
* use otel/trace.Tracer in request_tracing middleware
* tidy up tracing in contextMiddleware
* fix 404 test
* remove spans from contextMiddleware
* comment
* parse via sse
I need to figure out how to handle the pipeline.execute with our own
client. I think this is important for MT reasons, just like using our
own cache (via legacy) is important.
parsing is done though!
* WIP nonsense
* horrible code but i think it works
* Add support for sql expressions config settings
* Cleanup:
- remove spew from nodes.go
- uncomment out plugin context and use in single tenant flow
- make code more readable and add comments
* Cleanup:
- create separate file for mt ds client builder
- ensure error handling is the same for both expressions and regular queries
- other cleanup
* not working but good thoughts
* WIP, vector not working for non sse
* super hacky but i think vectors work now
* delete delete delete
* Comments for future ref
* break out query handling and start test
* add prom debugger
* clean up: remove comments and commented out bits
* fix query_test
* add prom debugger
* create table-driven tests with testsdata files
* Fix test
* Add test
* go mod??
* idk
* Remove comment
* go enterprise issue maybe
* Fix codeowners
* Delete
* Remove test data
* Clean up
* logger
* Remove go changes hopefully
* idk go man
* sad
* idk i ran go mod tidy and this is what it wants
* Fix readme, with much help from adam
* some linting and testing errors
* lint
* fix lint
* fix lint register.go
* another lint
* address lint in test
* fix dead code and linters for query_test
* Go mod?
* Struggling with go mod
* Fix test
* Fix another test
* Revert headers change
* Its difficult to test this in OSS as it depends on functionality defined in enterprise, let's bring these tests back in some form in enterprise
* Fix codeowners
---------
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
* Fix organization deletion error messages
- Improve error message clarity when attempting to delete active organization
- Fix incorrect 'Failed to update organization' message to 'Failed to delete organization'
- Update comment to be more precise about the check being performed
Fixes#92792
* Improve error handling in organization deletion service
- Add contextual error message when dashboard deletion fails during org deletion
- Include organization ID in error message for better debugging
- Import fmt package for error formatting
This helps administrators understand which specific organization failed
during the deletion process when dashboard cleanup encounters issues.
* Fix typo in unified resource access error message
Change 'Namespace missmatch' to 'Namespace mismatch' for correct spelling.
* automatically rename integration tests to follow the common convention
* name tests differently
* alter column type to bigint
* update another column to bigint
* add another alter
* fix subquery for mysql
Adds a new "Allow as recording rules target" toggle to Prometheus datasource configuration that controls whether the datasource can be selected as a target for writing recording rules.
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* Alerting: Use default_datasource_uid as the default target for recording rules
* Add tests
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* Fix static handler redirect logic to ensure proper clean up URLs before redirection.
(cherry picked from commit f50ec8e0d10c24fd79f6c454974a2fc6e9694ef2)
* replace usage of folder guardians with access control evaluators
* remove NewByFolderUID guardian
* bring up to date
* fix test
* more test fixes, and don't fetch the folder before evaluating lib element access
* change what error is returned
* fix alerting test
* try to fix linter errors
* replace the use of newByFolder guardian with direct access control evaluator checks
* remove newByFolder guardian
* get rid of dashboard and folder guardians
* undo unwanted change
* undo unwanted change
* undo unwanted change
* update code owners
* replace usage of folder guardians with access control evaluators
* remove NewByFolderUID guardian
* bring up to date
* fix test
* more test fixes, and don't fetch the folder before evaluating lib element access
* change what error is returned
* fix alerting test
* try to fix linter errors
* replace the use of newByFolder guardian with direct access control evaluator checks
* remove newByFolder guardian
* remove unintentional changes
* remove unintentional changes
* undo unwanted change
* feat: preinstall_sync config - process and installation logic
* ref: add preinstall_sync list to preinstalled plugins of frontendsettings
* fix: conf blank line for sections
* ref: remove plugins async flag, and rename PreinstallPlugins
* docs: default installed plugin list
* rename /mtfe route to /femt to match project name
* set correct navTree JSON property name
* call GetWebAssets in the request handler to prevent stale assets during development
* Call /bootdata and render grafana
* set nonce on script
* write csp header in index handler
* write report-only csp as well
* debug stuff
* more debug logging
* move importing app into a seperate, async-loaded module
* Clean up comments
* make /femt redirect to / in the frontend
* remove console.log
* remove stale commented code
* call __grafana_load_failed if bootstrap fails
* comment for __grafana_boot_data_promise
* remove console.log
* remove blank newline
* codeowners
* Sanitize paths before evaluating access to route
* use util.CleanRelativePath
---------
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* make sure that user permission cache is cleared after new dashboard and folder creation
* more test fixes
* Update pkg/services/dashboards/service/dashboard_service.go
* check identity type in SetDefaultPermissionsAfterCreate, set default permissions for service accounts
* set SA permissions for folders as well
* fix tests
* wip
* Add prom flavor support for data source variables and export/import dashboards (#103321)
* add dashboard and data source var selection
* use match plugin id instead
* use updated matchpluginid
* formatting
* cleanup
* regex anchor
* update error msg
* Alerting: Clean up prometheus-flavored types and functions (#103703)
* clean up types and utility functions for dealing with
prometheus-flavored data sources
* Refactor alerting datasource types to use constants as source of truth
* Alerting: Clean up prometheus-flavored types and functions on the bac… (#103716)
Alerting: Clean up prometheus-flavored types and functions on the backend
* add matchPluginId tests
* Update matchPluginId func to bidirectional (#103746)
* update matchpluginid func to bidirectional
* lint
* formatting
* use actual isSupportedExternalRulesSourceType in test
* add tests in datasource_srv
* betterer
* remove type assertion
* remove unnecessary case
* use satisifies to not have to convert tuple to an array of string
* add prometheus_flavor test
---------
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Alexander Akhmetov <me@alx.cx>
* add group to role DisplayName to make searching easier
* clean up more role names; add filtered display text when fetching
* pass filter state into role menu to decide how to display role name
* prop name better describes what it does