Commit Graph

5557 Commits

Author SHA1 Message Date
Todd Treece
a420040c73
Chore: Remove CRD generation (#67286) 2023-04-26 09:52:13 -04:00
Juan Cabanas
4b3aead2d0
DataLinks: encoded URL fixed (#66418) 2023-04-26 10:46:21 -03:00
Esteban Beltran
22713186cb
Toolkit: Remove plugin:ci-build plugin:ci-package plugin:ci-report and related files (#67212) 2023-04-26 15:01:32 +02:00
Juan Cabanas
47aa8c7654
PublicDashboards: HoverWidget in panel fix (#66685)
Hover widget modified for public dashboards.
2023-04-26 09:06:38 -03:00
Ashley Harrison
e6e741546f
Nested folders: Create basic Move/Delete modals (#67140)
* add modal scaffolding

* add some unit tests

* remove dummy api, add some TODO comments

* small test refactor

* another small test refactor

* fix unit tests due to aria-label/data-testid change
2023-04-25 17:08:40 +01:00
Torkel Ödegaard
de18ed6659
PanelContext: Add functionality to update data from panel (#66993) 2023-04-25 14:55:50 +02:00
Esteban Beltran
c7aafea370
Toolkit: Remove deprecated plugin:sign command (#67130) 2023-04-25 15:24:16 +03:00
Esteban Beltran
0d0c6401e3
Toolkit: Remove deprecated searchTestData (#67134) 2023-04-25 11:52:59 +02:00
Adela Almasan
c4c747cca6
e2e: Update annotation marker selector (#67135) 2023-04-24 18:51:15 +00:00
Galen Kistler
a6577cc6fd
Revert "Prometheus: Add Victoria metrics to Prometheus type dropdown in datasource config" (#67150)
Revert "Prometheus: Add Victoria metrics to Prometheus type dropdown in datasource config (#66984)"

This reverts commit 7cb4d65584.
2023-04-24 12:59:27 -05:00
Kyle Brandt
e57e0769ca
Prometheus: Enable prometheusDataplane by default (#67100)
* Prometheus: Enable prometheusDataplane by default
and related mitigation toggle dataplaneFrontendFallback
original PRs with the toggles:
 - https://github.com/grafana/grafana/pull/65237
 - https://github.com/grafana/grafana/pull/62694
2023-04-24 20:29:54 +03:00
Ashley Harrison
dcf53dbb3b
ConfirmModal: make button styling consistent (#67142)
* stop using fill="outline" for confirm modal dismiss button

* kick drone
2023-04-24 17:53:28 +01:00
Esteban Beltran
872e79f687
Toolkit: Remove plugin:dev and plugin:test (#67125) 2023-04-24 17:18:42 +02:00
Victor Marin
efd0e9cbea
Datagrid Panel: Edit data within your dashboards (#66353)
* wip

* Datagrid WIP: snapshotting when data edited, better UI for adding column/rows, refactors

* wip

* WIP

* wip

* Add series selector

* Delete selection on key press

* wip

* Multiple row select and delete

* wip

* draggable rows/columns, better column width calculator

* bug fixes

* scrollbars

* add feature flag

* bugfixes

* bugfixes

* bugfixes

* bugfixes

* Add possibility to rename column

* Input fixes

* bugfixes

* bugfixes

* performance optimisations

* WIP component refactoring and optimisations

* comment bit of code to remove error for testing

* fix column move and payload types

* WIP refactors and tests

* e2e tests

* queryGroup subscription refactor

* queryGroup - add component on update, fix failing tests

* refactor querygroup

* querygroup refactor

* tests

* fix codeowners validation

* lint fixes

* revert convertFieldType modification in favor of already merged mod + re-add mistakenly deleted line

* remove //ts-ignores

* Minor style tweaks

* fix

* align colors with theme

* fixes

* refactor

* add test for convertFieldType transformer and write todo

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-24 17:46:31 +03:00
Laura Fernández
07373705d9
Grafana UI: Improve AutoSaveField component (#66751) 2023-04-24 12:42:42 +02:00
Konrad Lalik
91704cf7de
Alerting: Loki-based alert state history modal (#66595)
* adds alertstatehistory backend config to grafanaBootData

* add alertStateHistory api

* show different ASH modal when using loki implementation

* group log lines by instance (unique set of labels)
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>

* render log lines for each instance
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>

* Add visual improvements to the log record of state changes

* Add values to log records

* compute common labels and show unique labels

* Add state changes visualization

* fix common labels extraction

* Code cleanup

* Add timespan-based log record view

* WIP

* scroll to timestamp - poc

* Use SortedVector for timestamp field

* add conditional accessor for frames

* update some of the log formats and styles

* Timestamp-based visualization with scrolling

* minor improvements

* Split Loki's state history viewer into multiple files

* Add memoization to prevent graph rerender on filter updates

* make chart size shrink when fewer instances

* style updates

* show warning when instances are hidden

* Add basic label-based filtering

* Improve label-based filtering

* Add regex validation

* Improve no instances message when everything was filtered out

* Update warning message

* Move timeline viewer to a separate file, refactor handling timeline pointer changes

* Remove unused component, add comments

* Fix test snapshot, fix type error

* adds tests for common.ts

* Add tests for converting log records into data frames

* Add basic component test, fix type guards

* Use a constant for timeseries limit

* Improve a11y, update component test

* Memoize AlertStateTag, migrate from deprecated ArrayVector

* Update public/app/features/alerting/unified/components/rules/state-history/common.ts

* Move helper hook into a separate file. Add Search input component

* Change the limit of visible time series on the timeline

* Add LogRecordViewer perf improvements, refactor timeline cursor events tracking

* Use callback to pass timeline refs

* Add grouping tests for the log record viewer

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-04-24 09:28:11 +02:00
Leon Sorokin
faad4b92ad
GrafanaDS: Add support for annotation time regions (#65462)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2023-04-21 23:25:50 +03:00
Galen Kistler
7cb4d65584
Prometheus: Add Victoria metrics to Prometheus type dropdown in datasource config (#66984)
* add VictoriaMetrics to prometheus type dropdown
2023-04-21 09:12:28 -05:00
Joey
6522bb377e
Tracing: Rename feature toggle (#66833)
Rename feature toggle so something more specific so new work can use older feature toggle name
2023-04-21 11:31:24 +01:00
Torkel Ödegaard
1ff9c47c7b
ThemeDemo: Add transparent to ThemeDemo (#66994) 2023-04-21 11:09:46 +02:00
Ryan McKinley
607b94aaa2
FieldValues: Use standard array functions (#67012) 2023-04-20 22:03:38 -07:00
Leon Sorokin
b24ba7b7ae
FieldValues: Use plain arrays instead of Vector (part 3 of 2) (#66612)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-20 17:59:18 +03:00
Andreas Christou
b16a8bd6a8
grafana/e2e: Put E2E select updates in selectOption (#66972)
Put E2E select updates in selectOption and force
2023-04-20 15:40:45 +01:00
Sven Grossmann
1e53a87d76
Log Context: Add button to open the context query in a split view (#66777)
* add show context button

* improve type definition

* change to default `maxLines`

* remove context query

* add provider to tests

* add test for split view button

* improve documentation

* add tests for `getLogRowContextQuery`

* refactor LogsContainer functions

* fix spelling

* add `contextQuery` as state

* fix tests

* fix lint

* do not use callIfDefined

* make button secondary
2023-04-20 14:21:14 +02:00
Andreas Christou
b1129a4375
grafana/e2e: Include wait in selectOption (#66894)
Update e2e select with wait
2023-04-20 12:32:14 +02:00
Josh Hunt
e0c5b4f0e0
NestedFolders: Basic item selection (#66843)
* NestedFolders: Item selection state

* Select children in state

* Unselect parents when children are unselected

* remove unneeded comment

* tests

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit
2023-04-19 22:44:07 +03:00
Ivana Huckova
33186e3e23
Explore: Fix using data source line limit when opening logs sample in split view (#66601)
* Logs sample: Use data source max lines setting when opening logs in split view

* Add internal tags
2023-04-19 17:04:47 +02:00
Esteban Beltran
5dac0c9871
Toolkit: Remove plugin:create and component:create commands (#66729) 2023-04-19 15:15:37 +02:00
Ivan Ortega Alba
c7af53b79f
[Under FF] New DS Picker with advance mode (#66566)
* Add a wrapper to switch between the previous and new DS picker depending on the feature toggle advancedDataSourcePicker.

* Add a new component to represent the modal DS picker, which we will refer as advanced DS picker
Integrate this into the Edit panel, for now, until we're ready to replace everywhere the grafana-runtime DS picker by the wrapper.

* Replace Drawer component with the dropdown

* Adjust the first version of the styles to fit into this Figma design

* Adjust the design of the FileDropzoneDefaultChildren to match with the new DS modal but everywhere else is used nowadays.

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2023-04-19 16:08:09 +03:00
juanicabanas
97a0527b44
Variables: Add new format id (#66793) 2023-04-18 18:24:56 -07:00
Ryan McKinley
987eff82a3
FieldValues: Implement array accessors for deprecated Vector types (#66807) 2023-04-19 00:07:27 +03:00
Ryan McKinley
9452c0d718
Annotations: Support filtering the target panels (#66325)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-04-18 15:39:30 -05:00
Stephanie Hingtgen
255d8f3326
Plugins: Remove secure socks proxy feature toggle (#66611) 2023-04-18 11:11:23 -06:00
Andres Martinez Gotor
98c695c68f
Chore: Use Grafana API to retrieve the public key to validate plugins (#66439) 2023-04-18 16:12:05 +02:00
Ivana Huckova
f612a72f96
Loki: Update log context UI (#66730)
* fix logrowcontext scrolling behavior

* Loki: Update loki context ui menu

* Update

* Add test, update

* Use escapeLabelValueInSelector when displaying labels

* Update test for new appliedContextFilters

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
2023-04-18 15:59:22 +02:00
Kristina
9d69d3173f
Correlations: Add transformation editor (#66217)
* There was an attempt

* Change disabled state based on transformation type

* Add validation to transformation type

* Revert "Add validation to transformation type"

This reverts commit 2188a3d9a93aec5eeafcdd40510391ba1a53671a.

* Add validation to transformation type

* Move transformations editor to a separate file

* Make name more descriptive

* Ensure type dropdown has always the same width

* Add tooltips around transformation options

* Slight style changes

* Remove autofocus on append, integrate read only to transformationeditor, save values that disappear so they come back

* Remove yaml changes

* Have variable background color work with alternating colors on different themes

* Make expression required for regular expressions

* Remove unused empty form object

* Fix bug about transformation’s values saved in memory

* Better validation formatting for expression

* Add labels and (for now) non working test, attempt to fix saved transformation delete/add bug

* Fix datalink comment

* Remove fancy CSS due to background change

* Fix deleting saved transformation bug, finish tests

* Consolidate transformation types

* Double check aria labels

* Change aria labels, fix tests

* Add a transformation with the create correlation test

---------

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-04-18 07:17:30 -05:00
Jack Westbrook
5d4bf19efb
Fix: Canary NPM publishing (#66734)
fix(npm-publishing): strip protocol from registry so npm can auth correctly
2023-04-18 12:00:05 +02:00
Jack Westbrook
e97befa221
Fix: NPM canary releases (#66727)
* fix(packages): remove double trailing slash from npmrc credentials

* chore(packages): add new line to storybook config to trigger an npm canary release
2023-04-18 11:02:37 +02:00
Jack Westbrook
efa641040d
Build: Improve NPM publishing (#65171)
* chore(packages): remove redundant npm scripts for publishing packages

* feat(packages): rewrite npm publishing script to work for manual and ci publishes

* ci(drone): update release-canary-npm-packages step to use new script

* docs(packages): update manual release instructions

* wip(packages): attempt to validate packed npm package

* fix(packages): release-canary-npm-packages should provide canary dist-tag

* ci(packages): clean up npm package validation script

* chore(devenv): add verdaccio config to allow anon publishing for easier dev npm testing

* ci(packages): clean up publishing script

* ci(drone): during build-frontend-packages, pack and validate packed tarballs

* chore(codeowners): update for publish/validate npm packages scripts

* ci(packages): fix esm loop bug matching e2e package

* ci(npm-packages): fix failing regex

* style(lib.star): run make format-drone

* style(npm-packages): shellcheck fixes for validate-npm-packages script

* docs(packages): update readme instructions for publishing locally and manually

* refactor(npm-publish): use drone when to trigger canary releases

* chore(drone): remove redundant trigger_npm_publish var

* chore(npm-publish): remove redundant echo
2023-04-18 10:19:37 +02:00
Ryan McKinley
09f03e92bf
FieldValues: Use simple array in panel visualizations (#66706)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-04-17 14:46:29 -07:00
Ryan McKinley
50cb4f8998
FieldValues: Use simple array in transformations and grafana/data (#66702)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-04-17 14:02:51 -07:00
Joao Silva
73f1cd7bad
TimePicker: Fixes issues with "Recently used absolute ranges" section (#66281)
* TimePicker: Fixes issues with "Recently used absolute ranges" section

Squashed commit of the following:

commit 99d5076ce1fadde1f22ed372f372656b58efa1c4
Author: Joao Silva <joao.silva@grafana.com>
Date:   Tue Apr 11 14:06:27 2023 +0100

    user essentials mob! 🔱

    lastFile:public/app/core/components/TimePicker/TimePickerWithHistory.tsx

commit cad0201df452f956a422b030d5b15e8ba4aed9a9
Author: eledobleefe <laura.fernandez@grafana.com>
Date:   Tue Apr 11 11:44:34 2023 +0200

    user essentials mob! 🔱

    lastFile:public/app/core/components/TimePicker/TimePickerWithHistory.tsx

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>

* TimePicker: Add correct date format

* Add convertRawToRange tests

* Rename test variables

* RTL tests

* Proper RTL tests

* Apply suggestions from code review

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>

* Remove commented line

* Fix linting

---------

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2023-04-17 17:19:44 +02:00
Ashley Harrison
ab08b4f7f2
Chore: Clean up NavModel interface (#66548)
* clean up navmodel interface

* remove concept of sections from NavModel interface

* clean up applinks
2023-04-17 16:01:32 +01:00
Ashley Harrison
3b3bd03f8a
Chore: upgrade our version of rc-cascader (#66668)
upgrade our version of rc-cascader
2023-04-17 13:45:18 +01:00
Luke Palmer
0181dc183b
Visualizations: Choose color based on series name (#66197) 2023-04-14 23:08:28 -07:00
Ryan McKinley
39c04a8e36
Chore: Remove deprecated dashboardId from panel query runner (#64786) 2023-04-14 16:50:10 -07:00
Isabella Siu
1b0cee491a
OpenSearch: Add feature toggle for detecting version (#66386)
OpenSearch: Add feature toggle for auto-detecting version
2023-04-14 13:59:31 -04:00
Andreas Christou
b2e32a70b9
Chore: Update @grafana/e2e (#66365)
* Update e2e package

- Ensure health request is monitored for addDatasource flow
- Add custom timeout to configurePanel flow

* Make health check optional
2023-04-14 17:46:49 +01:00
Selene
9665b3afe7
Chore: Update Cuetsy to v0.1.8 version (#66456)
* Update cuetsy version

* Fix defaults

* Update cuetsy

* Update cuelang version in bingo

* Remove TODO comments
2023-04-14 16:45:54 +02:00
Ryan McKinley
e65163ba4e
FieldValues: Use plain arrays instead of Vector (part 2 of 2) (#66224)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-04-14 09:03:45 -05:00
Ryan McKinley
b8188eead4
FieldValues: Use plain arrays instead of Vector (part 1 of 2) (#66187)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-14 07:36:53 -05:00
Ivan Ortega Alba
7bc31ab04b
Replace the DS drawer toggle with the new DS picker one (#66551) 2023-04-14 13:01:10 +02:00
Matias Chomicki
d3a1faad1a
Loki Config: Add missing section header + minor improvements (#66216)
* Loki config: add missing section title to max lines

* Loki config: minor improvements to datasource test messages

* Chore: remove new line

* Loki: further improve error messages

* Alerting Settings: Add missing tooltip

* Update packages/grafana-ui/src/components/DataSourceSettings/AlertingSettings.tsx

* Update alerting label and tooltip

* Update packages/grafana-ui/src/components/DataSourceSettings/AlertingSettings.tsx

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Alerting settings: Increase label width

* Loki config: update success message

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-04-14 12:39:54 +03:00
Ivana Huckova
f48c858ca2
Elasticsearch: Change feature toggle for backend migration to enableElasticsearchBackendQuerying (#66500)
* Elasticsearch: Change feature toggle for backend migration to enableElasticsearchBackendQuerying

* Update logic in data source

* Run test to re-genartate toggle
2023-04-14 12:24:35 +03:00
Ashley Harrison
4abe0249ba
Chore: Clean up old navigation (#66287)
* remove code outside of the topnav feature flag

* delete NavBar folder

* remove topnav toggle from backend

* restructure AppChrome folder

* fix utils mock

* fix applinks tests

* remove tests since they're covered in e2e

* fix 1 of the approotpage tests

* Fix another dashboardpage test

* remove reverse portalling + test for plugins using deprecated onNavChanged method

* kick drone

* handle correlations
2023-04-14 09:43:11 +01:00
Marcus Andersson
c3fee5881f
E2E: Fixed so openPanelMenuItem flow works with new/old panel chrome without breaking changes (#66118)
Fixed so the openPanelMenuItem works with both angular and react panels.
2023-04-14 09:11:15 +02:00
Jiří Kraml
8d6314c654
Dashboard: Add series color shades (#61300)
* Dashboard: Add series color shades

Add color option "Shades of a color" which gives each series a color derived from a user-selected base color.

* Documentation: Add entry for color shades

Describe color option "Shades of a color" in documentation.

* Chore: formatting fixes

* Dashboard: Use better fallback color for color shades in fieldColor.ts

Fall back to a gray color if the configured color cannot be parsed.

* Chore: fix typo in fieldColor.test.ts

* Documentation: fix a sentence

* remove custom color parsing and change logic a bit

* Fix prettier issue

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2023-04-13 14:03:31 -07:00
Artur Wierzbicki
2136e680c4
Previews: remove dashboard previews backend (#66176)
* remove dashboard previews backend

* remove dashboard previews backend

* bring back the migration

* bring back the migration

* bring back the migration
2023-04-13 21:42:24 +04:00
Alexander Zobnin
7476219b0c
SAML: Configuration UI (#64054)
* Add initial authentication config page skeleton

* Add initial SAML config page WIP

* Add few more pages

* Add connect to IdP page

* Assertion mappings page stub and url params

* Able to save settings

* Some tweaks for authentication page

* Tweak behaviour

* Tweak provider name

* Move SAML config pages to enterprise

* minor refactor

* Able to reset settings

* Configure key and cert from UI

* Refactor WIP

* Tweak styles

* Optional save button

* Some tweaks for the page

* Don't show info popup when save settings

* Improve key/cert validation

* Fetch provider status and display on auth page

* Add settings list to the auth page

* Show call to action card if no auth configured

* clean up

* Show authentication page only if SAML available

* Add access control for SSO config page

* Add feature toggle for auth config UI

* Add code owners for auth config page

* Auth config UI disabled by default

* Fix feature toggle check

* Apply suggestions from review

* Refactor: use forms for steps

* Clean up

* Improve authentication page loading

* Fix CTA link

* Minor tweaks

* Fix page route

* Fix formatting

* Fix generated code formatting
2023-04-13 16:07:43 +02:00
Torkel Ödegaard
7d1b61e033
AlertRules: Update design to align it with recent changes to lists and tables (#66461)
* AlertRules: Update design to be less boxy

* tag alignment fix

* Minor tweak
2023-04-13 16:00:03 +02:00
Torkel Ödegaard
4796a63554
InteractiveTable: Updated design and minor tweak to Correlactions page (#66443)
* InteractiveTable: Updated design

* Fix css issue

* Fixed test

* Removed leftover
2023-04-13 15:50:49 +02:00
Gábor Farkas
b928fce070
Loki: Remove alpha feature toggle lokiDataframeApi (#65918)
loki: remove experimental feature-flag
2023-04-13 15:22:09 +02:00
Gábor Farkas
531caec602
Loki: Add feature flag to enable dataplane-compliant metric frames (#66017)
* loki: add feature flag to enable dataplane-compatible metric frames

* linter fix
2023-04-13 15:07:08 +02:00
Laura Benz
725f29e6d0
Design System: Set TextArea to display: block in order to remove spacing below (#66262)
refactor: set textarea to display: block and add margin
2023-04-13 14:21:36 +02:00
Sven Grossmann
fef43fff7b
Logs: Use DataQuery from @grafana/schema (#66403)
Logs: Use `dataQuery` from schema
2023-04-13 13:35:23 +02:00
Gábor Farkas
83289065f6
GrafanaData: Remove obsolete logs exports (#66271)
* grafana-data: removed obsolete logs exports

* updated betterer checksums
2023-04-13 13:32:09 +02:00
Sven Grossmann
7bc0692801
Logs: Add new LogRowContext types to @grafana/data (#66404)
* Logs: Add new LogRowContext types to grafana/data

* use right type for `RowContextOptions`

* add missing renames
2023-04-13 13:07:28 +02:00
Laura Fernández
344bbb251c
GLDS: Create AutoSaveField component (#61316) 2023-04-13 10:18:45 +02:00
Torkel Ödegaard
7f9ad2cd73
Table: Fix storybook stories (#66414) 2023-04-13 07:56:09 +02:00
Andreas Christou
c5172247a9
@grafana/ui: Add support for showing selected options in Select (#66391)
* Add support for showing selected options

* Don't set a default to avoid breaking existing
2023-04-12 18:05:52 +01:00
Torkel Ödegaard
4ea7677bff
Explore: Start using PanelChrome as container (#66370)
* Explore: Start using PanelChrome as container

* fix test

* Fixing issue with test and timerange
2023-04-12 18:58:08 +02:00
Torkel Ödegaard
0c032460ca
VizLegend: Fixes flicking visualization height & re-render (#66331)
* VizLegend: Fixes flicking visualization height & re-render

* Fix test
2023-04-12 18:57:42 +02:00
Michael Mandrus
5626461b3c
Caching: Refactor enterprise query caching middleware to a wire service (#65616)
* define initial service and add to wire

* update caching service interface

* add skipQueryCache header handler and update metrics query function to use it

* add caching service as a dependency to query service

* working caching impl

* propagate cache status to frontend in response

* beginning of improvements suggested by Lean - separate caching logic from query logic.

* more changes to simplify query function

* Decided to revert renaming of function

* Remove error status from cache request

* add extra documentation

* Move query caching duration metric to query package

* add a little bit of documentation

* wip: convert resource caching

* Change return type of query service QueryData to a QueryDataResponse with Headers

* update codeowners

* change X-Cache value to const

* use resource caching in endpoint handlers

* write resource headers to response even if it's not a cache hit

* fix panic caused by lack of nil check

* update unit test

* remove NONE header - shouldn't show up in OSS

* Convert everything to use the plugin middleware

* revert a few more things

* clean up unused vars

* start reverting resource caching, start to implement in plugin middleware

* revert more, fix typo

* Update caching interfaces - resource caching now has a separate cache method

* continue wiring up new resource caching conventions - still in progress

* add more safety to implementation

* remove some unused objects

* remove some code that I left in by accident

* add some comments, fix codeowners, fix duplicate registration

* fix source of panic in resource middleware

* Update client decorator test to provide an empty response object

* create tests for caching middleware

* fix unit test

* Update pkg/services/caching/service.go

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>

* improve error message in error log

* quick docs update

* Remove use of mockery. Update return signature to return an explicit hit/miss bool

* create unit test for empty request context

* rename caching metrics to make it clear they pertain to caching

* Update pkg/services/pluginsintegration/clientmiddleware/caching_middleware.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Add clarifying comments to cache skip middleware func

* Add comment pointing to the resource cache update call

* fix unit tests (missing dependency)

* try to fix mystery syntax error

* fix a panic

* Caching: Introduce feature toggle to caching service refactor (#66323)

* introduce new feature toggle

* hide calls to new service behind a feature flag

* remove licensing flag from toggle (misunderstood what it was for)

* fix unit tests

* rerun toggle gen

---------

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-04-12 12:30:33 -04:00
Kyle Brandt
e78be44e1a
SSE: Dataplane Compliance (#65927)
Takes a specific code path for data that identifies itself as dataplane instead of "guessing" what the data is.

The data must identify itself by being in the dataplane by having both the following frame metadata properties:

- TypeVersion property that is greater than 0.0
- 'Type' property

The flag is disableSSEDataplane and disables this functionality and uses the old code for all queries regardless.

See https://github.com/grafana/grafana-plugin-sdk-go/blob/main/data/contract_docs/contract.md for dataplane details.
2023-04-12 12:24:34 -04:00
Dan Cech
d49b79fb24
add workaround for intercom iframe background being non-transparent in dark mode (#66329) 2023-04-12 11:46:13 -04:00
ismail simsek
d4bd024951
Expressions: Fix expression load with legacy UID -100 (#65950)
* Fix expressions instance settings loading

* Introduce a new method to get name or uid

* Update public/app/features/plugins/datasource_srv.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Move getNameOrUid method outside the class

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-12 16:33:31 +02:00
Gábor Farkas
18cb2ac9dd
GrafanaUI: Remove obsolete logs exports (#66268)
* grafana-ui: removed obsolete logs exports

* updated betterer stats

* updated CODEOWNERS
2023-04-12 15:41:33 +02:00
Ivana Huckova
303777e682
Elasticsearch: Add feature toggle to disable running queries trough backend (#66260)
* Elasticsearch: Create feature toggle to disable running queries trough backend

* Fix frontend tests running trough frontend

* Update description of feature toggle
2023-04-12 15:20:43 +03:00
Ivana Huckova
29c43fcf7e
Explore: Remove deprecated DataSourceWithLogsVolumeSupport (#66266)
Logs volume: Remove deprecated DataSourceWithLogsVolumeSupport
2023-04-12 14:10:14 +02:00
Adela Almasan
7e270021a8
Timeseries: Limit long text in legend (#66307) 2023-04-11 13:01:57 -05:00
Ivan Babrou
a9bd3fc334
Timeseries: Align tooltip values to the right (#64096) 2023-04-11 11:54:34 -05:00
Torkel Ödegaard
58f1ee1501
Alert: Restore storybook examples (#66097)
* Alert: Restore storybook examples

* Remove elevated prop from inline banner story
2023-04-11 16:31:39 +02:00
Gabriel MABILLE
5df9e64986
AuthN: feature flag for external service authentication (#66160)
* AuthN: feature flag for external service authentication

* Change the description message
2023-04-11 15:21:19 +02:00
Ashley Harrison
1261345b81
Chore: Upgrade to react 18 (#64428)
* update react 18 related deps

* fix some types

* make sure we're on react-router-dom >= 5.3.3

* Use new root API

* Remove StrictMode for now - react 18 double rendering causes issues

* fix + ignore some @grafana/ui types

* fix some more types

* use renderHook from @testing-library/react in almost all cases

* fix storybook types

* rewrite useDashboardSave to not use useEffect

* make props optional

* only render if props are provided

* add correct type for useCallback

* make resourcepicker tests more robust

* fix ModalManager rendering

* fix some more unit tests

* store the click coordinates in a ref as setState is NOT synchronous

* fix remaining e2e tests

* rewrite dashboardpage tests to avoid act warnings

* undo lint ignores

* fix ExpanderCell types

* set SymbolCell type correctly

* fix QueryAndExpressionsStep

* looks like the types were actually wrong instead :D

* undo this for now...

* remove spinner waits

* more robust tests

* rewrite errorboundary test to not explicitly count the number of renders

* make urlParam expect async

* increase timeout in waitFor

* revert ExplorePage test changes

* Update public/app/features/dashboard/containers/DashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* skip fakeTimer test, ignore table types for now + other review comments

* update package peerDeps

* small tweak to resourcepicker test

* update lockfile...

* increase timeout in sharepublicdashboard tests

* ensure ExplorePaneContainer passes correct queries to initializeExplore

* fix LokiContextUI test

* fix unit tests

* make importDashboard flow more consistent

* wait for dashboard name before continuing

* more test fixes

* readd dashboard name to variable e2e tests

* wait for switches to be enabled before clicking

* fix modal rendering

* don't use @testing-library/dom directly

* quick fix for rendering of panels in firefox

* make PromQueryField test more robust

* don't wait for chartData - in react 18 this can happen before the wait code even gets executed

---------

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2023-04-11 10:51:54 +01:00
Piotr Jamróz
0bf2b89eb9
Explore: Align multiple log volumes (#64356)
* Align log volumes on x an y axes

* Move helper functions to logs/utils

* Add tests

* Simplify supplementaryQueries.ts

* Fix tests

* Revert code simplifications

To simplify the PR, this can be added in a separate PR

* Fix reusing logs volume when limited/non-limited are used

* Use more specific property name

* Add missing property

* Stretch graph to selected range but only if there's data available

* Fix unit tests

* Fix calculating maximum when bars are stacked

* Sort log volumes by data source name

* Simplify logic to determine if log volumes can be zoomed in
2023-04-11 10:05:04 +02:00
Ryan McKinley
af31c77331
Dataplane: Support prometheus dataplane contract for transformations and name matchers (#65237)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2023-04-08 00:13:19 +03:00
Torkel Ödegaard
e10ef2241d
Transformations: Improve UX and fix refId issues (#65982)
* Transformations: Improve UX and fix refId issues

* Show query names and frame names in description

* move to main grafan UI component

* Added unit test

* Fix lint error

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-07 08:31:37 +02:00
Galen Kistler
38482c90bf
Build URL params and include requestId (#65742)
* add requestId and ds_type to datasource request url
2023-04-06 14:43:10 -05:00
Matthew Jacobson
63187fae0c
Alerting: Remove and revert flag alertingBigTransactions (#65976)
* Alerting: Remove and revert flag alertingBigTransactions

This is a partial revert of #56575 and a removal of the `alertingBigTransactions` flag.

Real-word use has seen no clear performance incentive to maintain this flag. Lowered db connection count
came at the cost of significant increase in CPU usage and query latency.

* Fix lint backend

* Removed last bits of alertingBigTransactions

---------

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2023-04-06 18:06:25 +02:00
Mofeng
55553322c8
Design System: Remove unused type parameter in SegmentProps and SegmentInput (#64919)
* fix: Remove unused type parameter in `SegmentProps` and `SegmentInput`

* lint: prettier auto fix

* fix( SegmentInput.story.tsx ): adapt to changes
2023-04-06 15:32:39 +02:00
Gábor Farkas
c4c406aacd
DataFrame: Handle nanosecond-precision timestamp fields (#64529)
handle nanosec-precision timestamps
2023-04-06 09:14:21 +02:00
Ivan Ortega Alba
45df536263
Flaky E2E: Wait for the data to be loaded before switch to table view (#66072)
Fix flaky e2e for panel edit suite
2023-04-06 09:07:41 +02:00
Alexa V
9041e7dfa6
Fix: DataLinks from data sources override user defined data link (#65996)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-04-05 15:44:43 +02:00
Andrej Ocenas
37eaf50197
FlameGraph: Use pyroscope/flamegraph (#65896) 2023-04-05 14:57:24 +02:00
Jack Westbrook
c96d5d6c7e
Grafana UI: Ignore internal stories when compiling (#65983)
Grafana UI: Ignore internal stories when compiling
2023-04-05 11:47:37 +02:00
Joao Silva
6108701aed
VizLegend: Change border radius from default to pill (#65946) 2023-04-05 11:30:29 +02:00
Torkel Ödegaard
507c6e7d97
Templating: Replace __data , __field and __cell_n with macros (#65324)
* Templating: __data __field and __series macros

* filter out datacontext from json serialization

* Fix condition

* Update

* Added test cases for formatting data, and field macros
2023-04-05 11:10:33 +02:00
Torkel Ödegaard
f69304fd50
Badge: Fix alignment and simplify markup and styles (#65980) 2023-04-05 10:37:30 +02:00
Gábor Farkas
4ded937c79
Show traceids for failing and successful requests (#64903)
* tracing: show backend trace ids in frontend

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* added feature flag

* bind functionality to the feature flag

* use non-generic name for traceid header

* fixed tests

* loki: do not create empty fields

* do not add empty fields

* fixed graphite test mock data

* added unit-tests to queryResponse

* added unit-tests for backend_srv

* more typescript-friendly check

* added unit-tests for runRequest

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-04-05 09:13:24 +02:00
Marcus Andersson
9719ee9bd3
PluginExtensions: Fixed issue in typings for the onClick link callback (#65978)
* Fixed bug with event being forced.

* Made onClick undefinable in the config as well.

* Fixed some more type issues.
2023-04-05 07:55:44 +02:00
Ryan McKinley
d974e5f25a
TrendPanel: Add new trend panel (Alpha) (#65740) 2023-04-04 20:52:20 -07:00
Grot (@grafanabot)
fa36392185
Release: Bump version to 10.0.0-pre (#65926)
"Release: Updated versions in package to 10.0.0-pre"
2023-04-04 16:41:50 +03:00
Ashley Harrison
6f7363af3a
Dropdown: Stop Dropdown accepting a function as children (#65467)
remove dropdown accepting function children
2023-04-04 14:40:44 +01:00
Marcus Andersson
68796a9f31
PluginExtensions: Fixed issue with incorrect type being exposed when configuring an extension (#65910)
Fixed issue with wrong type required in configureExtensionLink
2023-04-04 14:32:34 +02:00
Andreas Christou
61599de32c
Chore: Update AddPanel selectors for top nav (#65871)
* Update add panel selectors for top nav

* trigger build
2023-04-04 13:07:32 +01:00
Marcus Andersson
c8ecd0679b
PluginExtensions: Adding full targets to the panel menu context (#65861)
* Making sure we add the whole query to the dashboard panel context.

* Adding some more tests.

* Synced with main.
2023-04-04 07:17:10 +02:00
Joan López de la Franca Beltran
87a0c95164
Rendering: Experimental support to use JWTs as auth method (#60841)
* Rendering: Add support for auth through JWT

* Goimports

* Apply review suggestions

* Correct feature toggle ref

* Minor changes
2023-04-03 18:53:38 +02:00
Levente Balogh
1380fa54d6
UI Extensions: Rename placement to extensionPointId (#65841)
* UI Extensions: Rename `placement` to `extensionPointId`

* Fix tests.

* Fix conflicts and review notes

* Remove `placement` from some other places
2023-04-03 18:59:54 +03:00
Marcus Andersson
8b738d770c
PluginExtensions: Added onClick to link as a replacement for the command type (#65837)
* Added onClick to the link and made path optional.

* Added type to the import.

* revert(plugin-extensions): put back isPromise utility function

* Minor update to the isPromise function.

* added onClick in the panel menu item.

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-04-03 17:27:55 +02:00
Galen Kistler
96e9e80739
Prometheus: Browser resource caching (#60711)
Add cache control headers and range snapping to Prometheus resource API calls.
2023-04-03 09:07:17 -05:00
Matias Chomicki
663ed7ba82
Loki Query Splitting: Rename from "chunk" to "splitting" (#65630)
* Update chunking mentions in the code and ui

* Rename files and exported functions

* Rename configuration attribute

* Rename grouped querying function name

* Update more function names

* Update unit test

* Update unit tests

* More renames

* Rename time splitting functions
2023-04-03 12:30:08 +00:00
Alexa V
2b0c0d4b95
Dashboards: Enable feature flag newPanelChromeUI by default (#65593) 2023-04-03 13:50:43 +02:00
Polina Boneva
bf0f4a6751
Dashboard: Enable feature toggle emptyDashboardPage by default (#65464)
* enable FF emptyDashboardPage by default

* fix smoke test for creating a panel after enabling FF emptyDashboardPage by default
2023-04-03 14:04:54 +03:00
Torkel Ödegaard
c63cb5a0bd
PanelChrome: Add option to show actions on the right side (actions = leftItems) (#65762)
* PanelChrome: Add option to show actions on the right side

* remove button style change

* Added docs and minor tweaks to align the type with titleItems

* Hover header fixes, storybook improvements, and title description fix

* Fixed condition for drag icon in hover header
2023-04-03 12:44:00 +02:00
Oscar Kilhed
06ea490cc2
TablePanel: Fix table cells overflowing when there are multiple data links (#65711)
* Fix table cells overflowing when there are multiple data links
2023-04-03 12:34:29 +02:00
Levente Balogh
34f3878d26
UI extensions: Refactor the registry and remove the "command" type (#65327)
* Wip

* Wip

* Wip

* Wip

* Wip
2023-04-03 10:42:15 +02:00
Emil Tullstedt
be9361cb9e
Logger: Add feature toggle for errors in HTTP request logs (#64425) 2023-03-31 15:38:09 +02:00
Torkel Ödegaard
86b2af35b2
Table: Fix column filter popup shadow (#65675)
* Table: Fix column filter popup shadow

* fix border
2023-03-31 14:51:56 +02:00
Ashley Harrison
a123e0a97c
e2e tests: Add selector to close dashboard settings and use it in e2e tests (#65625)
* add selector to close dashboard settings and use it in e2e tests

* check visibility of add panel button

* check visibility of add new panel button before clicking
2023-03-31 09:32:44 +01:00
Leon Sorokin
e0ef79f5cc
TimeSeries: Don't extend stepped interpolation to graph edges (#65657) 2023-03-31 01:09:40 -06:00
Isabella Siu
92965578b3
CloudWatch Logs: Fix running logs queries with expressions (#65306) 2023-03-30 17:40:01 -04:00
Alexander Weaver
b2abb63286
Alerting: Introduce proper feature toggles for common state history backend combinations (#65497)
* define 3 feature toggles for rollout phases

* Pass feature toggles along

* Implement first feature toggle

* Try a different strategy with fall-throughs to specific configurations

* Apply toggle overrides once outside of backend composition

* Emit log messages when we coerce backends

* Run code generator for feature toggle files

* Improve wording in flag descs

* Re-run generator

* Use code-generated constants instead of plain strings

* Use converted enum values rather than strings for pre-parsing
2023-03-30 13:53:21 -05:00
Laura Fernández
ce1298c947
Storybook: update Alert story (#63959) 2023-03-30 18:11:30 +02:00
Francisco Montes de Oca
15b76808b7
DateTimePicker: Add min date support to calendar (#64632) 2023-03-30 18:04:02 +02:00
Ashley Harrison
ff96cd1342
Chore: add selector for items in the megamenu (#65633)
add selector for items in the megamenu
2023-03-30 16:57:08 +01:00
Leon Sorokin
89f3f289eb
TimeSeries: Improve stacking direction heuristic (#65499) 2023-03-30 10:30:49 -05:00
Alex Khomenko
2407d2a51d
e2e: Add Toggle menu selector (#65607) 2023-03-30 16:01:49 +03:00
Süleyman Barış Eser
6f6ebf5b18
Fix FieldValidationMessage height issue (#64717) 2023-03-30 14:37:15 +02:00
Polina Boneva
b9fb23502c
Dashboard: Add new visualization/row/library panel/pasted panel is now a dropdown menu (#65361)
* Empty Dashboard state has its own CTA items and its own separate box to choose a library panel to create

* show empty dashboard screen if no panels

* add feature flag for empty dashboard redesign

* only show empty dashboard redesign if FF

* add-new-panel button is a dropdown with options: visualization, row, import, paste

* fix onPasteCopiedPanel types

* do not create new panel to new dashboard if emptyDashboardPage FF true

* ToolbarButton does not allow rendering of Dropdown's overlay - switch to Button

* remove panel-add icon's default size of xl

* separate components for add new panel from dash navigation bar
2023-03-30 13:50:35 +03:00
Süleyman Barış Eser
1c7921770c
Grafana UI: Fix tooltip prop of button component (#64765)
fix tooltip prop of Button component
2023-03-30 11:53:11 +02:00
Joao Silva
a02091cc19
Search: Fix checkbox and row styles (#65515) 2023-03-30 11:05:44 +02:00
Alexa V
3ad4dc1547
Dashboards: Fix Mobile support dashboard issues on new iOS 16.3 (#65542) 2023-03-30 09:47:00 +02:00
Jev Forsberg
d23ebf63d2
Table Panel: Revert row number column changes (#65470)
* baldm0mma/revert

* baldm0mma/revert

* baldm0mma/revert/ update tests

* baldm0mma/revert/ add back isCountRowsSet condition

* baldm0mma/revert/ update tests

* baldm0mma/revert update annos
2023-03-29 11:04:24 -06:00
Kyle Brandt
674144c8e8
Prometheus: Update FrameType and make __name__ the field name (#62694)
These changes would make the response more in line with the dataplane contract, changes are under the feature toggle prometheusDataplane
2023-03-29 11:26:32 -04:00
Piotr Jamróz
5c138e16d7
Logs: Merge Log Volumes by data source name (#65392)
* Merge log volume by data source name

* Fix creating response for multiple fallback volumes

* Fix unit tests

* Hide title if there's only one log volume visible

* Make hide title optional

* Remove redundant parentheses

* Do not use frame.name, so the visualization can pick displayNameFromDS from the field config

* Simplify setting aggregated data frame meta data

* Update public/app/features/logs/utils.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Fix legend toggling

* Ensure limited graph info is shown

* Always show the data source name

---------

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-03-29 13:43:56 +02:00
Piotr Jamróz
383148bcd1
Glue: Fix creating duplicated data links created by Correlations (#65490)
* Ensure correlations do not create duplicated data links

* Remove correlation links before processing each correlation

* Improve test coverage
2023-03-29 13:09:27 +02:00
Abdul
aedcbf2a4f
Explore: Make DataSourcePicker visible on small screens (#65149)
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-03-29 02:26:37 +01:00
Torkel Ödegaard
b7b608418d
Templating: Introduce macros to simplify and optimize some scopedVars (#65317)
* Templating: Introduce macros to simplify and optimize some scopedVars

* Fixing tests

* fix test

* minor fix

* refactoring so macros work with formatting

* remove breaking change and keep current inconsistency

* Rename valueIndex to rowIndex

* Minor fixes

* Added test dashboard

* Added tags to dashboard

* Update

* Added test to check it returns match

* Update

* Fixed dashboard

* fix
2023-03-28 19:22:34 +02:00
Kristian Bremberg
420aeb3bec
Sanitize: do not escape forward slash (#65416) 2023-03-28 12:42:53 -04:00
Piotr Jamróz
b11186f946
Templating: Optionally save interpolated expressions when replacing variables in a string (#65411)
* Testing a refactor

* update

* Update interface, test interoplations map

* Refactoring

* Add more explicit comment about new behavior

* Update packages/grafana-runtime/src/services/templateSrv.ts

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-03-28 16:19:27 +02:00
Laura Fernández
48f5825499
DateTimePicker: Can now select time correctly (#65428) 2023-03-28 12:45:56 +02:00
Polina Boneva
221c5efedc
Dashboard: Empty/No Panels dashboard with a new design (#65161)
* Empty Dashboard state has its own CTA items and its own separate box to choose a library panel to create

* show empty dashboard screen if no panels

* start page for empty dashboard

* add feature flag for empty dashboard redesign

* only show empty dashboard redesign if FF
2023-03-28 12:42:23 +03:00
Alexa V
42b58fbca6
[Panel Header - Fullstory]: Make sure new menu's are findable in fullstory (#65167) 2023-03-28 10:20:35 +02:00
Torkel Ödegaard
f43ef18732
Revert "Explore: Show log line if there is an interpolated link" (#65315)
Revert "Explore: Show log line if there is an interpolated link (#62926)"

This reverts commit aa857e2a4f.
2023-03-27 19:19:42 +02:00
Ivana Huckova
f3da91f53f
Elasticsearch: Run Explore queries trough data source backend (#65339)
Elasticsearch: Execute Explore queries trough backend
2023-03-27 15:52:27 +02:00
David Radcliffe
cb68b1e0d1
Dashboard: Add value format for requests per minute (#62258)
add requests/min as value format option
2023-03-27 16:37:40 +03:00
Ryan McKinley
5870439026
Angular: Add feature toggle to disable angular at runtime (#65245) 2023-03-23 17:43:45 +02:00
Karl Persson
382b24742a
Auth: Add feature flag to move token rotation to client (#65060)
* FeatureToggle: Add toggle to use a new way of rotating tokens

* API: Add endpoints to perform token rotation, one endpoint for api request and one endpoint for redirectsd

* Auth: Aling not authorized handling between auth middleware and access
control middleware

* API: add utility function to get redirect for login

* API: Handle token rotation redirect for login page

* Frontend: Add job scheduling for token rotation and make call to token rotation as fallback in retry request

* ContextHandler: Prevent in-request rotation if feature flag is enabled and check if token needs to be rotated

* AuthN: Prevent in-request rotation if feature flag is enabled and check if token needs to be rotated

* Cookies: Add option NotHttpOnly

* AuthToken: Add helper function to get next rotation time and another function to check if token need to be rotated

* AuthN: Add function to delete session cookie and set expiry cookie

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-03-23 14:39:04 +01:00
Domas
3301275dc0
Logging: Report error boundary errors to Faro (#65164) 2023-03-23 14:30:00 +02:00
Ryan McKinley
baf5a1d141
Angular: Rename autoMigrateGraphPanels feature flag to autoMigrateOldPanels (#65243) 2023-03-22 21:02:36 -07:00
Ryan McKinley
732f3da33f
Transformers: Support adding the row index using calculate field transformer (#65148) 2023-03-22 11:10:22 -07:00
Ryan McKinley
f96637b5fc
Live: Remove (alpha) ability to configure live pipelines (#65138) 2023-03-22 20:09:44 +02:00
Torkel Ödegaard
b2fb7a162a
Table: Fixes issue with pagination summary causing scrollbar (#65189)
* Table: Fixes pagination rows counter not causing scrollbar

* remove unused style
2023-03-22 18:57:05 +01:00
Torkel Ödegaard
cd490ba0be
DataLinks: Fixes interpolation (formatting) of __all_variables and __url_time_range (#65162)
* DataLinks: Fixes interpolation (formatting) of __all_variables and __url_time_range

* simplify if statement
2023-03-22 18:56:18 +01:00
Eric Leijonmarck
3cd952b8ba
Auth: Fix orgrole picker disabled if isSynced user (#64033)
* fix: disable orgrolepicker if externaluser is synced

* add disable to role picker

* just took me 2 hours to center the icon

* wip

* fix: check externallySyncedUser for API call

* remove check from store

* add: tests

* refactor authproxy and made tests run

* add: feature toggle

* set feature toggle for tests

* add: IsProviderEnabled

* refactor: featuretoggle name

* IsProviderEnabled tests

* add specific tests for isProviderEnabled

* fix: org_user tests

* add: owner to featuretoggle

* add missing authlabels

* remove fmt

* feature toggle

* change config

* add test for a different authmodule

* test refactor

* gen feature toggle again

* fix basic auth user able to change the org role

* test for basic auth role

* make err.base to error

* lowered lvl of log and input mesg
2023-03-22 17:41:59 +00:00
Torkel Ödegaard
a3de3c9dde
Table: Fixes table panel gauge alignment (#64994)
* Table: Fixes tables guage alignment issues

* Removed console.log

* Fixing
2023-03-22 17:08:41 +01:00
Ryan McKinley
01a5d5042d
Units: Format currency with negative before the symbol (#65152) 2023-03-22 07:54:54 -07:00
juanicabanas
5435ae25f7
PublicDashboards: Frontend tracking events (#64854) 2023-03-22 10:49:34 -03:00
ismail simsek
1328878ace
Expressions: More robust expression check (#65006)
More robust expression check
2023-03-22 14:02:20 +01:00
Kristina
aa857e2a4f
Explore: Show log line if there is an interpolated link (#62926)
* bring in source from database

* bring in transformations from database

* add regex transformations to scopevar

* Consolidate types, add better example, cleanup

* Add var only if match

* Change ScopedVar to not require text, do not leak transformation-made variables between links

* Add mappings and start implementing logfmt

* Add mappings and start implementing logfmt

* Remove mappings, turn off global regex

* Add example yaml and omit transformations if empty

* Fix the yaml

* Add logfmt transformation

* Cleanup transformations and yaml

* add transformation field to FE types and use it, safeStringify logfmt values

* Add tests, only safe stringify if non-string, fix bug with safe stringify where it would return empty string with false value

* Add test for transformation field

* Do not add null transformations object

* Add provisioning (to be removed) and show log lines with links

* Only display links if change to query was made

* Break out transformation logic, add tests to backend code

* Fix lint errors I understand 😅

* Fix the backend lint error

* Remove unnecessary code and mark new Transformations object as internal

* Add support for named capture groups

* Remove type assertion

* Remove variable name from transformation

* Add test for overriding regexes

* Add back variable name field, but change to mapValue

* fix go api test

* Change transformation types to enum, add better provisioning checks for bad type name and format

* Change transformation types to enum, add better provisioning checks for bad type name and format

* Check for expression with regex transformations

* Remove isInterpolated variable, add option to always use format function

* Add template variable check to links

* Use new functions

* Filter log line at render, remove extra createSpanLink imports

* Add scrollable to long log messages

* Remove test that is no longer accurate

* Remove test correlation

* Add tests, fix duplicate key issue

* WIP: show log line links key/value pairs

* Some not great style changes

* Change LogDetailsRow for better multi value formatting

* Cleanup

* Add additional information around variable regex, implement PR feedback

* Display name with fieldPath if applicable

* Add variables with fieldPaths to test

* Count empty string as undefined variable

* Add better commented version of function, fix tests by removing new variable

* Modify when links show

* Remove sample yaml

* If a link has no variables, set value to field name, and some formatting issues

* Add comments and change variable names to be more clear, add back logic where needed, add test coverage for new scenario

* Fix formatting of replaceInVariableRegex comment

* Remove changes from Grafana-data, move logic into explore

* Rename function and property to match similar format

* Move types to type files and consolidate definitions, rename functions, change field definitions to accept arrays of keys/values, move function to parser, hide actions on multi key/value rows

* Add tests to logParser’s new function
2023-03-22 08:01:04 -05:00
Uladzimir Dzmitračkoŭ
67daa90651
GrafanaUI: change active tab styles to prevent layout shift (#64126) 2023-03-22 11:49:50 +01:00
Gilles De Mey
1b3e6d65ae
grafana-ui: cache ellipsis-h (#65017) 2023-03-21 16:27:13 +01:00
Tobias Skarhed
590b07539f
Core: Update components to have standard radii (#65065)
* Update core border radii

* Add non-default border-radius on some grafana-ui items
2023-03-21 12:24:50 +01:00
Selene
1328a32a31
Chore: Fix times in schemas (#64906)
* Fix times in schemas

* Fix frontend lints
2023-03-21 10:42:19 +01:00
Ashley Harrison
9ca01cc070
Notifications: Enable display of trace ID by default (#64884)
enable tracing by default
2023-03-21 09:35:21 +00:00
Jev Forsberg
93bcc3b26c
Stat Panel: Add an option for a non-gradient/solid background (#65052)
* baldm0mma/statNoGrad/ add no gradient option

* baldm0mma/statsNoGrad/ update migration and tests

* baldm0mma/statsNoGrad/ update suggestions module

* baldm0mma/statsNoGrad/ update bigValueLayout test

* baldm0mma/statNoGrad/ remove unused comment

* baldm0mma/statNoGrad/ revert to background

* baldm0mma/statNoGrad/ update enum values
2023-03-20 11:13:27 -06:00
Ryan McKinley
91a4b8b529
Chore: remove dashboardsFromStorage (#65058) 2023-03-20 18:36:49 +02:00
Artur Wierzbicki
4274b9414f
Chore: remove querylibrary feature toggle (#65021)
* chore: remove querylibrary

* chore: remove querylibrary

* chore: remove querylibrary
2023-03-20 20:00:14 +04:00
Sven Grossmann
68551ac9ca
Loki: Add lokiQueryChunkingOption feature flag (#65057)
* add `lokiQueryChunkingOption` feature flag

* be safe and also rely on `config.featureToggles.lokiQuerySplitting`

* renamed to `lokiQuerySplittingConfig`

* fix typo
2023-03-20 16:51:36 +01:00
Torkel Ödegaard
c00c0a283e
TablePanel: Switch to radio buttons for some cell options (#65000)
* TablePanel: Switch to radio buttons for the cell option

* Fixes issue with no default mode handling for colored background
2023-03-20 16:37:58 +01:00
Tobias Skarhed
1332b0d844
Grafana UI: Change border-radius to common 2px (#64502)
* Change border-radius to common 2px

* Add new radius options

* Deprecate radiusBorder function
2023-03-20 15:39:30 +01:00
Jack Westbrook
489500b5a7
Toolkit: Minor bump Webpack (#64957)
chore(toolkit): bump webpack to silence dependabot
2023-03-20 15:37:55 +01:00
Torkel Ödegaard
18385bfb0e
Revert "Stat: Add ability to remove default single-color background gradient" (#65002)
Revert "Stat: Add ability to remove default single-color background gradient (#64353)"

This reverts commit de901560d7.
2023-03-20 14:17:51 +01:00
Torkel Ödegaard
5c9898a860
Scenes: SceneApp example in core (#64686)
* Scenes: Progress on demo app

* Argh

* Fixing breadcrumbs

* Added spacer

* Conditional scene objects

* Quick and dirty test for drilldown link via panel title

* Changed the toggle

* Add url state syncing for most links

* Add url state syncing for most links

* Fix instance in url params

* Quick and dirty tabs on the handler page

* fixing breadcrumbs

* Hide footer

* Updates

* new table styles

* Update table cell link styles

* Added search box

* Scene app demo: dynamic data link (#60398)

* Dynamically build data links

* Add field override tests

* Updates

* Updated

* Updates

* before nesting routing

* Something is working

* Caching and nested routes working

* Simplify model

* Use app components from grafana/scenes

* Make the monitoring app work with section nav

* Fixing

* Update scenes

* Remove unused route

* Updates

* remove file

* Update scenes version and use new features

* Remove semicolon

* removed unused thing

* Add refresh pickers

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-03-20 11:15:42 +01:00
Levente Balogh
788e4a7f19
Extensions: Simplify the configure() function (#64958)
refactor: stop passing the extension to the `configure()` function
2023-03-20 10:41:15 +01:00
Jack Westbrook
46cba5f993
Fix: Grafana/e2e openPanelMenuExtension flow (#64974)
fix(e2e): update openPanelMenuExtension to open extensions menu
2023-03-20 10:18:05 +01:00
Alexa V
5bbdc62044
Storybook: Add MDX PanelChrome documentation (#64916) 2023-03-20 06:48:41 +01:00
Sven Grossmann
7261c6f7cd
DataSourceWithBackend: Add queryGroupId to find correlated/related queries (#64587)
* add `correlationId` to queries

* trace correlation id in backend

* add correlation id to loki's span

* add correlation id to query chunks

* fix test

* fix DataSourceWithBackend test

* change to `queryGroupId`

* remove empty line

* fix test in `DataSourceWithBackend`
2023-03-17 15:48:13 +01:00
Ryan McKinley
747b729743
Tabs: Avoid whitespace wrapping (#64824) 2023-03-17 06:51:29 -07:00
Ryan McKinley
b39039eadd
DataLinks: Default to percentEncoding (#64841) 2023-03-17 06:51:06 -07:00
Kristian Bremberg
27e2b037ae
Chore: Use DOMPurify to sanitize strings rather than js-xss (#62787)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-03-16 19:13:34 +02:00
Ryan McKinley
2578774188
Chore: Avoid explicit React.FunctionComponent<Props> when possible (round 3) (#64839) 2023-03-16 16:56:26 +02:00
Alexa V
fef0ee913c
Panel Header: Add CancelQuery option to panel header (#64796)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2023-03-16 13:56:58 +01:00
Ashley Harrison
b19f7bb653
Chore: update more unit tests to work with react 18 (#64812)
update more unit tests to work with react 18
2023-03-16 10:00:39 +00:00
Ashley Harrison
7fd7c6ed78
Chore: Better typings in @grafana/ui needed for react 18 (#64828)
* type changes needed for react 18

* pass empty props as generic

* move eslint ignore to correct line
2023-03-16 09:42:51 +00:00
Marcus Andersson
8617ad688d
Plugins: Added e2e flow for triggering panel menu UI extensions (#64855)
Added e2e flow for clicking a panel menu extension item.
2023-03-16 09:57:53 +01:00
ismail simsek
0823672fce
Influxdb: Re-introduce backend migration feature toggle (#64829)
* Revert "Influxdb: Remove backend migration feature toggle (#61308)"

This reverts commit 67c02f66

* Put feature toggle back
2023-03-15 18:12:16 +01:00
Ryan McKinley
4f13e78d11
Chore: Avoid explicit React.FC<Props> when possible (round 2) (#64749) 2023-03-15 16:56:09 +02:00
Alexa V
bc5400d8f5
Panel Header: Add an "untitled" placeholder, and change the dragging icon in the hover header (#64700)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2023-03-15 14:28:52 +01:00
Süleyman Barış Eser
34828f6c50
Storybook: Remove unused sizes from RadioButtonGroup story (#64716) 2023-03-15 12:51:28 +01:00
Ashley Harrison
e0e6165f70
Chore: adjust more unit tests to work with react 18 (#64759)
adjust unit tests to work with react 18
2023-03-15 10:12:13 +00:00
Ryan McKinley
6751a93d49
FeatureToggles: remove open type declaration (#64645) 2023-03-14 19:47:32 +02:00
Ashley Harrison
85e5326040
Chore: Adjust unit tests so they work with react 18 (#64698)
tweak unit tests so they work with react 18
2023-03-14 17:24:04 +00:00
Connor Lindsey
c29b6c07dc
[Explore] Fix lint error by updating field overrides tests (#64754)
Fix type error in fieldOverrides.test.ts
2023-03-14 10:40:02 -06:00
Connor Lindsey
1e7c27e636
Explore: Add range option to internal data links (#64063)
* Add range option to internal data links

* Add test for internal link time range
2023-03-14 09:12:46 -06:00
Jev Forsberg
de901560d7
Stat: Add ability to remove default single-color background gradient (#64353)
* baldm0mma/feature/solidOption/ update cue and ts types

* baldm0mma/feature/solidOption/ update data structures

* baldm0mma/feature/solidOption/ vizrepeater investigation

* baldm0mma/feature/solidOption/ add buildGradientBackground

* baldm0mma/feature/solidOption/ remove conlogs from fieldDisplay.ts

* baldm0mma/feature/solidOption/ rem destruct in fielddisplay.ts

* baldm0mma/feature/solidOption/ rem conlogs from bivaluelayout.tsx

* baldm0mma/feature/solidOption/ rem conlogs in visrepeater

* baldm0mma/feature/solidOption/ rem conlogs from statpanel.tsx

* baldm0mma/feature/solidOption/ add annotations in BigValue.tsx

* baldm0mma/feature/solidOption/ update cue

* baldm0mma/feature/solidOption/ remove unused anno

* baldm0mma/feature/solidOption/ update with toggle conditinal

* Update module.tsx

update anno

* baldm0mma/feature/solidOption/ update annos

* baldm0mma/feature/solidOption/ undo change

* baldm0mma/featurew/solidOption/ add anno for boolean toggle in stat module

* baldm0mma/featurew/solidOption/ update anno in BigValue.tsx for hasGradient

* baldm0mma/featurew/solidOption/ updart default logic in bigValueLayout.tsx
2023-03-14 08:59:54 -06:00
Ryan McKinley
d710507bc5
Chore: Avoid explicit React.FC<Props> when possible (#64722) 2023-03-14 16:38:21 +02:00
juanicabanas
5e46ea17b4
PublicDashboards: Request view access page selectors (#64718) 2023-03-14 09:46:08 -03:00
Ashley Harrison
53186c14a4
Chore: Improve some types (#64675)
* some type fixes

* few more

* more type fixes

* fix the majority of (window as any) calls

* don't make new variable for event

* few more

* MOAR
2023-03-14 09:51:44 +00:00
Leon Sorokin
855de98133
TimeSeries: fix & optimize time string parsing (#64640) 2023-03-13 09:59:40 -05:00
Marco Schaefer
d8a497ee6e
chore: upgrade faro-core and faro-web-sdk to 1.0.2 (#64407)
With v1.0.2 Faro explicitly closes fetch requests.
This fixes an issue were (headless) chrome browser
still considers those requests as open  which lead to timeouts.
2023-03-13 15:56:10 +02:00
Ashley Harrison
3a1862f37f
TimeSeries: fix time comparer not comparing date strings properly (#64622)
* fix time comparer not comparing times properly

* move isDateTime last as it's probably the most expensive check
2023-03-13 09:31:27 +00:00
Torkel Ödegaard
abbae80b5e
TablePanel: Default cell height should be small (#64611)
* TablePanel: Default cell height should be small

* Component default
2023-03-13 08:12:46 +01:00
Ryan McKinley
d5a9a0cea0
Chore: remove comments feature (#64644) 2023-03-11 04:28:12 -08:00
Leon Sorokin
18e3e0ca8d
FieldMatchers: Add match by value (reducer) (#64477)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-03-10 17:17:29 -06:00
renovate[bot]
faf19f3bf5
Update dependency webpack to v5.76.0 (#64605)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-10 14:44:49 +01:00
Torkel Ödegaard
73ce20ab48
Table Panel: Add ability to use text color for value or hide value in gauge cell (#61477)
* BarGauge: New value options

* Fix typings for cell options, add new value mode option for bar gauge cells

* Add BarGauge panel option, tests, and update test dashboard

* Updated

* Added default

* Goodbye trusty console.log

* Update

* Merge changes from main

* Update docs

* Add valuemode doc changes

* Update gdev dashboard

* Update valueMode symbol name to valueDisplayMode

* Use Enums as Opposed to literals, don't calculate values when hidden

* Remove double import

* Fix tests

* One more test fix

* Remove erroneous targets field, fix type of maxDataPoints

* Strip nulls and add index field to Thresholds

* Gen cue

* remove bad targets again

* Fixes

---------

Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-03-10 14:41:46 +01:00
renovate[bot]
a8f201f8ab
Update dependency rimraf to v4.4.0 (#64601)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-10 14:00:25 +01:00
Levente Balogh
79152969f3
Extensions: Expose an enum for available placements (#64586)
* feat: expose an enum type for extension placements

* fix: export the enum properly
2023-03-10 13:55:38 +01:00
Domas
548a5054ad
Table: Introduce sparkline cell type (#63182) 2023-03-10 14:41:06 +02:00
Leon Sorokin
14251db9ba
Chore: uFuzzy 1.0.6 (#64575) 2023-03-10 04:49:02 -07:00
Torkel Ödegaard
af5ee9c66d
PanelChrome: Fixes title max width, and make make menu more prominent (#64492)
* PanelChrome: Fixes title max width, and make make menu more prominent

* Add fix for wrapping timeshift
2023-03-10 12:25:25 +01:00
juanicabanas
a134b47e01
PublicDashboards: Show email sharing feature depending on featureEnabled flag (#64555) 2023-03-09 16:58:29 -03:00
Ashley Harrison
3336327306
Navigation: Fix Home logo always going to /login (#62658)
* only redirect to /login when anonymous access is disabled

* only search for dashboards when not logged in if anon access is enabled

* fix go logic

* add unit tests
2023-03-09 16:42:45 +00:00
Yahima Duarte
e8c131eb6f
GrafanaUI: Implement new component Toggletip (#64459) 2023-03-09 16:12:38 +01:00
Torkel Ödegaard
fb55dd5df6
PanelChrome: Improve error state design (#63776)
* PanelChrome: Improve error state design

* Simplify logic for hoverHeader

* padding for the title only for the title, not the whole header

* Review fixes

* missed saving file

---------

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2023-03-09 10:06:25 +01:00
Ryan McKinley
4b94c7e5d2
Schema: Remove key from root DataQuery type (#64467) 2023-03-08 16:52:31 -05:00
Ashley Harrison
11bc66a0e8
Chore: use React.PropsWithChildren to explicitly define the children prop (#64433)
* use React.PropsWithChildren to explicitly define the children prop

* fix ThemeDemo as well

* provide empty generics
2023-03-08 16:12:54 +00:00
Andres Martinez Gotor
15aae5e8a9
Panel: Show multiple errors info in the inspector (#64340) 2023-03-08 16:11:38 +01:00
Levente Balogh
d44dc0f100
Plugins: Allow command extensions to open modals (#64029)
feat: make it possible to open modals from commands
2023-03-08 15:44:48 +01:00
Jev Forsberg
09341a0cd6
TablePanel: fix footer bug; no footer calculated values after "hidden" column override (#64269)
* baldm0mma/bug/tableFooter/ first commit

* baldm0mma/bug/tableFooter/ investigation annotations

* baldm0mma/bug/tableFooter/ solution

* baldm0mma/bug/tableFooter/ rem conlogs in footerrow.txs

* baldm0mma/bug/tableFooter/ rem conlogs in tablepanel.tsx

* baldm0mma/bug/tableFooter/ rem conlgs in table.tsx

* baldm0mma/bug/tableFooter/ rem conlogs in utils.ts

* baldm0mma/bug/tableFooter/ reset return in footerRow.tsx

* baldm0mma/bug/tableFooter/ rem unused anno in table.tsx

* baldm0mma/bug/tableFooter/ rem unsed annos in utils.ts

* baldm0mma/bug/tableFooter/ add addMissingColumnIndex

* baldm0mma/bug/tableFooter/ add annos

* baldm0mma/bug/tableFooter/ add annos

* baldm0mma/bug/tableFooter/ / add annos

* baldm0mma/bug/tableFooterFix/ update annos

* baldm0mma/bug/tableFooterFix/ update spelling in utils

* baldm0mma/bug/tableFooterFix/ rem unused condition in utils.ts

* baldm0mma/bug/tableFooterFix/ update anno in utils.ts

* Wrap comments and fix misspelling.

* baldm0mma/bug/tableFooterFix/ add TSDoc

* baldm0mma/bug/tableFooterFix/ update annotations in utils.ts

---------

Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
2023-03-08 06:57:01 -07:00
Marcus Andersson
b63c56903d
Plugins: Extend panel menu with commands from plugins (#63802)
* feat(plugins): introduce dashboard panel menu placement for adding menu items

* test: add test for getPanelMenu()

* added an unique identifier for each extension.

* added context to getPluginExtensions.

* wip

* Wip

* wiwip

* Wip

* feat: WWWIIIIPPPP 🧨

* Wip

* Renamed some of the types to align a bit better.

* added limit to how many extensions a plugin can register per placement.

* decreased number of items to 2

* will trim the lenght of titles to max 25 chars.

* wrapping configure function with error handling.

* added error handling for all scenarios.

* moved extension menu items to the bottom of the more sub menu.

* added tests for configuring the title.

* minor refactorings.

* changed so you need to specify the full path in package.json.

* wip

* removed unused type.

* big refactor to make things simpler and to centralize all configure error/validation handling.

* added missing import.

* fixed failing tests.

* fixed tests.

* revert(extensions): remove static extensions config in favour of registering via AppPlugin APIs

* removed the compose that didn't work for some reason.

* added tests just to verify that validation and error handling is tied together in configuration function.

* adding some more values to the context.

* draft validation.

* added missing tests for getPanelMenu.

* added more tests.

* refactor(extensions): move logic for validating extension link config to function

* Fixed ts errors.

* Started to add structure for supporting commands.

* fixed tests.

* adding commands to the registry

* tests: group test cases in describe blocks

* tests: add a little bit more refactoring to the tests

* tests: add a test case for checking correct placements

* feat: first version of the command handler

* feat: register panel menu items with commands

* refactor: make the 'configure' function not optional on `PluginExtensionRegistryItem`

* Wip

* Wip

* Wip

* added test to verify the default configure function.

* added some more tests to verify that commands have the proper error handling for its configure function.

* tests: fix TS errors in tests

* tests: add auxiliary functions

* refactor: small refactoring in tests

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* draft of wrapping command handler with error handling.

* refactor: refactoring tests for registryFactory

* added test for edge case.

* replaced the registry item with a configure function.

* renamed the configure function type.

* refactoring of the registryfactory.

* added tests for handler error handling.

* fixed issue with assert function.

* added comment about the limited type.

* Update public/app/features/plugins/extensions/errorHandling.test.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update public/app/features/plugins/extensions/errorHandling.test.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update public/app/features/plugins/extensions/errorHandling.test.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* added missing tests.

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-03-08 14:23:29 +01:00
Ashley Harrison
986a1c2a1b
Chore: group uLibrary updates in renovate, revert uplot update for now (#64386)
* group uLibrary updates in renovate, revert uplot update for now

* fix json
2023-03-08 11:48:51 +00:00
renovate[bot]
523f675dd8
Update Monthly patch updates (#64323)
* Update Monthly patch updates

* don't update dangerously-set-html-content

* run prettier

* fix types

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-03-08 09:38:06 +00:00
Jack Westbrook
a317e48de8
Bug: Fix support for Node 18 in grafana/e2e package (#63446)
* fix(e2e): replace resolve-as-bin for node 18 support

* chore(yarn): refresh lock file
2023-03-08 10:17:26 +01:00
Brendan O'Handley
9b6e531549
Prometheus: Metric encyclopedia (#63423)
* add metric encyclopedia feature toggle and component

* remove unused button

* move file, add test file

* add tests

* add pagination and tests

* test with 10,000,000 metrics

* remove unused import

* add filter by type

* search alphabetically and add switch to exclude metrics with no metadata

* add suggested functions and filter for functions

* allow user to select variables in encyclopedia

* fix style and tests

* add fuzzy search by either metric name or all metadata

* if missing metadata, remove metadata fuzzy search option, exclude metadata, and filter by type

* add encyclopedia feature tracking

* indicate that metrics are filtered by labels

* handle metric singular or plural

* add tooltips and fix language

* add filtering tests

* change 'search' to 'browse'

* remove functions filter and tests as not part of work flow

* add m.e. button and selected metric is a tag

* fix hanging search and update styles, padding, labels, and groupings

* small performance improvements

* fix tests

* add backend metrics query option

* add loading spinner for start load and backend search

* autofocus search input

* Update docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* run prettier

* run prettier

* fix text for feature toggle

* for license check since https://cla-assistant.io/check/grafana/grafana?pullRequest=<PR#> is not working

* fixing tests

* fix feature toggle docs

* fix feature toggle

* fix feature toggle

* add owner to feature toggle

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-03-07 13:41:05 -05:00
Joao Silva
e5f6c80379
Stat Panel: Fix issue with clipping text values (#64300) 2023-03-07 15:29:01 +01:00
Piotr Jamróz
a7238ba933
Explore: Support mixed data sources for supplementary query (#63036)
* Consolidate logs volume logic (full range and limited)

* Fix showing limited histogram message

* Test passing meta data to logs volume provider

* Improve readability

* Clean up types

* Add basic support for multiple log volumes

* Move the comment back to the right place

* Improve readability

* Clean up the logic to support Logs Samples

* Update docs

* Sort log volumes

* Provide title to logs volume panel

* Move logs volume cache to the provider factory

* Add helper functions

* Reuse only if queries are the same

* Fix alphabetical sorting

* Move caching out of the provider

* Support errors and loading state

* Remove unused code

* Consolidate supplementary query utils

* Add tests for supplementaryQueries

* Update tests

* Simplify logs volume extra info

* Update tests

* Remove comment

* Update tests

* Fix hiding the histogram for hidden queries

* Simplify loading message

* Update tests

* Wait for full fallback histogram to load before showing it

* Fix a typo

* Add feedback comments

* Move feedback comments to github

* Do not filter out hidden queries as they may be used as references in other queries

* Group log volume by refId

* Support showing fallback histograms per query to avoid duplicates

* Improve type-checking

* Fix supplementaryQueries.test.ts

* Fix logsModel.test.ts

* Fix loading fallback results

* Fix unit tests

* WIP

* Update deprecated styles

* Simplify test

* Simplify rendering zoom info

* Update deprecated styles

* Simplify getLogsVolumeDataSourceInfo

* Simplify isLogsVolumeLimited()

* Simplify rendering zoom info
2023-03-07 15:00:11 +01:00
renovate[bot]
c5cbcdb420
Update dependency react-calendar to v4 (#64310)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-07 13:02:45 +00:00
Marcus Andersson
5c13d8eefd
Plugins: make sure we expose all available field color modes (#64289)
expose all available field color modes via fieldcolormodeid enum.
2023-03-07 12:44:45 +01:00
Ashley Harrison
5b8c2f494d
Chore: convert VariableOptions to use emotion instead of scss (#64135)
convert VariableOptions to use emotion instead of scss
2023-03-07 11:13:57 +00:00
Andre Pereira
fd37ff29b5
Tempo: New Search UI using TraceQL (#63808)
* WIP of creating new components to support the Search tab using TraceQL

* Search fields now require an ID. Added duration fields to new Search UI

* Distinguish static from dynamic fields. Added dynamic tags input

* Moved new search behind traceqlSearch feature flag. Added handling of different types of values to accurately wrap them in quotes when generating query.

* Hold search state in TempoQuery to leverage state in URL. Moved types to schema file

* Use a read only monaco editor to render a syntax highlighted generated query. Added tooltip to duration. Added query options section

* Support multiple values using the regex operator and multi input

* Delete dynamic filters

* Automatically select the regex op when multiple values are selected. Revert to previous operator when only one value is selected

* Added tests for SearchField component

* Added tests for the TraceQLSearch component

* Added tests for function that generates the query

* Fix merge conflicts

* Update test

* Replace Search tab when traceqlSearch feature flag is enabled. Limit operators for both name fields to =,!=,=~

* Disable clear button for values

* Changed delete and add buttons to AccessoryButton. Added descriptions to operators

* Remove duplicate test

* Added a prismjs grammar for traceql. Replaced read only query editor with syntax highlighted query. Removed spaces between tag operator and value when generating query.

* Fix support for custom values when isMulti is enabled in Select

* Use toOption function
2023-03-06 16:31:08 +00:00
Gilles De Mey
282d021c53
Revert "Alerting: Fix alert form broken coming from panel (#64148)" (#64240) 2023-03-06 16:31:03 +01:00
Alexander Zobnin
2eb4ca3827
FileUpload: Fix showFileName option (#64202)
* FileUpload: Fix showFileName option

* Fix tests
2023-03-06 12:25:48 +01:00
Dominik Prokop
7948e3b20d
Transformations: Add support for custom transformation operators in transformDataFrame (#64208) 2023-03-06 03:09:26 -08:00
Uladzimir Dzmitračkoŭ
88231c7cb8
GrafanaUI: reset ConfirmModal disabled state on re-open (#63452) 2023-03-06 11:52:28 +01:00
Torkel Ödegaard
30c6ac49ba
Table: Fixes logic for when adhoc filters are shown (#63642) 2023-03-06 11:14:55 +01:00
Torkel Ödegaard
4bf23b7f5f
PanelData: move preProcessPanelData to @grafana/data (#63743) 2023-03-06 10:59:47 +01:00
Ryan McKinley
b7d8589588
FieldType: Add enum type and include it in testdata scenarios (#64059) 2023-03-03 13:37:56 -08:00
renovate[bot]
9dc9e614d6
Update dependency rimraf to v4 (#64150)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-03 12:08:01 -05:00
renovate[bot]
ec8bd7691f
Update dependency sinon to v15 (#64151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-03 17:00:18 +00:00
Ashley Harrison
d61bcdf4ca
Chore: Pass signed user_hash to Intercom via Rudderstack (#63921)
* move analytics identifiers to backend

* implement hash function

* grab secret from env

* expose and retrieve intercom secret from config

* concat email with appUrl to ensure uniqueness

* revert to just using email

* Revert "revert to just using email"

This reverts commit 8f10f9b1bc.

* add docstring
2023-03-03 14:39:53 +00:00
juanicabanas
c59682fad6
PublicDashboards: Paused or deleted public dashboard screen (#63970) 2023-03-03 10:12:29 -03:00
Timur Olzhabayev
0b2dfaa710
Feat: Linking to plugin details page rather than externally for new datasources (#63499)
Changed links to help enterprise users install plugins directly via internal grafana catalog instead of linking out to grafana.com
2023-03-02 17:08:40 +01:00
Jack Westbrook
8c8f584b41
Plugins: Extend panel menu with links from plugins (#63089)
* feat(plugins): introduce dashboard panel menu placement for adding menu items

* test: add test for getPanelMenu()

* added an unique identifier for each extension.

* added context to getPluginExtensions.

* wip

* Wip

* wiwip

* Wip

* feat: WWWIIIIPPPP 🧨

* Wip

* Renamed some of the types to align a bit better.

* added limit to how many extensions a plugin can register per placement.

* decreased number of items to 2

* will trim the lenght of titles to max 25 chars.

* wrapping configure function with error handling.

* added error handling for all scenarios.

* moved extension menu items to the bottom of the more sub menu.

* added tests for configuring the title.

* minor refactorings.

* changed so you need to specify the full path in package.json.

* wip

* removed unused type.

* big refactor to make things simpler and to centralize all configure error/validation handling.

* added missing import.

* fixed failing tests.

* fixed tests.

* revert(extensions): remove static extensions config in favour of registering via AppPlugin APIs

* removed the compose that didn't work for some reason.

* added tests just to verify that validation and error handling is tied together in configuration function.

* adding some more values to the context.

* draft validation.

* added missing tests for getPanelMenu.

* added more tests.

* refactor(extensions): move logic for validating extension link config to function

* Fixed ts errors.

* Update packages/grafana-data/src/types/app.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update packages/grafana-runtime/src/services/pluginExtensions/extensions.test.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* refactor(extensions): rename limiter -> pluginPlacementCount

* refactor(getpanelmenu): remove redundant continue statement

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2023-03-02 15:42:00 +01:00
Gilles De Mey
5412f8d414
Alerting: New notification policies view (#61952) 2023-03-02 13:49:38 +01:00
Torkel Ödegaard
27070c252d
ErrorHandling: Fixes issues with bad error messages (#63775) 2023-03-02 13:09:58 +01:00
renovate[bot]
a2bd98488d
Update dependency eventemitter3 to v5 (#64014)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-02 11:58:40 +00:00
Joao Silva
afd5f41780
StatPanel: Fix issue where sparkline chart was not being shown on resize (#63942) 2023-03-02 12:00:40 +01:00
renovate[bot]
9e2e569708
Update dependency @types/uuid to v9 (#63957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-03-02 05:43:11 -05:00