Commit Graph

18075 Commits

Author SHA1 Message Date
Matias Chomicki
9874a2d48b
Loki Logs sample: use the selected time range in sample request (#65126)
Logs sample: use the selected time range in sample request

There are parts of the query, such as label values, that could only be present during the current selected time interval. If we request using a time range other than the selected one, we are not providing builder suggestions based on the same data that the user is seeing.
2023-03-22 18:56:40 +02:00
Virginia Cepeda
43bbe567e7
Alerting: Support filtering rules by multiple datasources (#64355)
* Support having a datasources array in the rules filter

* Fix tests

* Display a MultiplePicker for filtering datasources

* Fix tests

* Refactor as MultipleDataSourcePicker as FC

* Make select box wider

* Remove FC from component definition

* Display ds options in groups based on whether they manage/don't manage rules

* Change dropdown texts and add help info
2023-03-22 12:02:56 -03:00
Kyle Cunningham
bf687fff45
SQL Datasources: Prevent Call Stack Overflows with Large Numbers of Values for Variable (#64937)
* Push values with every map call to avoid hitting the maximum call stack size.

* Add test and refactor to for of

* Use native fill instead of lodash

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-03-22 14:50:54 +01: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
Virginia Cepeda
a1fc515c88
Alerting: Enable preview for recording rules (#63260)
* Create RecordingRuleEditor component

It reuses QueryEditor and propagates a few properties to allow to filter the visible datasources and customize what's shown in the editor header

* Set recording rules queries as a new state prop

Otherwise it would get mixed up with the alert rules queries when switching back and forth from this option. This also allows me to initialize these queries with the right datasource

* Show CloudRulesSourcePicker only for Loki/Mimir rules

As now we use the query editor for recording rules which already includes a datasource picker within

* Fix lint and tests

* Fix saving a recording rule

* Show expression when editing the recording rule

* Show query editor back for cloud rules

* Fix duplicated import

* Tweak after rebase

* Remove ts-ignore

* Refactor to use queries state instead of recordingRuleQueries

* Refacrtor RecordingRuleEditor to use ds QueryEditor

* Revert extra properties previously added to QueryEditor components

* Remove console.log

* Fix saving/editing a recording rule

* Fix tests

* Add margin to vizwrapper component
2023-03-22 09:21:15 -03:00
Joey
b1a7e1d33d
Tempo: Update service graph view and docs (#64875)
Update service graph view and docs
2023-03-22 08:37:44 +00:00
Ryan McKinley
83e9558cdd
Transformers: move long to wide logic into existing transformer (#64474) 2023-03-21 11:35:47 -07:00
Andre Pereira
bfb0dde4a8
Tempo: Search using TraceQL improvements (#64616)
* Added scope to filter

* Intrinsic fields don't have scope

* Consistent plus button placement next to the last tag. Changed All Scopes to "unscoped"

* Added validation to duration fields

* Disable options load when dropdown is opened

* Use focused list of operators when all values are of type string or int/float

* Fixed and added tests

* Fix another test

* Better way to prevent duplicate and redundant backend requests when a filter updates
2023-03-21 15:59:16 +00:00
Matias Chomicki
6093e45178
Loki Query Chunking: Refactor naming conventions and reorganize code (#65056)
* Rename splitting files to chunking

* Rename time chunking functions

* Move response functions to response utils

* Remove some blank spaces

* Add an extra test case for frame refIds and names
2023-03-21 15:54:18 +00:00
Ryan McKinley
a0d440fb03
Dashboards: Show copy menu item to editors (regardless of dashboard edit state) (#64826) 2023-03-21 07:15:45 -07:00
Victor Marin
24ecc7d0dc
Fix x-value being formatted as time when not necessary (#65095) 2023-03-21 16:03:34 +02: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
Konrad Lalik
d8e32cc929
Alerting: Prometheus-compatible Alertmanager timings editor (#64526)
* Change Alertmanager timings editor

* Update timing inputs for default policy editor

* Switch prom duration inputs in notification policy form

* Fix a11y issues

* Fix validation

* Add timings forms tests

* Fix default policy form and add more tests

* Add notification policy form tests

* Add todo item

* Remove unused code

* Use default timings object to fill placeholder values
2023-03-21 12:12:25 +01:00
Christy O'Reilly
a7bb87d15d
Chore: Refactor to introduce VARIABLE_PREFIX constant (#62980)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2023-03-21 10:46:18 +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
Torkel Ödegaard
395890c357
Prometheus/Loki: Run query explicitly instead of onblur in panel edit (#64815)
* Prometheus: Run query explicitly instead of onblur in panel edit, and highlight Run qqueries when query changed

* Update loki to do the same

* Cleanup unused prop

* Remove test
2023-03-21 07:55:34 +01: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
Torkel Ödegaard
6f73777d59
SectionNav: Make section toggle not take up horizontal space (#64898) 2023-03-20 15:43:05 +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
Ludovic Viaud
07be0643f0
Instrument transformations (#64960)
* Instrument transformations

* Fix any

* Fix any

* Fix unit test
2023-03-20 15:30:07 +01:00
Brendan O'Handley
eba2c7b522
Prometheus: Metric encyclopedia, return results in table format (#64851)
* add table results to metric encyclopedia

* remove extra tests

* add class to top align text in td elements

* add secondary style to use metric button and remove unused styles

* Prometheus: Make metrics encyclopedia more responsive for smaller screens (#64909)

* improvements

* remove comments

* feat: exclude all mertics with no metadata

* remove comment

* convert from InlineSwitch to Switch components

* fix bug, enter a fuzzy search sentence, switch to fullMetaSearch, perform fuzzysearch function

---------

Co-authored-by: Gareth Dawson <gareth.dawson@grafana.com>
2023-03-20 09:21:19 -04: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
Domas
ff49683673
Tempo: Set default limit if none is provided for traceql queries (#65039)
add default limit to tempo datasource traceql searches
2023-03-20 14:47:23 +02:00
linoman
b3243486e8
Fix empty value for expiry date (#64893) 2023-03-20 13:32:20 +01:00
Sven Grossmann
7a17a8f02d
QueryStats: Fix comparison of relative and absolute timeranges (#65035)
* add missing fix of relative timeranges

* add doc
2023-03-20 11:35:03 +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
Torkel Ödegaard
769b4598d7
Router: Fix broken link interception and router navigation (#65023)
* Router: Fix broken link interception and router navigation

* replace with instanceof Element
2023-03-20 10:54:10 +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
Sven Grossmann
6ae373b8c7
QueryStats: Fix comparison of timeranges (#65025)
* fix timerange comparison

* remove import
2023-03-20 10:04:41 +01:00
Andre Pereira
67fe282f7e
Flame Graph: Fix Copy Function Name (#64970)
Fix getting the function name when clicking the Copy Function Name context menu item of the flame graph
2023-03-20 08:57:03 +00:00
Gilles De Mey
fd6e97d52d
Alerting: Inherit new policy grouping from parent (#64956) 2023-03-20 07:58:23 +01:00
Gilles De Mey
59bc66f0ef
Alerting: Normalize border-radius usage (#64613) 2023-03-20 07:54:50 +01:00
ismail simsek
8438716bf5
Use standard border-radius as 2px (#64534) 2023-03-19 20:59:51 +01:00
Ezequiel Victorero
e01a3e0ea5
PublicDashboards: Added grafana special datasources to supported list (#64930) 2023-03-17 13:14:24 -03: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
Sven Grossmann
6f83a45e1b
Logs: Fix variant of Download logs button (#64962)
fix button variant
2023-03-17 16:31:32 +02:00
Ryan McKinley
b39039eadd
DataLinks: Default to percentEncoding (#64841) 2023-03-17 06:51:06 -07:00
Ryan McKinley
7d1ebe6b75
Scenes: improve createVizPanelFromPanelModel helper (#64918) 2023-03-17 06:50:37 -07:00
Stephanie Hingtgen
ae38501675
Plugins: add UI toggle for additional datasources for secure socks proxy (#64934) 2023-03-17 06:15:20 -06:00
Jack Westbrook
595518ec12
Plugin Extensions: Move PanelMenu links into extensions submenu (#64599)
* feat(pluginextensions): move panel menu links into an extensions submenu

* refactor(pluginextensions): move extensions submenu above more... submenu

* test(panelmenu): fix failing tests after moving extensions out of more

* fix: fix rebase issues

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-03-17 11:09:23 +01:00
Sven Grossmann
15804234d6
QueryHistory: Fix filter strings being regular escaped (#64879)
* fix wrong regex escape in query history

* fix import

* disable regexescape on `RichHistoryStarredTab`
2023-03-17 10:21:58 +01:00
Ludovic Viaud
e22e12455d
Revert "Fix xss in Graphite functions tooltip (#64925)" (#64933)
This reverts commit a896feb346.
2023-03-16 21:37:48 +01:00
Ludovic Viaud
a896feb346
Fix xss in Graphite functions tooltip (#64925) 2023-03-16 21:15:18 +01:00