Commit Graph

18093 Commits

Author SHA1 Message Date
Sonia Aguilar
54d7e95be1
Alerting: Fix wrong text in step4 (#65279)
* Fix wrong text in step4

* Add link to documentation for annotations in grafana alerts and cloud alerts
2023-03-27 15:28:20 +02:00
Dominik Prokop
2d7965402e
Templating: Allow percent encoding of variable with custom all (#65266)
* Templating: Allow percent encoding of variable with custom all

* Test fix
2023-03-27 00:35:41 -07:00
Kevin Yu
0871b6aea9
CloudWatch Logs: Fix to make log queries use a relative time if available (#65236) 2023-03-23 13:11:12 -07:00
Ivana Huckova
9ba38b760a
Elasticsearch: Unify adhoc variables processing (#65274) 2023-03-23 17:46:33 +01:00
ismail simsek
ff83367e6e
Security: Fixes for CVE-2023-1410 (#65278)
Remove rst2html dependency
2023-03-23 17:34:05 +01:00
Gilles De Mey
409bd33a8f
Alerting: Paginate result previews (#65257)
Co-authored-by: konrad147 <konradlalik@gmail.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
2023-03-23 15:17:33 +01: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
Josh Hunt
d13488a435
NestedFolders: Show nested folders in Browse folder view (#63746)
* dirty dirty code for showing nested folders in folder view

refactor to NestedFolderItem

Update dashboard grid view to new types

update tests

REBASE OUT OF THIS BRANCH - joshhunt/star-by-uid merged into this

Squashed commit of the following:

commit d0f046ccd3
Author: joshhunt <josh@trtr.co>
Date:   Wed Feb 8 18:35:56 2023 +0000

    undo async

commit abe2777a1f
Author: joshhunt <josh@trtr.co>
Date:   Wed Feb 8 18:34:11 2023 +0000

    Dashboards: Star dashboards by UID

add type for dashboard search dto

clean DashboardSearchItem type

simplify DashboardSearchHit type

remove unused properties from DashboardSearchHit

make uid non-optional

rename + move NestedFolderItem type to DashboardViewItem

clean up

* wip

* fix checkbox selection of nested folders

* show folder's parent correctly

* Add dashboard result kind

* don't render folder empty view in SearchView

* call nested folders api only if feature flag enabled

* remove unused import

* un-rename variable to reduce PR diff

* fix typo in comment

* fix order of pseudoFolders

* Fix General folder not showing in browse

* rename folder view tests

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-03-23 13:28:45 +00:00
Torkel Ödegaard
647f693e59
Scenes: Update to latest scenes package and remove editing stuff (#65222)
* Update to latest scenes and remove editing stuff

* fixing test
2023-03-23 10:31:25 +01:00
Andrej Ocenas
d10ce5a122
TraceView: Don't require preferredVisualisationType to render (#64920) 2023-03-23 10:27:34 +01:00
Ryan McKinley
baf5a1d141
Angular: Rename autoMigrateGraphPanels feature flag to autoMigrateOldPanels (#65243) 2023-03-22 21:02:36 -07:00
Ryan McKinley
7835aacc8f
Schema: Remove exclusion for timeseries and update imports (#65242) 2023-03-23 02:14:54 +02:00
Piotr Jamróz
b033fe8d73
Glue: Split correlations editor into 3 steps (#64818)
* Create simple Wizard for Correlations editor

* Allow using custom navigation in the wizard

* Update types

* Add more info

* Add comments

* Update comments

* Remove main info box to avoid having too many info boxes

* Fix CorrelationsPage.test.tsx

* Add Wizard test

* Simplify Correlations wizard

* Make expected typing error more explicit

* Don't use meaningless defaults
2023-03-22 20:20:45 +01: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
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
Virginia Cepeda
b90aed4fd7
Alerting: Improve showing nextEvaluationDate for rules (#65205)
* Improve showing nextEvaluationDate for rules

Co-Authored-By: Konrad Lalik <konradlalik@gmail.com>

* Improve imports and comments

---------

Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
2023-03-22 14:02:08 -03:00
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