* 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>
* Create basic structure PanelDataQueriesTab unit test
* Add more test cases to the PanelDataQueriesTab test
* Update public/app/features/dashboard-scene/panel-edit/VizPanelManager.tsx
* Add failing tests for timezone handling
* Fix `DateTimePicker.tsx` timezone handling
- Resolves `onBlur` issue
- Resolve Calendar and TimeOfDay issues
- Update test to cover different timezone
* Handle `console.warn` in test
* Handle `console.warn` in test #2
* Better handling of invalid date
When parsing date string with `dateTime`, adding a second `formatInput` aids in both parsing the actual string and avoid `console.warn` when `moment` reverts to be using `Date`.
* add more test cases
* Ash/proposed changes (#86854)
* simplify
* only need this change
* formatting
* const > let
* add test to ensure calendar is always showing the matching day
* separate state
* undo story changes
* update util function comments
* fix for selecting date in the calendar
---------
Co-authored-by: Ashley Harrison <ashley.harrison@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>
* 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>
* Fix issue
* Prettier
* codeincarnate/image-table-fix/ lint
* Make linter happy by using div with role of button + improve a11y
---------
Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* Add timezone selector to Storybook toolbar
So that it's possible to preview how components that are using date functions, behave when timezone differs from browser/client.
* Re-order imports
* Update @lezer/lr to v1.4.0
* Update @prometheus-io/lezer-promql to v0.37.0
* Update @prometheus-io/lezer-promql to v0.38.0
* Update @prometheus-io/lezer-promql to v0.39.0
* Update @prometheus-io/lezer-promql to v0.40.0
* add jest config
* update code
* fix code to pass "handles things" test
* fix retrieving labels
* fix code to pass "handles label values" test
* fix code to pass "simple binary comparison" test
* use BoolModifier
* add changed lines as comments
* fix for ambiguous query parsing tests
* resolve rebase conflict
* fix retrieving labels, aggregation with/out labels
* add error
* fix comment
* fix "reports error on parenthesis" unit test
* fix for "handles binary operation with vector matchers" test
* fix for "handles multiple binary scalar operations" test
* fix for "parses query without metric" test
* fix indentation and import style
* remove commented lines
* add todo items and comments
* remove dependency update from tempo datasource
* apply same changes in core prometheus frontend
* prettier
* add new test case
* use old version of lezer in the root package.json
* Revert "apply same changes in core prometheus frontend"
This reverts commit 83fd6ac7
* fix indentation
* use latest version of lezer-promql v0.51.2
* Update packages/grafana-prometheus/src/querybuilder/parsing.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* enable native histogram test
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Canvas: Fix division by zero
* Fix last add vertex control
* Apply fix to existing vertices
* Apply deltas to temporary paths
* Persist original source and target coorindates
* Add follow up TODO
* Update connection svg to handle originals
* Get rid of minimum constraints for deltas
* Apply persist coordinate system to vertex handlers
* Consolidate and rename selected value
* Update connection arcs to use new coordinates
* fix editor crashing with scenes
---------
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
* Add section and use Text component to get h2 for panel
* Remove heading when collapsible
* Make button text truncate
* Update test
* Remove labelledby as it is not needed anymore
* Use testid selectors in test
* Remove async
* Prom: disable cmd f within the editor
* Loki: disable cmd f within the editor
* Update public/app/plugins/datasource/loki/components/monaco-query-field/MonacoQueryField.tsx
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Monaco: upgrade to 0.34.1
* Loki/Prometheus: allow native search to be displayed
* Formatting
* Monaco: upgrade to 0.34.1
https://github.com/microsoft/monaco-editor/issues/102#issuecomment-1282897640
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* add default variant
* enhance story
* rename to "initial" + update docs
* default to showing a CTA
* use switch
* translations
* update and use LinkButton
* update default message
* rename "initial" to "nothing-here"
* update variant name to `call-to-action`
* i18n
* add CTA svg
* extract into its own component
* add history links for monaco completion provider folder
* add history links for monaco query field folder
* add history links for components folder
* add history links for configuration folder
* add history links for dashboard json folder
* add history links for gcopypaste folder
* add history link for variableMigration
* add history link for querybuilder/components/metrics-modal folder
* add history link for querybuilder/components/promqail folder
* add history links for querybuilder/components folder
* add history links for querybuilder/hooks folder
* add history links for querybuilder/shared folder
* add history links for querybuilder folder
* add history links for querycache folder
* add history links for src folder
* use frontend package and custom auth in module.ts
* remove files and fix import issues
* remove usePrometheusFrontendPackage
* remove extra files
* update betterer
* remove extra files after rebase
* fix betterer for rebase
* fix e2e flakiness
* add native histogram functions to code editor
* add native histogram function types for query builder
* add functions to query builder
* add test to show parsing breaks from code to builder
* add histogram_avg to code editor
* add histogram_avg to builder and make parity between package and core
* add functions to hard coded promql file for highlighting
* remove native histogram test so that it can be added in #85942
* remove functions from core prometheus js to prevent merge conflict in #86080
* use xit for test instead of removing it
* Update dependency @types/react-calendar to v4
* remove @types/react-calendar since it's no longer used
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Update dependency @testing-library/dom to v10
* update @testing-library/react as well
* fix unit tests
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* fix some type assertions in loops
* some more cleanup
* some alerting fixes
* put comments in correct place to ignore rule
* couple more
* undo SilencesFilter changes
* WIP
* Use splitpanewrapper for drawer
* Get rich history pulling from multiple datasources
* highlight pane
* Fix datasource data handling
* create ds/explore map, move around ds lookup
* Handle no filters
* Fix tests and some errors
* Fix context menu issue
* (Poorly) enable scrolling, fix onClose to function
* Remove highlighting, use legacy key, fix casing
* fix filtering to handle non-simple data
* Fix linter, add translations
* Fixing tests~~
* Move to explore drawer and fix some more tests
* Kinda fix drawer stuff?
* Fix remaining card tests
* Fix test
* Fix tests
* Partially fix starred tab tests
* Fix integration tests
* Fix remaining tests 🤞
* Add a test and a clarifying comment behind a couple hooks
* Remove unused code
* Fix button styling and fix animation (but break width)
* Make Drawer using parent width (100%)
* Fix tests and some small catches
* Add tests for selectExploreDSMaps selector
---------
Co-authored-by: Piotr Jamroz <pm.jamroz@gmail.com>
* Add feature toggle
* Add filters and group by variables by default to all new dashboards
* Nits
* Tests
* Rename feature toggle to newDashboardWithFiltersAndGroupBy
* Icon: aria hide icon, unless a label is set
* Update doc
* Remove weird auto import
* Fix fialing tests
* Add recommendation for Tooltip
* Consider more aria attributes to support Tooltip
* Handle tabIndex and aria-hidden case
* Add comment about aria-label
* Add applicability function to group to nested table
* codeincarnate/group-to-nested-cond/ run linter
---------
Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
* make substring and not substring transformer case insensitive
* timlevett/case-insensitive/ run linter
---------
Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
* reenable ext-jwt-client
* fixup settings struct
* add user and service auth
* lint up
* add user auth to grafana ext
* fixes
* Populate token permissions
Co-authored-by: jguer <joao.guerreiro@grafana.com>
* fix tests
* fix lint
* small prealloc
* small prealloc
* use special namespace for access policies
* fix access policy auth
* fix tests
* fix uncalled settings expander
* add feature toggle
* small feedback fixes
* rename entitlements to permissions
* add authlibn
* allow viewing the signed in user info for non user namespace
* fix invalid namespacedID
* use authlib as verifier for tokens
* Update pkg/services/authn/clients/ext_jwt.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update pkg/services/authn/clients/ext_jwt_test.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* fix parameter names
* change asserts to normal package
* add rule for assert
* fix ownerships
* Local diff
* test and lint
* Fix test
* Fix ac test
* Fix pluginproxy test
* Revert testdata changes
* Force revert on test data
---------
Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update Yarn to v4.1.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>
* fix: remove global a tag styles inside tooltips
* corret inside / outside button references in toggletip test
* Remove code and pre styling rules from tooltipUtils
"Release: Updated versions in package to 11.1.0-pre"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
* add feature toggle usePrometheusFrontendPackage
* add feature toggle logic to Prometheus module
* use config editor with package and remove configOverhaul feature toggle
* update betterer because we will be removing other files as we replace with files from @grafana/prometheus
* fix exemplar ds picker selector
* add more description to ts-ignore
* remove go.work.sum change
* copy go.work.sum from main
* update go.work.sum after talking with ismail
* put back the promlib entry
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* attempt at solving issue and resetting bounds to match panel content
* cleanup failed experiments
* add toggle for infinite pan - dont love naming but open to suggestions; clean up scene transform function
* add ability to "infinite" zoom (i.e. render more canvas via zooming out)
* slight refactor
* revert refactor as it broke things
* Canvas: Add corner radius option
* Update connection radius logic
* Simplify angle calcs
* Simplify math to be a bit more clear and efficient
* Add checks for hyperbola behavior
* Prevent arc calcs if no radius
* Add comments for SOME clarity
* Add some more clarity to comments
* Fix linter issue
* Check for segment overlap for first vertex
* Update public/app/plugins/panel/canvas/components/connections/ConnectionSVG.tsx
* Add comment for calc clarity
* add empty search state component
* extract translations
* nicer prop spreading
* actually expose component in grafana-ui
* use requestAnimationFrame
* add rollup-plugin-svg-import
* move to a single EmptyState component with variants
* update docs
* remove CTA
* add some more prop documentation
* just use 1 svg
* feat(systemjs): move systemjs to grafana core and stop exporting from runtime
* feat(plugins): move systemjs to own file, update imports
* chore(plugins): call systemjs directly from window as ref can be undefined
* chore(plugins): make sure systemjs is imported before its shared dependencies
* chore(systemjs): move dependency to root package.json
* feat: add incomplete unit test
* refactor: add idea for unit test
* feat: create new e2e test
* feat: add some steps
* feat: add comment
* feat: complete prep work
* feat: complete clean up
* rebase
* feat: add more steps to test flow
* refactor: remove unit test
* refactor: clean up
* refactor: create a provisioned alert rule
* refactor: change location and content
* refactor: e2e test
* refactor: betterer
* refactor: move provisioned alert rule
* refactor: make provisioning file available remote
* refactor: clean up test
* refactor: move provisioned alert rule
* refactor: remove wait()
* feat: restructure first test and add more tests
* feat: add another provisioned alert rule
* feat: add a new test
* feat: complete new test
* refactor: replace data-testid in alert rules
* refactor: replace data-testid
* refactor: fix tests for drone
* refactor: fix third test after review
* refactor: fix last test
* temp
* refactor: improve some things
* refactor: adjust unit tests
* refactor: remove assertions for alert rule details view
* refactor: remove assertions
* refactor: add check for button text
* refactor: remove session storage
* refactor: apply changes from code review
* refactor: add codeowner
* refactor
* refactor
* refactor: clean up
* refactor: clean up
* refactor: clean up
* refactor: increase pa11y threshold for /alerting/list
* E2E: Rewrite mysql tests to playwright
* Fix lint
* Add more selectors and address comments
* Scope locators when locating text
* Don't run it 20 times
* Update new-datasource-variable to assert mysql
* Table: hacky poc for colored rows
* update
* Update options editor
* Refactor out styling
* Make sure option applies
* Start unifying coloring logic
* Support various options
* Cleanups
* Fix up hover behavior
* Update label
* Fix bug with sorting and make cleanups
* Ensure text color also applies to whole row
* New treatment for cell inspect
* Update cell inspect spacing
* codeincarnate/table-row-background-selected-riffs/ run linter
* Fix hover colors
* Fix coloring
* The other part of color application
* Another color fix
* codeincarnate/table-row-background-selected-riffs/ lint
* Update cell value inspect
* Prettier
* Update cell value inspect coloring
* Fix text coloring
* Update inspect style
* Linting and betterer
* Fix tests
* i18n
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
* initial start
* don't use getTagKeysProvider
* some cleanup
* undo kinds adjustment
* simplify
* remove async declaration
* add description and a couple of unit tests
* add transformSaveModelToScene test
* add tests for AdHocVariableForm
* add tests for AdHocFiltersVariableEditor
* update to defaultKeys
* fix snapshots
* update to 3.13.3
* Adds color and stroke-dasharray support for node graph edges
Adds support for providing color, highlighted color, and visual display of node graph edges as dashed lines via stroke-dasharray.
* Updates node graph documentation
* Updates documentation
Adds default for `highlightedColor`
* Update docs/sources/panels-visualizations/visualizations/node-graph/index.md
Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>
* Update packages/grafana-data/src/utils/nodeGraph.ts
Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>
* Update docs/sources/panels-visualizations/visualizations/node-graph/index.md
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Removes highlightedColor; deprecates highlighted
Per [request](https://github.com/grafana/grafana/pull/83855#issuecomment-1999810826), deprecates `highlighted` in code and documentation, and removes `highlightedColor` as an additional property. `highlighted` will continue to be supported in its original state (makes the edge red), but is superseded if `color` is provided.
* Update types.ts
Missed a file in my last commit. Removes `highlightedColor` and deprecates `highlighted`.
* Add test scenario in test data source
---------
Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
* feat: make it possible to specify prop types for component extensions
* Update packages/grafana-runtime/src/services/pluginExtensions/getPluginExtensions.ts
* chore: adapted test case
* chore: update betterer
* feat: update types for configureComponentExtension()
* fix: remove type specifics for `configureExtensionComponent`
* Update betterer config
---------
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
Co-authored-by: Darren Janeczek <darren.janeczek@grafana.com>
* Unify how the version is shown in the UI
* use versionString in dashboard help bundles
* fix lint
* remove comment
* fix test types
* make test less flakey
* Canvas: Add vertex control to connections
* Add function for vertex conversion
* Add vertex interface
* Add future vertex handling
* Only show vertices when connection selected
* Add vertices to save model
* Apply select constraint to first midpoint
* Add some infrastructure for vertex edit
* Render vertex edit and capture events
* Save vertex edit on button release
* Handle adding new vertices
* Limit number of vertices to 10
* Handle zoom for vertex edit and creation
* Rename future to add
* Remove more references to future
* Remove unsued console log
* Clean up styles
* Add some clarity for path generation
* Add clarity to connections event handling
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Removes legacy alerting, so long and thanks for all the fish! 🐟
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* pyroscope: adds ability to add context menu items
* moves things around
* removes console.log
* improvements
* Change the extra context button API shape
* Add test
* lint
---------
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>