* catch error in query tab when running query throws an error
* add translations
* fix translations
* update query runner to omit nodes that failed to link
* remove unused function
* add DAG errors to AlertingQueryRunner
* bump CI
* fix test
* update test
* fix i18n
* revert code pieve
* Bring the piece of code back 😁
* bail from runner when no queries are to be executed
* add tests and translations
* refactor prepareQueries to omit broken refs and exclude descendant nodes
* update code comments
* fix omitting descendant nodes
* add all broken or missing nodes to panel errors
* go go drone
* remove unused function
* fix prettier and translations
* add export
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Add alertingRuleVersionHistory feature toggle
* WIP: Add version history tab
* revert temp change in index.ts
* wip2
* --wip--
* sync code with the BE changes in the endpoint
* add translations
* Add translations
* use ff only for restore feature
* WIP: Add tracking, make version required, and start mapping dif results
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* Tweak more translations and improve types
* Add button to show/hide JSON diff
* update type for top level rule fields
* Create types
* Make updated_by/version properties optional
* Update mocks to remove updated by and version
* add comments to restore code
* rename fetature flag, as we use this one only for the restore feature
* Update version history to handle special cases
* Add diff numbers
* Fix conflicts
* Move generic computeVersionDiff to a utils file
* Update DOM structure of version summary and tidy up types
* Add tests for version comparison logic
* Lint fix utils file
* Rename props and add docs
* Change to EmptyState and log when no versions
* Remove CreatedBy component and simplify
* Add missing i18n for version history
* add test for computeVersionDiff
* update test
* fix number diff order and add a test
* fix prettier
* fix prettier
* Add promise resolve back in
* Rename to humanReadableDiff and tweak translation
* Show tab for recording rules as well
* Split components out to separate files
* Add optional interval seconds
* Update i18n
* Remove commented code
* Remove value
* Remove unneeded version
* Consistent rendering of updated by
* Mode parseVersionInfo to a separate pure function
* update invalidate/provide tags for getAlertVersionHistory
* Use checkedVersions state only in the parent component
* update getSpecialUidMap name and create an interface
* Fix prettier
* update tab description
* use set instead of map for checkedVersions
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* Provisioning: Remove S3
* Provisioning: Use URL for GitHub
Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>
Co-Authored-By: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Provisioning: Use workflow list
Co-Authored-By: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= <roberto.jimenez@grafana.com>
* Provisioning: Model secrets
* Provisioning: Define a total in the job summary
* Provisioning: Generate code
* Provisioning: Update testdata
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= <roberto.jimenez@grafana.com>
- use types.Convert to get a more normalized type returned from GMS. After syncing with GMS maintainers, the underlying type of the row could be different things (e.g. int when unit32, so this calls the Convert method from the GMS types library to normalize the interface.
- Clean up fieldValFromRow more
- Use IsText to capture different string types
- Add more types to test, also update test to use same cmp.Diff method as others
---------
Co-authored-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>
* starting to refactor query library to use callback
* replace QueryActionButton with onSelectQuery
* hook up properly in explore
* fix unit tests
* i18n
* extract types
* fix refId in explore
* fix unit tests
* handle changing datasource to mixed
* enrich queries with datasource
* move out into separate function
* filter out expression datasources
When introducing errorsource over in:
https://github.com/grafana/grafana/pull/99900
I introduced a bug - trying to use a http response with a non-nil error.
In that case, the response is nil, so code panics.
This PR removes that check.
* Add Jira integration to cloud AMs
* Add alertingJiraIntegration feature toggle for jira integration
* Update integration name to Jira Service Management
* address pr comments
* gen ff
* add project to the getReceiverDescription for jira
* Update getReceiverDescription for jira
* update text
* update texts and add required option
* Add conversion for fields jira integration to JSON format in the dto and viceversa
* add tests
* Add translation for jira receiver summary
* Add placeholder for Jira duration option
* move logic cheking integrtion type outside the conversion method
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* add config.unifiedAlertingEnabled check to render create alerts menu item from panels
* Disable create rule from panel when unifiedAlerting is disabled
* fix test and lint
* fix test
* handle "sharedwithme" use-case in both legacy/US modes
* display "Shared with me" as location in dashboard list
* fix missing "TotalHits" prop in mode 2
* Updating SAML for Azure specific attribute structures
Adding additional context surrounding SAML via Azure where the full attribute URL needs to be specified or it will not map correctly.
This generates a lot of support contacts and isn't documented causing friction when organizations can't set it up themselves or lack the technical staff to self manage.
* run prettier
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* split create to create and patch and move to state
patch will be refactored further
* move setNextState to state transition
* move tests
* split tests for patch function
* Set up to reproduce issue locally
* add check for deadline exceeded
* Revert "Set up to reproduce issue locally"
This reverts commit d8d9b354ca.
* Trigger build
---------
Co-authored-by: Will Browne <will.browne@grafana.com>
* Add FolderStore interface
* Authz: add implementation to use folders api and use it inproc with loopback config
* Add tracing and add rest.Config for talking with folder api using access tokens
* Restructure test to get rid of circular dependencies in tests
* use correct group version kind
---------
Co-authored-by: gamab <gabriel.mabille@grafana.com>
* Custom links with repository link, licence link, docs link and raise an issue link
* run translation command
* delete console log
* delete console log
* fix frontend tests
* change UI with a new design
* remove license, documentation, repository url calculation logic from grafana
* remove unsused function from helpers
* change repo icons and raise an issue icon
* fix the build
* remove logic for raiseAnIssueUrl
* fix the build
* fix lint
* Delete Links title in the box of links
---------
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
* feat: add generic plugin extension functions
* updated betterer.
* Fixed type issues after sync with main.
* Remved extensions from datasource and panel.
* Added validation for extension function registry.
* Added tests and validation logic for function extensions registry.
* removed prop already existing on base.
* fixed lint error.
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
We currently cancel the context when the adapter function is done. We should wait for the entire handler we're wrapping
to finish before cancelling our context.
* use local storage to show the native histogram banner has been loaded
* remove banner logic from datatrail
* set banner shown in local storage on closing the banner
* adjut quickRanges type in v2
* clean up unused time_options property
* remove deprecated time_options property on time picker
* add schema migration for time_options
* adjust test
* Chore: pin tonistiigi/binfmt version
* change version to qemu-v7.0.0-28
* uninstall first, log version
* uninstall first, log version
* uninstall first, log version
* Update `Intro > Queries and Conditions`
* Small tweaks (advanced options) and screenshots
* Change `Expressions` heading
* Set links from Alert rules introduction
* Minor intro changes
* small change due to recent updates
* fix vale errors
* fix vale error
* Remove unnecessary mention to `alertingQueryAndExpressionsStepMode` feature flag
* NodeGraph: Improve view traces for uninstrumented services
* Switch to onBuildUrl and more peer attributes
* Update unit tests
* Added test for new logic
* Open traces in same tab
* Update the tests
* bring back internal link
* Update public/app/plugins/datasource/tempo/datasource.ts
Co-authored-by: Joey <90795735+joey-grafana@users.noreply.github.com>
* Revert export of generateInternalHref
* Update tests after change from onBuildUrl to query function
---------
Co-authored-by: Domas Lapinskas <domasx2@gmail.com>
Co-authored-by: Joey <90795735+joey-grafana@users.noreply.github.com>
* APIServer: Propagate a new context with limited information
* APIServer: Remove error return
* APIServer: Test that context propagation does fork
* APIServer: Fix golangci-lint lints
* chore: make update-workspace
* Docs: adding additional installation steps to Grafana on openSUSE docs
* Docs: Adding systemd service info for grafana manual install
* Finalizing first edit with tested steps
* spacing adjustment and adding steps to RHEL/Fedora
* Adding a note based on Marins feedback
* A slight adjustment based on feedback from Marin and adding steps to Debian installation
* adjusting some wording
* adjusting naming conventions for Debian instructions
* changing "open-source" to "open source"
* vale and review edits
* deleting erroneous character in shortcode
* updating some shortcodes
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* update scenes and weekStart prop type
* update test
* adjust weekStart type in schemaV2
* clean up weekStart error message
* clean up weekStart in test data
* Add tests
* refactor transformSaveModelToSchemaV2 and transformSceneToSaveModelV2
* move default grid serializer functions outside of class
* simplify layoutmanager descriptor
* add test for SaveModel -> Scene
* Fix lint issues
* remove auto added import
* Fix name
* Fix test typo
* Refactor folder tree to its own structure
* Make it possible to json encode the tree
* Use iterations for Ancestors and Children
---------
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
* TraceQL metrics streaming POC
* Reduce duplicate frames by using scan() and combineResponses()
* Trying to remove samples outside of time range
* Remove code to clean out of range
* Metrics streaming config toggle
* Sync opening the search and metrics options
* Fix tests
* Fix issues after conflicts
* Fix tests
* Use absolute value when computing minXDelta
* Revert last commit
* Fix frame sorting
* Remove all duplicates
* Use fields from schema to get the frames
* Use FieldCache
* Address PR comments
* docs: new alerting tutorial - part 5
* all pretty, no pity
* title
* vale vale
* minor formatting issues
* minor formatting issues2
* format
* prettier
* docker compose
* creds
* format
* even prettier
* DS Apiservers should return a k8s 404 error
* Do not swallow status codes
* Updates from initial CR.
* Add test for ds apiserver to retunr 404 when a datasource is not found
* Didn't intend for a change here
* update faro versions in grafana-runtime
* update faro packages in root
* update Faro version in Grafana UI
* upgrade faro version in grafana-prometheus
* replace deprecated type
Only ask the linker to strip DWARF information if we're not in
dev, to avoid seeing stuff like this when using delve:
~ $ dlv attach $(pgrep grafana)
(dlv) l main.main
Command failed: location "main.main" not found
After this change:
~ $ dlv attach $(pgrep grafana)
Type 'help' for list of commands.
(dlv) l main.main
Showing /home/justin/code/grafana/pkg/cmd/grafana/main.go:23 (PC: 0xac93533)
18: var commit = gcli.DefaultCommitValue
19: var enterpriseCommit = gcli.DefaultCommitValue
20: var buildBranch = "main"
21: var buildstamp string
22:
23: func main() {
24: app := MainApp()
25:
26: if err := app.Run(os.Args); err != nil {
* E2E: Add tasks for new reporting tests
* try to switch to pdf-parse
* fix pdf comparison
* add log
* increase threshold
* clean up
* apply review feedback
* improve logs + fix local setup for reporting
* format
* Provisioning: Jobs: Define repository name field
* Provisioning: Jobs: Separate options per job type
* Provisioning: Define a sanitised settings resource
* Provisioning: Jobs: Define a job summary
* Provisioning: Remove linting
* Provisioning: Update docs for a few fields
* Provisioning: Remove HelloWorld
* Provisioning: Replace Repository with Message in job info
* Provisioning: Remove YAML support
* Provisioning: Remove custom folder specification
* Provisioning: Support read-only repositories
* Provisioning: Remove edit options
* Provisioning: Add sync options for repositories
* Provisioning: Add resource statistics
* Provisioning: Make slices atomic lists
* Provisioning: Message list needs to exist even if empty
If we don't do this, we can't clear the messages field, leading to buggy UX.
* Provisioning: Support incremental syncing
* Provisioning: Remove the 'items' subresource workaround
* Provisioning: Add resource list
* Provisioning: Reformat
* Provisioning: Declare new types
* OpenAPI: Generate openapi JSON spec from generated code
* Codegen: Generate OpenAPI spec
* Provisioning: Support generating frontend API
* Codegen: Generate Go code
* Provisioning: Define the base API
* Codegen: Generate frontend endpoints for provisioning
* Refactor: yarn prettier:write
* Provisioning: Tiger team takes ownership
* Chore: Remove dir we haven't added yet
* Provisioning: Remove frontend
* Test: Update example repositories
* Themes: Gloom theme wip
* Themes: Gloom theme wip
* refactor
* A bit brown maybe?
* Update secondary to also be a bit brownish orangy
* Not super happy
* down a bit
* Progress
* Update
* Update
* orange primary again
* add support for deleted query param
* support tag query param in modes 2 and below
* handle dashboardIds
* hhandle dashboardUIDs
* handle folderUIDs query param
* handle page query param when hitting legacy storage
* handle sort query param
* handle type query param
* re-enable search fallback
* remove folder search workaround and fix /api/search to return both folders and dashboards when no title or type is provided
---------
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* basic setup
* update CODEOWNERS
* update name
* add temp test that ensures we are loading schema V2 json in the UI
* update language
* test with yarn cache and combine steps
* revert combine
* remove commented out code
* Run current dashboard suite, make workflow optional
* make job always succeed
* Remove temp v2 suite
* don't run on draft PRs
* command for old arch
* Introduce __legacyStringValue and deprecate string type for query
* Fix tests
* Fix tests
* remove default
* kind should default to default ds if variable doesn't have ds field
* lint
* getDefaultDataSourceRef should not return undefined
* Under feature flag `sqlExpressions` and is experimental
* Excluded from arm32
* Will not work with the Query Service yet
* Does not have limits in place yet
* Does not working with alerting yet
* Currently requires "prepare time series" Transform for time series viz
---------
Co-authored-by: Sam Jewell <sam.jewell@grafana.com>
* create new toggle
* add survey link behind feature toggle
* fix translations
* better theme structure
* add all the themes back
* update matrix
* fix mars contrast
* fix color contrast probs with tron
* fix a11y issues with synthwave/victorian themes
* fix aubergine/zen
* rename green + gold
* rename to space
* rename, only enable 4 for grafanacon
* add survey link
* fix info color in sapphiredusk
* handle extra themes in storybook
* Dashboards+Folders: Ensure the service identity is used for dashboard and folder resolvers
* Add convinient function to call closure with service context
* support more themes in storybook
* default to dark theme
* fix type error
* change theme in docs container
* add TODO
* only show extra themes in development mode
* add comment
* Auth: Add IP address login attempt validation
* LoginAttempt struct IpAddress field must be camelCase to match db ip_address column
* add setting DisableIPAddressLoginProtection
* lint
* add DisableIPAddressLoginProtection setting to tests
* add request object to authenticate password test
* nit suggestions & rename tests
* add login attempt on failed password authentication
* dont need to reset login attempts if successful
* don't change error message
* revert go.work.sum
* Update pkg/services/authn/clients/password.go
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Adds support for embedding []byte in SmtpClient instead of filenames. This is backwards compatible as it uses a new field EmbeddedContents to add an alternative to the existing EmbeddedFiles which takes filenames.
* migrate API keys to SA at startup
* send metrics with api key migration stats
* address feedback
* run API keys migration in a server lock
* update logging
* Create base components
* Create measurement service
* Add container for list
* Use measurement to render virtualized log lines
* Match rendered styles in 2d context for measuring
* Improve virtualization initialization and handle resize
* Introduce log line processing
* Virtualization: fix measurement of lines with line endings
* Virtualization: include scrollbar width in calculation
* Remove logs
* Virtualization: optimize text measurement
* Add support for forceEscape
* Log line: properly style wrapped/unwrapped lines
* Virtualization: handle possible overflows
* Improve overflow handling
* LogList: remove scroll position ref
* Remove logs
* Remove log
* Add top/bottom navigation buttons
* Add timestamp to pre-processing
* Add showtime support
* Fix imports
* Chore: simplify dedup
* Show level
* Refactor measurement and measure level and timestamp
* Virtualization: skip unnecessary measurements
* Improve measurements to minimize overflow chance
* Introduce logline colors
* Update palette
* Remove pretiffying
* Add comment
* Remove unused variable
* Add color for info level
* Fix dependencies
* Refactor overflow to account for smaller estimations
* Debounce resizing
* Fix imports
* Further optimize height calculation
* Remove outline
* Unused import
* Use less under/overflow method
* Respond to height changes
* Refactor size adjustment to account for layout changes
* Add Logs Panel support
* Add margin bottom to log lines
* Remove unused option
* LogList: container div should never be null
Bad API design
* Log List: make app not undefined and update containerElement usages
* New Logs Panel: Create as new visualization (#99427)
* Logs Panel: clean up old panel
* Logs Panel New: create as new visualization
* Plugin: mark as alpha
* Logs panel new: hold container in a state variable
* Logs panel: fix no data state
* Create newLogsPanel feature flag
* Logs: use new feature flag
* Prettier
* Add new panel to code owners
* Logs Navigation: add translations
* Address betterer issues
* Fix import
* Extract translations
* Update virtualization.ts
* Virtualization: add DOM fallback for text measurement
* Run gen-cue
* plugins_integration_test: add logs-new to expected plugins
fix: eliminate data race in plugin metrics middleware
A data race was detected when multiple goroutines accessed the `MetricsMiddleware`
simultaneously. The race occurred because a single `MetricsMiddleware` instance
was being shared across goroutines while its `BaseHandler` field was being
modified during middleware chain setup.
Fix by creating a new `MetricsMiddleware` instance for each middleware chain,
while safely sharing the thread-safe Prometheus metrics and plugin registry.
This maintains proper metrics collection while eliminating the mutable shared
state that caused the race condition.
Original error was detected here:
```
WARNING: DATA RACE
Read at 0x00c0039c0790 by goroutine 4486:
github.com/grafana/grafana-plugin-sdk-go/backend.(*ErrorSourceMiddleware).CallResource()
/Users/clord/src/grafana/irm-devstack/.devenv/state/go/pkg/mod/github.com/grafana/grafana-plugin-sdk-go@v0.261.0/backend/error_source_middleware.go:93 +0x40
github.com/grafana/grafana-plugin-sdk-go/backend.BaseHandler.CallResource()
...
```
* open edit pane on selection
* stuff
* use drawer instead for override panel options
* reverts
* closing edit pane while selection exists should also clear selection
* set width
* TimeRangePicker: allow to customize quick ranges per dashboard
* TimeRangePicker: show selected custom time range using its name
* rangeutil: add tests for describeTextRange + quickRanges
* Fix up tests, and add an extra case for hidden time ranges
* Don't construct an object to find options, add findRangeInOptions util
* fix type errors detected by TypeScript
---------
Co-authored-by: joshhunt <josh@trtr.co>
This PR adds `backend.ErrorSourceDownstream` values to all `backend.DataResponse`
values where it's certain that the error wasn't the result of the
InfluxDB datasource plugin.
* baldm0mma/ manually update deps and run yarn
* baldm0mma/ update version from workspace to actual version
* baldm0mma/ revert some workspaces
* baldm0mma/ update workspace
* baldm0mma/ update deps
Ensure frames have refIDs
- Sanitise the refID
- Alias the query target with the refID
- Set the appropriate refID on the created frames
- Update tests
* update generated iam client
* update API
* with meta api
* regenerate client
* with identify ref
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* create new generated iam api client and use in query library
* update betterer
* use new createBaseQuery method
* update CODEOWNERS
* fix unit tests
* use shared type
* update comment
* fix test
* Return max depth folder reached instead of a generic error
* Unit test error function
* Lint
* Update pkg/api/apierrors/folder.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>
* RTK APIs: Extract base query function
* Add error handling
* Add return type
* Use createBaseQuery in browseDashboards
* Support custom manageError
* Export getConfigError
* Remove redundant type
* data -> body
* Alerting: Call RLock() before reading sendAlertsTo map
* defer unlocking
* drive-tru fix for another lock
* less time holding the lock in SyncAndApplyConfigFromDatabase
* Tempo: Replace deprecated @grafana/experimental with @grafana/plugin-ui
* Add also pyroscope and tracing features
* align version of package with main
Valid MSSQL database names can contain characters like `-`, which need
to be escaped when used in queries.
This PR wraps database names in `[]`, and fixes Grafana issue #58757.
* chore: use IRM plugin ID instead of OnCall / Incident if it's present in the stack
* minor improvements
* fix unit tests
* Add IRM plugin discovery tests
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Upgrade grafana-app-sdk to 0.31.0
What
This commit upgrades the app SDK to 0.31.0 and re-generates codegen files.
It doesn't touch alerting schemas, because those are quite old and
should be upgraded separately.
This commit slightly alters the schemas for the investigations app,
because the codegen is not happy with the current syntax, for some
reason (probably has to do with CUE upgrades in `cog`).
Why
To make sure we use up-to-date SDK version and remove the workaround for
the `defencoding=none` bug that required us to clean up generated CRD
files.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Revert changes to golden file for store tests
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Testing out rows in schemav2
* update schema
* loading sort of works
* descibe position in relation to row
* add row repeats by variable
* explain ts-expect-error
* Save repeats as well
* Update tests for repeat behavior of rows
* Don't add the clones of the repeated rows
* Add row support for response transformer for V2
* Add row actions
* fix panel name
* fix merge issue
* fix tests
* Implement ensureV1
* set key of GridRow
* fix lint issue
* When going from V2 to V1 rows should be assigned unique ids following max panel id
* remove old comment
* Add panel repeats in V2 -> V1 transform
* Alerting: Fix Alertmanager configuration updates
Alertmanager configuration updates would behave inconsistently when performing no-op updates with `mysql` as the store.
In particular this bug manifested as a failure to reload the provisioned alertmanager configuration components with no changes to the configuration itself. This would result in a 500 error with mysql store only.
The core issue is that we were relying on the number of rows affected by the update query to determine if the configuration was found in the db or not.
While this behavior works for certain sql dialects, mysql does not return the number of rows matched by the update query but rather the number of rows actually updated.
Also discovered and fixed the mismatched `xorm` tag for the `CreatedAt` field to match the actual column name in the db.
References: https://dev.mysql.com/doc/refman/8.4/en/update.html
* feat: use slog adapter for go-kit/log
The adapter library is Apache-2.0, which is compatible with AGPL-3.0 as a dependency.
The adapter library outputs a little more info than we'd like, but rather a couple fields too many than it outputting
ERROR logs as INFO.
* feat: update dependencies
* chore: attribute ownership of dependency
* refactor: move require
* chore: make update-workspace
* Dashboard: Simplify handling of variables that update on time range change when used in repeats
* Update
* Update
* Update
* Update
* Update
* Update
* Explore: Add `disableLogsDownload` and hide button to download logs
* change copy
* Explore: Change `disableLogsDownload` to `hide_logs_download`
* change casing in frontend
* also hide from inspector
* add test
* lint
* Dashboard: Schema V2 - Remove Dashboard id from spec
* Fix issue with dashboard id used in examples and serializers for schema v2
* Fix snapshot test
* adds extra debug logs and a new metric for poller query latency to help us better understand watch and index latency for write events
* adds trace span to the index for handling index write events
* wires up dashboards page to be able to sort by usage stats (sprinkles)
* dont mutate field
* use better type for field
* adds tests. Had to export some types and put the field type back to object.
* frontend asks for sort field in response if needed
* adds some unit tests for getSortOptions
* use Record instead of object
* prettier
* adds ternaries, another unit test
* WIP benchmark dashboard rendering
* Script
* Benchmark with variable and a panel
* Add one more benchmark
* Explicitely enable profiling
* Playwright tests
* update scenes
* Report measurement to faro when config set
* Let user enable metrics reporting in UI
* Fix logging
* Change how performance metrics is enabled per dashboard, now in config file only
* add benchmark run option
* Fix benchmark runs
* fix description for performance config
* remove console.log
* update codeowners
* add back crashDetection init that was lost in merge
* fix yarn.lock
* restore custom.ini
* fix import
* Make sure we have the echoSrv
* fix config type
* Try to limit changes to e2e runs
* remove benchmark
* Fix lint issue
* fix codeowners
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
* Revert "Revert "LibraryPanel: Fallback to panel title if library panel title …"
This reverts commit 6e705ee67c.
* LibraryPanels: Respect model title when adding a library panel to a dashboard
* remove debugger
---------
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
* remove managed isOpen state, add hook to abstract away options/async functionality
* split useOptions into new file
* refactor stories
revert combobox stories to what's in main. I screwed up that rebase
* change onChange type, clean up what calls onChange, add debounce and useLatestAsyncCall
* tests (mid trying to figure out the act stuff)
* tests
* debounce-promise doesn't work with rollup?
* just some minor code clean up
* fix type import
* Add input auto resizing
* Initial auotsize
* Initial implementation
* Remove px
* Remove unused import
* Handle backspace and support the width prop
* Make sizing work with useComboboxFloat
* Remove unused expression
* Add supoport for min and max width
* Change space for clicking
When exporting contact-points, mute-timings, and notification policies in the provisioning API, we need to escape the `$` character which is used in interpolation by file provisioning.
Follow up to #97985
* Get rid of _dashboardLoadFailed
* Get rid of dashboardNotFound meta
* Update public dashboards tests
* Fix DashboardPage tests
* DashboardPageProxy tests
* DashboardScenePageStateManager test fix
* Beterer
* Fix merge
* Nits
* Fix test
* remove debugger
* Update get folder to throw
* translate error title
* Update public/app/features/apiserver/types.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
* Betterer
* Update test cases
* More test updates
* More translations
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
* added changes for rebase
* ran go mod tidy and ran a build
* ran a build
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* updated go.work.sum to upstream
* added newline to match upstream
* added more specificity in documentation
* bump grafana-azure-sdk-go to update package for currentuser auth support
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Schema v2: Reason about new dashboard based on UID
* Fix test
* Alerting: respect isNew dashboard for legacy and new arch
* Translate untranslated strings
* Unify is new checks
* PanelInspectDrawer update
* typo fix
* on close test for panel inspect drawer
* Update public/app/features/alerting/unified/PanelAlertTabContent.tsx
* Remove dashboards table dependency when getting all library panels
* Filter library elements a user can see using the folder service
* Stop using folder name as UID in get all elements tests
* Set actual folder name not UID when getting all elements
* Stop selecting folder name in the get all elements sql query
* Introduce a library elements param selector without where clause
* Include empty string as general folder UID when getting all library elements
---------
Co-authored-by: suntala <arati.rana@grafana.com>
* draft: coerce types to string to prevent localCompare bug
* chore: update with comment for draft
* chore: cleanup and change fix
* fix: instantiate compare outside of functions scope
* chore: update tests!
* fix: make the linter happy again
* fix: remove unnecessary loop to generate array
* chore: revert forEach to for loops, other changes also
* chore: reduce diff
* chore: one more revert
---------
Co-authored-by: drew08t <drew08@gmail.com>
* introduce new fields created_by in rule tables
* update domain model and compat layer to support UpdatedBy
* add alert rule generator mutators for UpdatedBy
* ignore UpdatedBy in diff and hash calculation
* Add user context to alert rule insert/update operations
Updated InsertAlertRules and UpdateAlertRules methods to accept a user context parameter. This change ensures auditability and better tracking of user actions when creating or updating alert rules. Adjusted all relevant calls and interfaces to pass the user context accordingly.
* set UpdatedBy in PreSave because this is where Updated is set
* Use nil userID for system-initiated updates
This ensures differentiation between system and user-initiated changes for better traceability and clarity in update origins.
---------
Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Fix silence drawer being re-rendered when the alert list is refreshed
* remove unnecessary formValues usage as prop
* remove AlertmanagerProvider in RuleActionsButtonsV2
* fix getting targets in dag when using classic condition
* remove query fingerprinting
the DAG function is probably fast enough and the fingerprinting function is too complex to make it work for all expression types
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Alerting: Expect 406s from the remote Alertmanager during the readiness check
* make it clear in the warning logs that we'll attempt to send the confgiuration/state without comparing in case of error pulling the current state/config
* Request interceptor: Do not block PDC
* Apply change after feedback received
* Add test
* Check if secure socks proxy configured for the instance
* Apply suggestions from code review
* Add dedicated service for datasource request URL validation (#99179)
---------
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* add metrics for authZ MT service
* remove metrics that are already tracked by the GRPC server metrics
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* undo unneeded change
* test fix
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* added changes for rebase
* ran go mod tidy and ran a build
* ran a build
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* updated go.work.sum to upstream
* added newline to match upstream
* added more specificity in documentation
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Add initial fuzzy match
* Remove unused import
* Fuzzy search for Multi
* Remove old filter function
* Restore changes to Multi while waiting for async
* Add non ascii support and memoize stringified version
* updates
* Add tests
* Add tests for real this time
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Prometheus package: Replace deprecated @grafana/experimental with @grafana/plugin-ui and @grafana/llm
* Fix @grafana/llm mock in test
* Keep version exact
* Keep version exact
* Update lock
* Allow setting the y axis width
* Add to docs
* Add to status history as well
* Add to status history docs and schema
* Change config to come from generic axis builder
* keep axis
* Change overridden label
* Update docs/sources/panels-visualizations/visualizations/status-history/index.md
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Update docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Remove the category/label override
* Move axis to its own section in docs as well
* clean
* rename to addAxisWidth
* Apply suggestions from code review
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Move sections to match UI order
* Update docs/sources/shared/visualizations/axis-options-all.md
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Change other axis options doc to be consistent.
* Fix linter
* add AxisPlacement
* Add new placement option to docs
* change some wording
* Apply suggestions from code review
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
We use Vulnerability Observability for Docker images. The current comments say we simply don't scan them at all, so
let's make it clear for future readers that we do, in fact, scan Docker images, too.
* bugfix: defensive guard against null columnName
* fix: per suggestion limit diff and revert alphabetization of properties
* test: add test for null case
* chore: remove it.only
* test: convert to inline snapshot
* open queries that have utf8 labels in explore properly
* remove unnecessary line
* Revert "open queries that have utf8 labels in explore properly"
This reverts commit 85b81c96
* remove quoting
* support open in explore
* Zipkin: Replace deprecated @grafana/experimental with @grafana/plugin-ui
* Prometheus: Replace deprecated @grafana/experimental with @grafana/plugin-ui
* Mysql: Replace deprecated @grafana/experimental with @grafana/plugin-ui
* Jaeger: Replace deprecated @grafana/experimental with @grafana/plugin-ui
* Postgresql: Replace deprecated @grafana/experimental with @grafana/plugin-ui
* Brin experimental back to main package.json - accidentally removed
* Fix order of imports
* add feature flag
* puts search permission filtering behind a feature flag
* fixes issue with doc match id. When the match is for an in-memory index, the internal id is a string (this is what we expected). However, when its a file-based index, the internal id is a binary encoded int64 that point to something internally. So to get the id, we need to use ExternalID() instead of relying on the indexInternalID to be the correct format.
* adds debug log
* update comment
* formatting
* Avoid circular dependency when getting a restCfgProvider for Folder Svc
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Logs Volume: Do not throw when fields are missing
* Add removed line back
* Prevent permanent mutations
* Decrease nesting
* Move conditional up
* Update public/app/features/logs/utils.ts
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
* Use dataframe length and remove from function
* Use getFieldDisplayName
* Keep original dependency array
* Keep original dependency array
---------
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
* feat: datasource connections tab in plugin detail page
* test: no ds defined test added
* feat: configure feature toggle
* chore: i18n extract
* test: added unit tests for page and list
* add generate script and endpoints.gen.ts
* temp state with delete working
* list + save working
* edit working
* starting to clean up
* fix remaining type errors
* remove withNamespace function
* fix richhistory
* clean up some types
* extract query limit to endpoint definition
* extract namespace logic into common util
* update CODEOWNERS
* move script to be nearer generated endpoints
* remove nonexistent script from CODEOWNERS
* fix bug when parsing results in search handler
* applies permissions filtering to bleve query
* formatting
* wraps in check for access being present, adds some comments
* update go mod
* fix tests
* add dep owner
* fix go mod
* add space after //
* clean up returns
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
* fixed formatting
* Uses single checker since index is for single resource. Passes folderId using dvReader to checker func. Adds debug logging.
* handles federation with index permission checkers
* formatting
* move import
---------
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
* Extract "PermissionStore" from general store interface
* Add static and union permission stores
* Add GetStaticRoles
* Use accesscontrol.Service for inproc to provide static permissions
* MultiCombobox: Add All option
* Translate
* Add prop to show All option
* Change variable name
* betterer update
* Extract variable
* Update packages/grafana-ui/src/components/Combobox/MultiCombobox.tsx
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Return All item
* Update checkboxes
* Add filtering functionality
* Handle deduplication when selecting already selected items
* Performance improvements when selecting and modifying all items
* Handle bug with isOpen for tests to pass
* Small fixes
* Add filtered phrase
* Address PR feedback
* Reset okg/services from main
* Reset from main
* Restore main
* Add counter to filtered all
* Fix OptionListItem
* Hide all when there are no results
* Refactor to use useMemo instead
* Fix comments
* Remove useEffect
---------
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
* Update copy for missing metrics when OTel is on
* update message
* Add OTel message in no metrics found message, not the warning banner
* Otel > OTel
* QueryVariable: Default query is not set when creating a new variable
* use correct getDefaultQuery
---------
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
* Update playlists app schemas to work with app SDK v0.29.0
What
* Added the manifest for the playlists app
* Updated playlist kind definition to match the new format
* Re-generated the files
* Changed Makefile to not use post-processing flag
Why
To make sure the codegen works with the latest version of the app SDK.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Update app SDK to v0.30.0
* Skip generating custom resource definitions
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Fix SDK not generating the manifest Go file
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
* Refactor deleteLibraryElementsInFolderUID to use folder UID only
* Convert dashboard error to folder one when deleting library elements
* Fix incorrectly set folder UID in nested folder test
---------
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
* Improve resource request error handling
- Correctly parse JSON responses
- Log erroneous failures in JSON marshalling/unmarshalling
- Correctly set response status code
- Do not attempt to use the response writer as it will be nil
* Minor change
* Improve type assertion handling
* Unistore: Ensure deprecated Folder ID gets stored on all modes
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* utf8 metrics for prometheus devenv
* introduce utf8 support
* completions and suggestions
* don't wrap the utf8 label in quotes
* linting
* support utf8 labels and metrics on visual query builder
* lint
* update raw view for utf8 metric syntax
* betterer
* support utf8 metric names in explore metrics
* utf8 support in grouop by
* utf8 support in label break down
* utf8 metric and label support in metric_find_query for label values
* use the same regex to check label values
* no need to escape
* support series endpoint
* support series endpoint
* support series endpoint
* support series endpoint
* fix tests
* fix extracting labels from labelValuesQuery
* show explanation with right syntax
* support utf8 metrics and labels
* utf8 metrics for prometheus devenv
* introduce utf8 support
* completions and suggestions
* don't wrap the utf8 label in quotes
* linting
* support utf8 labels and metrics on visual query builder
* lint
* update raw view for utf8 metric syntax
* betterer
* support utf8 metric names in explore metrics
* utf8 support in grouop by
* utf8 support in label break down
* utf8 metric and label support in metric_find_query for label values
* use the same regex to check label values
* no need to escape
* support series endpoint
* support series endpoint
* support series endpoint
* support series endpoint
* fix tests
* fix extracting labels from labelValuesQuery
* show explanation with right syntax
* betterer
* utf8 metrics for prometheus devenv
* introduce utf8 support
* completions and suggestions
* don't wrap the utf8 label in quotes
* linting
* support utf8 labels and metrics on visual query builder
* lint
* update raw view for utf8 metric syntax
* betterer
* support utf8 metric names in explore metrics
* utf8 support in grouop by
* utf8 support in label break down
* utf8 metric and label support in metric_find_query for label values
* use the same regex to check label values
* no need to escape
* support series endpoint
* support series endpoint
* support series endpoint
* support series endpoint
* fix tests
* fix extracting labels from labelValuesQuery
* betterer
* utf8 metrics for prometheus devenv
* introduce utf8 support
* completions and suggestions
* don't wrap the utf8 label in quotes
* linting
* support utf8 labels and metrics on visual query builder
* lint
* update raw view for utf8 metric syntax
* betterer
* support utf8 metric names in explore metrics
* utf8 support in grouop by
* utf8 support in label break down
* support series endpoint
* support series endpoint
* support series endpoint
* Explore metrics: Utf8 support in Explore metrics with OTel experience enabled (#98707)
* betterer
---------
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* wip: include transformation output as filtering option
* add refId to joinByField transformation
* clean up
* add refId to transformations that create new data frames
* adjust duplicate query removal for filtering options
* refactor transformation input/output subscription effect
* adjust input data frame filtering logic to include transformations as input for debug view
* transformation filter can only filter on output of previous transformation
* always add filters for elastic seach ds when filtering table value
* simplify update filter logic and restore behaviour from old arch
* remove unnecessary modifications
* adjust namig
* utf8 metrics for prometheus devenv
* introduce utf8 support
* completions and suggestions
* don't wrap the utf8 label in quotes
* linting
* support utf8 labels and metrics on visual query builder
* lint
* update raw view for utf8 metric syntax
* betterer
* support series endpoint
* support series endpoint
* betterer
* utf8 metrics for prometheus devenv
* introduce utf8 support
* completions and suggestions
* don't wrap the utf8 label in quotes
* linting
* support series endpoint
* Use cog as a cli tool to generate code for kinds v2 schemas
* Update imports to dashboard v2 package in frontend
* Ensure cog is installed before using it
* Add event to dashboards restore version
* moved changes to scenes instead
* remove last non-scene change
* Move events to centralised file
* remove ? from properties copy pasta
* Add tests
* identify native histograms by classic histograms
* use trail to expose ds helper
* identify native histograms for preview panel
* refactor ds helper to initialize all native histograms
* remove await
* add info message for native histograms
* hide button on show examples
* show nh in metric scene by passing check for nh and storing in url for url loads, bookmarks and recent explorations
* add badge for native histograms
* click native histogram examples in info message to see them
* add link for learn more
* close banner on select when selecting native histogram in info banner
* show message for newly selected data sources
* capitalize Native Histogram badge
* prettier
* fix badge ui width
* add padding for badge
* add images, styling and tests for native histogram banner
* move images to img folder
* fix store tests
* run i18n
* fix betterer
* fix betterer with translations
* cannot translate interpolated metric in button text
* Fix import
* do not indent the > See examples section
* trans component interferes with text with special chars
* update sm text with 4px padding and 16px spacing between images
* do not show banner after closing then changing data sources
* prettier
* Update public/app/features/trails/helpers/MetricDatasourceHelper.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/banners/NativeHistogramBanner.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/banners/NativeHistogramBanner.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* update comments
* remove unnecessary code check
* add rudderstack types
* add close example functionality
* prettier
* add t() for betterer
* prettier
* fix betterer and trans issues
* fix test
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
Ensures we retake images after expiration on long-lived repeat alerts.
Otherwise, logs would show "Image not found in database" and notifications
would cease to contain an image after 24h of continuous firing.
* wip. adding sprinkles fields.
* some refactoring. Works with sprinkles now.
* exclude top level dashboard hit fields from hit "fields"
* adds unit test for DecodeCell helper
* test can search for specific dashboard fields on bleve index
* adds search handler tests for the fields and tests for fields when transforming the search req to a bleve search req
* fix panic when calling fields.Set() with int32
* adds regression test
* remove unneeded method on test mock client
* fix linter issues
* updates dashboard test data for bleve tests
* remove DASHBOARD_LEGACY_ID from bleve_tests
* dont cast twice
* updates test to sort by dashboard_views_last_1_days
* declare excludedFields outside of function
* fixes sorting by dashboard fields - prepends "fields." to any dashboard fields we try to sort by
* uses map for excludedFields
* expects fields to be array-style url param
* change method name
* fixes failing tests - needed to add column type to mocks
* feat: pass gcom sso_api_token to repo created from install command
* fix
* fix: extract gcom section to a func
* Update pkg/cmd/grafana-cli/utils/command_line.go
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
* fix: only set gcom token when the request is to GCOM
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
What
This PR changes the dashboard authorizer logic to no longer require
requester to be the super admin user in order to list dashboards using
k8s APIs.
Why
We no longer need this precondition - dashboards should be listable
based on the regular authorizer logic.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Remove dependency on dashboards table to get library element
* WIP
* Don't use dashboard id when getting library connections
* Lint
* Don;t include folder_uid in library element
* Remove "wrapper" interface and only check feature toggle for grpc and cloud mode
* Only set name for update checks
* Set dashboard permissions for admin user
* Add prefix constants and use string builders / string concatinations
* Use cache for both streamed and non-stream versions of list objects
* Remove unused constants
* Use cog for Go types
* Delete old generation code
* Fix plugins generation
* workspaces update
* Update datasources with new generated code
* More fixes
* Update swagger and openapi specs
* Fixes
* More files...
* Update workspace
* More fixes...
* Remove unused functions
* Clarify DS managed rules support only the creation of Mimir and Loki rules
* additional copy changes
* Extend `Manage alerts via Alerting UI` description
* fix capital letter
* further details for `Manage alerts via Alerting UI`
* Zanzana: Remove usage from legacy access control
* remove unused
* remove zanzana client from services where it's not used
* remove unused metrics
* fix linter
* Plugins: Disable SRI checks for filesystem plugins
* Plugins: Disable SRI checks for filesystem plugins
* Update tests
* Lint
* Check for cdn enabled rather than just plugin class
* ops
* Update tests
* lint
* use panel title for dataName instead of panel.getDisplayTitle()
* Interpolate variables in panel title for downloads in scenes
---------
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
* Chore: Bump Go to 1.23.4
This is done in preparation of updating the App SDK library we import, as it has bumped its Go version to 1.23.4 as well.
* Chore: make update-workspace
* sort otel resources to top of adhoc filters
* add bool in datatrail
* add function to find non promoted otel resources
* add additional super filter variable
* hide filters var and keep otel filters var hidden
* add nonpromoted resources to state, update otel or var filters when super filter is updated
* update comments
* update plan
* Allow deployment environment values from both metrics and target_info
* Remove usage of dep env var in getting resources
* update code comments for clarity
* Remove dep env variable, autoselect dep env in otelmetricvar and allow updating of vals in otelmetricvar
* Fix bug that conflicts with local storage useOtelExperience check
* expose metadata to show data source is loaded to prevent otel race conditions
* remove filtering check on target_info in the itel join query
* update plan with extra issues
* refactor update and reset functions for otel experience
* use non promoted resources as the standardization check
* sort the resources in filters var if using otel experience
* add test for sorting resources with otelmetricsvar
* update tests for otel experience in datatrail.test
* update tests for otel utils
* update otel api tests
* update trail store tests to remove dep env var
* run prettier
* remove unused imports
* add tests, distinguish on start and when the initial otel check is done, update comments
* Fix bug when adding multiple otel resources
* fix when adding filter from breakdown
* add migration for dep env var
* update migration function and write tests
* prettier
* Update dep env migration to handle bookmarks
* fix trailstore tests for reintroducing the dep env var
* refactor default env function, we only need the value
* remove redundant check
* move otel functions to utils and update and add tests
* prettier
* cleanup
* fix migration for fromStart
* update tests for migration
* use join and use push
* fix flow with state
* Fix flow in update OTel function
* update tests for flow fixes
* fix toggle OTel bugs
* report when dep env has been migrated and delete dep env filters to not migrate it again
* Clear out dep env after migration
* run prettier
* improve non promoted attribute function
* remove unused functions
* prettier
* default otel experience to off
* report when otel experience is used
* report when otel is turned on and off
* report otel filters changed
* prettier
* keep default otel off, respect the local storage, but if loading with otel vars from url or bookmark we can turn it on
* Add new badge
* fix metric scene breakdown add filter bug around non promoted labels on a metric that are different than non promoted labels for all metrics
* prettier
* make i18n-extract
* prettier for translations
* change button name to "Filter"
* Update public/app/features/trails/Breakdown/AddToFiltersGraphAction.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/DataTrail.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/migrations/otelDeploymentEnvironment.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/DataTrail.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/otel/api.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/otel/util.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Add more padding for pill where capital letter gets to close to the left border and looks off.
* clear up comments
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* add two dummy feature toggles to use for testing potential AB testing setup
* update betterer
* update auto generated files
* fix camelcase test case
* made initial edits
* continued updates
* finished initial config doc updates
* updates
* updates to query editor
* edits to query editor
* final edits prior to PR
* more final edits :-)
* edits based on feedback meeting
* fixed some spelling and grammar issues
* final edits
* ran prettier
* minor change to intro description
* Fix prettier
* Update docs/sources/datasources/mysql/query-editor/_index.md
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Update docs/sources/datasources/mysql/query-editor/_index.md
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Update docs/sources/datasources/mysql/query-editor/_index.md
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* edits based on feedback
* fixed mistake
* Fix prettier
* fixed ref UIs, edits based on feedback
* one minor change
* ran prettier again
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* update github.com/prometheus/prometheus to v0.301.0
* have an adapter for infra logger
* go mod tidy and go work sync
* remvoe the cuelang.org/go replace
* remove slog_adapter
* Fix: MySQL integration tests don't need to verify CA
The _better_ solution here is to use our own, custom CA certificate. But there is also no real problem in risking a MITM
attack here as it's just test code, with no sensitive data, and it's ran on our own infra (so if we have a MITM problem,
we have even bigger issues...).
* Chore: make drone
* Chore: buildifier format
* Allow dashboardDS to run in mixedDS
* Make mixedDS panel wait for dashboardDS panel to load first
* cleanup
* cleanup
* refresh dashboardDS queries within mixedDS when source panel changes
* more tests
* fix
* fixes scenario where source returns an error
* do not allow dashboardDS references to mixedDS targets that contain other dashboardDS panels
* test
* lint
* Show invalid panels as invalid and with a message
* refactor
* avoid bunching shared dashboard queries
* skip instead of debouncing to avoid stale data
* debouce dashboard ds result stream when coming from mixed ds
* restore unnecessarily touched files
* fix import
* increase debounce interval value to account for slower machines
---------
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
* Zanzana: Setup GRPC authentication in client/server mode
* don't use grpcutils
* refactor
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Add a namespace stub for in-proc mode
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Read parameters from config
* authorize server requests
* add namespace to the tests context
* use stack id from config
* simplify authorize func
* properly format namespace
* return Unauthenticated if namespace is empty
* use insecure cred only in dev env
* check request namespace
* Use CallCredentials API for client auth
* provide config
* fail if stack id is missing
* improve error message
* use insecure connection by default
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Alerting: PoC - default template in k8s templategroup API
* Move code to grafana/alerting
* Move validation to admission validation abstraction
* Testing
* Linting
* Workspace update
* Update grafana/alerting hash to the merged commit
* More user-friendly name and remove need for CREATE/UPDATE validation
Use __default__ for k8s object name and UID so that we don't need to restrict
CREATE/UPDATE for similarly named user-owned templates.
* wip
* make tests pass
* get all tests passing
* fixes
* some small cleanup
* fix test
* convert delimiter keys to struct keys
* dont execute empty sql statement
* remove printlns
* fix unit test
* a bit more cleanup
* whoops
* Logs: sync direction and sort order for loki queries in explore
* Logs: emit event on sort order change
* Loki query editor: listen to sort change events and update direction
* Loki query editor: unsubscribe to sort event
* Logs: don't publish events in Explore
* LokiQueryBuilderOptions: use stored order as default value when in explore
* Query builder options: initialize query direction
* Logs: unit test
* LogsPanel: update unit test
* Update tests
* LokiQueryBuilderOptions: unit test
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.tsx
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.tsx
---------
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
* Add support for exemplars
* TraceQL metrics exemplars ftw
* Fix exemplars on histogram queries
* Added exemplars field for the query builder options
* Add series labels as exemplars dataframe fields so the panel can link series with exemplars
* Fix tests
* Fix lint
* Hide exemplars field from options
* Fix crash on histogram queries
* Use DataTopicAnnotations enum
* Fix test
* Datasources: Add toggle to control default behaviour of 'Manage alerts via Alerts UI' toggle
* Update documentation with suggestions
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
* RuntimeDataSource: Support in core for runtime registered data sources
* Added tests for runtime datasource.
* added another test to make sure runtime ds isn't included in datasource list.
* changed so we not are expecting the settings to be returned by name.
* Fixed betterer error.
* fixed type issues.
* updated comment according to feedback.
* will prevent runtime ds registration from overwriting regular ds.
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Create go.mod files for plugins and core kinds
* Update go work and main go.mod dependencies
* Update pfs import
* Missing update of pfs dependency
* Remove fixed cuelang dependency
* Update codeowners
* Update workspace
* Update Dockerfile
* Missing go.mod codeowner
* Use intermediate kin-openapi dependency to make all workspaces to work
* Handle both user and service accounts when resolving identity name for dashboards and folders
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Set span filters through panel options WIP
* Replace vars, tags editor, service and span name are now selects
* Fix undefined access
* Fix sync between panel options and span filters component
* Refactor tags input and use it in the plugin options
* Fix options to panel communication
* Rename Tags file. Fix tag values loading in dropdown
* Fix clear tags
* useMount instead of useEffect
* Replace HorizontalGroup with Stack
* Update betterer results
---------
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
* Auth: disable passwordless auth if any SAML/OAuth is enabled
* Update pkg/services/authn/authnimpl/registration.go
Co-authored-by: Victor Cinaglia <victor@grafana.com>
* simplify check if any auth providers are enabled
* add accidentally removed break statement, use IsEnabled with empty context to check if PasswordlessMagicLinkAuth enabled
* use IsClientEnabled
* Update pkg/api/frontendsettings.go
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Victor Cinaglia <victor@grafana.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Introduce DashboardScenePageStateManagerLike interface
* Implement dash loader for handling v2 api
* Transformation improvements
* Update response transformer test
* v2 schema: Remove defaultOptionEnabled from ds variable schema
* v2 schema: Make annotations filter optional
* WIP render dashboard from v2 schema
* Force dashbaord scene for v2 api
* V2 schema -> scene meta transformation
* v2 api: Handle home dashboard
* Use correct api client in DashboardScenePage
* Correctly use v2 dashboard scene serializer
* Remove unnecesary type assertions
* Handle v2 dashboard not found
* Fix type
* Fix test
* Some more tests fix
* snapshot
* Add dashboard id annotation
* Nits
* Nits
* Rename v2 api
* Enable snapshot variables
* Support getSnapshotUrl() for v2 serializer
* fix
* Make metadata available in the serializer
* Test
* Decouple meta info
* State Manager: Extract snapshot loading into loadSnapshot
* Fix tests
* Add test for snapshot url
* Don't expose dashboardLoaderSrvV2
* Remove TODO
* Bubble up loading snapshot error to error boundary
* Fix test
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* update docs to direct to our terraform provider for provisioning
* run prettier
* Update _index.md
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* Make sure we activate the parent and tree even if current panel is active
* force activate full scene object tree
---------
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
* Add better error messaging
- Ensure it's clear to users what action needs to be taken if an operation ID cannot be found
- Add test
* Display resource picker for trace exemplar queries
* Remove unneeded test
* Update tests
* CloudMigrations: delete unused code
* CloudMigrations: add access control and protect API + navtree with action
* CloudMigrations: register access control roles
* CloudMigrations: gate frontend based with access control
* CloudMigrations: fix api tests
* CloudMigrations: add docs on new actions and roles
* CloudMigrations: dont interpolate vars to make it more greppable
* CloudMigrations: run prettier
* Dashboards API: v0 k8s dashboards saving
* Build dashboard url with a slug
* fix test
* fix test
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Change usePluginInfo to keep installed and latest version
* fix tests, delete console.log
* fix isManaged plugin which s not installed
* refactor add versions into info
* Add tests for combination of switch
* refactor test
* use alerting option for default datasource in RuleEditor Grafana rules test
* add test for grafana recording rules
* use enum for grafana steps in tests
* dont make each test dependent on previous localstorage
* add test for local storage
* Create and use common ResourceInfo struct
* Add support for formatting group resource with subresource
* Add initial support for handling subresource
* Add test for checking subresource for generic resource
* Bump authlib
* Zanzana: Pass contextual tuples for authorization
* global reconciler for fixed roles
* inject tuples from global store
* fix adding contextual tuples
* cleanup
* don't error on auth context fail
* add todo
* add context for List
* add caching
* remove unused
* use constant for global namespace
* Rename global namespace to cluster namespace
* added backend support for client_secret_jwt
* added backend support for client_secret_jwt
* added all logic to the exchange function (overloaded social exchange in azuread_oauth to handle managed identity client id)
* ran yarn install to update lock file
* added support for client_secret_jwt when managed_identity_client_id is null
* added audience flag and changed exchange to directly access oauth config using .info
* added logic in setting oauth.Config for supported client authentication values
* added client_authentication, managed_identity_client_id, and audience to sample.ini file
* using provided ctx in ManagedIdentityCallback function
* added frontend support for federated identity credential auth
* added client authentication field
* added Azure AD documentation for Grafana
* added bold font to "Add" keyword in documentation
* minor wording change relating to previous commit
* addressed changing audience to federated_credential_audience, moving validation, and changing managedIdentityCallback to private function
* correction to audience name changing
* fixed orgMappingClientAuthentication function name, and added in logic into validateFederatedCredentialAudience function
* Change docs
* Add iam team as owner of azcore pkg
* added backend support for client_secret_jwt
* added all logic to the exchange function (overloaded social exchange in azuread_oauth to handle managed identity client id)
* ran yarn install to update lock file
* added support for client_secret_jwt when managed_identity_client_id is null
* added audience flag and changed exchange to directly access oauth config using .info
* added logic in setting oauth.Config for supported client authentication values
* added client_authentication, managed_identity_client_id, and audience to sample.ini file
* using provided ctx in ManagedIdentityCallback function
* added frontend support for federated identity credential auth
* added client authentication field
* added Azure AD documentation for Grafana
* added bold font to "Add" keyword in documentation
* minor wording change relating to previous commit
* addressed changing audience to federated_credential_audience, moving validation, and changing managedIdentityCallback to private function
* correction to audience name changing
* fixed orgMappingClientAuthentication function name, and added in logic into validateFederatedCredentialAudience function
* Change docs
* Add iam team as owner of azcore pkg
* updated yarn lock file
* updated doc for correction
* removed wrong changes in pkg directory
* removed newline in dashboard-generate.yaml and unified.ts
* updated yarn.lock to match upstream
* Lint
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* removing unwanted changes
* added back removed newline
* fixed failing test in azuread_oauth_test.go
* Update azuread_oauth.go
removed unnecessary newline, fixed lint
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Replace sql query with folder service call when collecting folder tree
* Update provider for folder service implementation for wire
* Refactor provisioning of oss service in folder permissions test util
* start plugins migration
* more plugin work
* add warning
* fakepluginsettings test
* tests get plugins
* lint
* load logos
* go lint
* get all plugins once
* locales
* josh suggestion to inject query in rtk
* more plugin filters
* remove datasource warning
* access control for plugins
* remove unused method
* lint
* use gcom list
* Introduce DashboardScenePageStateManagerLike interface
* Implement dash loader for handling v2 api
* Transformation improvements
* Update response transformer test
* v2 schema: Remove defaultOptionEnabled from ds variable schema
* v2 schema: Make annotations filter optional
* WIP render dashboard from v2 schema
* Force dashbaord scene for v2 api
* V2 schema -> scene meta transformation
* v2 api: Handle home dashboard
* Use correct api client in DashboardScenePage
* Correctly use v2 dashboard scene serializer
* Remove unnecesary type assertions
* Handle v2 dashboard not found
* Fix type
* Fix test
* Some more tests fix
* snapshot
* Add dashboard id annotation
* Nits
* Nits
* Rename v2 api
* Update public/app/features/dashboard-scene/serialization/transformSaveModelSchemaV2ToScene.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* add getDashboardsApiVersion test for forcing scenes through URL
* add links to ResponseTransformers
* Update public/app/features/dashboard/api/ResponseTransformers.test.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Nit rename test case
* Add tests for DashboardScenePageStateManagerV2
* Update test
* Typecheck
* Add console error for debugging
* Fix typo
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
When exporting a notification policy with no `group_by` the hcl exported is not valid as it is missing the required field.
This fixes the issue by initializing the `group_by` field with an empty list if it is nil.
* chore(grafana/ui): add react-router-dom v5 as a dependency
* chore(grafana-ui): align version of react-router with core
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* Ensure all internal Services are using FolderService and not FolderStore
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Put move and counts behid a feature flag
* Gen toggles
* Generate feature flag
* Make feature name more explicit
* Remove unused code
* Update toggle name
* listing implementation pt 1
* validate list request
* register GRPC endpoint, pass the correct user UID and return folder identifiers not scopes
* uncomment code that was only commented out for testing
* fix tests
* remove unneeded changes
* remove unused import
* Update pkg/services/authz/rbac/service.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* refactor to improve efficiency
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* use variable names when logging
* adding tests for listing
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* refactor frame and field creation
* use influxql package to get the type of the query
* remove unnecessary tests
* add influxql in go.mod
* fix unit test
* update ownership
* update query expression
* Make dashboard prompt ignoreChanges schema version independent
* Serializer: add interface for snapshot url retrieval
* Revert "Make dashboard prompt ignoreChanges schema version independent"
This reverts commit 65466c2ef1.
* Add dashbaord version to scene metadata
* Add tracking info
* Revert "Add tracking info"
This reverts commit 4c58c6687b.
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* fix: handling of special chars
* docs: add clarity
* fix: escaping
* refactor: put changes behind new feature toggle
* docs: use consistent comment style
* refactor: rename feature toggle for brevity
* use single quotes
* fix unit tests
* remove redundant json entry
* fix: keep all changes behind feature toggle
* fix: support builder mode
* fix: don't escape when using regex operators
* fix: code mode label values completions with special chars
* refactor: remove unneeded changes
* move feature toggle up so new changes from main won't conflict with ours
* fix: escape label values in metric select scene
* refactor: ensure changes are behind feature toggle
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Fix `min step` parameter interpolation in prometheus annotations query
Looks like the step is interpolated in annotationQuery, but not interpolated in processAnnotationResponse. Fixing that.
* Update packages/grafana-prometheus/src/datasource.ts
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* Added test for non-default step
* modified tests
* apply prettier manually
---------
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* Wire up sprinkles to oss and enterprise. Fetching sprinkles not implemented yet.
* Adds wireset for initializing document builders. Had to init it when creating the service to avoid cyclical imports.
* updates to int64 for stats
* adds config for sprinklesApiServer and gets sprinkles from there when its present
* add comment for later
* adds feature toggle for sprinkles. returns empty results when flag not enabled.
* adds unified storage config setting for sprinkles apiserver page limit
* fixes bug where dashboard uid was not getting set
* when creating dashboard summary, use metadata.name as the dashboard uid
* cleans up wire. use existing oss and enterprise sets to generate doc builders
* remove old wireset
* fix linter - adds missing arg for doc builders
* update dashboard stats in tests
* updates test-data dashboards
* log a warning instead of returning an error if we can't get sprinkles for a namespace
* dont read uid from dashboard json
* Update scenes to v5.35.0
* update test to mock console.warn
* use updateLocale
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* AuthZ Service: Add caching
* split in functions
* Test getUserTeams
* Add tests to getUserBasicRole
* Test getUserPermissions
* Cache user identifiers
* fix test
* Update dependency @types/react-test-renderer to v19
* replace usage of react-test-renderer
* use renderHook from @testing-library/react in most tests
* update tests to work without @testing-library/react-hooks
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
What
Update dependencies in go.mod and add investigations app module.
Why
The investigations app was introduced as a new sub-module in
https://github.com/grafana/grafana/pull/98084 and since it's imported by
code inside the main `grafana/grafana` module it now is required to be
part of the main `go.mod`.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* structure apic
* API versioning proposal
* Make api service independent from version
* Update v2
* Fix public dashboards page test
* Uncomment reload dashboard feature code
* Revert
* Betterer
* Fix imports
* useV2DashboardsAPI feature toggle
* POC/v2 schema: Add v1<-> v2 transformers (#97058)
* Make dshboard access interface more precise
* Add first pass for schema v1<->v2 transformers
* Update response transformer test
* Import fixes
* Manage dashboards validation: Handle v2 schema
* Handle new dashboard with v2
* Fix tests
* Move dashboard is folder error handling to legacy API implementation
* Add tests for dashboard api client
* betterer
* Use dashboard DTO when capturing dashbaord impression
* prettier
* Dashboard API: resolve folder metadata
* Add tests for resolving folder metadata
* Fix DashboardPicker
* Renames and nits
* POC Alternative Suggestion for Dashboard API versions handling (#97789)
* Add transitional_dashboard_api, reset components that are not ready for v2 schema, and start working on migrating
DashboardPicker to use v2 schema
* reset DashboardScenePageStateManager
* Improve logic in transitional api, also remove isDashboardResource checks from components
* REmove transitional_dashboard_api and apply PR feedback
* Apply PR feedback, use 'v2' as a parameter and remove unnecesary if
* Fix tests
* Adding missing comments from original PR and also changing order to improve diffing in github :)
* update betterer
* fix prettier
* Add tests for DashboardPicker
* Do not use unified alerting mocks
* Fix unused type in dashboard test
* Improve comments in DahboardPicker
* Update folder validation fn
* Validation update
* Update legacy api test
* Lint
---------
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* plugin details right panel tab
* fix betterer
* useMedia hook, use function for currentIdPage instead of state
* Rename PluginDetailsRightPanel to PluginDetailsPanel
* nit changes
* remove maxWidth for pluginDetailsPanel if screen is narrow
* fix width prop
* Add tests
* Rename PluginDetailsRight Panel file, rename info prop, fix the latestVersion
* delete console log
* move latestVersion from info arrya
* fix latestVersion test
---------
Co-authored-by: Esteban Beltran <esteban@academo.me>
* clean up almost all of the toggle
* betterer
* clean up searchBarHidden and extract translations
* fix remaining unit tests
* remove redundant topPosition
There have been reports of faro performing poorly when the URLs
generated are long (there was a 39KB one). The TRACKING_URLS we are
using leading wildcard characters, leading to excessive backtracking.
This commit uses a simpler regular expression, that ensures we are
blocking the appropriate URLs without the performance hit. To prevent
that from happening, a timed test is introduced. The timeout threshold
is long enough to be hardware independent.
* Implement k8s count handler
* Fix endpoint
* Fix type converstions
* Add tests for foldercounts
* Add more tests
* Only use sql-fallback if no values in unistore
* Update gomod
* Fix test
* Update pkg/api/folder_test.go
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
* Go.mod
---------
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
* Remove permissions levels that don't exists for team memberships
* Remove Permission from team structure
* Use WithAccessControlMetadata
* Remove roles from base Team interface
* WIP
* Refactor useSaveDashboard to make it dashboard type independent when used
* DashboardPrompt: makeit Dashboard type independent
* DashboardScene: accept both v1 and v2 schema
* Update save dashboard command interface
* Fix test
* Lint
* Refactor
* Add onSaveComplete to DashboardSceneSerializer
* Cleanup tests
* Remove unused code
* Refactor dashboard tracking information
* added a todo
* Fix betterer
* Update betterer results
* move graph builders in one file
* rename the folder as auto-query
* have a components folder
* more refactoring
* rename
* remove getQueryGeneratorFor
* why not renaming again
* add tests for baseQuery
* remove the need of default query generator
* refactor getAutoQueriesForMetric
* split the logic
* better structure
* better structure 2
* clean up
* summary tests
* unite tests for default.ts
* update unit tests
* update unit tests
* cleaning
* one variable for filters
* don't duplicate job or instance in match terms for OTel
* truncate job and instance list if exceeding 2000 chars for GET request
* test for warning when truncating
* fix check for duplicated job and instance, make easier to read
* add trans and remove console.log
* report when a metric has too many labels for job and info
* remove console.warn
* fix tests for not logging warning
* fix tests
* remove unused import
* make i18n-extract
* Update public/app/features/trails/interactions.ts
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* allow to dismiss warning
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Log Details: add support to resolve label types if supported
* Update public/app/features/logs/utils.ts
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
* LogDetailsRow: create component to display label type
* Remove log
* Add missing index resolution for label type values
* Make type icon less prominent
* Update new icon styles
* Formatting
* Update public/app/features/logs/utils.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Update public/app/features/logs/utils.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* LogDetails: update test
* Formatting
---------
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
I don't see a reason to accept a variable amount here, as we never use it. The only use I can see is optionally
including the opts, which isn't necessary and only complicates matters when an empty struct would do just as well: the
options are all created to be assumed zero-values already, in case a test doesn't need that option set.
* Update dependency golang.org/x/crypto to v0.31.0
* Update dependency golang.org/x/crypto to v0.31.0 - based on Trivy Scan
* Chore: go mod tidy
* Chore: make update-workspace
* Chore: manually update more sum files
---------
Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
* Add basic token-based paginated fetching
* Add 1:many relation between UI and API pages
* Fix pagination arrows
* Add pagination to hierarchical view
* Add multidatasource filtering
* Improve flushing filtered rules, add better identifiers
* Fix pagination for data sources not supporting server side pagination
* Use alert rule loader on the filter view
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* use useTransition and update loader
* types
* Update ruleGruopIdentifier. Add actions and location to recording rules
* Update to the new API parameters
* Refactor iterator code
* Use ix to merge iterators
* Improve perf
* use AbortController to cancel loading pages
* remove iterops for now
* add comments
* add application and rulesource information to list view
* update test
* update list view functionality
* add emptystate
* automatically load more items when we get to the bottom of the page
* reduce number of loaders
* separate hook for useFilteredRulesIteratorProvider
* use useDeepCompareEffect to track filter state changes
* fix weird no results loading glitch
* fix rare case where changing filters wouldn't update the list
* add number of results to component
* Simplify FilterView rerendering
* add filter for dashboard
* Add tests for filtered view, use data source UID instead of names in the interator code
* Improve HTML semantics, extract a separate GroupedView component
* Split RuleList.v2 into multiple files
* Split tests into Filtered and Grouped view files
* PR feedback
* Improve error handling, add tests for GroupedView
* Improve types, small refactoring
* Improve rules setup
* Small improvements, v1 and v2 versions of the view type selector
* Remove yarn cache changes
* Import from test-utils
* Move groupIdentifiers, improve state param parsing
* reorder imports
* reorder imports
* update yarn resolution
* i18n
* Improve API mock, increase timeout limit
* Add tests for RuleList.v2
* Update tests
* Fix mocks in test
* Fix lint
* Fix data sources mock
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* get stats from index
* fix logging
* fix logging
* actually counting
* Use searcher to check for resources referencing a folder
* Add tests when deleting a folder
* Lint
* merge/fix test
* will delegate to SQL
* get stats from index
* fix logging
* actually counting
* merge/fix test
* will delegate to SQL
* Uncomment test
* Add tests for checking stats before deleting a folder
* Change base branch to main
* Lint
* [REVIEW] remove logs
* Check for type assertion success
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This has been failing to compile, bringing down a _lot_ of tests along with it (notably the entire pkg/tests dir).
The `experimental/errorsource` package was deprecated, so the recommended replacement was used.
* Mark MockDataSourceSrv as deprecated
* Add `module` into necessary existing mock datasources
* Remove config mock
* Update helper method for test datasources to more accurately reflect real behaviour
* Update alerting/unified tests to remove mock datasource srv
* Lint fix
* Remove some unused re-exports
* Make mock mimir use correct module
Ⓜ️
* Add necessary handlers for mimir query editor responses
* Lint fix
* Add implementation to mock mimir data source
* implement perm check with direct db access
* add tests
* more tests
* Update pkg/services/authz/rbac/service.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update pkg/services/authz/rbac/service.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* allow fetching permissions for a user who is not a member of the org
* linting
* fix typo
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Remove global mock of `plugin_loader`
Removing this means we can get more accurate datasources behaviour in tests
* Fix circular dependency/undefined method when plugin_loader is unmocked
* Use optional chaining for trusted policies to stop tests failing when `bootData` is partially set
* Add plugin_loader mock back into single test that is still broken
* Revert trusted type policies changes
* Fix tests that break with trusted type policies
* Extract basic extensions to a separate files
* Add simple queryless apps links
* Move links for queryless apps next to the datasource picker
* Update tests
* Add translations
* Add tracking
* Update translations
* Fix tests and betterer
* Fix the mock for the test (the hook may be called twice now)
* Add a todo
* Revert "GrafanaUI: Revert: Fix inconsistent controlled/uncontrolled state in AutoSizeInput (#97551)"
This reverts commit 9f3073fd17.
* Fix defaultValue being used if the user cleared the inputy
* first commit adding usememo and refactoring scenes objects to keep an state for variables values
* Fix scenes with the panel reacting to variables changes
* move body to the model
* address some pr feedback
* Refactoring central alert history scene (#97658)
Refactoring
* fix test and some wrong imports
* update comments
* add eslint-disable-next-line
* remove unnecessary SceneFlexLayout and SceneFlexItem wrapper
* address pr feedback
* update tests for labels filtering
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* dont lazy init unified storage
* Inits index when creating new resource server. Fixes trace propagation by passing span ctx. Update some logging.
* Use finer grained cache locking when building indexes to speed things up. Locking the whole function was slowing things down.
* formatting
* linter fix
* go mod
* make update-workspace
* fix workspaces check error
* update dependency owner in mod file
* wait 1 second before querying metrics
* try with big timeout, see if fixes CI. Wont fail locally.
* skips postgres integration test. Only fails in drone. Will fix later.
* put delay back to 500 ms
* create notifications module and generate models
* switch template group to app models
* switch time intervals to use app models
* switch receiver to use app models
* switch routing tree to use app models
* move schema registration to resource packages
* fix package names to match app
* fix codeowners
* fix UI to use metadata.name instead of uid
* update dockerfile
* move generated models to pkg
* remove provenance from field selector
* move client factories to test files
* rename GenericClient to TypedClient
* build(webpack): add a stats config and build:stats script for analysing bundles locally
* chore(yarn): dedupe lock file
* feat(webpack): use bundle analyser by default, env vars for additional plugins
* Zanzana: Handle renderer service authorization requests
* only add context if render service is authorizing
* use group and resource from API definitions
* check prefix instead of full identity
* fix AddRenderContext
* remove unused type
Currently the default is 1, this means that by default users will see transient
query errors reflected as alert evaluation failures, when often an immediate
retry is sufficient to evaluate the rule successfully.
Enabling retries by default leads to a better experience out of the box.
* Remove eslint compat
* Remove fixup for testing library rules
* Make sure we don't ignore betterer eslint config from itself
* Update betterer to not run rules that are run in linting anyway
* Dashboard: Fixes issue with compatability of old DashboardModel.annotations
* let's lint this thing
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Adds back indexer metrics. Uses config values instead of hardcoded ones.
* cast to int64
* remove unused func
* Index metrics impl doesn't depend on Bleve. Adds a TotalDocs func to SearchBackend interface.
* adds config setting for index_min_count
* rename arg
* rename metric label to namespace instead of slug
* adds default "do nothing" case to satisfy linter
* moves bleve index metrics to search package
* make bleve backend private, dont need to pass in prom reg
* imports
* adds bleve metrics to resource package to avoid circular deps
* Browse dashboards: Use dashboard DashboardAPI
* Browse dashboards: Use DashboardAPI for deleting
* Browse dashboards: Use DashboardAPI for uid validation
* Ensure we're not using suggestions when no scopes are present
* Simplify scopes check
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
---------
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
When unified storage is using the grafana db (default case for on-prem), if the db is using ssl then set tls=preferred. This fixes an on-prem bug in 11.3.1.
* Bump github.com/grafana/grafana-plugin-sdk-go to v0.260.1
* run make update-workspace
* make update-workspace
---------
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* Docs: Make a clear distinction between Organization Roles and RBAC roles
* Add section to assign fixed and custom roles using the HTTP api
* Remove </br>
* run prettier
* Suggestions
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
---------
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
* build(typescript): switch module resolution to bundler for exports imports goodness
* chore: bump react-calendar and temp patch prometheus-io package
* Wip
* feat(decoupled-plugin): fix types errors in tests by including testing-library/jest-dom
* chore(betterer): pass custom tsconfig so betterer continues to run
* "Show usages" functionality
* Don't rely on the inital model but current state; add tests
* Fix typo
* variable check indicators
* Abaility to see renamed or missing variables
* clean up missing variables section async logic
* remove variable type casting
---------
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
* validate with durations
* update docs
* Add default values to calculation, show error if too many bins
* move default generation to separate function
* Update docs/sources/panels-visualizations/visualizations/heatmap/index.md
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* dont try to parse ‘’ as a duration, move max to variable
* Add new function to support duration and ms, only calculate if valid
* Add radix
* Remove validation and precalc to determine bucket quantity
* simplify
* simplify more
* less
* cleanup transformationsVariableSupport. reset value to auto on mode changes
* maybe...
* by hook or by crook
* Change function name back
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* works also before the min version
* adding datasource picker
* adding toggle viz picker and panel editor content
* Panel editor content
* small readme fix for docker compose
* removing constant
* style: increase size of the ‘let’s start’ section; decrease number of filter lines in the trail cards; remove DS line; change select metric to all metrics
* chore: delete unused get datasource test mock
* fix: adjust test to account for select metric to all metrics change
* chore: update i18n
* text: update truncate long labels test to truncate after 2 lines
* style: shrink card height
* LogsPanel: expose infinite scrolling to apps
* Logs panel: implement infinite scrolling callback and type guards
* Logs panel: expose infinite scrolling toggle in panel options
* Logs permalink: extract range function to a module
* Update unit test
* Logs panel: migrate test to dataplane format
* Formatting and docs
* Shortlinks: remove unnecessary mock
* Remove unnecessary params
* Formatting
* Add basic controlled functionality
* Fix controlled component
* Make component completely controlled
* Fix PR feedback
* Add support for number values and values not in options
* Fix TS errors
* Fix test feedback
* Extract function
* feat(plugins): automatically preload plugins
This PR enables auto-preloading for plugins when they are used
by an extension or extension-point. Once this change is merged plugins
that were only using "preload: true" in their plugin.json for using extensions
can remove it.
* fix: remove unused types
* fix: call `setComponentsFromLegacyExports()` after meta is initialised
* Add translations for notification preview
* Make notifications endpoints use alertmanager config mock entity
* Fix translations and error handling in preview component
* Update preview hook to use new k8s APIs
* Move receivers k8s mock logic so it always comes from the mock config
* Fix test that wasn't using the correct receiver
* Fix object_matchers
* Remove mockApi method and update tests
* Update translation for error case
* Remove useMemo
* feat(storybook): upgrade to version 8.4
* chore(grafana-ui): replace all usage of preview with canvas
* chore(grafana-ui): add fs-extra as dev dependency
* feat(storybook): copy required assets to temp static directory due to 8.4 not supporting file paths
* chore(yarn): fix up lock file so swc-loader doesnt break for decoupled plugins
* Add ExampleFrame component to render grafana-ui examples
* Prevent Storybook from styling in ExampleFrame
* Use global styles in Storybook docs
* Update mdx docs to use ExampleFrame or correct Canvas usage
* update AutoSizeInput
* Update Index mdx
* remove the gfm mdx package
* silence sass warnings
* fix(storybook): add missing imports to fix failed rendering of stories/docs
* remove empty docs
---------
Co-authored-by: joshhunt <josh@trtr.co>
* Add setting to adjust number of login attempts before user login gets locked
* Ensure at least one attempt can be made
* Update documentation with new setting
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Alerting: Explore button in Insights view
* Fix wrong insights queries
* replace `$rule_group` in the query expression with the actual rule group value
* Add info tooltip in `Insights` title
* Remove unused `RatingModal` component
* fix betterer results
* remove unnecessary `React.Fragment`
* Remove unnecessary text space
* Annotations
* Default to configured default DS when datasource is undefined
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
* Support importing local cue modules when generating TS types with cog
* Generate enums as unions of values instead of an actual `enum` statement
* Update transformers to use the new TS enums
* Update go workspaces
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* add service account to the schema
* sync managed permissions for service accounts
* sync SA basic roles
* sync SA roles
* Fix endless loop in reconciler while read openfga
* Fix removing reducer when inital value is instant
* use ID to allow clicking label to toggle the switch
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Fix simplified query step
* remove is advancedMode and use editorSettings.simplifiedQueryEditor
* remove unnecessary Boolean conversion
* fix when feature toggle is disabled
* fix test
* simplify code
* fix when not ff is not enabled
* Azure Monitor: Add a feature flag to toggle user auth for Azure Monitor only
* Fix condition for userIdentityEnabled
* Re-add removed test
* Remove unused prop
* Refactor onAuthTypeChange in AzureCredentialsForm
* Add frontend unit tests
* Lint
* Initial streamed version of list
* instantiate openfga client to use StreamedListObjects
* Add config option for using streamed version
* Use caching
* fix cache init
* Fix hashing
* refactor
Remove create relation from generic resources.
We cant have a create relation to a resource because they don't exist yet. So
in oder to check create we either have to have that permissions on a folder or the namespace
* Use hideFrom in GraphNG to hide fields if value is defined. Remove other filtering from timeline chart
* make hidefrom logic more robust
* remove unneeded decoupling, filter fields when there are no links
* add omitHideFromViz prop to GraphNG
* Add more to comment on property
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Feature toggles: remove lokiMetricDataplane
* Framing: remove test cases expecting metricDataplane to be false
* Remove test code
* Chore: rename test cases
* LogRowMessage: limit displayed characters to MAX_CHARACTERS
* LogRowMessage: update ellipsis text
* Formatting
* Revert test change
* LogRowMessage: fix conditional
* Extract translations
* LogRowMessage: use button for ellipsis
* Revert test change
* Change fill to outline
* Revert test change
* Enable getting folders with kubernetes client
* Add TestIntegrationFolderGetPermissions
* Set full path as part of legacy get
* Replace implementation for setting fullpath
* Add folder get test
* Escape forward slash in parent titles
* Replace test for access control metadata
* Add test case to TestIntegrationFolderGetPermissions
* Improve fetching of access control
* Add basic usage of K8s API for notification policies
* Add permissions checks for navtree for routes
* Add and update permissions for routing tree logic
* Add capability to skip calling contact points hook
* Conditionally show list of mute timings depending on permissions
* Conditionally link to mute timings if user can see at least one
* Add work in progress k8s handlers for routing tree
* Update notification policy hooks
* Wire up policies to permissions better (conditionally calling APIs)
* Add additional checks for whether to show grafana AM
* Add permission checks to access control
* Remove accidental permissions after rebase
* Update types and const for k8s routes
* Improve statefulness and reset routing tree in tests
* Update notif policy tests to check k8s and config API
* Fix type assertion
* Move non-grafana test out of .each
* Make failure case safer
* Override tag invalidation for notification policies API
* Pass in error and add new error alert component
* Add basic mock server conflict check
* Add test to check user can save after a conflict
* Add logic to allow reloading policies if changed by another user
* Fix test
* Update translations in Modals
* Add ViewAlertGroups ability
* Tweak provisioning logic and memoize AM config response
* Update snapshots for useAbilities
* Update result destructure
* Use enums for provenance in routingtrees
* Use consistent memoisation
* Fix _metadata for vanilla AM
* useAsync for error / update state
* move k8s api error handling to separate file
* use cause for error codes
* Use `supported` bools from Alertmanager abilities and clarify default policy
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Chore: Clean up some excludes and fix makefile (#96052)
clean up some excludes and fix makefile
* Chore: Enable cache on golangci linter (#95471)
* try to enable cache on golangci linter
* bump version
* exclude G115
* reduce timeout
* remove deprecated linter
* bump linter version in bingo
* try a different syntax for workspace modules
* try another command
* add apps to linter path
* try disabling cue codegen
* skip some linting in devenv
* exclude dirs and try again
* try workaround for pkg
* try path instead of dir
* make it one line
* replace package prefix
* exclude xorm
* exclude wire
* file-based aproach to nolint in workspaces
* missing quote
* simplify command line
* change ownership
* upgrade linter
* revert bingo readme
* revert devenv changes
* upgrade golint
* use dashes to stay consistent with other workflows
* also change name in its own workflow file
* rename in codeowners
* Remove simple configuration from Tempo data source docs
* Change deprecation to 11.5 for aggregate by
* Update docs/sources/shared/datasources/tempo-search-traceql.md
* GrafanaUI: Fix delayed state in AutoSizeInput due to mixed controlled/uncontrolled state
* clean up state management into seperate hook
* update test
* Sync new prop value to state when uncontrolled, tests
* Zanzana: Search with list
* Allow to pass werb into list request
* split list search into 2 functions
* fix listing resources
* remove unused
* refactor
* remove unused function
* Add more logging to reconciler
* Fix search for users with access to all resources
* fix findFoldersZanzanaList
* search for folders as well by default
* refactor
* use compile for list and search
* remove list from client
* remove only from client
* remove list from interface
* run compile once
* refactor
* refactor
* add search tests
* fix tests
* Fix linter
* add new button for exporting new alert rule
* Fix test
* allow only HCL format for exporting new alert rule
* fix initial tab
* Update public/app/features/alerting/unified/components/rule-editor/alert-rule-form/ModifyExportRuleForm.tsx
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* Update public/app/features/alerting/unified/components/rule-editor/alert-rule-form/ModifyExportRuleForm.tsx
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* address review comments
* update translations
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* Support delete endpoint for folders
* Include authorizer
* Add test for delete verb
* Add delete command to delete options
* Pass query string to context to admission
* Dont support nested folder deletion for now
* Skip test if feature flag is present
* Add test case
* Remove comment
* Only rely on the storage type config to run alerting tests
* Dont change legacy subpath
* Remove unised function
* Add test case when an editor can delete alert rules
* Lint
* created config doc, made initial changes
* initial draft of config doc completed
* additional edits
* moved config doc into directory, renamed
* made additional updates
* template variables updates/cleanup
* cleaned up intro page, some more minor edits
* edited and re-formatted configure the data source doc
* final edits
* more edits
* minor changes prior to PR
* fix typo
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/query-editor/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/query-editor/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/template-variables/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/query-editor/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/configure-influxdb-data-source/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/query-editor/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* updates based on feedback
* ran prettier
---------
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Merge in default threshold base if exists
* Fix tests to not expect default threshold
* Add config from query example to gdev
* Add a test around the merging of thresholds
* Revert "Add config from query example to gdev"
This reverts commit a239224ebb.
* update gdev
* Add note about keeping the base threshold
* Update public/app/features/transformers/docs/content.ts
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Merge in generated code
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* test: add skeleton for initial unit tests
* test: add basic tests for DataTrailsHome
* test-wip: add tests for recent metrics functionality, but need to move from DataTrailsHome.test to DataTrailsRecentMetrics.test
* wip: tests for DataTrailBookmarks
* test: add tests for recent metrics; refactor: make DataTrailsRecentMetrics accept onSelect as prop rather than whole trail; test: add tests for DataTrailCard (WIP)
* test: add test for truncates long list of labels after 3 lines in recent explorations
* refactor: make DataTrailBookmarks take in onSelect and onDelete as props rather than a whole trail and onDelete; test: add tests for bookmarks (WIP)
* remove deprecated style
* fix import issues
* fix getTrailForBookmark tests by returning a trail, clean up tests
* chore: delete notes to self
---------
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* Add github app token generation in pipelines that use GITHUB_TOKEN
* ci?
* clone gh repo using x-access-token user
* address linting issues
* use mounted volume for exporting token
* remove unused github_token env var swagger gen step
* replace pat on release_pr pipepline
* cleanup GH PAT references
* linting
* Update scripts/drone/steps/lib.star
* make drone
---------
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
* add new option for multi variables to lock value list wip
* WIP - lock option list
* tests
* fix
* fixes + canary scenes
* wip
* wip
* fix snapshot
* bump scenes
* Dashboards: Add possibility to lock adhoc variables options list (#96077)
* Lock list of options flag for ad hoc
* refactor
* fix snapshot
* Refactor OAuthToken service
* introduce user.SessionAwareIdentityRequester
* replace login.UserAuth parameters with user.SessionAwareIdentityRequester
* Add nosec G101 to fake ID tokens
* Opt 2, min changes
* Revert a change to the current version
This patch marks ID tokens as not required when initalising a gRPC
Authenticator to be used in `cloud` mode. ID Tokens are still enabled in
`cloud` mode, but the `Required` option is set to `false`.
This is needed for MT services like Cloud API Server to authenticate
against gRPC services like Resource Store with only an Access Token.
Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
* Update existing property once we save the new rule data and stay in the same page
* prettier
* use cache invalidation for updating the existing property
* fix cloud usecase
* add group mapping UID returned mapped roles
* request mapped roles from the frontend, but don't attempt to update mapped roles
* lock mapped roles and show a pop-up message about why a role is locked
* update role selectors to not allow deselecting a mapped role
* swagger gen
* simplify and set mapped as bool instead of mapping UID array
* swagger gen
* Dashboard: Panel edit and support for more layout items
* It's working
* Fix discard issue
* remove unused file
* Update
* Editing for responsive grid items now work
* Update
* Update
* Review fix
* optimize tokens count from service accounts query
* add unit tests for tokens count
* skip broken test
* fix lint error
* rename Tokens to TokenCount
* Move TraceQL metrics queries to backend
* Add tests for TransformMetricsResponse
* Add tests for createMetricsQuery
* Refactor, detect metric queries and throw error for search queries
* Remove unneeded types
* Don't add start and end if they are 0. Return on err
* lint
* Fix pre-alloc of frames
* Address PR comments
* Explore: store displayedFields in URL state
* Displayed fields: reset when queries change
* Add test
* LogRowMessageDisplayedFields: pass logRowMenuIcons props to component
* LogsMetaRow: use primary outline for reset button
* Logs: clear displayedFields from URL
* fix pseudo locale and add simple e2e test
* add comment
* update test and add comments
* fix unit test
* try 5 instead of 6?
* clear input
* only check pseudo in dev mode
* don't check pseudo in CI
* don't test pseudo locale
* isolate language changes
* move waits around
* only wait for preferences on first visit
* add proper loading state
* bit of tidy up
* hook up ids correctly
* use disabled/isLoading instead of skeleton
* set props on Field
* Support undefined value
* Check truthiness of value instead
* check falsy
* Conditional typing for clearing value
* Less restrictive default typing
* simplify props
* Add tests for autosizing
* Write failing test case
* Add list of falsy values
* Check if nullish
* Check nullish in itemToString
* Nvm, it doesn't matter here
* Add support for autoFocus
* Pick from InputProps
* Move docstring
* Solve type issues in Storybook
* Fix failing story
feat: inject server-timing header to match initial loads with client-side telemetry
Faro Web SDK can read the server-timing info and
correlate the initial request with the client side telemetry gather from navigation timings.
* Rename method applyTemplateVariables so it used by backend
* Zipkin: Move query running to backend
* Fix error source
* Hndle invalid query and return error response
* create a new state and set at the end
* propagate labels datasource_uid and ref_id from current state if it's error
* copy the state when apply to all
* add note that support for Auth0 audience feature is not available
* Update docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Certain combinations of KeepLast state transition annotations exceed the current
limit of 25 characters. This increases the column size limit to be able to
handle the longest combination (27) with some extra space for comfort.
* Fix toDTO
* Remove conversion function for folder dto
* Convert toDTO to a standalone function
---------
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
* rewriting installation docs and including info about airgapped environments
* Changing example to lokieexplore app
* run prettier
* adding corrections
* running prettier
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* Remove reducer when using a non complex query that is instant
* remove reducer when changing data source
* Fix whenField
* use DataSourceType instead of string literal
* add reducer when using range
* add tests
* use an object for SimpleCondition refids identifiers
* fix threshold expression to point to B after switching back to range
* address pr review comments
* refactor: extract reducer optimization to the reducer
* fix tests
* fix snapshot
* rename constants
* add a warning for components when they exceed the recommended options amount
* Update packages/grafana-ui/src/components/Combobox/Combobox.tsx
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Update packages/grafana-ui/src/components/Combobox/Combobox.tsx
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* log faro
* log once with flag
* log in setItems
* move logOptions to utils and write tests
* import function, update betterer for combobox
* Fix lint errors
* log once without the try
* fix tests
---------
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
* initial passwordless client
* passwordless login page
* Working basic e2e flow
* Add todo comments
* Improve the passwordless login flow
* improved passwordless login, backend for passwordless signup
* add expiration to emails
* update email templates & render username & name fields on signup
* improve email templates
* change login page text while awaiting passwordless code
* fix merge conflicts
* use claims.TypeUser
* add initial passwordless tests
* better error messages
* simplified error name
* remove completed TODOs
* linting & minor test improvements & rename passwordless routes
* more linting fixes
* move code generation to its own func, use locationService to get query params
* fix ampersand in email templates & use passwordless api routes in LoginCtrl
* txt emails more closely match html email copy
* move passwordless auth behind experimental feature toggle
* fix PasswordlessLogin property failing typecheck
* make update-workspace
* user correct placeholder
* Update emails/templates/passwordless_verify_existing_user.txt
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update emails/templates/passwordless_verify_existing_user.mjml
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update emails/templates/passwordless_verify_new_user.txt
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update emails/templates/passwordless_verify_new_user.txt
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update emails/templates/passwordless_verify_new_user.mjml
Co-authored-by: Dan Cech <dcech@grafana.com>
* use & in email templates
* Update emails/templates/passwordless_verify_existing_user.txt
Co-authored-by: Dan Cech <dcech@grafana.com>
* remove IP address validation
* struct for passwordless settings
* revert go.work.sum changes
* mock locationService.getSearch in failing test
---------
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
* Set CoreServices as codeowners for SQL Expressions
* Set CoreServices as CodeOwners for ALL SSEs
Don't limit to SQL Expressions alone, but take all of the
Server Side Expressions
* updated kiosk behaviour
* Removed TV mode and updated Normal mode
* Updated kiosk mode and other small edits
* Removed dashboard controls from playlist controls section and reformatted
* Added playlist controls behaviour in kiosk mode
* Updated Use dashboards image and descriptions
* Docs: Clean up basic auth, anonymous access and main pages for auth configuration
* Fix the typo
* Prettier should fix this
* fix minor typo
* Update docs/sources/setup-grafana/configure-security/configure-authentication/_index.md
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Move the configuration options to the bottom and extend it
* Improve assertion mapping docs for Okta
* fix typo
* Update index.md
---------
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
* Use 0 for window functions if value does not exist
* Simplify logic, add test
* Fix tests, have first value count as 0 if null as well
* evaluate entire array instead of individual values
* Adjust logic, move prior results back
* add docs describing what GAS is and how it can be configured
* Update configure-group-attribute-sync.md
* Update configure-group-attribute-sync.md
---------
Co-authored-by: Aaron Godin <aaron.godin@grafana.com>
* Postgresql: Support tables from non-default schema
- Add support for schema-qualified table names.
- Partially resolve an issue where the column type of a table from the
wrong schema with the same table name was incorrectly used. Now
limited to tables of schemas within the search_path.
* Support schema in raw query editor
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Rename from AllowedKubernetesNamespace to Namespace
* Use a sync hook to always set namespace for Identity.
* format
* Don't set uid when authenticating as user
* Refactor basic usage with stateReducer
This is a combination of 3 commits.
This is the 1st commit message:
more wip
This is the commit message #2:
even more wip
This is the commit message #3:
got basic usage working well with stateReducer
remove unrelated change
todo tests
* fix behaviour for async
* clean up dev stuff
* story
* Fix options being cleared for non-async combobox
* Fill out tests!
* put story back
* clean up metriccombobox test
* show selected value as placeholder while menu is open
* properly fallback placeholder to the prop
* Hide `Instances` field in RuleDetails view for recording rules
* Alerting UI: add `helpLink` to Recording Rules docs
* Make the Metric input placeholder more explicit for recording rules
* adding ignoreUrls param to EchoSrvTransport
* adding test for ignore urls
* linting
* cleaning up
* adding a new error message to the list of ignored errors
* check error for source and check http status for source
* refactor
* add source to health check status code as well
* remove error where it will be nil
* Use different threshold x/y coordinates depending on orientation
* invert wording / semantics
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Move server init into server package
* map store name to id
* refactor model loading
* pass namespace into reconcilers and collectors
* refactor
* Extend authz server with Read and Write methods
* use new read/write in reconciler
* implement server side read and write
* Sync permissions for every org
* handle namespace in check and list
* split read and write
* provide conditions
* Fix client implementation
* fix nil conditions
* remove unused client code
* use lock for store access
* move type translators to common package
* fix folder collector
* fix store creation
* remove unused AuthorizationModelId
* fix server tests
* fix linter
* Remove collectors
* Remove zanzana search check, we need to rewrite that part to the new schema
* Only use generic resource schema and cleanup code we don't want to keep / need to re-write
* useRef instead of create ref for functional components, pass function to close popper if needed
* Cleanup, hide on save as well
* add comment about when hidePopper is available to content
* try to enable cache on golangci linter
* bump version
* exclude G115
* reduce timeout
* remove deprecated linter
* bump linter version in bingo
* try a different syntax for workspace modules
* try another command
* add apps to linter path
* try disabling cue codegen
* skip some linting in devenv
* exclude dirs and try again
* try workaround for pkg
* try path instead of dir
* make it one line
* replace package prefix
* exclude xorm
* exclude wire
* file-based aproach to nolint in workspaces
* missing quote
* simplify command line
* change ownership
* Zipkin: Run health check through backend
* Mark some errors as downstream
* Update pkg/tsdb/zipkin/zipkin.go
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Use errors.New where error formatting is not needed
* Remove executable in plugin.json
* Fix joining the path
* Keep logger as global and then create from context
* Close the res body
---------
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Intro: simplify `Architecture`. Add a new guideline
* Define `Notification policies` as an advanced option
* Intro: include about "Notification messages"
* Minor copy changes
* Check if sidecar is used
* Update packages/grafana-runtime/src/services/SidecarService_EXPERIMENTAL.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* WIP - build tenant indexes concurrently
* adds local dev seeders and readme for indexer
* update logging and adds locking in getShard()
* update logs
* Adds Namespaces func. Initializes index after ResourceServer is created.
* fixes Count() and updates test lint issues
* Initialize index separately. Don't do it when creating the resource server. Makes testing really awkward.
* fix lint error
* handles error when getting namespaces
* updates test and index helper funcs
* handle regex matchers with flags
* add test in alertmanager.test.ts
* refactor to use the same matching functions
* lint
* lint again
* move matchers functions to matchers.ts
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Prometheus: Fix escaping of quotation marks for non-regex variables
* Prometheus: Fix escaping of double quotation marks for regex variables
* Prometheus: Add escaping for adhoc filter label queries
* initial logs integration
* rename back to Integrations
* remove comments
* connect related logs in metrics with logsIntegration service
* rename
* remove comments
* feat: related logs with loki expr
* fix: layout & var updates
* refactor: prefer scene state to context
* fix: limit DS select to relevant loki DSes
* refactor: use existing utils
* refactor: types
* fix: tests and types
* refactor: simplify
* refactor: prefer precise data updates
* refactor: prefer variable for key
* refactor: simplify panel search
* refactor: remove unnecessary short-circuit
* fix: ensure single network request for logs
* fix: add missing limit to fetched log lines
* refactor: add clarity
* refactor: organize imports
* feat: messaging for No Related Logs case
* fix: add missing space
* chore: add `exploreMetricsRelatedLogs` feature toggle
* feat: link to Explore Logs app
* fix: i18n
* fix: use sentence case consistent with design system
* style: avoid competing with metricscene buttons
* fix: capitalization for names
* fix: a11y
* refactor: clean up and document utils
* fix: formatting
* chore: run `make i18n-extract`
* test: improve coverage
* test: fix module resolution side-effects
* extract only the first rule
refactor: organize imports
* remove unnecessary test files
---------
Co-authored-by: Nick Richmond <nick.richmond@grafana.com>
* Alerting docs: Update `Create alert rules from panels`
* Remove screenshots except when the panel displays alert status
* Further changes sync with Brenda
* minor changes
* Relocate admonition
* Specify `dashboardUId` and `panelId` must be set together
* Update docs/sources/alerting/alerting-rules/link-alert-rules-to-dashboards.md
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* change title
* change URL
* fix spell error
---------
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* refactor breakdown scene
* refactor BreakdownScene along with LayoutSwitcher
* rename
* don't pass default layout
* better type handling
* betterer
* add @bsull/augurs
* implement LabelBreakdownScene
* integrate SortByScene in LabelBreakdownScene
* move to new directory
* introduce BreakdownSearchScene
* integrate searchScene
* cleaning
* initialize @bsull/augurs
* add interaction
* use new breakdown scene
* resolve merge conflicts
* ugrade @bsull/augurs
* update import
* update css
* update tooltip text
* refine sorting
* fix unit test
* fix
* implement outlier detector
* support wasm
* jest testing fix
* localization fix
* use unknown instead of any
* update i18n
* update betterer
* fix locales
* update test
* fix tests maybe
* prettier
* chore: update jest config
* chore: create mock for @bsull/augurs (#92156)
chore: create mock for bsull/augurs
@bsull/augurs assumes it will be running as an ESM, not
a CommonJS module, so can't be loaded by Jest (specifically
because it contains a reference to import.meta.url).
This PR provides a mock implementation which gets tests passing
again.
Ideally we'd be able to load the actual @bsull/augurs module
in tests so this is just a stopgap really, until a better
solution appears.
* fix unit tests
* remove unused BreakdownScene.tsx
* set outliers as undefined if an error occurs
* Add labels
* betterer
* reset event implemented
* fix controls positioning
* update augurs
* betterer
* i18n
* conflict fixes
* update texts
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ben Sully <ben.sully@grafana.com>
* Alerting: Keep state manager cache during cache warm-up
Instead of overwriting the state manager cache during warm-up,
we update the data in the cache if it is not there yet. If the cache
already contains a state entry with the same key, we do not overwrite it.
* indexer integration tests WIP
* make protobuf
* Adds a few more integration test cases to cover the basics. Use Limit instead of Size param from SearchRequest.
* skip if testing.Short()
* adds test comments
* Scan direction: add experimental badge
* Logs model: keep data when the response contains errors
* SupplementaryResultError: extend behaviors
* LogsVolumePanel: add custom message for partial shard data
* SupplementaryResultError: add size prop
* SupplementaryResultError: remove size prop and adjust sizes
* Infinite scroll: disable when direction is scan
* Fix lint issues
* logsModel: add logs volume test
* chore: unfocus test
* modifyQuery: add function to add drop statement to queries
* Shard query splitting: split metric queries
* Shard query splitting: drop stream shard from metric queries
* Fix tests
* logsModel: skip coverage data when the direction is scan
* Add getter to FolderAPIBuilder so that we can access it in admission
* Remove deprecated return
* Fix test
* Update pkg/registry/apis/folders/register_test.go
Co-authored-by: maicon <maiconscosta@gmail.com>
* Fix maxNested folder test
* Remove log
---------
Co-authored-by: maicon <maiconscosta@gmail.com>
* Uses Combobox in Prometheus for the metrics select, behind feature toggle
* switch to new async combobox api
* clean up MetricCombobox, add in dev slowness
* wip
* reset combobox changes to other pr https://github.com/grafana/grafana/pull/95191
* restore placeholder
* wip
* tests :)
* remove history comment
* use main import
* add new otel grouping variables
* add call for resource attributes for a metric
* add function to update variables for otel join
* interpolate metric in match param
* update group left when starting trail
* process the group left before setting the metric and showing the metric scene
* add attributes to metric overview list
* change label name to attributes because it contains resource attributes and metric attributes
* add resource attributes to label breakdown select
* add otel resource attribute to filters from label breakdown
* add otel flag for rudderstack event when breakdown label selected
* for translations
* add test for new variable in datatrail spec
* add test for filtering otel resource attributes
* update documentation
* add tests for updating the join query with group left resource attributes
* use Nick and Ismail's suggestions, return early, space and no type needed for timerange
* remove unused import
* wip: homepage (new user)
* fix: spacing between button and text; wip refactor: separating bookmarks and recent metrics from home page
* feat: new user homepage; wip: need to clean up code
* fix: change rocket icon to svg
* wip feat: rendering recent metrics
* chore: add comments to understand code, will need to delete / cleanup later / pare down into documentation comments
* wip: new recent metric card design
* wip: display recent metrics cards in rows of 3 (height still incorrect)
* feat: apply conditional styling to remainder recent metrics exploration cards (any cards that are not a complete row of 3)
* fix: render new recent metrics explorations without refresh
* style: render recent metrics explorations in rows of 3 using grid instead of flex; fix: remove remainder card styling
* fix: remove delete button from recent metrics exp cards
* style: make background color for each card take up the entire card/grid space; make height of cards for each row the tallest card
* chore: clean up code
* fix: fix eslint errors
* style: implement recent metrics card header styling
* style: in recent metrics exp cards, format datasource line
* fix: add initial value for _lastModified to fix eslint err
* style: format date correctly; chore: clean up code; wip: get date to render properly on bottom left
* style: make inner card height match outer card height; style: add date footer; style: wrap last metric name; style: wrap labels
* style: adjust font for label name and label value
* style: truncate singular label if value is greater than 35 characters
* style: truncate singular long labels at 44 characters; style: truncate multiple labels at 3 lines; style: correct the border width and radius
* style: make background border radius match the border
* style: correct gap between rows and columns of cards; style: correct padding inside card
* chore: clean up code
* refactor: apply new card UI to DataTrailCard component
* feat: add bookmarks (not formatted correctly), only render section if there are bookmarks, hook up delete functionality
* style: add horizontal line above bookmarks header; style: add bookmarks header
* style: add additional padding above bookmarks divider; chore: delete unused code
* style: add carrot button to bookmarks; style: format heading font style
* refactor: separate bookmarks into functional component; feat: make bookmarks section collapsed by default; feat: allow toggle to expand bookmarks section
* style: position delete button for bookmarks in bottom right of card
* fix: only render recent metrics and bookmarks headings if there are any
* style: add show more button (not functional); style: fix padding around show more button
* chore: delete unused code
* fix: add back gap underneath bookmarks header
* feat: implement show more/less button for recent metrics
* fix: do not show select metric card if user does not actually select a metric
* chore: preliminary code clean up
* chore: delete console.logs, comments
* chore: clean up styling
* Update public/app/features/trails/DataTrailCard.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* fix: add i18nKey to Trans tags
* fix: attempt to remove go.work.sum changes that are unrelated to my PR
* fix: add Trans tags
* refactor: sepearate recent metrics into functional component; chore: delete unused code; fix: add Trans tags
* chore: generate translation json
* trigger drone
* trigger drone
* fix: add trans tag to date
* chore: abbreviate descriptive key, regenerate json
* Update public/app/features/trails/DataTrailBookmarks.tsx
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Update public/app/features/trails/DataTrailsRecentMetrics.tsx
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Update public/app/features/trails/DataTrailBookmarks.tsx
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* fix: revert trans tag on date created to fix formatting
* chore: return null immediately if no recent metrics
* style: add margin between bookmarks header and carrot toggle button
* style: adjust margin to 8px between bookmarks header and carrot toggle button
* style: make margins multiples of 4
* Update public/app/features/trails/DataTrailBookmarks.tsx
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* style: fix light mode styles; style: fix border radius
* fix: save select metric view as recent metric card if labels are applied
* Update public/app/features/trails/DataTrailCard.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* refactor: move rocket svgs into assets folder
* chore: add back accidentally deleted console log
* Update public/app/features/trails/DataTrail.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/DataTrailBookmarks.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* chore: revert lastModified related changes since behavior appears to remain the same
* fix: add back lastModified changes because they make the recent metrics show more functionality work
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* add user ID API translation
* add uid to user frontend
* use users' UIDs in admin pages
* fix ldapSync page
* use global user search for user by UID
* remove active org filtering
* remove orgID params
* sandboxfy alerting tutorial part 2
* format
* format2
* added frontmatter
* all pretty no pity
* added setup, login
* link
* STEPS
* login link
* update steps
* improve visibility of part 2
* link
* new diagram image
* img
* all pretty, no pity
* Activate parents of query runner when using dashboard ds
* Set plugin loading util to fix test because activating the ancestors of the query runner needs to be able to load the plugin for the panel
* Rename activateInActiveParents -> activateSceneObjectAndParentTree
* Add back but deprecate activeInActiveParents
* Improves initial indexing speed. Makes params configurable.
* fix linter errors
* removes kind param
* updates index test
* remove println from test
* removes error check in test
* adds log for high index latency ands updates max goroutine var with workers config var
* fix test timing out - set worker limit
* set the batch size
---------
Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
* updated steps
* update before you begin
* updated title
* update title 2
* elaborated on 'Sample logs' section
* updates to improve visibility
* updated links
* format
* updated link
* links and steps
* updated call-to-action boxes
* updated box
* title
* format
* steps
* format
* Made docs live in the now
* all pretty, no pity
* Activate parents of query runner when using dashboard ds
* Set plugin loading util to fix test because activating the ancestors of the query runner needs to be able to load the plugin for the panel
* WIP - Restructure recording rule pages
* Add more `Recording rules` use cases
* Update `Intro > Alert rules`. Minor style changes and updates to the recording rules section
* Minor verb change
* Switch `aliases` and fix broken link
* Bold for clarity
* Complete `Create recording rules in Grafana Alerting`
* Complete data source-managed recording rules
* Final update
* LogsPanel: add props to prepend or append icons to the log row menu
* LogsPanel: add test and type guard
* LogsPanel: add test
* Fix addonBefore position
* Refactor to be an array of ReactNode
* Remove comment
* chore: add docs
* Linting issues
* Rename to CheckObject
* Implement authz.AccessClient
* Move folder tree to reconciler and use new schema
* Move shared functionality to common package
* Add reconciler for managed permissions and resource translations
* Add support for folder resources
* Fix folder status error message
* Add test for folder creation response message
* Add TestFoldersCreateAPIEndpointK8S fixes
* Fix message returned when user has no permissions
* Only enable Faro if origins are the same in iframe
* Handle non-iframe case
* Remove console logs
* Use try catch to identify cross origin iframe
* Only disable transport
* WIP: setup to test folders GetAuthorizer
* Setup test
* Extract authorizer fn for tests
* Setup internal test fn
* Better define test inputs
* Add FolderAPI builder to the test
* First test passing
* Test getAuthorize for the create method
* Change authorizerFunc's signature
* [REVIEW] code readability
* Name error
* [REVIEW] add one more test case. Lint
* Remove empty line
* Implement initial check with schema for generic resources
* Implement List and add tests
* Add namespace type and change to folder_resource name
* Handle namespace grants for typed resources
* Run tests as integration tests
* Add support for verb in list requests
* build(webpack): set publicpath and process urls to resolve assets correctly
* build(webpack): add back --progress to build
* Add local cdn
(cherry picked from commit 7a19523fa476fd5ff2d7669d116f5be462b100f5)
* chore(devenv): fix local_cdn path in ngnix conf
* chore(codeowners): add frontend-ops as owners of local_cdn docker block
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* FIX: Remove the checks for lbac rules inside of datasources
* Remove json validation for lbac rules
* Preserve lbac rules in updates
* Refactored test to remove the table structure
* refactor: change to allow naming and concise override instead of complex branching
* refactor to make sure we set an empty field for updates
* bugfix
* check for datasources.JsonData
* fix merge
* add datasource to check for field presence only
* add function call for readability
* Combobox async: Invalidate using timestamp instead of value
* Simulate keyboard delay in test
* Use a counter instead of timestamps
* Fix feedback
* Expand tests to include case discussed on PR
---------
Co-authored-by: Joao Silva <joao.silva@grafana.com>
* Introduce new models RoutingTree, RouteDefaults and Route and api-server to serve them that is backed by provisioning notification policy service.
* update method UpdatePolicyTree of notification policy service to return route and new version
* declare new actions alert.notifications.routes:read and alert.notifications.routes:write and two corresponding fixed roles.
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
* ref: ds picker events added
* ref: track opendropdown only on click
* ref: update/update all payload added to the event
* ref: configure more ds button event path to from path
* ref: result count fix, enable/disable track
* ref: debounce search tracks
* ref: track connections_plugin_card_clicked
* ref: call tracking from the child comp with result count
* ref: change event names, add creator_team and schema version
* Add installed and latest version information
* get latest changelog for changelog tab from gcom
* fix displaying signature type
* fix integration test
* add translations
* remove gcom request at local changelog method
* extracted in-proc mode to #93124
* allow insecure conns in dev mode + refactoring
* removed ModeCloud, relying on ModeGrpc and stackID instead to discover if we're running in Cloud
* remove the NamespaceAuthorizer would fail in legacy mode. It will be added back in the future.
* use FlagAppPlatformGrpcClientAuth to enable new behavior, instead of legacy
* extracted authz package changes in #95120
* extracted server side changes in #95086
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
* Transformations: Add field from calc - avoid frame joining in some cases
* Add test for multiple query, 1 field, replace all
* omit frames that had no binary ops performed on them
---------
Co-authored-by: drew08t <drew08@gmail.com>
* fix: Change users permissions search to use a consistent key without collisions
* Move HashString to cacheutils
* Change error handling logic for what to do with a cache key
* Add a test that confirms search cache key consistency
* ds-querier: return QDR instead of k8s error
After parseQuery we know the request is a valid k8s request but we don't
know if the query is valid, therefore this change returns a QDR that
other systems, e.g. alerting ruler, can de-serialize properly.
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* ds-querier: fix tests
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* tweak status
* refactor refID to empty
---------
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* no orgname
* format code
* update unit test
* delete contextSrv
* fix unit test
* run prettier
---------
Co-authored-by: Laura Benz <laura.benz@grafana.com>
* add admin permissions upon creation of a folder w. SA
* Update pkg/services/folder/folderimpl/folder.go
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Grant service account permissions for creation of dashboards
* Grant service account admin permissions upon creating a datasource
* fetch user using the userservice with the userid
* Revert "fetch user using the userservice with the userid"
This reverts commit 23cba78752.
* revert back to original datasource creation
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* handle button focus between states
* fix focus when closing the overlay menu from the close button
* move into a separate hook
* properly feature toggle the hook
* use constants
* All objects should have an UID
* Now with a different error message
* Simplify create on DW 2: use the same object to write to both storages
* Run only one test
* Add check for status code
* Add name if it's not present in mode2
* Populate UID in legacy
* Remove logs and commented code
* Change dualwriter1
* Remove commented code
* Fix list test
* remove get on update from dualwriter 2
* Get object before updating. Better var renaming
* Finish rebasing
* Comment test
* Uncomment tests
* Update legacy first. Add preconditions
* Remove preconditions
* Fix update test
* copy RV from unified to legacy objects
* revert changes to playlist xorm store
* Improve logging. Add go routines for mode3
* Add tests for async funcs in mode3
* Lint
* Lint
* Lint. Start to fix tests
* Fix watcher tests
* Fix store tests
* Fiinish fixing watcher tests
* Fix server tests
* add name check
* Update pkg/apiserver/rest/dualwriter_mode1.go
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
* All objects should have an UID
* Now with a different error message
* Simplify create on DW 2: use the same object to write to both storages
* Run only one test
* Add check for status code
* Add name if it's not present in mode2
* Populate UID in legacy
* Remove logs and commented code
* Change dualwriter1
* Remove commented code
* Fix list test
* remove get on update from dualwriter 2
* Get object before updating. Better var renaming
* Finish rebasing
* Comment test
* Uncomment tests
* Fix update test
* revert changes to playlist xorm store
* Improve logging. Add go routines for mode3
* Lint
* Fix watcher tests
* Fiinish fixing watcher tests
* Add mode 5 with etcd test case. Add early check to fail on populated RV in payload
* we can't set RV to the found object when updating
* Lint
* Don't fail on update playlists
* Name should not be different when updating and it should be not empty on creating
* Fix tests
* Update pkg/apiserver/rest/dualwriter_mode2.go
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
* Lint
* Fix mode 5 tests
* Lint
* Add generateName condition on every mode. Fix tests
* Lint
* Add condition on where name or generate name have to be set
* Fix test
* Lint
* Fix folders test
* We dont need to send name for mode1
* Fail if UID is not present
* Remove change from not running test
* Remove unused line
* Lint
* Update pkg/storage/unified/apistore/store.go
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
* Improve error message
* Fix broken watcher test
* Fail on name mismatch on update
* Remove log
* Make sure UIDs match on create in both stores
* Lint
* Write first to unified storage
* Remove uid setting
* Remove RV only in mode2
* Fix test. Remove log line
* test
* No need to asser on RV in mode3
* Remove RV check due to race condition
* Update dualwriter.go
Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
* Update pkg/storage/unified/client.go
* remove unused parameter
* log an error for object is missing UID instead of returning an error
* remove obj.SetResourceVersion("")
* log an error for object is missing UID instead of returning an error
* FInalise merge
* Move RV check to where it was
* Remove name check
* Remove server check for backwards compatibility
* Remove unused fn
* Move test checks for another PR
* Dont commit go work sum changes
* Only log error if RV is present for now.
---------
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
Previously all receiver modifications were denied with alertingApiServer
enabled. This allows pure creates and deletes through as these specific
cases can be handled simply and without risk of rbac shenanigans.
* Fix: Fix panic when json data are nil
* Use Interface()
* Feedback
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Need to check inside the if statement
---------
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Implement uidToResourceID
* add middleware
* Move uidToResourceID to alerting package
* Only hash uid if it's too long
* Use hashed uid in access control
* Move ReceiverUidToResourceId to ScopeProvider
* resolve uid in middleware only if param exists
* Tests
* Linting
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This solves problems on Linux distros like NixOS and BSDs like FreeBSD that don't provide `/bin/bash`, while also
maintaining support for all other distros out there (AFAIK? even Alpine with its Busybox has /usr/bin/env).
* adds metric for watch latency
* registers storage metrics when creating a new ResourceServer
* defines the latency (in milliseconds) as the diff between now and the RV. Still need to wait until PR for switching RV to millisecond timestamp is rolled out.
* should be micro seconds not milli
* for watch latency, use diff between now and resource version and convert to seconds
* fix typo
* Loki query editor: update CompletionDataProvider time range when it changes
* CompletionDataProvider: update test and add regression
* Formatting
* Completion Data Provider: clear cache when the time range changes
* Completion Data Provider: specifically test for undefined values vs empty string
* Transforms raw US resource into an intermediate IndexableResource and indexes that. Pulls index mapping code out into different file. For now, we will hardcode which spec fields are indexed, per resource.
* Fixes a few bugs with field casing and timestamps not being formatted right (or not existing).
* adds readme section for using search with US
* extracts to function to transform from search hit to IndexedResource
* get folders when building index
* Remove SettingProvider settings from SSO interactions
* Mock Settings Provider for SSO Settings test
* Ignore error from SettingsProvider
* Add test for backend
* start on tokens
* more error messages
* more handling
* rephrased with suggestions from Daniel
* separate gms parse method
* use translation
* refactor initial idea to use error obj
* use error dto result
* handle gms client
* clean logs and comments
* fix tests
* tests for gms
* test and lint
* lint
* one more handling from gms
* typing in fe
* use error interface
* use validation error
* remove unused gms error
* use errorlib and helper function in fe
* regen api
* use same error util
* one more error to handle
* Also validate folder on provisioning update
* Move folder check before auth check
When checking for the existence of a folder we go through the folder
service which requires auth. Doing so prevents an unprivileged user from
accessing information about whether a particular folder exists or not.
* move query library + share buttons to toolbar
* add share text to button
* need spacer when not in singleTopNav
* fix unit tests
* use secondary button styling when singleTopNav is enabled
* Request trace by id using v2, fallback for v1 when 404
* Show partial traces badge in Trace View
* update go work sum
* Fix tests
* some linting
* Fix tests and try to ignore linter
* Move no lint
* nolint:bodyclose
* merge main
* Fix null tags in array
* Fix test
* Update go.sum
* Update go.sum
* Build: Fix docker manifest create not using correct IMAGE_TAG
* Support publishing security versions of NPM packages
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* Use a enable configuration to enable frontend sandbox
* Modify settings to load enableFrontendSandbox
* Check for signature type
* Update commment
* Fix e2e tests for the frontend sandbox
* Modify logic so a custom check function is used instead of a list of checks
* Fixes flaky test
* fix comment
* Update comment
* Empty commit
* Empty commit
* Update texts for gm rr in the form
* fix translations
* Fix test
* address review comments
* address review comments - part2
* translations
* update docs for new term: output
* Rewrite zanzana collector to fetch all available pages
* Register access control as a background service
* If zanzana is enabled we run Syncs and start Reconciliation job
* Update pkg/services/authz/zanzana/client/client.go
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Use server lock when doing performing reconciliation
* start on loading the error code
* error code to message mapping
* use resource code type
* use defined error code
* partial updates from comments
* i18nKey gen
* fixed t
* fixed translations
* typing
* CloudMigrations: create snapshot for Notification Policy
* CloudMigrations: add notification policy constants and components
* CloudMigrations: add uid to resources that have it
* Add streamingEnabled to Tempo ds docs
* Update docs/sources/datasources/tempo/configure-tempo-data-source.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Tidy and update types
* Tidy up comments
* More tidy up
* Simplify logic and reduce repitition in autocomplete
* Simplify logic
* Add and support new intrinsics
* Only retrieve intrinsics from language provider
* Move generateQueryFromFilters to languageProvider
* Initial async
* Set value
* Update story
* Ignore older returned requests
* Add tests
* Update async test
* Support custom value
* Fix ignore late responses test
* Add act to test
* Fix final test
* Remove comment and fix type error
* refactor async story to look more like api call
* allow consumers to pass in a value with a label, for async
* compare story to async select
* Move 'keep latest async value' into seperate hook
* remove null fn from useLatestAsyncCall
* remove commented assertion
* move custom value to top
* before/afterAll & useRealTimers
* create a user
* no useless await
---------
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
* run service account creation DB queries in transaction
* extract the signed in user from the context
* undo unneeded change
* don't error out if a user is not found
* Update pkg/services/serviceaccounts/manager/service.go
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Update pkg/services/serviceaccounts/manager/service.go
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Fixes#94296
* format code
* format code
* remove the timezone
* fix bug
* format code
* update unit test
* modified csv data order
* format code
* delete csv change
* build(webpack): extract css imports into files including node_modules
* feat(webassets): add cssfiles to entrypoint assets for extracted css files
* feat(views): add entrypoint css link tags to html templates
* feat(webassets): set CDN prefix for CSS files
* test(webassets): trim down sample-assets-manifest, fix failing snapshot tests
* Update pkg/api/webassets/webassets_test.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* build(webpack): remove css module loader
---------
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* CloudMigrations: create snapshot for Contact Points
* CloudMigrations: add contact point copies and components in frontend
* CloudMigrations: temporarily use bell for all alerts resources
* feat(frontend): introduce project.json for every workspace to improve caching
* refactor(frontend): use nx tags for grafana dependson
* refactor(frontend): clean up nx tags for packages and plugins
* build(nx): make grafana dependent on cacheable generate icons command
* build(nx): clean up project files
* introduce appPlatformGrpcClientAuth (renamed appPlatformAccessTokens which is not used)
* re-run toggles gen
---------
Co-authored-by: gamab <gabriel.mabille@grafana.com>
* Added Query hints for Prometheus query code editor
* ES Lint fixes
* Remoed displayName from queryEditorHints as it was unused
* Added the logic on button click to difference function
* extracted data to constants from props
* added css style to hints
* Use advanced options when query params are not transformable
* Update public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/QueryAndExpressionsStep.tsx
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Publish event when one or more rules are changed
* Publish affected rules
* Use a fake bus to test publish event without listening
* Wire alerting store into provisioning service
* Combobox: Measure text of longest label for dropdown width
* remove commented out code
* add story to compare to Select
* move magic numbers to constants to reference, and calculate the scrollbar width
* look at first 100,000 items
* Extract shared add to dashboard flow
* Change how we save and add the new panels
* More cleanup
* Began updating tests
* Move and update tests
* set time range
* Fix lint / ts issues
* Fix time history step issue
* fix test
* Update betterer
* remove more tests that are now not needed
* work around cyclic dep
* Update
* Fixes
* fix lint
* remove unused type
* Require create permissions when creating folder
* Test folder create permissions
* Add test for nested folder permissions on creation
* Replace hardcoded verbs
* Remove traceQLStreaming feature flag from docs
* Apply suggestions from code review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Updates from prettier
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
`GuranteedUpdate` method of `apistore.Storage` had a bug, where it would
errorneously conclude that the object is unchanged, in case a
`tryUpdate` function is passed that modifies the existing object itself
(as it is the case in many core types in K8s upstream).
The modified `existingObj` was compared with `updatedObj`, which would
essentially be same and this lead to the update being skipped.
This patch fixes this by always passing a copy of the `existingObj`.
Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
* Use epoch with microsecond resolution as RV
* fix backend tests
* Add solution for when the clock goes back
* Add solution for when the clock goes back
* generate mocks
* go lint
* remove comment
* Use Greatest instead of max in msyql and postgres
* update tests
* Update pkg/storage/unified/sql/sqltemplate/dialect_sqlite.go
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* cast to bigint
* add additional round trip
* increment the RV using 2 sql round trips instead of 3
* cleanup comments
* cast unix timestamp to integer
* fix postgres query
* remove old increment test data
* remove greatest
* cast unix_timestamp to signed
* Use statement_timestamp instead of clock_timestamp
---------
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* refactor: remove FE feat toggle from BE
* refactor: remove FE toggle and adjust roles
* refactor: replace feat toggle in tracking events
* refactor: remove FE feat toggle
* refactor: remove FE feat toggle
* fix: autogenerated file
* ref: pass tracer to plugin factory func
* fix: add tracer to coreplugin
* test: fix test, generate wire
* test: ignore trace field in loader_test
* ref: pass tracer as dependency, don't store in plugin
* ref: wrap tracer with tracer provider to satisfy WithTracerProvider
* ref: use otel trace.Tracer type for tracer
* scenes error when options not set
* add all of the options that are updated in onOptionsChange
* add options to all the other places we are building timeseries panels
* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/percentiles.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* remove activation handlers and unused code
* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/simple.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/percentiles.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Open dashboard list when a scope is selected
* refactor
* test
* remove localstorage key
* add checks on open/close methods
* remove redundant statement
* improve dashboards listing
* Pass parent folder as a contextual tuple in Check request
* Search by listing folders and dashboards
* skip dashboards listing if limit reached
* remove unused
* add some comments
* only add ContextualTuples if parent provided
* Remove parent relation for dashboards from schema and perform separate checks
* resource-api: Loosen name validation to match K8s requirements
This patch modifies some of the requirements for name validation of
objects in Resource API to match Kubernetes.
The limit we have on characters in name is 64, but some resources allow
upto 253 characters. Similarly we also include `:` in the regex, as many
objects in default K8s setup use it in the name (the group
`system:masters` for example)
Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
* Update the name column length in migrator and update e2e test to verify
---------
Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
* Support getting full path of UIDs
* Use full path to set parents field
* Update get folder test
* Add folder store test for getting with full path UIDs
* Add test for parsing parent titles
* Test nested folder create payload
* Update dependency @grafana/scenes to v5.20.0
* bump scenes-react as well
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* wip
* add simple scenes object with logs panel
* return hardcoded log message from runtime ds
* simplify log entry
* use log in links registry
* wired the log together.
* wip
* Connected the extensions log to the runtime datasource to steam logs
* wired the other registies.
* implemented child function.
* set right field type on labels
* set meta type
* using the logger in various places.
* added type of onclick.
* removed time picker.
* removed imports.
* passing log to functions where they are needed.
* moved scene into admin page.
* minor improvement to the message.
* added possibility to update query with values based on the data.
* added filter suppoert.
* wip
* wip
* fixed so extension points are displayed.
* use log level from grafana data
* fixed bugs with the filtering.
* Fixed some logs.
* only register extensions page in development mode.
* fixed filtering.
* added on click debug log.
* PluginExtensions: Add debug log to Grafana (Rewrite to scenes-react) (#93954)
* refactoring.
* simplify it even more.
* Update public/app/features/plugins/extensions/logs/LogViewer.tsx
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
* used VizGridLayout instead of VizGrid component.
* Fixed feedback and fixed bug in filtering logic.
* fixed another nit.
* empty string instead of title.
* Added tests and fixed error.
* added test file.
* regenerated yarn.lock
* Update public/app/features/plugins/extensions/logs/filterTransformation.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* fixed nit.
* more nits.
* added more test cases.
* simplified filtering logic.
* removed unused dep.
* defined broadcast channel in jest setup.
* added tests for datasource.
* fixed failed tests.
* fixed tests.
* fixing go lint issue.
* silent go lint.
* fixed lint issue.
---------
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* adds Filter gRPC and make protobuf
* adds route for querying the filter gRPC
* wires up Filter gRPC call
* [WIP] index from start
* renames gRPC endpoint to "Search"
* adds /apis/search route into k8s routes. Hacky for now.
* updates readme - wrong casing
* adds feature toggle for unified storage search
* hides US search behind feature flag. Clean up print statements.
* removes indexer - will be added in another PR
* Search: Add API Builder
* adds required method
* implementing UpdateAPIGroupInfo (WIP)
* adds groupversion
* commenting out for now
* remove unneeded code from experimenting and update register.go to match interface required
* list resources and load into index
* pass context
* namespaces search route
* lint
* watch
* add todo
* add todo
* merge
* cleanup
* add todo
* gen protobuf
* lint; fix migration issue
* Updates index mapping function to map unified storage object Value
* Changes Index() to pointer receiver - fixes panic
* add delete
* cleanup
* gets search/browse functioning. Results show up as base64 encoded. Still a WIP.
* Doesnt json re-encode gRPC response in search handler
* add kind to SearchRequest proto
* Updates query interface to be more generic. Make proto. Parses query params in api server.
* make protobuf
* removes unused method and imports
* Returns all indexed fields in search results. Adds pagination support (limit + offset).
* remove comment
* remove unused struct
* gets tenant in search k8s api handler
* adds hardcoded spec field mappings - starting with playlists
* adds all spec fields to search results
* moved helper function for field mappings into index
* only includes allowed spec fields in search results
* cleans up error handling
* removes debug log
---------
Co-authored-by: leonorfmartins <leonorfmartins@gmail.com>
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
* Fix detail view not showing instances nor history tab
* small refactor
* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* refactor
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Add parents field to folder DTO
* Allow subfolder creation when folder flag is enabled
* Update UnstructuredToLegacyFolder
* Include parents field when creating folder
* add limit for adhoc filters in providers functions
* add comments to describe function
* return early if filtersVariable is not an instance of AdHocFiltersVariable
* update function comments
* add tests to confirm the providers are limited to 10000
CloudMigrations: create onPremToCloudMigrationsAlerts feature toggle in experimental stage
This feature toggle requires the `onPremToCloudMigrations` toggle to be enabled in order to work.
Given migration of Alerts (and child resources) is more critical, this flag was separated from
the main one.
* use name in fe
* store parent folder name in local db
* clean up
* tiny test
* trial react
* rename to parent name
* go lint
* generate api and ts
* go tests
* rearrange
* clean
* update with suggestions from josh
* make library elements work
* updates from comments
* global migration types
* parent name for alter table
* Revert "Revert "Unistore : Ensure Watch works in HA mode." (#94097)"
This reverts commit 7c3fc2f261.
* make previous_resource_version nullable
* handle nil case
* Generate options for variables through TemplateSrv
* Add refresh when object changes
* Remove unnecesary static function
* Extract logic
* Add extra test case when variable changes and refresh event is triggered
* bring back old logic, query options should not live in the dashboard json
* add missing change
* Add support to keep variable options in query
* tests
* move refreshEvent to DashboardVariableDependency
---------
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* add data provider when switching from non data panel
* handle adding and cleaning up data provider in panel editor on panel switch
* add data provider check sin panel editor tests
* Update dependency @grafana/experimental to v2
* add data-testid to old save button so it works properly in e2e test
* fix azure monitor e2e tests
* use raw selectors
* remove .only
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Plugins: Pass hashes for SRI to frontend
* Add SRI hashes to frontendsettings DTOs
* Add docstring
* TestSriHashes
* Fix typo
* Changed SriHashes to ModuleHash
* update loader_test compareOpts
* update ModuleHash error message
* Add TestModuleHash/no_module.js
* Add omitEmpty to moduleHash
* Add ModuleHash to api/plugins/${pluginId}/settings
* moved ModuleHash field
* feat(plugins): add moduleHash to bootData and plugin types
* feat(plugins): if moduleHash is available apply it to systemjs importmap
* Calculate ModuleHash for CDN provisioned plugins
* Add ModuleHash tests for TestCalculate
* adjust test case name
* removed .envrc
* Fix signature verification failing for internal plugins
* fix tests
* Add pluginsFilesystemSriChecks feature togglemk
* renamed FilesystemSriChecksEnabled
* refactor(plugin_loader): prefer extending type declaration over ts-error
* added a couple more tests
* Removed unused features
* Removed unused argument from signature.DefaultCalculator call
* Removed unused argument from bootstrap.DefaultConstructFunc
* Moved ModuleHash to pluginassets service
* update docstring
* lint
* Removed cdn dependency from manifest.Signature
* add tests
* fix extra parameters in tests
* "fix" tests
* removed outdated test
* removed unused cdn dependency in signature.DefaultCalculator
* reduce diff
* Cache returned values
* Add support for deeply nested plugins (more than 1 hierarchy level)
* simplify cache usage
* refactor TestService_ModuleHash_Cache
* removed unused testdata
* re-generate feature toggles
* use version for module hash cache
* Renamed feature toggle to pluginsSriChecks and use it for both cdn and filesystem
* Removed app/types/system-integrity.d.ts
* re-generate feature toggles
* re-generate feature toggles
* feat(plugins): put systemjs integrity hash behind feature flag
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* Reuse MySQL and Postgres Grafana config instead of the object
- Only reuse the Grafana DB object for SQLite. Support for SQLite will be added in a different PR
- Fail when reusing the Grafana DB object if it is using DB instrumentation
- In the case that we have to reuse a Grafana DB with its instrumentation, fail with an error that describes a workaround
- Add regression tests to reproduce incident 2144
* remove temp file
* fix linter
* fix linter x2
* fix linter x3
* Service account: clean up permissions related to service accounts when deleted
* Add migration for deleting orphaned service account permissions
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* feat: add extensions to the backend plugin model
* feat: update the frontend plugin types
* feat(pluginContext): return a `null` if there is no context found
This will be necessary to understand if a certain hook is running inside a plugin context or not.
* feat: add utility functions for checking extension configs
* tests: fix failing tests due to the type updates
* feat(AddedComponentsRegistry): validate plugin meta-info
* feat(AddedLinksRegistry): validate meta-info
* feat(ExposedComponentsRegistry): validate meta-info
* feat(usePluginComponent): add meta-info validation
* feat(usePluginComponents): add meta-info validation
* feat(usePluginLinks): add meta-info validation
* fix: only validate meta-info in registries if dev mode is enabled
* tests: add unit tests for the restrictions functionality
* tests: fix Go tests
* fix(tests): revert accidental changes
* fix: run goimports
* fix: api tests
* add nested app so that meta data can bested e2e tested
* refactor(types): extract the ExtensionInfo into a separate type
* refactor(extensions/utils): use Array.prototype.some() instead of .find()
* refactor(usePluginLinks): update warning message
* feat(usePluginExtensions()): validate plugin meta-info
* Wip
* fix(e2e): E2E tests for extensions
* fix(extensions): allow multiple "/" slashes in the extension point id
* fix(extensions/validators): stop validating the plugin id pattern
---------
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
* CloudMigrations: create snapshots of Library Elements
* CloudMigrations: render library element resource in resources table
* CloudMigrations: create newtype with necessary fields for library element creation
* Search by query text, pagination
* Support default filtering by active datasource; filter by datasource name; improve table display
* Cleanup
* Fix update and delete url paths
* Fix test
* Use Stack, remove uneccessary function wrapper
* Notify when something is wrong with a row, add interaction tracking
* i18n
* Alerting docs: update that test functionality only for G Alertmanager
* ran prettier
* fixed alphabetical order
* indentation
* format
* all pretty, no pity
---------
Co-authored-by: tonypowa <tonypowa@gmail.com>
In Dashboard Scene:
* Display a warning in the panel header when rendering an angular panel
* Display a warning in the dashboard when rendering one or more angular panels
* Display a button to migrate in the dashboard banner
* Display a button to migrate in the panel editor
* Display a button to "Edit options" when it is an Angular panel, to open the panel JSON inspector to be able to edit the options
* Add tests
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Add folder store to dashboard permissions
* Include folder store in annotation scope resolver
* Add folder store when initialising library elements
* Include folder store in search v2 service initialisation
* Include folder store in GetInheritedScopes
* Add folder store to folder permissions provider
* Include cfg, folder permissions in folder service
* Move setting of folder permissions for folder service create method
* Change the label used for additional app links from apps to more apps so it doesn't conflict with applications, which is application observability, not the other bucket
* update to more apps
* more in german is mehr
* fix case, update translations correctly
* revert changes to de
* fix be tests
---------
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Chore: Update module github.com/rs/cors to v1.11.0
* Fix: rs/cors to v1.11.1 to benefit from fix regarding support for multiple Access-Control-Request-Headers field, e.g. API Gateway
* update go.sum
---------
Co-authored-by: Jo <me@jguer.space>
* Add health fields to rules and an aggregator method to the scheduler
* Move health, last error, and last eval time in together to minimize state processing
* Wire up a readonly scheduler to prom api
* Extract to exported function
* Use health in api_prometheus and fix up tests
* Rename health struct to status
* Fix tests one more time
* Several new tests
* Handle inactive rules
* Push state mapping into state manager
* rename to StatusReader
* Rectify cyclo complexity rebase
* Convert existing package local status implementation to models one
* fix tests
* undo RuleDefs rename
* adds Filter gRPC and make protobuf
* adds route for querying the filter gRPC
* wires up Filter gRPC call
* [WIP] index from start
* renames gRPC endpoint to "Search"
* adds /apis/search route into k8s routes. Hacky for now.
* updates readme - wrong casing
* adds feature toggle for unified storage search
* hides US search behind feature flag. Clean up print statements.
* removes indexer - will be added in another PR
* Search: Add API Builder
* adds required method
* implementing UpdateAPIGroupInfo (WIP)
* adds groupversion
* commenting out for now
* remove unneeded code from experimenting and update register.go to match interface required
* namespaces search route
---------
Co-authored-by: leonorfmartins <leonorfmartins@gmail.com>
Co-authored-by: Todd Treece <todd.treece@grafana.com>
* Style nits for the simple query mode
* update translations
* update text
* update translations
* update disable word to deactivate
* update preview text when not advanced options
* update text
* update text
* Alerting: Decrypt secure settings when testing receivers in the remote Alertmanager
* go work sync
* make update-workspace
* point to latest main in grafana/alerting
* unit test
* import definitions only once
* Replace Watch with WatchNext
* remove watchset
* fix previous page and closing the channel
* Remove the broadcaster cache to prevent dupplicated events
* add watch bookmark
* add watch bookmark
* cleanup comments
* disable the tests for bookmarks for now
* Ensure we send previosu events
* lint
* re-introduce the cache
* load from cache
* disabling legacy test
* disabling legacy test
* Update pkg/storage/unified/resource/server.go
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* Could not read previous events
* add proper migration
* Add previous_resource_version to both history and resource
* First event should have an RV of 2 and not 1
* Test both storage backends
* fix the inital RV for the sql backend
* ensure graceful stop of the stream decoder
* gocyclo
---------
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* Mark Scenes feature toggles as GA
* Move old arch e2e to a new folder
* Run E2E on scenes by default
* Upgrade e2e-selectors to ensure the tests in Playwright works
* Export folder store implementation
* Rename folder store
* Add folder store as a parameter to folder service
* Add folder store to dash service implementation
* Fix folder store comments
* Add showPolicies prop
* Add manage permissions component for easier reuse within alerting
* Add method for checking whether to show access control within alerting
* Remove accidental console.log from main
* Tweak styling for contact point width and add manage permissions drawer
* Improve typing for access control type response
* Add basic test for manage permissions on contact points list
* Only show manage permissions if grafana AM and alertingApiServer is enabled
* Update i18n
* Add test utils for turning features on and back off
* Add access control handlers
* Update tests with new util
* Pass AM in and add tests
* Receiver OSS resource permissions
There is a complication that is not fully addressed: Viewer defaults to read:*
and Editor defaults to read+write+delete:*
This is different to other resource permissions where non-admin are not granted
any global permissions and instead access is handled solely by resource-specific
permissions that are populated on create and removed on delete.
This allows them to easily remove permission to view or edit a single resource
from basic roles.
The reason this is tricky here is that we have multiple APIs that can
create/delete receivers: config api, provisioning api, and k8s receivers api.
Config api in particular is not well-equipped to determine when creates/deletes
are happening and thus ensuring that the proper resource-specific permissions
are created/deleted is finicky.
We would also have to create a migration to populate resource-specific
permissions for all current receivers. This migration would need to be reset so
it can run again if the flag is disabled.
* Add access control permissions
* Pass in contact point ID to receivers form
* Temporarily remove access control check for contact points
* Include access control metadata in k8s receiver List & Get
GET: Always included.
LIST: Included by adding a label selector with value `grafana.com/accessControl`
* Include new permissions for contact points navbar
* Fix receiver creator fixed role to not give global read
* Include in-use metadata in k8s receiver List & Get
GET: Always included.
LIST: Included by adding a label selector with value `grafana.com/inUse`
* Add receiver creator permission to receiver writer
* Add receiver creator permission to navbar
* Always allow listing receivers, don't return 403
* Remove receiver read precondition from receiver create
Otherwise, Creator role will not be able to create their first receiver
* Update routes permissions
* Add further support for RBAC in contact points
* Update routes permissions
* Update contact points header logic
* Back out test feature toggle refactor
Not working atm, not sure why
* Tidy up imports
* Update mock permissions
* Revert more test changes
* Update i18n
* Sync inuse metadata pr
* Add back canAdmin permissions after main merge
* Split out check for policies navtree item
* Tidy up utils and imports and fix rules in use
* Fix contact point tests and act warnings
* Add missing ReceiverPermissionAdmin after merge conflict
* Move contact points permissions
* Only show contact points filter when permissions are correct
* Move to constants
* Fallback to empty array and remove labelSelectors (not needed)
* Allow `toAbility` to take multiple actions
* Show builtin alertmanager if contact points permission
* Add empty state and hide templates if missing permissions
* Translations
* Tidy up mock data
* Fix tests and templates permission
* Update message for unused contact points
* Don't return 403 when user lists receivers and has access to none
* Fix receiver create not adding empty uid permissions
* Move SetDefaultPermissions to ReceiverPermissionService
* Have SetDefaultPermissions use uid from string
Fixes circular dependency
* Add FakeReceiverPermissionsService and fix test wiring
* Implement resource permission handling in provisioning API and renames
Create: Sets to default permissions
Delete: Removes permissions
Update: If receiver name is modified and the new name doesn't exist, it copies
the permissions from the old receiver to the newly created one. If old receiver
is now empty, it removes the old permissions as well.
* Split contact point permissions checks for read/modify
* Generalise getting annotation values from k8s entities
* Proxy RouteDeleteAlertingConfig through MultiOrgAlertmanager
* Cleanup permissions on config api reset and restore
* Cleanup permissions on config api POST
note this is still not available with feature flag enabled
* Gate the permission manager behind FF until initial migration is added
* Sync changes from config api PR
* Switch to named export
* Revert unnecessary changes
* Revert Filter auth change and implement in k8s api only
* Don't allow new scoped permissions to give access without FF
Prevents complications around mixed support for the scoped permissions causing
oddities in the UI.
* Fix integration tests to account for list permission change
* Move to `permissions` file
* Add additional tests for contact points
* Fix redirect for viewer on edit page
* Combine alerting test utils and move to new file location
* Allow new permissions to access provisioning export paths with FF
* Always allow exporting if its grafana flavoured
* Fix logic for showing auto generated policies
* Fix delete logic for contact point only referenced by a rule
* Suppress warning message when renaming a contact point
* Clear team and role perm cache on receiver rename
Prevents temporarily broken UI permissions after rename when a user's source of
elevated permissions comes from a cached team or basic role permission.
* Debug log failed cache clear on CopyPermissions
---------
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
* Fix duplicate command and code format
* Minor adjustment
* add bash to code line
added bash to a code line
* run prettier
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* Extract a helper funtion to perform list with authorization checks
* Add k8s verb to utils package
* Construct default mapping when no custom mapping is passed
* Configure authorization checks for service accounts
* Fix helper and add filtering to service accounts
Update Usage insights logs docs: Scope
As far as I can tell, in https://github.com/grafana/grafana/pull/59931
we started to record Usage Insights events for Explore queries.
And in https://github.com/grafana/grafana/pull/78097 we further improved
our implementation of that logging.
This documentation should have been updated back then to match. So I'm
updating it now.
* chore(packages): bump rollup and rollup plugins to latest
* chore(packages): fix rollup node-externals plugin imports
* chore(packages): update build/bundle scripts to pass configPlugin arg to rollup
* feat(packages): migrate rollup configs to be esm compliant
* feat(packages): build using es2018 target and use same tsconfig and tsc for rollup
* ManagedServiceAccounts: Add a config option to disabled by default
* Update log in pkg/services/extsvcauth/registry/service.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Cloud migrations: store resource name in the cloud_migration_resource table
* remove unused function: convertMigrateDataResponseToDTO
* make swagger-clean && make openapi3-gen
* use DB_Text for cloud_migration_resource.name instead of DB_Varchar
* Add mode switch in Query section
* Implement simple query mode : WIP
* fix logic switching mode
* move guard and get methodd to another folder
* Add more requiremts for being transformable from advanced to not advanced mode
* fix usig mode when it's not a grafana managed alert
* Show warning when switching to not advanced and its not possible to convert
* Add feature toggle alertingQueryAndExpressionsStepMode
* fix test
* add translations
* address PR feedback
* Use form context for sharing simplfied mode used, save in local storage and use the new fields in the api
* add check to valid reducer and threshold when switching to simplified mode
* Use only one expression list
* fix test
* move existing rule check outside storeInLocalStorageValues
* add id in InlineSwitch to handle onClick on label
* fix
* Fix default values when editing existing rule
* Update dto fields for the api request
* fix snapshot
* Fix recording rules to not show switch mode
* remove unnecessary Boolean conversion
* fix areQueriesTransformableToSimpleCondition
* update text
* pr review nit
* pr review part2
* Revert "chore: add replDB to team service (#91799)"
This reverts commit c6ae2d7999.
* Revert "experiment: use read replica for Get and Find Dashboards (#91706)"
This reverts commit 54177ca619.
* Revert "QuotaService: refactor to use ReplDB for Get queries (#91333)"
This reverts commit 299c142f6a.
* Revert "refactor replCfg to look more like plugins/plugin config (#91142)"
This reverts commit ac0b4bb34d.
* Revert "chore (replstore): fix registration with multiple sql drivers, again (#90990)"
This reverts commit daedb358dd.
* Revert "Chore (sqlstore): add validation and testing for repl config (#90683)"
This reverts commit af19f039b6.
* Revert "ReplStore: Add support for round robin load balancing between multiple read replicas (#90530)"
This reverts commit 27b52b1507.
* Revert "DashboardStore: Use ReplDB and get dashboard quotas from the ReadReplica (#90235)"
This reverts commit 8a6107cd35.
* Revert "accesscontrol service read replica (#89963)"
This reverts commit 77a4869fca.
* Revert "Fix: add mapping for the new mysqlRepl driver (#89551)"
This reverts commit ab5a079bcc.
* Revert "fix: sql instrumentation dual registration error (#89508)"
This reverts commit d988f5c3b0.
* Revert "Experimental Feature Toggle: databaseReadReplica (#89232)"
This reverts commit 50244ed4a1.
* feat: add setup guide in home tab
* chore: add feature toggle for setup guide
* chore: add feature toggle for sub menu
* chore: run pretier
* chore: run i18n
* chore: run generated files again
* chore: update description
* chore: update comment to trigger test flow
* chore: trigger test
* chore: fix styling
* New Select: Extratc floating ui setup into hook
* Remove unused exports
* Rename exported floatStyles
* Set maxHeight instead of using js to find it
* Extarct into seperate file
* fix(datasources): add option to avoid adding '-- Grafana --' DS
Currently the `getList` method of `DatasourceSrv` adds the
'-- Grafana --' datasource in the majority of situations, unless a few
of the other filters are set, all of which affect the results in other
ways. This is the case even if the `filter` function is passed.
This causes the `DataSourcePicker` component to include the
'-- Grafana --' datasource in cases it's unsupported, such as in
Grafana ML where we only support specific datasource types.
This commit adds a new optional `grafana` field to the filter interface.
If explicitly set to `false`, the '-- Grafana --' datasource will not be
added to the list of datasources returned.
This should be backwards compatible and should allow developers to prevent
that datasource from appearing in the `DataSourcePicker`.
Relates to https://github.com/grafana/machine-learning/issues/4578.
* Use filter func to see if we should add '-- Grafana --', instead
* Add separate folder registration function
* Convert to k8s resource directly after legacy create
* Use create command when creating folders
* Set additional fields when converting to k8s resource
* Add created/updated timestamps during conversion
* Refactor UnstructuredToLegacyFolderDTO
* Return errors when doing k8s conversions
* WIP: working as expected, has to be tested
* Rename query param, small changes
* Remove unused code
* Address feedback
* Cleanup
* Use the feature toggle to control the behaviour
* Use the toggle on the FE too
* Prevent the extra redirect/reload
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
* Return to login if user is not authenticated
* Add tracking issue
* Align BE redirect constructor to locationSvc
* Options pane, data pane queries tab and transformations tab working
* Update
* Discard works
* Panel inspect working
* Table viw works
* Repeat options
* Began fixing tests
* More tests fixed
* Progress on tests
* no errors
* init full width when enabling repeat
* Began moving VizPanelManager tests to where the code was moved
* Unlink libray panel code and unit test
* Fixes and unit tests for change tracking and resetting original state and dirty flag when saving
* migrating and improving unit tests
* Done with VizPanelManager tests refactoring
* Update
* Update
* remove console.log
* Removed unnesssary behavior and fixed test
* Update
* Fix unrelated test
* conditional options fix
* remove
* Fixing issue with editing repeated panels and scoping variable to first value
* Minor fix
* Fix discard query runner changes
* Review comment changes
* fix discard issue with new panels
* Add loading state to panel edit
* Fix test
* Update
* fix test
* fix lint
* lint
* Fix
* Fix overrides editing mutating fieldConfig
---------
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
* Pass one
* Fix linter and add new betterer problem (sorry)
* fix swagger
* Add type to tests and update single correlations sql
* Fix provisioning test and other function that needs a type
* Add errors around query/external typing and add tests
* increment number of correlations tested as we added one for testing v1 type placement
* try merging back the swagger that is in main
* try again?
* Style form a little
* Update public/app/features/logs/components/logParser.ts
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* fix bad commit, simplify logic
* Demonstrating type difficulties
* Fix distributed union changes
* Additional type changes
* Update types in form
* Fix swagger
* Add comment around the assertion and explicit typing
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
* Update Yarn to v4.5.0
* commit new version
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Add authlib gRPC authenticators for in-proc mode
* implement `StaticRequester` signing in the unified resource client
- [x] when the `claims.AuthInfo` value type is `identity.StaticRequester`, and there's no ID token set, create an internal token and sign it with symmetrical key. This is a workaround for `go-jose` not offering the possibility to create an unsigned token.
- [x] update `IDClaimsWrapper` to support the scenario above
- [x] Switch to using `claims.From()` in `dashboardSqlAccess.SaveDashboard()`
---------
Co-authored-by: gamab <gabriel.mabille@grafana.com>
* Annotations: Optimize search on large number of dashboards
* refactor
* fix batch size
* Return early if no annotations found
* revert go.mod
* return nil in case of error
* Move default limit to the API package
* fix empty access control filter
* Set default limit to 100
* optimize query when number of annotations is less than limit
* Update pkg/services/annotations/annotationsimpl/annotations.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* remove limit from store since it's set in API
* set default limit in Find method (do not break tests)
* Only add limit to the query if it's set
* use limit trick for all searches without dashboard filter
* set default page if not provided
---------
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* update 'Simplified exploration' page
* removed extra 'Explore' heading, which is a little confusing in this context
* simplified the intro text to sound more like the rest of the docs
* Update docs/sources/explore/simplified-exploration/_index.md
Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
---------
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
* fix: keep extra datapoint before new 'from' when evicting datapoints in incremental query cache
* remove redundant comments
* Update todo
* move prometheus specific code in a new function
* add unit test
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Unexport store and create new constructor function
* Add ResourceAuthorizer and LegacyAccessClient
* Configure checks for user store
* List with checks if AccessClient is configured
* Allow system user service account to read all users
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Managed Service Accounts: Use AutoAssignOrgID
* Fix the IsExternalServiceAccount function
* Reassign service account role
* Account for AutoAssignOrg
* Update pkg/services/serviceaccounts/models.go
* Simplify IsExternalServiceAccount function
* Add tests
* Easier to understand test
* Revert small change
* refactor breakdown scene
* refactor BreakdownScene along with LayoutSwitcher
* rename
* don't pass default layout
* better type handling
* betterer
* add @bsull/augurs
* implement LabelBreakdownScene
* integrate SortByScene in LabelBreakdownScene
* move to new directory
* introduce BreakdownSearchScene
* integrate searchScene
* cleaning
* initialize @bsull/augurs
* add interaction
* use new breakdown scene
* resolve merge conflicts
* ugrade @bsull/augurs
* update import
* update css
* update tooltip text
* refine sorting
* fix unit test
* fix
* implement outlier detector
* support wasm
* jest testing fix
* localization fix
* use unknown instead of any
* update i18n
* update betterer
* fix locales
* update test
* fix tests maybe
* prettier
* chore: update jest config
* chore: create mock for @bsull/augurs (#92156)
chore: create mock for bsull/augurs
@bsull/augurs assumes it will be running as an ESM, not
a CommonJS module, so can't be loaded by Jest (specifically
because it contains a reference to import.meta.url).
This PR provides a mock implementation which gets tests passing
again.
Ideally we'd be able to load the actual @bsull/augurs module
in tests so this is just a stopgap really, until a better
solution appears.
* fix unit tests
* remove unused BreakdownScene.tsx
* set outliers as undefined if an error occurs
* Add labels
* betterer
* reset event implemented
* fix controls positioning
* remove sorting
* fix type guard
* more clean up
* remove wasm support from webpack
* betterer
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ben Sully <ben.sully@grafana.com>
* if result format is null from previous query, it will be null and not correct to a different format
* update to not have empty value in result format field
* fix tests
* add check to see if options are in list
* reformat stuff so logic lives on the right layer
* linterrrrrrrrrrrrrrrrrrRR
* Apply suggestions from code review
* if result format is null from previous query, it will be null and not correct to a different format
* update to not have empty value in result format field
* fix tests
* add check to see if options are in list
* reformat stuff so logic lives on the right layer
* linterrrrrrrrrrrrrrrrrrRR
* frontend linter
* linter
* feedback :)
* feat: supporting code for groupsync extension UI
* Add result of running i18n extraction
* Place the UI behind a feature toggle as well as the license feature
* Also add access checks to route loading of groupsync route with feature toggle
* Add access check on permissions to show External group sync in nav
* fix: New version of multiOrgRoleOptions hook
* Remove OSS route definition
* Apply feedback on nav title
* add OTel filter in metric select scene
* add resource query to get matching OTEL job&instance
* filter metrics by OTEL resources
* only add otel select if DS has OTEL matching job and instance
* add folder for otel resources
* upate metric select for new otel folder
* move otel api call
* get otel resources for labels for single series job/instance target_info
* add otel resources to adhoc variable dropdown
* update otel api to check for standardization and return labels
* label types for api
* check standardization, show otel variable, select depenv, update other variables
* remove otel target list from metric select scene
* load resources if dep_env label has already been selected
* exclude previously used filters
* do not check standardization if there are already otel filters
* drop filters when switching data sources
* add experience var for switching to otel experience
* remove otel from variables and place near settings
* add error for non-standard prom with otel resources
* fix typescript errors, remove ts-ignores
* add custom variable for deployment environment like app-olly
* fix name of otel variable
* add function for getting otel resources from variables
* add otel join query const
* update standard check to be simpler
* allow for unstandard otel data sources but give warning
* add otelJoinQuery to the base query and clean up variables when state changes
* refactor otel functions to return filters for targets, use targets to filter metrics
* update metric names on otel target filter change
* when no otel targets for otel resource filter, show no metrics
* move switch to settings, default to use experience, refactor otel checks
* clean code
* fix refactor to add hasOtelResources for showing the switch in settings
* sort otel resources by blessed list
* reset otel when data source is changed
* move otel experience toggle back outside settings
* move showPreviews into settings
* do not re-add otel resources from blessed list to filters when already selected
* add otel join query variable to histogram base query
* only show settings for appropriate scenes
* show info tooltip the same but show error on hover for disabling otel exp for unstandard DS
* refactor tagKeys and tagValues for otel resources variable, fix promoted list ordering, fix dep env state bug
* default dep env value
* apply var filters only where they are using VAR_FILTER_EXPR in queryies
* change copy for labels to attributes
* do not group_left job label when already joining by job
* update copy for label variable when using otel
* remove isStandard check for now because of data staleness in Prometheus
* default to showing heatmap for histograms
* add trail history for selecting dep env and otel resources
* add otel resource attributes tests for DataTrail
* move otel functions to utils
* write tests for otel api calls
* write tests for otel utils functions
* fix history
* standard otel has target_info metric and deployment_environment resource attributes
* fix tests
* refactor otel functions for updating state and variables
* clean code
* fix tests
* fix tests
* mock checkDataSourceForOtelResources
* fix tests
* update query tests with otelJoinQuery and default to heatmap for _bucket metrics
* fix tests for otel api
* fix trail history test
* fix trail store tests for missing otel variables
* make i18n-extract
* handle target_info with inconsistent job and instance labels
* fix otel copy and <Trans> component
* fix custom variable deployment environment bug when switchiing data sources from non otel to otel
* fix linting error for trans component
* format i18nKey correctly
* clean up old comments
* add frontend hardening for OTel job and instance metric list filtering
* fix test for deployment environment custom variable to use changeValueTo
* fix i18n
* remove comments for fixed bug
* edit skipped tests
* DashboardScene: Fixes preserve dashboard state for hidden options
* DashboardScene: Alt fix for pervering only specific url keys
* DashboardScene: Fixes url sync issue when coming from Home route
* Update
* Fix test
* Parameterise region building metric namespace URL
- Add parameter for region (this parameter takes precedence over if global is set)
- Update tests
- Support this parameter on the data source method
* Refactor fetchAllNamespaces
- Use Set rather than an array for greater performance
- Request namespaces across WestEurope, EastUS, and JapanEast concurrently
- Update test
* Maintain existing behaviour
* Add: http docs for lbac for datasources
* spelling
* update with only cloud loki
* rename to lbac for datasources
* moved it
* Update _index.md
This commit fixes minor style and punctuation issus
* change datasource to data source
* replace datasource with data source
minor updates and style fixes
* minor style changes
* prettier
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* update RenameReceiverInNotificationSettings in DbStore to check for provisioning
* implement renaming in receiver service and provisioning
* do not patch route when stitching
* fix bug in stitching because it returned new name but the old one was expected
* update receiver service to always return result converted from storage model this makes sure that UID and version are consistent with GET\LIST operations
* use provided metadata.name for UID of domain model because rename changes UID and request fails
* remove rename guard
* update UI to not disable receiver name when k8s api enabled
* create should calculate uid from name because new receiver does not have UID yet.
* Fix parse of
* Add i18n files
* Add default value
* Replace input field with multiselect
* rename delete form function
* Use Controller for MultiSelect
* feat(plugin.json): update the extensions definition schema
* feat(plugin.json): add `exposedComponents` definition to the dependencies
* feat(plugin.schema.json): add descriptions for the new schema fields
* review: wrap extensions related dependencies
* review: add a pattern for the extension point id
* review: add a min-length to added link & component titles
* add a pattern to the exposed component id
* Chore: use github app for issue commands workflow
* use it in issue-opened too
* update comments and permissions
* use issue app for triager token
* add spaces
* add config as requirement
* only run main if it has secrets
* Check for repository name,
* remove config work
* get secrets after sleep
* Fix panels in rows stuck in loading
* fix
* fix + tests
* force reperform in case All value is selected and actual options change
* bump scenes so tests pass
* redo yarn.lock
* redo yarn.lock
* Display event name of a span
* Clean up
* Retrigger the build
* Show colon only when there are fields to display
* Rollback
* Use event name when exporting to OTLP
* Allow filtering spans by event name
* Remove redundant types
* Remove redundant TraceLog
* Update betterer report
* Include access control metadata in k8s receiver List & Get
* Add tests for receiver access
* Simplify receiver access provisioning extension
- prevents edge case infinite recursion
- removes read requirement from create
* Alerting: Fix dasboardUid typo in json provisioning api
The json tag for DashboardUID was incorrectly set to dasboardUid in the provisioning api. This change fixes the typo while keeping backwards compatibility for the typo.
* Add alerting-squad as CODEOWNER for services/provisioning/alerting
* introduce storage model for alert rule tables
* remove AlertRuleVersion from models because it's not used anywhere other than in storage
* update historian xorm store to use alerting store to fetch rules
* fix folder tests
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
* Transformations: Binary operation on all numbers
* Handle replaceFields option
* Change left clear out to string
* Handle time field
* Fix filtering
* Update new field names to remove double space
* Add tests
* Add BinaryValue interface and update editor
* Fix initial behavior
* Rollback rendering standards
* Add ctx interpolate
* Fix fixed value variable
* Add function to convert old binary value type
* Update tests for new structures
* Add bullet for all number field option
* baldm0mma/run content build script
* Disable alias control for type matching
* Add group and type labels to rule_group_rules metric
* Don't include group to avoid high cardinality
* Add comments
* Reset rule_group_rules before recording new values
* Edit description for rule_group_rules
* Include ruleGroup combo key in labels
* Fix lint
* only updateable plugins can be updated via the UI
* add missing state
* Apply levi brains
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* apply same style throughout
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Add initial folder tests
* Add test for get/reading folders
* Compare legacy and k8s create and read
* Remove dependency on grafanaAPIServerWithExperimentalAPIs
* Alerting docs: adds recording rule info
* ran prettier
* Updates with feedback from pepe and removes external reference
* couple of minor edits
* removes reference
* feedback from sonia
* adds links per gilles
* adds correct version link
Back-end:
* update alerting module
* update GetSecretKeysForContactPointType to extract secret fields from nested options
* Update RemoveSecretsForContactPoint to support complex settings
* update PostableGrafanaReceiverToEmbeddedContactPoint to support nested secrets
* update Integration to support nested settings in models.Integration
* make sigv4 fields optional
Front-end:
* add UI support for encrypted subform fields
* allow emptying nested secure fields
* Omit non touched secure fields in POST payload when saving a contact point
* Use SecretInput from grafana-ui instead of the new EncryptedInput
* use produce from immer
* rename mapClone
* rename sliceClone
* Don't use produce from immer as we need to delete the fileds afterwards
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
* allow post URL
* check for config
* allow relative paths
* add allowed internal pattern; add checks for method
* update defaults.ini
* add custom header
* update config comment
* use globbing, switch to older middleware - deprecated call
* add codeowner
* update to use current api, add test
* update fall through logic
* Update pkg/middleware/validate_action_url.go
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update pkg/middleware/validate_action_url.go
Co-authored-by: Dan Cech <dcech@grafana.com>
* add more tests
* Update pkg/middleware/validate_action_url_test.go
Co-authored-by: Dan Cech <dcech@grafana.com>
* fix request headers
* add additional tests for all verbs
* fix request headers++
* throw error when method is unknown
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Brian Gann <bkgann@gmail.com>
Co-authored-by: Brian Gann <briangann@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
* Export Combobox and add portalling
* Use floatingui fixed strategy and fix z-index
* Check non null
* Make value string type only
* Try with fiscal year setting
* Use combobox for WeekStartPicker
* Improve screen reader handling
* Fix faulty import
* Fix type issue
* Fix failing tests and export unstable
* Rename option and remove export
* Use comboboxMockSetup function
* Add support for number type
* menuClosed styles to emotion
* fix(plugins): resolve loadPluginCss urls for filesystem and cdn hosted plugins
* fix(plugins): should a registry lookup fail in getLoadPluginCssUrl fallback to relative path
* refactor(plugins): rename var to id for legibility
* test(plugins): add some extra test cases for getLoadPluginCssUrl function
Update to explain grafana_net is older and grafana_com is the preferred config name. However, grafana_net config is still accepted and parsed to grafana_com config.
* feat: add a context for the extension registries
* feat: add a provider for registries to `AppWrapper`
* feat(extensions): add a read-only registry version
* feat: share the registry for exposed components using the context
* fix: tests
* feat: share the registry for added components using the context
* feat: share the addedLinks registry using react context
* use read-only registry versions
* send "one-of" and "not-one-of" directly to datasource (instead of changing them to regex)
* Added to Ad-hoc and and Scope Filters: The "values" prop ([]string) and the "one-of" and "not-one-"of" operators. "values" is used with one-of and not-one-of.
* adds prometheus support for the above
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Todd Treece <todd.treece@grafana.com>
* Add split view and basic APIs to extensions
* Add comments
* Update public/app/AppWrapper.tsx
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Moved the .grafana-app element and deduplicate some code
* Remove the provider variants of usePluginLinks/Components
* Change buildPluginSectionNav
* Update comment
* Use eventBus
* Remove non existent exports
* refactor: use a sidecar service to encapsulate the state
* Don't wrap single app in split wrapper
* Use hook splitter
* Remove inline styles
* Type the style props from useSplitter
* Move the overflow style changes to appWrapper
* Deduplicate some common top level providers
* Move modals
* Move routes wrappers to it's own file
* Use better css and add comments
* Remove query rows app extension point
* Fix test
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* do it all
* feat(plugins): move loadingStrategy to ds pluginMeta and add to plugin settings endpoint
* support child plugins and update tests
* use relative path for nested plugins
* feat(plugins): support nested plugins in the plugin loader cache by extracting pluginId from path
* feat(grafana-data): add plugin loading strategy to plugin meta and export
* feat(plugins): pass down loadingStrategy to fe plugin loader
* refactor(plugins): make PluginLoadingStrategy an enum
* feat(plugins): add the loading strategy to the fe plugin loader cache
* feat(plugins): load fe plugin js assets as script tags based on be loadingStrategy
* add more tests
* feat(plugins): add loading strategy to plugin preloader
* feat(plugins): make loadingStrategy a maybe and provide fetch fallback
* test(alerting): update config.apps mocks to include loadingStrategy
* fix format
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* Update `refs` links in `Service accounts` to enable the Cloud docs
* Update `refs` links in `Migrate API keys` to enable the Cloud docs
* Update `refs` links in `RBAC docs` to enable the Cloud docs
* 2 - Update `refs` links in `RBAC docs` to enable the Cloud docs
* 3 - Update `refs` links in `RBAC docs` to enable the Cloud docs
* Apply Jack suggestions
* Set `folder permissions` for OSS and Cloud
* Set adminition shortcode to support GC ref links
* Fix `//` in URLs
* Remove usage of traceqlStreaming feature toggle and stop checking for Tempo version
* Increase Grafana Live's ClientQueueMaxSize to 4mb to support larger responses from Tempo
* Add GroupMApping component
* Add remove/add buttons
* Implement role fields
* Change value as number for org ids
* Add i18n extracts
* Use conditional for GrafanaAdmin switch
* Ensure changelogs are prettified prior to commit
* Remove cache property
* Include .yarn directory
* Include packages directory
* Try just using npx
* Update workflows
* Hide some fields in the details tab (view page) when it's a grafana recording rule
* link to the explore view from the metric name in the detail view
* Revert "link to the explore view from the metric name in the detail view"
This reverts commit 3c17d16cf6.
* move logic to usePendingPeriod hook
* move logic to getPendingPeriod function
* move logic for getting annotations to a new getAnnotations function
* Access control: Use composite cache key for team permissions
* use composite key for teams
* use cache for hotpath (getCachedUserPermissions)
* don't cache empty teams set
* don't pass permissions as argument
* early return if no teams found
* reload cache correctly
* optimize allocations
* Clear user's teams cache
* remove composite cache for teams
* fix linter
* don't clear teams permissions
* pre-allocate memory for basic roles permissions
* chore(frontend): remove stray side-effect features import that brings the whole jungle
* chore(app): delete features/all.ts and its friends
* chore(codeowners): remove public/app/features/all.ts from file
* Display event name of a span
* Clean up
* Retrigger the build
* Show colon only when there are fields to display
* Rollback
* Use event name when exporting to OTLP
* Allow filtering spans by event name
* Show duration as a key/value pair
* Update betterer report (we do not translate panels that are planned to be externalized)
* Fix tests after changing how duration is rendered
* Handle long names
* Test handling long names
* Make parenthesis gray
* Fix a test
* Fix linting
* Fix tests
* Update label
* refactor: replace soft delete method
* refactor: adjust test to new naming
* refactor: clean up unused functions
* refactor: replace delete modal
* refactor: use new delete modal outside of scenes
* Display custom value in option list
* Ignore create new value when there is an exact match
* Support displaying custom value
* Add i18n string
* Update failing test
* update view panel scene variables properly after row repeat is performed
* refactor
* Fix case where view mode from panel menu would not work
Co-authored-by: ivanortegaalba <ivan.ortega@grafana.com>
* add context
---------
Co-authored-by: ivanortegaalba <ivan.ortega@grafana.com>
* DashboardGridItem: Fixes repeating panels issue when variable depends on time range
* tests
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* update the docs to reflect permissions needed to create subfolders
* Minor language fix
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* handle oneOf operator in prometheus
* use new supportsMultiValueOperators
* remap oneOf to regex in prometheus datasource
* Remap one of operators for scope filters
* use plugin.json property instead of feature toggle
* optional chaining
* fix unit tests
* use getInstanceSettings
* update to latest scenes
* fix unit tests
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Remove kubernetesPlaylists feature_toggle
* Remove unified_storage_mode
* Remove double import
* Read from config instead from feature_toggle
* cover scenario for when unified storage is not defined
* Be temporarily retro compatible with previous feature toggle
* Properly read unified_storage section
* [WIP] Read new format of config
* Fix test
* Fix other tests
* Generate feature flags file
* Use <group>.<resource> schema
* Use <group>.resource format on the FE as well
* Hide UniStore config from Frontend
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* unwanted changes
* Use feature toggles in the FE. Enforce FTs are present before enabling dual writing
Co-authored-by: Ryan McKinley <ryantxu@users.noreply.github.com>
* use kubernetes playlists feature toggle on the FE
* Remove unwanted code
* Remove configs from the FE
* Remove commented code
* Add more explicit example
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Maicon Costa <maiconscosta@gmail.com>
* IAM docs: Transform `API keys` to `Migrate API keys` docs
* Update links to `API keys` in other doc pages
* Grafana UI: update help button link
* Update OpenAPI/Swagger links
* Update docs/sources/administration/service-accounts/migrate-api-keys.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update `relref` links to the new URL
* fix space before em dash
spaces before or after em dashes are not recommended (https://developers.google.com/style/dashes)
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* Docs: keep the HTTP API list updated
* Update menu title to be consistent with the HTTP API list
* Update docs/sources/developers/http_api/preferences.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/developers/http_api/snapshot.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Alerting docs: add info on changing default time out for evaluation
* ran prettier
* Update docs/sources/alerting/fundamentals/alert-rule-evaluation/state-and-health.md
Co-authored-by: antonio <45235678+tonypowa@users.noreply.github.com>
* Update docs/sources/alerting/fundamentals/alert-rule-evaluation/state-and-health.md
Co-authored-by: antonio <45235678+tonypowa@users.noreply.github.com>
* ran prettier
* updates with yuris feedback
* ran prettier
---------
Co-authored-by: antonio <45235678+tonypowa@users.noreply.github.com>
* Stop redacting receivers by default in receiver_svc
[REDACTED] is only used in provisioning API since response doesn't include
SecureFields. This is not necessary in k8s or notifications api, instead we do
not include the encrypted settings in Settings at all, leaving it to
SecureFields to specify when a secure field exists.
* Capitalize logs messages
* Ensure that datasource apiservers receive and forwards headers for datasources:
- adds log line for prometheus to see when from alert header is received
- add logging to the datasource apiserver
- Updates the Connect func in sub query to forward expected headers to datasources and log unexpected ones.
* Adding information about datasource UID enforcement
* Style and content fixes (#92667)
This fixes:
- datasource to data source as per our style guide
- some other minor typos
- style and content
* fixing prettier lint
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* use count_bytes_reader from plugin-sdk-go
* run `make update-workspace`
* update postgres tests
* update mysql tests
* time back to utc
* make update-workspace done
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com>
* Restructure user queries
* restructure display query
* restructure team queries
* restructure team bindings query
* Restructure team members
* Restructure store
* Add team members as a sub resource
* Fix and clean up pagination for teams
* Fix and clean up pagination for users
* Fix and clean up pagination for service accounts
* Update snapshots
* Provide the list of admins if the admin with the default ID was not found
* Clean up
* Update docs
* Update docs/sources/cli.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update pkg/cmd/grafana-cli/commands/reset_password_command.go
Co-authored-by: Dan Cech <dcech@grafana.com>
* Lint
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
* model fixed roles for dashboards and folders
* Correctly translate fixed role assignments
* minor refactor
* assign fixed roles to teams
* fix linter errors
* Migrate general folder permissions for fixed roles
* fix dashboards:create permission
* feat(plugins): only load shared plugin dependencies when needed
* feat(plugins): add react-redux and fix up comments
* feat(plugins): attempt to load async deps in fe sandbox
* feat(frontend): defer script execution to prevent systemjs from loading app.js
* fix(datalinks): position context menu offest to vertical window scroll
* feature toggle change
* enhance boot data mock with empty featureToggles
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Access control: Use composite cache key for team permissions
* use composite key for teams
* use cache for hotpath (getCachedUserPermissions)
* fix linter
* fix sorting
---------
Co-authored-by: Jeff Levin <jeff@levinology.com>
* add uid to template and populate it
* update delete method to support both uid and name
* update UpdateTemplate to support search by UID and fallback to name + support renaming of the template
* update upsert to exit if template not found and uid is specified
* update Get method to address by name or uid
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
* Replace global authz abstraction with one compatible with uid scope
* Replace GettableApiReceiver with models.Receiver in receiver_svc
* GrafanaIntegrationConfig -> models.Integration
* Implement Create/Update methods
* Add optimistic concurrency to receiver API
* Add scope to ReceiversRead & ReceiversReadSecrets
migrates existing permissions to include implicit global scope
* Add receiver create, update, delete actions
* Check if receiver is used by rules before delete
* On receiver name change update in routes and notification settings
* Improve errors
* Linting
* Include read permissions are requirements for create/update/delete
* Alias ngalert/models to ngmodels to differentiate from v0alpha1 model
* Ensure integration UIDs are valid, unique, and generated if empty
* Validate integration settings on create/update
* Leverage UidToName to GetReceiver instead of GetReceivers
* Remove some unnecessary uses of simplejson
* alerting.notifications.receiver -> alerting.notifications.receivers
* validator -> provenanceValidator
* Only validate the modified receiver
stops existing invalid receivers from preventing modification of a valid
receiver.
* Improve error in Integration.Encrypt
* Remove scope from alert.notifications.receivers:create
* Add todos for receiver renaming
* Use receiverAC precondition checks in k8s api
* Linting
* Optional optimistic concurrency for delete
* make update-workspace
* More specific auth checks in k8s authorize.go
* Add debug log when delete optimistic concurrency is skipped
* Improve error message on authorizer.DecisionDeny
* Keep error for non-forbidden errutil errors
* WIP
* Validate new field, and add value in provisioning if not defined in correct spot
* Simplify logic, use correct value
* fix tests
* Fix linter errors
* fix swagger and tests
* 😬
* Auto-generation isnt doing this..
* Fix linter
* test if nullable is the issue…
* Change structure on the frontend fields
* Try with backtick
* try programatic quoting
* Try only quote non-ints
* quoting, no backticks
* Remove debugging
* Use dag to find origin nodes when updating resample queries
Co-authored-by: Gilles De Mey <gilles.demey@grafana.com>
* lint
* fix test and types
* short-circuit function
* Prevent cycles in DAG
* Handle dag cycle error
* Catch the cyclic link error in dashboard variables
---------
Co-authored-by: Gilles De Mey <gilles.demey@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* build test apps with webpack
* add extensions test app
* update e2e tests
* remove non-build test apps using amd
* use @grafana/plugin-configs rather than create-plugin config
* Update e2e/plugin-e2e/plugin-e2e-api-tests/as-admin-user/extensions/usePluginComponents.spec.ts
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* Update package.json
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* use run dir variable instead of hardcoded path
* add dummy licence file
* add separate step for building test plugins
* support nested plugins
* remove react-router-dom from the externals array
* remove add_mode dev
* lint starlark
* pass license path as env variable
* fix the path
* chore(e2e-plugins): clean up dependencies to match core versions
* refactor(e2e-plugins): prefer extending webpack plugins-config
* docs(e2e-plugins): add basic info to extensions test plugin readme
* update readme
* change dir name from custom plugins to test plugins
* change root readme
* update lockfile
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* feat(nameHeaders): add feature flag
* add safe parsing of headers
* use headers in loki datasource
* Loki: add option to pass headers to Loki
* Loki: add datasource tests for dashboard names
* cleanup
* DataSourceWithBackend: add test
* rename to `sanitizeHeader`
* Loki: add condition when to add headers
* Loki: add e2e tests
* Loki: change test name
* feat: Add new read filtering to datasources guardian
* Apply suggestion to use datasources read guardian check for frontend settings
---------
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* revert buildLayout
* filter metric names using metricPrefix using regex
* build groups with all the metric names and only build them once
* remove commented code
* use the metrics search input results to build the prefix select options
* simplify prefix regex because we do not have to do it at the same time as the metrics search input regex
* chore: add tracing to quote API and service methods with contexts
I also fixed a typo (overriden -> overridden) and removed a method that looked like it wasn't useful anymore. (It seemed to exist to return an error, but never returned an error, and so just added many lines of unnecessary error checking).
* chore: Bump Go to 1.23.0
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* update swagger files
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* chore: update .bingo/README.md formatting to satisfy prettier
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* chore(lint): Fix new lint errors found by golangci-lint 1.60.1 and Go 1.23
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* keep golden file
* update openapi
* add name to expected output
* chore(lint): rearrange imports to a sensible order
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Alerting docs: separates doc on create alerts from panels
* deletes previous panel section
* adds time series limitation and play link
* removes play from old topic
* ran prettier
* removed play shortcode, typo
* adds feedback from gilles
---------
Co-authored-by: tonypowa <tonypowa@gmail.com>
* fix public dashboards pages when publicDashboardsScene is enabled
* properly handle react-grid-layout at small screen sizes
* use unset instead of auto
* chore: add spans to publicdashboards service methods
* add tracing to test service
* test fixture whackamole
* move tracer to a package var
* Update pkg/services/publicdashboards/service/service.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
---------
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* DashboardScene: Support remember scroll position when coming back from view panel, panel edit and settings
* remove unused state prop
* Update
* Fixes
* Update e2e
* Page/Body: Only show scrollbar lane gutter when needed
* Update packages/grafana-ui/src/themes/GlobalStyles/elements.ts
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
- Note: The `dashboardTitle` property and this property (`groups`) are likely to move from the `spec` container to the `status` container within the `scopeDashboardBinding` object in the future.
* feat: add folder picker
* feat: run i18n extraction
* feat: add target folder to api query
* feat: hand over targetFolder data to api query
* feat: retrieve original location
* feat: Add condition for folder picker
* feat: Modify condition for folder picker default
* refactor: add changes from code review
* refactor: add changes from code review
* feat: add plural to translation, add styling
* feat: run i18n extraction
* update oauthtoken service to use remote cache and server lock
* remove token cache
* retry is lock is held by an in-flight refresh
* refactor token renewal to avoid race condition
* re-add refresh token expiry cache, but in SyncOauthTokenHook
* Add delta to the cache ttl
* Fix merge
* Change lockTimeConfig
* Always set the token from within the server lock
* Improvements
* early return when user is not authed by OAuth or refresh is disabled
* Allow more time for token refresh, tracing
* Retry on Mysql Deadlock error 1213
* Update pkg/services/authn/authnimpl/sync/oauth_token_sync.go
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update pkg/services/authn/authnimpl/sync/oauth_token_sync.go
Co-authored-by: Dan Cech <dcech@grafana.com>
* Add settings for configuring min wait time between retries
* Add docs for the new setting
* Clean up
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
---------
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* started updates
* added descriptions
* changed some wording
* minor updates
* updates
* updates
* created new landing page, and the get started page
* finished creating landing page
* continued with restructure
* final edits
* updated the Explore landing page
* ran prettier
* Update docs/sources/explore/get-started-with-explore.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/explore/get-started-with-explore.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/explore/get-started-with-explore.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/explore/get-started-with-explore.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/explore/get-started-with-explore.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/explore/get-started-with-explore.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/explore/get-started-with-explore.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/explore/get-started-with-explore.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* updates based on Jack's feedback
* ran prettier a second time
* wording change on landing page
* removed uncommented section
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Progress
* Fix dashboards pane
* almost working
* add hook to get scopesDashboardsScene state
* check whether it's enabled when considering opened state
* add height to container
* Update
* revert change
* Make it work when bodyScrolling is disabled
* Last tweaks
* Update scenes
* Updating
* Fix
* fix tests
* fix lint issues
* fix lint issues
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add more doc info for truncate function and how we use it
* truncate label names and allow users to search all labels on typing
* remove unused import
* handle labels select in variable query in addition with truncated list
* add RenameTimeIntervalInNotificationSettings to storage
* update dependencies when the time interval is renamed
---------
Co-authored-by: William Wernert <william.wernert@grafana.com>
* add a limit for the series resource api in metrics browser
* decouple serieslimit from options and only use in metrics browser
* add series limit input to metrics browser
* add warning
* add and fix tests
* add new param to jsdoc
* do not use the limit in other calls outside metrics browser
* update test
* trim limit
* fix tests, remove limit from non labels calls
* backendResultTransformer: use templateSrv to highlight search words from variables
* Add unit tests
* Formatting
* Fix import issues
* Update public/app/plugins/datasource/loki/backendResultTransformer.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Refactor: use executedQueryString to get the interpolated query
* Remove unused imports
* Update public/app/plugins/datasource/loki/backendResultTransformer.test.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* pkg/tsdb/parca: Upgrade to using the flamegraph arrow
* pkg/tsdb/parca: Delete code for old flamegraphs
* pkg/tsdb/parca: Fix golangci-lint error in test
* pkg/tsdb/parca: Handle errors nicely
* docs/sources/datasource: Add Parca v0.19+ support note
* pkg/tsdb/parca: Don't use arrow table reader
As pointed out during reviews, it's not really needed and we can read the record directly.
* LogsNavigation: show older logs button when the order is descending
* LogsNavigation: adjust styles for showing only older logs button
* Logs Navigation: revert changes
* Infinite scroll: add older logs button
* Older logs button: show only in explore
* chore: add unit test
* Formatting
* Update public/app/features/logs/components/InfiniteScroll.test.tsx
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Chore: add missing translation
* Chore: move the button a tiny bit
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Alerting: Fix duplicated silences in remote primary mode bug
* test that a new silence id returned by calling CreateSilence() on the internal Alertmanager is ignored
* Add missing dependency to Dockerfile
Add aggregator dependency to Dockerfile, fix the issue #91871.
* Add defaults.ini to Dockerfile, add bash for alpine
* add OpenID metadata URL field
* add i18n generated content
* configure server discovery URL in a modal
* remove getValues
* address feedback
* update field name to OpenID Connect Discovery URL
* add well-known suffix to the URL provided
* address feedback
* add isLoading state to ServerDiscoveryField
* bump version 11.3.0-pre
* fix linters with: yarn run prettier:write
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* WIP
* Finish getting form to populate
* WIP API
* Get PUT to work although the edit doesnt apply yet
* Complete working PUT
* PATCH v1 no json patch
* This works!
* Fix headers to be configurable
* Fix translations
* Revert "This works!"
This reverts commit d57ffcbc4b.
# Conflicts:
# public/app/features/query-library/api/factory.ts
# public/app/features/query-library/api/query.ts
# public/app/features/query-library/types.ts
* Use normal method of patching 😅
* Replace add to library form with generic version
* make translations generic
* Rename function, fix bad conflict resolution
* LogsPanelCfg: add displayedFields
* LogsPanel: expose displayedFields
* Chore: add docs
* LogsPanel: add callbacks to external API
* LogsPanel: expose field callbacks and add default implementation
* chore: add unit test
* chore: unfocus test
* LogsPanel: add docs for new props
* Enable by default
* Cloud migrations: GetSnapshotList only returns snapshots that belong to a session that exists
* Cloud migrations: test GetSnapshotList
* add one more test case for GetSnapshotList
* fix test
* store encryption key for testing
* Alerting: Add rule_group label to grafana_alerting_rule_group_rules metric (#62361)
* Alerting: Delete rule group metrics when the rule group is deleted
This commit addresses the issue where the GroupRules metric (a GaugeVec)
keeps its value and is not deleted when an alert rule is removed from the rule registry.
Previously, when an alert rule with orgID=1 was active, the metric was:
grafana_alerting_rule_group_rules{org="1",state="active"} 1
However, after deleting this rule, subsequent calls to updateRulesMetrics
did not update the gauge value, causing the metric to incorrectly remain at 1.
The fix ensures that when updateRulesMetrics is called it
also deletes the group rule metrics with the corresponding label values if needed.
* PluginDetailsRight panel is added. All the details were moved from the top to the right panel
* Add feature toggle pluginsDetailsRightPanel,Fix build, fix review comments
* Fix the typo
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
* hasAccessToExplore
* changes after review, add translations
* fix betterer
* fix betterer
* fix css error
* fix betterer
* fix translation labels, fix position of the right panel
* fix the build
* add condition to show updatedAt for plugin details
* add test to check 2 new fields at plugin details right panel;
* change the gap and remove report abuse button from core plugins
* add more tests
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
Adds myself as an additional codeowner for issue templates given the current reliance on ordering for links to request a new plugin from Grafana.
This may be a temporary solution prior to being able to raise the requests natively within Grafana.
* Refactor identity struct to store type in separate field
* Update ResolveIdentity to take string representation of typedID
* Add IsIdentityType to requester interface
* Use IsIdentityType from interface
* Remove usage of TypedID
* Remote typedID struct
* fix GetInternalID
* Remove kubernetesPlaylists feature_toggle
* Remove unified_storage_mode
* Remove double import
* Regenerate feature-toggles
* Read from config instead from feature_toggle
* cover scenario for when unified storage is not defined
* Handle namespace and group query string params in Ruler API
* Use the new namespace and group query params when slashes in names
* Add validation, add group handling in GMA Api
* Move constants
* Use checkForPathSeparator function
* Fix linter issue
* Bump to go-duck v0.1.0
This fixed ordering of the columns
**What is this feature, why do we need it?**
See https://github.com/scottlepp/go-duck/pull/14 for a description of the improvement we're including here
**Who is this feature for?**
Anyone who uses SQL Expressions. This is still an experimental feature, and only used by a very small number of instances.
* Run `make update-workspace`
* add simple test apps that use usePluginComponent hook and exposeComponent api
* add e2e test
* update readme
* Update README.md
* fix lint issue
* pr feedback
* support optimistic concurrency in template service
* update request handler to get version from query parameter
* return not found if a new template is set with version
* update PUT api to set version
* update documentation + for mute timings
---------
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* Feature (quota service): Use ReplDB for quota service Gets
This adds the replDB to the quota service, as well as some more test helper functions to simplify updating tests. My intent is that the helper functions can be removed when this is fully rolled out (or not) and we're consistently using the ReplDB interface (or not!)
* test updates
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
- [ ] It works as expected from a user's perspective.
- [ ] If this is a pre-GA feature, it is behind a feature toggle.
- [ ] The docs are updated, and if this is a [notable improvement](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-release-notes/#how-to-determine-if-content-belongs-in-a-whats-new-document), it's added to our [What's New](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-release-notes/) doc.
- [ ] The docs are updated, and if this is a [notable improvement](https://grafana.com/docs/writers-toolkit/contribute/release-notes/#how-to-determine-if-content-belongs-in-whats-new), it's added to our [What's New](https://grafana.com/docs/writers-toolkit/contribute/release-notes/) doc.
@@ -28,3 +28,83 @@ try to cherry-pick the PR merge commit into that branch and open a PR. You must
If there are merge conflicts the bot will write a comment on the source PR saying the cherry-pick failed. In this case you have to do the cherry pick and backport PR manually.
The backport logic is written [here](https://github.com/grafana/grafana-github-actions/blob/main/backport/backport.ts)
## Auto triager bot
The auto triager bot is a github action that **assigns** labels to issues based on the issue contents. The logic to assign
labels is its own program and lives [here](https://github.com/grafana/auto-triager). It uses an LLM to do this.
The bot runs **every time** a new issue is opened in the grafana/grafana repository. You can find the bot definition [here](https://github.com/grafana/grafana/blob/main/.github/workflows/issue-opened.yml#L61)
The job only assign labels when the issue author is not a member of the Grafana organization in **GitHub**. The bot concurrency is 1.
This bot is not responsible for assigning teams, the [commands](https://github.com/grafana/grafana/blob/main/.github/workflows/commands.yml) workflow is responsible for doing that
### General diagram
```mermaid
sequenceDiagram
actor User
participant GH as GitHub
participant AT as Auto Triager Job
participant ATP as Auto Triager Program
participant LLM as LLM Service
participant CJ as Commands Job
User->>GH: Opens Issue
GH->>GH: Check if user in Grafana org
alt User not in Grafana org
GH->>AT: Trigger Auto Triager Job
AT->>ATP: Execute program
ATP->>LLM: Send issue content & categories
LLM-->>ATP: Return matching categories
ATP-->>GH: Assign labels to issue
GH->>CJ: Trigger Commands Job
CJ->>CJ: Read commands.json
CJ-->>GH: Assign teams based on labels
end
```
### Team definitions
The team associated with labels are defined [here](https://github.com/grafana/grafana/blob/main/.github/commands.json).
This bot is not responsible for assigning teams, the [commands](https://github.com/grafana/grafana/blob/main/.github/workflows/commands.yml) workflow is responsible for doing that.
The commands workflow code can be found [here](https://github.com/grafana/grafana-github-actions/tree/main/commands)
### Categories/Labels definitions
The categories (or labels) and the types used to categorize issues are defined in this same repository [here](https://github.com/grafana/grafana/tree/main/.github/workflows/auto-triager) the [prompt](https://github.com/grafana/grafana/blob/main/.github/workflows/auto-triager/prompt.txt) that is passed to the LLM is also defined there.
If you are adding a new category in the auto-triager repository you must define a team that owns the label in the
If you remove a label from the [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json) and it doesn't have any other
team associated with it you must remove it from the [labels file](https://github.com/grafana/grafana/blob/main/.github/workflows/auto-triager/labels.txt)
### Secrets
The bot secrets live in the vault. It uses a [shared workflow](https://github.com/grafana/shared-workflows/tree/main/actions/get-vault-secrets) to get the vault secrets, the
workflow requires a token with `contents:read` and `id-token:write` scopes for it to work.
### How to detect the bot is working?
The list of [unlabeled issues](https://github.com/grafana/grafana/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) should remain empty as long as the bot is running.
There might be issues in the list if some team member removed all labels, but if the list grows to more
than 5 it is likely the bot is not working correctly.
### What to do if this bot is not working?
You can contact the plugins platform team in slack `#grafana-plugins-platform` and inform about the issue.
### Troubleshooting
Possible reasons why the bot is not working:
* The OpenAI API key is not valid anymore. The action output will show this in its error log. A new key needs to be
generated via the OpenAI UI and its value updated in vault. See [the action](https://github.com/grafana/grafana/blob/main/.github/workflows/issue-opened.yml#L72) to find the correct path to
update the key.
* The Slack webhook URL is not valid anymore. The action output will show this in its error log or the
#triage-automation-ci channel will stop showing messages about issue triaging. A new slack webhook url needs to be
generated for the auto triager app and its value updated in vault.
* This bot is not responsible for assigning teams, the [commands](https://github.com/grafana/grafana/blob/main/.github/workflows/commands.yml) workflow is responsible for doing that
"comment":" please add one or more appropriate labels. Here are some tips:\r\n\r\n- if you are making an issue, TODO, or reminder for yourself or your team, please add one label that best describes the product or feature area. Please also add the issue to your project board. :rocket:\r\n\r\n- if you are making an issue for any other reason (docs typo, you found a bug, etc), please add at least one label that best describes the product or feature that you are discussing (e.g. `area/alerting`, `datasource/loki`, `type/docs`, `type/bug`, etc). [Our issue triage](https://github.com/grafana/grafana/blob/main/ISSUE_TRIAGE.md#3-categorizing-an-issue) doc also provides additional guidance on labeling. :rocket:\r\n\r\n Thank you! :heart:"
"comment":" please add one or more appropriate labels. Here are some tips:\r\n\r\n- if you are making an issue, TODO, or reminder for yourself or your team, please add one label that best describes the product or feature area. Please also add the issue to your project board. :rocket:\r\n\r\n- if you are making an issue for any other reason (docs typo, you found a bug, etc), please add at least one label that best describes the product or feature that you are discussing (e.g. `area/alerting`, `datasource/loki`, `type/docs`, `type/bug`, etc). [Our issue triage](https://github.com/grafana/grafana/blob/main/contribute/ISSUE_TRIAGE.md#3-categorize-an-issue) doc also provides additional guidance on labeling. :rocket:\r\n\r\n Thank you! :heart:"
Since you've added the `Add to what's new` label, consider drafting a [What's new note](https://admin.grafana.com/content-admin/#/collections/whats-new/new) for this feature.
You are provided with a Grafana issue. Your task is to categorize the issue by analyzing the issue title and description to determine the most relevant category and type from the provided lists. Focus on precision and clarity, selecting only the most pertinent labels based on the issue details. Ensure that your selections reflect the core problem or functionality affected.
The output should be a valid JSON object with the following fields:
* id (string): The ID of the current issue.
* categoryLabel (array of strings): The category labels for the current issue, emphasizing key terms and context.
* typeLabel (array of strings): The type of the current issue, emphasizing clarity and relevance.
**Instructions**:
1. **Contextual Analysis**: Understand the context and intent behind the issue description. Analyze the overall narrative and relationships between different components within Grafana. Consider dependencies and related components to inform your decision.
2. **Category and Type Differentiation**: Use language cues and patterns to differentiate between similar categories and types. Provide examples and counterexamples to clarify distinctions. Prioritize primary components over secondary ones unless they are critical to the issue.
3. **Historical Data Utilization**: Compare current issues with past resolved issues by analyzing similarities in problem descriptions, leveraging patterns to inform categorization. Use historical data to recognize patterns and inform your decision-making.
4. **Confidence Scoring**: Implement a confidence scoring mechanism to flag issues for review if the confidence is below a predefined threshold. Clearly indicate thresholds for high and low confidence predictions. Provide clarifying questions if data is ambiguous.
5. **Feedback Loop Integration**: Integrate feedback from incorrect predictions to refine understanding and improve future predictions. Conduct error analysis to identify patterns in misclassifications and adapt your approach accordingly.
6. **Semantic Analysis**: Evaluate the underlying intent of the issue using semantic analysis, considering broader implications and context. Leverage metadata or historical patterns to improve accuracy.
7. **Avoid Over-Specification**: Maintain precision and conciseness, avoiding unnecessary details. Prioritize clarity and flag for further review if uncertain.
8. **Consistent JSON Formatting**: Ensure the output maintains a consistent JSON structure with uniform formatting for readability and scalability.
**Next Steps and Insights**:
- Suggest potential next steps or resources that could help address the issue, providing actionable insights to enhance user engagement.
- Regularly test responses against edge cases to ensure robustness and adaptability.
- Stay updated with changes in category and type lists to remain current.
Provide a brief explanation of the categorization decision, highlighting key terms or context that influenced the choice. Use user-centric language and technical details to ensure the explanation is comprehensive and insightful.
{pkg="io/ioutil",desc="Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details."},
{pkg="gopkg.in/yaml.v2",desc="Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available"},
{pkg="github.com/pkg/errors",desc="Deprecated: Go 1.13 supports the functionality provided by pkg/errors in the standard library."},
{pkg="github.com/xorcare/pointer",desc="Use pkg/util.Pointer instead, which is a generic one-liner alternative"},
{pkg="github.com/gofrs/uuid",desc="Use github.com/google/uuid instead, which we already depend on."},
{pkg="github.com/bmizerany/assert",desc="Use github.com/stretchr/testify/assert instead, which we already depend on."},
]
[linters-settings.depguard.rules.coreplugins]
deny=[
{pkg="github.com/grafana/grafana/pkg/api",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/cmd",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/cuectx",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/extensions",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/kinds",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/middleware",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/modules",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/registry",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/services",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/build",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/codegen",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/events",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/ifaces",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/kindsysreport",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/mocks",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/plugins",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/setting",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/util",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/bus",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/components",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/expr",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/infra",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/login",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/models",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/server",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/tests",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/web",desc="Core plugins are not allowed to depend on Grafana core packages"},
{pkg="github.com/grafana/grafana/pkg/tsdb/intervalv2",desc="Core plugins are not allowed to depend on Grafana core packages"},
]
files=[
"**/pkg/tsdb/grafana-pyroscope-datasource/*",
"**/pkg/tsdb/grafana-pyroscope-datasource/**/*",
"**/pkg/tsdb/grafana-testdata-datasource/*",
"**/pkg/tsdb/grafana-testdata-datasource/**/*",
"**/pkg/tsdb/azuremonitor/*",
"**/pkg/tsdb/azuremonitor/**/*",
"**/pkg/tsdb/cloud-monitoring/*",
"**/pkg/tsdb/cloud-monitoring/**/*",
"**/pkg/tsdb/mysql/*",
"**/pkg/tsdb/mysql/**/*",
"**/pkg/tsdb/parca/*",
"**/pkg/tsdb/parca/**/*",
"**/pkg/tsdb/tempo/*",
"**/pkg/tsdb/tempo/**/*",
"**/pkg/tsdb/cloudwatch/*",
"**/pkg/tsdb/cloudwatch/**/*",
]
[linters-settings.depguard.rules.apiserver]
list-mode="lax"
allow=[
"github.com/grafana/grafana/pkg/apimachinery",
"github.com/grafana/grafana/pkg/apiserver",
]
deny=[
{pkg="github.com/grafana/grafana/pkg",desc="apiserver is not allowed to import grafana core"}
]
files=[
"**/pkg/apiserver/*",
"**/pkg/apiserver/**/*"
]
[linters-settings.depguard.rules.apimachinery]
list-mode="lax"
allow=[
"github.com/grafana/grafana/pkg/apimachinery",
]
deny=[
{pkg="github.com/grafana/grafana/pkg",desc="apimachinery is not allowed to import grafana core"}
]
files=[
"**/pkg/apimachinery/*",
"**/pkg/apimachinery/**/*"
]
[linters-settings.depguard.rules.promlib]
list-mode="lax"# allow unless explicitely denied
deny=[
{pkg="github.com/grafana/grafana/pkg",desc="promlib is not allowed to import grafana core"}
]
allow=[
"github.com/grafana/grafana/pkg/promlib"
]
files=[
"**/pkg/promlib/*",
"**/pkg/promlib/**/*"
]
[linters-settings.gocritic]
enabled-checks=["ruleguard"]
[linters-settings.gocritic.settings.ruleguard]
rules="pkg/ruleguard.rules.go"
[linters-settings.misspell]
ignore-words=["Unknwon","Creater"]
[linters-settings.nakedret]
max-func-lines=60
[linters]
disable-all=true
# try to keep this list sorted, please
enable=[
"asciicheck",
"bodyclose",
"depguard",
"dogsled",
"errcheck",
"errorlint",
"exhaustive",
"exportloopref",
# "gochecknoinits",
# "goconst",
# "gocritic", # Temporarily disabled on 2022-09-09, running into weird bug "ruleguard: execution error: used Run() with an empty rule set; forgot to call Load() first?"
"gocyclo",
"goimports",
"goprintffuncname",
"gosec",
"gosimple",
"govet",
"ineffassign",
"misspell",
"nakedret",
"prealloc",
"revive",
"staticcheck",
"stylecheck",
"unconvert",
"unused",
"whitespace",
]
# Disabled linters (might want them later)
# "unparam"
# "rowserrcheck" # The linter doesn't detect that both Scan and Close also returns the error message returned by Err.
[issues]
exclude-use-default=false
max-same-issues=0
# Enable when appropriate
# Poorly chosen identifier
[[issues.exclude-rules]]
linters=["stylecheck"]
text="ST1003"
# Enable when appropriate
# Dot imports that aren't in external test packages are discouraged.
[[issues.exclude-rules]]
linters=["stylecheck"]
text="ST1001"
# Enable when appropriate
# http.CloseNotifier has been deprecated since Go 1.11 and an alternative has been available since Go 1.7: We currently need it in pkg/web/response_writer.go.
[[issues.exclude-rules]]
linters=["staticcheck"]
text="SA1019: http.CloseNotifier"
# strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly.
# Use golang.org/x/text/cases instead.
[[issues.exclude-rules]]
linters=["staticcheck"]
text="SA1019: strings.Title"
# go.opentelemetry.io/otel/exporters/jaeger" is deprecated: This module is no longer supported. OpenTelemetry dropped support for Jaeger exporter in July 2023.
# Jaeger officially accepts and recommends using OTLP.
# Use [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp] or [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc] instead.
// NewCheckMetadata creates a new CheckMetadata object.
funcNewCheckMetadata()*CheckMetadata{
return&CheckMetadata{}
}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.