* [explore] lookup datasource by name when present in legacy compact URLs
* update unit test
* prettier fix
---------
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
* Reduce number of request fetching rules in the dashboard view using rtkq
* Fix UnifiedAlertStatesWorker work
* refactor ungroupRulesByFileName
* Address review comments and fix test
* fix DashboardQueryRunner test
* Fix tests
* Update AlertStatesDataLayer to use RTKQ
* Fix PanelAlertTabContent test
* Fix PanelAlertTabContent test after adding RTKQ
* fix test and address PR review comments
* Update useCombinedRuleNamespaces to have both dashboardUID and panelId as optional params and rename the hook
* Address review pr comment
* remove test about template variables
* Use poll interval in useCombinedRules
* set selected config type before save
* use effect once and move in mssql
* add to prom
* Update ConfigurationEditor.tsx
* Update ConfigurationEditor.tsx
* Delete public/app/plugins/datasource/mssql/configuration/ConfigurationEditor.tsx
* omadsfdsa
* remove unneeded assign
* MixedDataSource: Support multi value data source variable
* go work sync
* fix typo
* if it is not interpolated use the actual uid
* Update tests
* prettier
* go work sync
* add more unit test case
* Update tests to use scene variables
* merge main
* Update
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* I18n: Change verify-i18n script to use node_deb image with make in it
* remove swagger from i18n make
* make verify-i18n fail ci
* fix incorrect and unextracted nav translations
* fix more copy paste
* wip filtering
* Remove corresponding children from parentlessItem ref on register
* wip filtering
* Remove corresponding children from parentlessItem ref on register
* Highlighting filters
* OMG
* Handle updating highlight field inside context
* Toggling legend from the content outline
* Support multiple selects for log filters in content outline
* Remove commented out code
* Fix an issue with loki datasource; use same datastructure for logsVolume in Logs and LogVolume panel
* Fix registering logic
* cleanup
* Don't register outline items when having multiple log volume levels
* Remove checking mergeSingleChild logic because in context because ContentOutline does it
* Fix logic so it works for elasticsearch
* Better logic
* Add log color and sort
* Show items at full opacity
* Remove commented sort
* Do not highlight if all are selected, and highlight = 100% opacity, active = 30%
* dont auto collapse after filter unselect
* Remove console logs
* No partial opacity, add height for consistent display
---------
Co-authored-by: Piotr Jamroz <pm.jamroz@gmail.com>
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
* update plugin install filter to show all by default
* make pretty
* remove aria-label on lock icon
* wip: attempt to fix overflow
* switch to stack, add aria label back for testing
* make pretty
* switch to TextLink
* remove learn more link from catalog
* add hover text
* docs: update plugin install to reflect state filter change
* Revert "docs: update plugin install to reflect state filter change"
This reverts commit 16222aee0b.
* Only let nodeGraph frames process through nodeGraph
* add metadata to test frames to be processed
* Revert "add metadata to test frames to be processed"
This reverts commit fc366a0ab4.
* Revert "Only let nodeGraph frames process through nodeGraph"
This reverts commit b8be50e219.
* Only send node graph frames to node graph logic
* remove unnecessary logic
* Loki: Add label values API selector to setting and use label_values API when selected
* remove CHANGELOG change
* add docs
* Support Loki 2.7+ only, so unconditionally use /labels API
* Correct doc for fetchLabels and fetchLabelValues functions
* Fixes after merge
* Do not encode query parameter twice
* return getLabelKeys in Completion Provider
* docs
* Add test for LabelParamEditor
* Update public/app/plugins/datasource/loki/LogContextProvider.test.ts
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* toHaveBeenCalledWith
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* fix: reloaded scene first step topScene
The top scene was not being initialized
when reloading trails, causing it to use
the top scene of whatever was selected
previously.
* fix: select new metric node not reloading right
On reloading trails, any metric node that
was 'green' with a undefined metric due to
clicking on the "select new metric" button,
was reloading with the metric of the step
directly before it (in index order).
* fix: opt-in to `useQueriesAsFilterForOptions`
With updating the scenes library, dashboards must now explicitly
opt in to `useQueriesAsFilterForOptions`.
* fix: loaded trails modified parent var on new step
This ensures that recently loaded trails won't have variable changes
which create new steps modify the previous step.
* Update Yarn to v4.2.1
* add new yarn version
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Add reqAction to Prometheus routes
This should allow provisioned service accounts that do not have a role to use the /proxy endpoints for Prometheus. This
is desired for some integrations that need to query for labels or other data not part of /ds/query.
* Create basic structure PanelDataQueriesTab unit test
* Add more test cases to the PanelDataQueriesTab test
* Update public/app/features/dashboard-scene/panel-edit/VizPanelManager.tsx
* fix(plugins): fetch strategy should always be used for css/json/wasm/html
* refactor(plugins): prefer checking for js file type rather than list of other file types
* - Added migration to add a new collumn UID to both migration and migration_run tables.
- Added migration to set UID for records already existent in the database before adding a new column.
- Added UID field to CloudMigration and CloudMigrationRun dtos (model.go)
* Fix db migration
* Updating store and model
* Updating API to use UID
* fix typo
* update openapi specs and generated endpoints
* fix spec
* update openapi specs and generated endpoints
* Fixing db mapping
* Fix frontend
* fix migration
* remove migration uid from run fetch endpoint
* Revert "merge"
This reverts commit d654e4c530, reversing
changes made to 5fe0b483eb.
* manual merge
* rename some funcs for consistency
* make interfaces consistent
* validate uids
* update generated frontend api
* fix enterprise spec
* manually resolve api
* try again
* try yet again
* once more
---------
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
* CloudWatch: Fix metric query with group by not being labelled in alerts
* just use one key for the labels
* not needed
* unused function
* add tests
* pr comments
* fetch dimensions to build labels for MetricQuery type queries
* pr comments
* group cache related tests and use fresh cache for non-cache related tests
* don't cache empty values
* Add mock method for getting a plugin
* Update tests to find "more" button via label
* Remove test for Silence action in rule details
* Unify alert rule actions to pull from same place
* Restore behaviour of only showing incident button when firing
* Fix identifier and pause permission/logic
* Remove TODO comment related to refactor
* Update snapshot for useAbilities
* Undo optional param
* Rename alert rule menu hook to component
* Refactor hook to component
* Rename Rule action buttons component
* Chore: update style syntax for RuleDetails
* Add tests for refactored alert rule menu
* Only re-fetch Grafana managed alerts after pausing/resuming
* Remove console log and check for extensions
* Improve share rule generation of GMA rules
* Rename component
* Update action
* Refactor plugins and fix tests
* lint
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Canvas: Connection original persistence check
* modify current connection state directly instead of copying and needing to call "onChange"
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
This is not ideal! Preference would be to have a more robust mock server
that responds to the received silence and appends it to a stateful list for the test
and then resets afterwards
TemplateSrv.replace takes an optional 'interpolations' argument which
records information about the variables which were found during the
interpolation. Until [this Scenes PR][scenes PR] this wasn't supported
by Scenes so the interpolations argument was being ignored if dashboard
scenes were enabled. This commit bumps the scenes version and passes
the interpolations array along to the scenes function.
[scenes PR]: https://github.com/grafana/scenes/pull/708
* fix: persistence trail detection, save on unload
- fixes detection on bookmarks and recents when current step isn't final
- now save current trail on browser close or reload (unload)
- refresh page or return to URL that corresponds to a recent trail will
resume that trail instead of creating a duplicate recent trail
- do not create a recent trail out of an empty starting trail
* fix: bookmarks status after making new step
- clone bookmark trail state to prevent it from being changed by user
- re-evaluate bookmark status after creating new step
* fix: interpolate "explore metrics" from panels
---------
Co-authored-by: Darren Janeczek <darren.janeczek@grafana.com>
* fix: remove support for legacy dashboard
- simplify code
- take advantage of scenes dashboard async and datasource api object
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* DataTrails: Exploring alternatives to history issues
* incorporated unit tests from #86817 and #86741
---------
Co-authored-by: Darren Janeczek <darren.janeczek@grafana.com>
* Dashboards: Migrate from aria-label e2e selectors to data-testid
* more changes
* addPanelwidget
* Test: Update .betterer.results
* refactor: fix e2e tests
* refactor: fix failing test
* refactor: update plugin-e2e after adding selector changes to the packege
---------
Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: Laura Benz <laura.benz@grafana.com>
* feat(plugins): introduce logic to selectively load fe plugins via script tags
* feat(plugins): extend cache to store isAngular flag. use isAngular in shouldFetch
* revert(plugins): remove unused prepareImport from SystemJSWithLoaderHooks type
* fix(plugins): cache[path] maybe undefined if not registered or invalidated
* Update public/app/features/plugins/plugin_loader.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* measure scene load time
* Fix tests that fail due to performance not being the proper global performance object in jest
* add isScene parameter to tracking test
* Create basic feature toggle
* Rename context to reflect it contains query history and query library
* Update icons and variants
* Rename hooks
* Update tests
* Fix mock
* Add tracking
* Turn button into a toggle
* Make dropdown active as well
This is required to have better UI and an indication of selected state in split view
* Update Query Library icon
This is to make it consistent with the toolbar button
* Hide query history button when query library is available
This is to avoid confusing UX with 2 button triggering the drawer but with slightly different behavior
* Make the drawer bigger for query library
To avoid confusion for current users and test it internally a bit more it's behind a feature toggle. Bigger drawer may obstruct the view and add more friction in the UX.
* Fix tests
The test was failing because queryLibraryAvailable was set to true for tests. This change makes it more explicit what use case is being tested
* Remove active state underline from the dropdown
* Allow closing Query Library drawer from the toolbar
* Simplify dropdown design
* feat: add a reactive extension registry
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: add hooks to work with the reactive registry
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: start using the reactive registry
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "command palette" extension point to use the hook
* feat: update the "alerting" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "explore" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "datasources config" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "panel menu" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "pyroscope datasource" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "user profile page" extension point to use the hooks
* chore: update betterer
* fix: update the hooks to not re-render unnecessarily
* chore: remove the old `createPluginExtensionRegistry` impementation
* chore: add "TODO" for `PanelMenuBehaviour` extension point
* feat: update the return value of the hooks to contain a `{ isLoading }` param
* tests: add more tests for the usePluginExtensions() hook
* fix: exclude the cloud-home-app from being non-awaited
* refactor: use uuidv4() for random ID generation (for the registry object)
* fix: linting issue
* feat: use the hooks for the new alerting extension point
* feat: use `useMemo()` for `AlertInstanceAction` extension point context
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Show list of labels on the alert rule form in a more visual way, and use a modal for managing them
* fix test
* Fix more tests
* Show orange badge when no labels are selected
* Remove unused datasource property in LabelsField
* Remove unused div and add comment
* Use button instead of icon for editing labels
* Use subform for labels
* Move logic fetching labels from different places in a separate hook
* Fix tests
* remove unused getLabelInput const in test
* Add ellispis and tooltip for long labels and move labels list in modal to the bottom
* Use text instead of badge when no using labels
* Fix tests after adding ellipsis and tooltip to the labels
* simplify styles
* Fix fetching values from gops when new key is used
* Address pr review comments
* Address pr review comments part2
* Fix tag on rtkq
* Remove color for no labels selected text
* Disable already used keys in the labels sub form
* Fix typo
* use the UseFieldArrayRemove type from react-hook-form
* Update some styles and text in the labels modal
* Address some review comments (nits)
* Address review comments part1
* Move logic getting labels in useCombinedLabels hook
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* FE Sandbox: Fix worker post message not handling proxy objects correctly
* use expect error instead of ignore
* use assertion instead of ignore
* Fix formatting
* Render current MegaMenu link as `aria-current=page`
* Add overrides capability for mega menu links
* Pass pageNav into getActiveItem so we can use override capability
* Test MegaMenu special cases for starred & dashboards
* Test that overrides for megamenu util works correctly
* Alpha-sort megamenu overrides
* Refactor util for getting active item for megamenu
Update parameters to getActiveItem
Update tests for getActiveItem
* Fix test for starred dashboard and remove query param test
Query param case happens differently in real app and is fiddly to test here
* handle edge cases
* restore handling home page test
* fix dashboard settings
* handle starring properly
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* apply empty state in a bunch of places
* fix unit tests
* put alert back on top
* add data-testids so e2e tests keep working
* remove info boxes
* fix annotations empty state alignment with new maxWidth