* clean up some e2e/runtime types
* fix some stories
* some more fixes
* fix route props
* update unit tests
* update more unit tests
* don't throw here
* build(plugin-configs): move swc-loader to configs and use require.resolve for less duplicate deps
* build(plugins): move cacheLocation to ESLintPlugin, run lint and tscheck plugins in dev
* revert(plugins): remove obsolete stats setting
* Add PUT to canvas button
* Update cue file to include PUT
* Re run make gen cue
* fix gen-cue
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* only render icons on hover
* Table: Optimization - remove plaintext cell wrapper (#76916)
* remove inner wrapper div from plain text cells
* reuse result of typeof value === 'string'
---------
Co-authored-by: Galen <galen.kistler@grafana.com>
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* initial commit for PromQAIL
* add feature toggle and start button
* add drawer
* set up drawer and state
* fix styles and start the conditional text display
* add data info list going to ai
* add logos and style
* metric display table style, neeed to make responsive
* make feature toggle frontend only
* add logic for want prompt for list or not, add helpers, addquerysuggestion type
* make query suggestion component
* add buttons to add or refine prompt
* refactor logic to add interactions to have multiple AI or historical interactions
* refactor and enable multiple questions, all flow
* add colorful AI icon to drawer open button
* fix linting
* refactor for hooking up promQail app and only giving one suggestion
* design fixes
* fix next prompt button styling
* historical suggestions give us 5, fixed that and some design things
* hook up the api, provide defense filler if it's down, refactor lots
* use query, fix linting
* add metadata to explain for ai suggestions
* styling fixes
* give metadata for historical suggestions by parsing query on the fly
* no prompt field to query-suggestion endpoint if prompt is empty
* fix linting
* use suggest rte for historical list, fix long code style
* use suggest rte for historical list, fix long code style
* fix historical bug
* added prompt file
* updated llm logic in explainer helper
* bump @grafana/experimental from 1.7.0 to 1.7.2
* use llmservice and vectorservice
* cleanup prompts + streaming explainer
* promqail feature toggle: fix re-order
* PromQL non-llm failback recommendation logic (#75469)
* added template recommendation logic directly in helpers
* also added selected labels to recommendation
* PromQail: query gen: fix prompt formatting and fetch metric labels to be used (#75450)
* PromQail: query gen: fix prompt formatting and fetch metric labels to be used
* Code fixes as suggested
* Use newly decided collection name for promql templates
* Prometheus: Promqail tests and bug fixes (#75852)
* add tests for drawer
* refine one prompt at a time, fix css
* scroll into view on interaction change
* fix styles for light
* disable prompt input after getting sugestions for that interaction
* make buttons disappear after selecting refine prompt or show historical queries to prevent user from clicking many times
* fix border radius
* fix new eslint rule about css requiring objects and not template literals
* add scrollIntoView for test
* grafana_prometheus_promqail_explanation_feedback - add feedback rudderstack interaction for explanation
* add form link to feedback for query suggestions
* fix bugs
* for prettier
* PromQL Builder Explainer: Added promql documentation and updated prompt (#75593)
* added promql documentation and updated prompt
* refactor prompt generation into isolated function
* updated prompt to answer with a question
* removed commented code
* updated metadata logic
* updated documentation body logic
* Prometheus: PromQAIL UI fixes (#76654)
* align buttons at 16px
* only autoscroll when an interaction has been added or the suggestions have been updated
* add 12px below explain for suggested queries
* add . after suggestion number
* fix linting error
* Prometheus: PromQAIL feedback improvements (#76711)
* align buttons at 16px
* only autoscroll when an interaction has been added or the suggestions have been updated
* add 12px below explain for suggested queries
* add . after suggestion number
* add text indication for explanation feedback
* add form for suggestion feedback, add form for not helpful explanation feedback
* fix linting error
* make radio button feedback required
* required text, padding additions, thank you for your feedback
* PromQL Builder Suggestion: Added type level templates and removed explainer steps for fallback suggestion logic (#75764)
* adding more detailed templates to promql fallback suggest
* remove debug logs
* added missing explain logic
* Fix brendan's type issue
---------
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
Co-authored-by: bohandley <brendan.ohandley@gmail.com>
* make yarn.lock equal to current in main
* fix feature toggles
* fix prettier issues
---------
Co-authored-by: Edward Qian <edward.qian@grafana.com>
Co-authored-by: Yasir Ekinci <yas.ekinci@grafana.com>
Co-authored-by: Edward Qian <edward.c.qian@gmail.com>
Co-authored-by: Gerry Boland <gerboland@users.noreply.github.com>
* add aria-describedby, tooltip role and unit tests
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
* remove `delayShow` so tooltip text is announced correctly
* adjust IconButton, fix unit tests
* undo tooltip aria-label change
* only set aria-describedby if there's no aria-label
---------
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
"Release: Updated versions in package to 10.3.0-pre"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
"Release: Updated versions in package to 10.3.0"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
* feat: add cost management to admin and put adaptive metrics and log volume under it
* test: fix applinks test
* chore: fix lint error
* remove "new" from feature toggle description
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Add teamHeaders for datasource proxy requests
* adds validation for the teamHeaders
* added tests for applying teamHeaders
* remove previous implementation
* validation for header values being set to authproxy
* removed unnecessary checks
* newline
* Add middleware for injecting headers on the data source backend
* renamed feature toggle
* Get user teams from context
* Fix feature toggle name
* added test for validation of the auth headers and fixed evaluation to cover headers
* renaming of teamHeaders to teamHTTPHeaders
* use of header set for non-existing header and add for existing headers
* moves types into datasources
* fixed unchecked errors
* Refactor
* Add tests for data model
* Update pkg/api/datasources.go
Co-authored-by: Victor Cinaglia <victor@grafana.com>
* Update pkg/api/datasources.go
Co-authored-by: Victor Cinaglia <victor@grafana.com>
---------
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Victor Cinaglia <victor@grafana.com>
* Add images
* Basic button functionality; TODO placeholders for dispatching contentOutlineToggle and rendering content outline component
* Basic content outline container
* Content outline toggles
* Remove icon files from explore
* Scroll into view v1
* outline that reflect's explore's order of vizs
* Update icon name
* Add scrollId to PanelChrome; scrolling enabled for Table
* Add queries icon
* Improve scroll behavior in split view
* Add wrapper so the sticky navigation doesn't scroll when on the bottom of the window
* Fix the issue with logs gap; center icons
* Memoize register and unregister functions; adjust content height
* Make displayOrderId optional
* Use Node API for finding position of panels in content outline; add tooltip
* Dock content outline in expanded mode; at tooltip to toggle button
* Handle content outline visibility from Explore and not redux; pass outlineItems as a prop
* Fix ContentOutline test
* Add interaction tracking
* Add padding to fix test
* Replace string literals with objects for styles
* Update event reporting payloads
* Custom content outline button; content outline container improvements
* Add aria-expanded to content outline button in ExploreToolbar
* Fix vertical and horizontal scrolling
* Add aria-controls
* Remove unneccessary css since ExploreToolbar is sticky
* Update feature toggles; Fix typos
* Make content outline button more prominent in split mode; add padding to content outline items;
* Diego's UX updates
* WIP: some scroll fixes
* Fix test and type error
* Add id to ContentOutline to differentiate in split mode
* No default exports
---------
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Stub types
* Update applicator
* Type and functionality updates
* Format time applicator
* Group by applicator
* Groupy to matrix applicator
* Use applicability levels
* Add organize fields applicator
* Add applicator to heatmap
* Add disabled icons
* Update presentation
* Prettier
* Why run prettier once when you can do it twice?
* Update presentation
* Prettier
* Update presentation
* Prefer object syntax
* Betterer and Prettier
* Fixed so we will return default timeZone to extensions if empty is provided.
* Update public/app/features/dashboard/utils/getPanelMenu.test.ts
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* moved themecontext to data
* chore(grafana-ui): re-export ThemeContext from grafana/data for backwards compatibility
* Moved icon bundling to core.
* feat(plugins): share react-inlinesvg with plugins for grafana/ui bundling
* chore(codeowners): add generate-icon-bundle.js to file
* chore(storybook): update path to iconBundle file for theme
* feat(plugins): share i18n dependency via systemjs
* Make sure that icon bundle is initialized for tests.
* Removed comment.
* added tests for icon root.
* Removing the need of having an init variable.
* feat(grafana-ui): add icon svgs to bundle for projects that don't rely on grafana
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Update @testing-library/dom to v9.3.3
* Update @testing-library/dom to v9.3.3 in packages
* Update yarn.lock
* Revert "Update yarn.lock"
This reverts commit 0cc2084273.
* point all @testing-library/dom packages to v9.3.3
* Add context to editor so field calculation does not return undefined variable and shows on next transform
* fix bug where default alias would get interpolated
* Add option to calculate min max per field
* Fix eslint warnings
* Add back hideFromDefaults that went missing
* whitespace
* Add tests
* Refactor range calculation
* Rename localMinMax -> fieldMinMax
* Remove the lint exceptions
Removing these as to not hide these once we get around to fixing the
underlying typing issue.
* Update docs
* extend threshold command with second evaluator called `unloadEvaluator`
* Introduce a new expression command Hysteresis and update Threshold unmarshaller to create the HysteresisCommand if the second eval
* add feature flag `recoveryThreshold`
* update unmarshal threshold command to not re-marshall because it breaks frame definition by shuffling the schema and data fields
* Create a state for dockedMegaMenu and the function to manage it
* Add the dockedMenu icon and handle the status when clicking it
* Add Megamenu to section nav area when it is docked
* get logic working
* fix mobile
* refactor state + persist in localStorage
* adjust icon and don't use position absolute
* restore old rudderstack tracking
* use Flex instead
* adjust feature toggle to be experimental
* extract out localStorage handling into utils
* don't need separate file
* use store.set/get instead
---------
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
* Only call preventDefault if it exists
* Change "View Traces" link to use traceQLSearch instead of the deprecated nativeSearch
* Thank you again test. Update tests
* Update test
* Update betterer
* Type fix
* Small type change
* Update betterer
* Add unary operations to add field from calc transform
* Refactor layout to use new UI components. fix 'as' type assertions
* rename exp
* more docs
* fix docs
* variables for filterforvalue
* use datalinkinput for basic matcher
* fix user select issue
* heatmap transformation variable interpolation
* clean code
* interpolate sort by
* add options interpolation in histogram transformation
* interpolation for limit
* Add suggestions UI to Filter by data value Transformation
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
* add validation for number/variable fields
* Add variables to add field from calculation
* Add validator to limit transformation
* Refactor validator
* Refactor suggestionInput styles
* Add variable support in heatmap calculate options to be in sync with tranform
* Refactor SuggestionsInput
* Fix histogram, limit and filter by value matchers
* clean up weird state ref
* Only interpolate when the feature toggle is set
* Add feature toggle to ui
* Fix number of variable test
* Fix issue with characters typed after opening suggestions still remains after selecting a suggestion
* Clean up from review
* Add more tests for numberOrVariableValidator
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
do not put NaNs as first in legend desc sort
Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
* Start adding correlations editor mode
* Add selector for merge conflict resolution
* Enable saving
* Build out new corelation helper component
* flesh out save with label/description, change color
* Have breadcrumb exit correlation editor mode
* Add extension property to show/hide, use it for correlations
* Bring in feature toggle
* Remove unnecessary param
* Cleanup
* Parse logs json
* Work on correlation edit mode bar
* Tinker with a top element for the editor mode
* Handle various explore state changes with correlations editor mode
* WIP - add unsaved changes modal
* Have correlation bar always rendered, sometimes hidden
* Add various prompt modals
* Clear correlations data on mode bar unmount, only use not left pane changes to count as dirty
* Move special logic to explore
* Remove all shouldShow logic from plugin extensions
* remove grafana data changes
* WIP - clean up correlations state
* Interpolate data before sending to onclick
* Override outline button coloring to account for dark background
* More cleanup, more color tweaking
* Prettier formatting, change state to refer to editor
* Fix tests
* More state change tweaks
* ensure correlation save ability, change correlation editor state vars
* fix import
* Remove independent selector for editorMode, work close pane into editor exit flow
* Add change datasource post action
* Clean up based on PR feedback, handle closing left panel with helper better
* Remove breadcrumb additions, add section and better ID to cmd palette action
* Interpolate query results if it is ran with a helper with vars
* Pass the datasource query along with the correlate link to ensure the datasource unique ID requirement passes
* Use different onmount function to capture state of panes at time of close instead of time of mount
* Fix node graph’s datalink not working
* Actually commit the fix to saving
* Fix saving correlations with mixed datasource to use the first query correlation UID
* Add tracking
* Use query datasources in mixed scenario, move exit tracking to click handler
* Add correlations to a place where both can be used in the correlations editor
* Be more selective on when we await the datasource get
* Fix CSS to use objects
* Update betterer
* Add test around new decorator functionality
* Add tests for decorate with correlations
* Some reorganization and a few tweaks based on feedback
* Move dirty state change to state function and out of component
* Change the verbiage around a little
* Various suggestions from Gio
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* More small Gio-related tweaks
* Tie helper data to datasource - clear it out when the datasource changes
* Missed another Gio tweak
* Fix linter error
* Only clear helper data on left pane changes
* Add height offset for correlation editor bar so it doesn’t scroll off page
---------
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* feat(plugins): allow filtering of plugin errors by plugin type
* refactor(plugins): migrate PluginsErrorsInfo component to use Alert component
* chore(plugins): remove redundant d3 import
* feat(datasources): filter plugin errors by plugin type
* refactor(plugins): pass plugin.type from selector rather than guess from pluginId
* refactor(plugins): move filtering to selector
* Extend support for variables in filter by name
* Simlpify help and include variable support
* Simplify regexp
* Remove id that was left from an erlier implementation attempt
* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Improve variable name and fix react warning
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* DataSourceAPI: Add adhoc filters to DataQueryRequest and some methods to make it not depend on global templateSrv
* Minor tweaks/fixes
* Renamed to filters
* Fix test
* Log deprecation warning
* I give up
* Initial POC for modified rule expor
* Add rule and group export options to modified export
* Add feature toggle for modifier export
* Rename GrafanaRuleDesigner to ModifyExportRuleForm to identify it easily as a rule form
* Refactor naming and folder for RuleDesigner => ModifyExport
* Don't render more action drop-down button when no more actions are allowed
* Redirect cancel button to alert list view
* Fix modify export page being reloaded correctly without errors
* Fix test
* Protect modify-export route when toggle-feature is not enabled
* Fix css betterer error
* Address pr review coments
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* deprecate scrollableContent prop and make it the default behaviour
* restore prop behaviour, just make it default to true
* Update packages/grafana-ui/src/components/Drawer/Drawer.tsx
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
---------
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Fix unexpected error when creating a new cloudwatch datasource.
Involves a fair amount of refactoring, so if this causes unexpected issues related to region fetching we can turn this off with the cloudwatchNewRegionsHandler feature toggle, although we do not predict it will so we are enabling it to default to true and hope to remove it shortly.
* show row index as percentage in add field from calc transform
* prettier
* add test + modify docs
* show quantile and add percentage unit default. add explanatory tooltip and docs
* fix test
* set unit percent only on quantile mode
* Change naming to percentile
* Rename to As Percentile
* docs mods
* Storybook: Remove flexbox from story container
* Update packages/grafana-ui/src/components/Monaco/CodeEditor.internal.story.tsx
Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
---------
Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
* issue loki queries in parallel so total query time is only the slowest query rather than the sum of all query times.
* Fix lint
* Add running of queries in parallel behind feature toggle to test the functonality before release
* Add span end
* Move shared logic to separate function
* Add logging and tracing around running of all queries
---------
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>