Commit Graph

19133 Commits

Author SHA1 Message Date
Ivana Huckova
792edfb293
Loki: Fix import for intervalToMs (#78265)
* Loki: Use TemplateSrv from grafana/runtime

* Loki: Fix import for intervalToMs

* Revert "Loki: Use TemplateSrv from grafana/runtime"

This reverts commit d573925e37.
2023-11-16 15:08:45 +01:00
Piotr Jamróz
3d4940cf85
QueryHistory: Improve test performance (#78255)
Improve performance
2023-11-16 15:06:37 +01:00
Gilles De Mey
2659409191
Breadcrumbs: Only dedupe breacrumb items for matching node names (#78077)
only dedupe breactumb items for matching node names
2023-11-16 13:46:25 +00:00
Gilles De Mey
0e5ce50b90
Page: Add support for tab counters (#78127) 2023-11-16 13:31:14 +00:00
Ashley Harrison
2c0c51a0df
Chore: improve types (#78126)
* fix some types

* more type updates

* some more fixes

* more changes

* string instead of unknown

* more like original logic

* remove outdated comment

* update betterer
2023-11-16 12:39:12 +00:00
Matias Chomicki
9cb303c3f7
Log Rows: Added popover menu with filter options when a log line is selected (#75306)
* LogRow: detect text selection

* LogRow: refactor menu as component

* LogRow: add actions to menu

* LogRow: hack menu position

* Remove unsused imports

* LogRowMessage: remove popover code

* PopoverMenu: refactor

* LogRows: implement PopoverMenu at log rows level

* PopoverMenu: implement copy

* PopoverMenu: receive row model

* PopoverMenu: fix onClick capture issue

* Explore: add new filter methods and props for line filters

* PopoverMenu: use new filter props

* Explore: separate toggleable and non toggleable filters

* PopoverMenu: improve copy

* ModifyQuery: extend line filter with value argument

* PopoverMenu: close with escape

* Remove unused import

* Prettier

* PopoverMenu: remove label filter options

* LogRow: rename text selection handling prop

* Update test

* Remove unused import

* Popover menu: add unit test

* LogRows: update unit test

* Log row: hide the log row menu if the user is selecting text

* Log row: dont hide row menu if popover is not in scope

* Log rows: rename state variable

* Popover menu: allow menu to scroll

* Log rows: fix classname prop

* Log rows: close popover if mouse event comes from outside the log rows

* Declare new class using object style

* Fix style declaration

* Logs Popover Menu: add string filtering functions (#76757)

* Loki modifyQuery: add line does not contain query modification

* Elastic modifyQuery: implement line filters

* Modify query: change action name to not be loki specific

* Prettier

* Prettier

* Elastic: escape filter values

* Popover menu: create feature flag

* Log Rows: integrate logsRowsPopoverMenu flag

* Rename feature flag

* Popover menu: track interactions

* Prettier

* logRowsPopoverMenu: update stage

* Popover menu: add ds type to tracking data

* Log rows: move feature flag check

* Improve handle deselection
2023-11-16 11:48:10 +02:00
Andres Martinez Gotor
05cf8c9253
Bug Fix: Only display latest version if a plugin is not installed (#78178) 2023-11-16 10:47:42 +01:00
Alex Khomenko
d641f9153e
Grafana/ui: Move Grid out of unstable (#78220)
* Grafana/ui: move Grid out of unstable

* Update docs
2023-11-16 07:23:22 +02:00
Kristina
1ebdf390e6
Correlations: Only show original field list in transformation field list (#78230)
Only show original field list in transformation field list
2023-11-15 15:06:36 -06:00
Piotr Jamróz
64d05e009a
Correlations: Ensure datasource uid property exists when a link is created (#78167)
Ensure datasource uid property exists
2023-11-15 21:56:21 +01:00
Ben Tasker
f38f657f87
InfluxDB: Add new truthiness operators (Is and Is Not) to InfluxQL Query Builder (#77923)
* InfluxDB: Add new truthiness operators (`Is` and `Is Not`) to InfluxQL Editor for use with boolean fields

* InfluxDB: Make the front-end aware of the new operators so that translation between raw and builder works

* Chore: Add tests

* feat: identify type of field value to allow other types to work with Is/Is Not

Tags: always quote
Integer: Don't quote
Float: Don't quote
Boolean: Don't quote
String: Quote

* Chore: Add test-cases for type inference

* Update front-end to infer type for operators Is and Is Not

* chore: Add front-end tests

* chore: add additional front-end tests

* chore: fix failing lint test

* chore: fix tests (run prettier)
2023-11-15 21:10:37 +01:00
Brendan O'Handley
b5429a456c
Prometheus: Query advisor new rudderstack events (#78218)
add event for yesno, no. of prompts per session, suggest instead
2023-11-15 13:11:40 -05:00
Alex Khomenko
441403729f
Grid: Make props responsive (#78214)
* Grid: Make props responsive

* Make 'columns' and 'minColumnWidth' mutually exclusive

* Cleanup
2023-11-15 18:49:27 +02:00
Giordano Ricci
42a3f36c18
Explore: Fix queries (cached & non) count in usage insights (#78097)
* Fix: Fix queries (cached & non) count in usage insights

* also keep deprecated error property

* Fix & refactor tests
2023-11-15 16:32:28 +00:00
Dominik Prokop
0122f7ccad
DashboardScene: Support dashboard links (#77855)
* MenuItem: Allow react node as label

* LinkButton: Expose ButtonLinkProps

* Typecheck fix

* DashboardLinks: Refactor and use LinkButton and menu

* DashbaordLinks scene object

* Use flex layout for dashboard controls

* Update public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx

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

* fix keepTime and includeVars

* Add ellipsis to menu item label and description

* Use DashboardLink type from grafana/schema

* Update dashboard scene controls layout

* Fix e2e

* Test fix

* Bring back keyboard navigation

* Remove unused code

* One more fix

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-11-15 17:49:51 +02:00
Torkel Ödegaard
dfa506857a
SharedQueryProvider: Fixes issue when source panel query runner is waiting for container width (#78199)
SharedQueryProvider: Fixes issue when source panel is not active and is waiting for container width
2023-11-15 16:49:37 +01:00
Haris Rozajac
2a675d5905
Explore: Refactor RichHistory.tsx into a functional component (#78144)
* Refactor to functional component

* Remove theme as it's unused
2023-11-15 07:15:55 -07:00
Dominik Prokop
384db8e0ca
DashboardScene: Add macro for interpolating __dashboard variable (#78172)
* DashbaordScene: Add macro for interpoladint __dashboard variable

* Review

* Test fix

* Test fix
2023-11-15 04:05:54 -08:00
Virginia Cepeda
05febc4665
Alerting: Allow to clear datasource selection in panel list (#77960)
* Allow to clear datasource selection

Also improve texts for linked alerts switch

* Remove onClear prop as it does not work

* Change text on datasource selection filter

* Change datasource filter description
2023-11-15 12:48:10 +01:00
Torkel Ödegaard
1f1d348e17
DataTrails: Auto query, explore and breakdown/drilldown prototype (#77019)
* First try

* Update

* app with drilldowns

* Progres

* Progress

* update

* Update

* update

* Update

* Update

* Progress

* Update

* Progress

* Update

* Progress

* logs url sync

* related metrics

* Progress

* progress

* Progress

* Update

* Update

* Update

* Update

* Update

* fix

* Update

* update

* Update

* update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* update

* Update

* Update

* Settings

* Update

* Tweaks

* update

* Improve auto queries

* Update

* Update

* Fixes

* Update

* Update

* Update

* fix

* Update

* Removing logs view, cleanup

* Update

* Update

* disabled not implemented buttons

* Update

* Feature toggle on dashboard menu

* remove unused prometheus change

* removed bit

* Fix failing test

* chore: added `/public/app/features/trails/` to CODEOWNERS

* go mod tidy

* go mod tidy

* fix: added missing arg

* Moved panel action

* Moved panel action

---------

Co-authored-by: André Pereira <adrapereira@gmail.com>
Co-authored-by: Darren Janeczek <darren.janeczek@grafana.com>
2023-11-15 11:28:29 +00:00
Ben Tasker
c06debe200
InfluxDB: Add support for >= and <= comparison operators to IQL Query Builder (#77917)
* InfluxDB: Add support for `>=` and `<=` comparison operators to InfluxQL Query Builder

* Add front-end support for the new operators

This ensures that the query translates correctly between raw and builder mode

* Chore: add test for new operators

* chore: add front-end tests

* fix: don't skip quoting on `<>`

This preserves the pre-existing behaviour, fixing a failing test

* chore: fix tests
2023-11-15 12:21:41 +01:00
Ashley Harrison
4ebfce8b9a
Accessibility: Increase contrast of MonacoQueryField placeholder (#78176)
increase contrast of promqueryfield placeholder
2023-11-15 11:11:42 +00:00
Ivana Huckova
c0a866d7c7
Logs: For LogLines frames, don't show additional fields in log details (#78109)
* Logs: Don't use other fields in log details for log details

* Reorder variables

* Update comment

* Update comment
2023-11-15 12:02:32 +01:00
Torkel Ödegaard
f7e5689305
Variables: Add support for aliasIDs to datasource variables (Fixes issue with Postgres datasource variables) (#78170)
* Variables: Add support for aliasIDs to datasource variables

* remove file
2023-11-15 11:18:21 +01:00
Óscar Erades
20f541d7e7
Transformations: Fix Timeseries to table transformation trend reduction when result is 0 (#78026)
* Transformations: Fix Timeseries to table transformation trend reduction when result is 0

When reduceField function returns 0, the reduced value is set to null. I
think we can remove this "|| null" statement, as:
- There is a check a few lines above to make sure the field type is a number. This might be a reasonable guarantee that the calculation we are doing will make sense and there will be no need to set to null.
- Sparkline cell type already has an option to hide value if we believe the calculation
  does not make sense.

Fixes #78025

* make sure we check for undefined

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2023-11-15 10:12:04 +01:00
Lucy Chen
384e024955
Task: Add tracking dashboard toolbar options (#77524)
* add tracking for toolbar

* Add favorite

* add timepicker

* add reusable analytics file

* change the refresh and zoom click prop function

* add interaction for timepicker

* decouple tracking code

* update naming of function

* Update packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker.tsx

Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>

* use useEffect

* remove prop from useEffect

* destructure prop

* add dependency on useEffect

---------

Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
2023-11-14 13:37:43 -05:00
kay delaney
d0180957d1
Scenes/ShareModal: Implement public dashboard tab (#76837)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-11-14 17:05:24 +00:00
linoman
408dab8c57
IAM: Protect managed service account frontend details page (#77839)
* Add `isManaged` property to frontend model

* Remove enabled and token buttons for managed SA

* Replace trash icon for lock icon for managed SA

* Block the role picker for managed SA

* Filter SA list usiong the managed filter

* Rename external for managed

* Add only managed filter

* Toggle the enable buttons for managed sa

* Disable add token and delete token buttons

* Remove the edit name button

* Disable the Role picker for managed sa

* Hide the permissions section

* Add managed by row

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-11-14 17:52:48 +01:00
Zodan Jodan
3b9886830e
Loki: fix missing entries when there arent any derived fields (#78123)
pushing nulls for log entries that does not have a derived field to preserve the order of log data derived fields
2023-11-14 17:10:28 +01:00
ismail simsek
656808a41b
InfluxDB: Fix multi variable interpolation (#78068)
fix special variable escape
2023-11-14 16:59:34 +02:00
Zodan Jodan
53758ad764
Loki: Option to add derived fields based on labels (#76162)
* Plugin: Deriving fields by name from parsed logs

Loki only derives fields by a regex matcher, this limits its usage when functions such as `line_formatter` is used on
top of the logs.
Some users already have logs parsed in json or logfmt structure which are detected as fields in loki.
This pull request allows the mapping between detected fields values and derived values by matching the fields' names.
Currently the feature is behind `lokiEnableNameMatcherOption` feature toggle.

* improve settings page to have a `fieldType`

* improve derived fields getter to use `matcherRegex`

* fix failing test

* rename feature toggle to `lokiDerivedFieldsFromLabels`

* added suggestions from review

* add empty config object

* remove feature flag

* fix width of select

* default to `regex` derived field

* fix failing test

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
2023-11-14 15:06:02 +01:00
Khushi Jain
f41f939c1c
i18n: Markup up correlations forms for translations (#75264)
* correlations/forms

* Update public/app/features/correlations/Forms/ConfigureCorrelationBasicInfoForm.tsx

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>

* Update public/app/features/correlations/Forms/ConfigureCorrelationBasicInfoForm.tsx

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>

* Update public/app/features/correlations/Forms/ConfigureCorrelationBasicInfoForm.tsx

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>

* Update public/app/features/correlations/Forms/ConfigureCorrelationBasicInfoForm.tsx

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>

* Added rest of filed

* minor-changes

* map function

* retriggered

* Update public/app/features/correlations/Forms/TransformationsEditor.tsx

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* removed whitespace

* removed whitespace

* more changes

---------

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-11-14 14:52:42 +01:00
Juan Cabanas
cf89307428
Dashboards: Update link to documentation in repeated row warning (#77964) 2023-11-14 10:36:39 -03:00
Galen Kistler
a18eee4093
Logs Panel: Table UI - Refactor to use includeByName transformation (#78070)
* remove excludeByName logic from LogsTable.tsx, migrate to includeByName. Update tests
2023-11-14 15:18:47 +02:00
Esteban Beltran
b6d6375e2b
Sandbox: Add setImmediate polyfill (#78093) 2023-11-14 10:40:58 +01:00
Josh Hunt
2f2be24e01
Chore: Remove unnecessary type assertions (#78009)
* Chore: Remove unnecessary type assertions

* betterer
2023-11-14 09:17:29 +00:00
Dominik Prokop
a3ae9d418d
DashboardScene: Alert states data layer (#77945)
* Add AlertStates data topic

* DashboardScene: Alert states data layer

* TMP package json

* Remove duplicated function

* Use latest scenes canry

* Use latest scenes and add transformation test
2023-11-14 00:08:06 -08:00
Levente Balogh
ea12eecac5
Plugins: Keep working when there is no internet access (#77978)
* fix: make connections and plugins-catalog work when GCOM is not available

* fix: remove unused import
2023-11-14 09:49:14 +02:00
Levente Balogh
ea2b493937
Plugins: Share the plugin context with apps and ui-extensions (#77933)
* feat: share the plugin context with app plugins

* feat: share the plugin context ui-extension modals

* feat: pre-fetch the app plugin settings

* feat: expose more utility hooks for plugins

* fix: use `location.pathname` directly

Previously it was referenced by `pluginRoot.props.path`, which stops
working in case the `pluginRoot` element is wrapped with anything.
2023-11-14 08:35:40 +01:00
Ryan McKinley
ea37a116f7
K8s: expose namespace in frontend_settings (#78090)
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2023-11-14 06:34:09 +02:00
Ryan McKinley
1be1432926
K8s: Add subresource to the example apiserver (#78030) 2023-11-14 05:51:58 +02:00
Josh Hunt
4a3c148298
Chore: Stricter typing in type guards (#77809)
* Stricter typing in type guards

* create utility isObject fn

* better isAlertStateWithReason

* better name

* restore "data !== undefined"
2023-11-13 16:11:54 +00:00
Galen Kistler
7617a7a3fc
Transformations: Add includeByName to organize fields transformation (#77797)
* add includeByName inclusion list to transform, update ui to work with either filtering method
2023-11-13 08:59:37 -06:00
Ivana Huckova
c91fc18d31
Loki: Fix escaping in cheatsheet (#78046) 2023-11-13 15:13:40 +01:00
ismail simsek
deea9a7243
Prometheus: Fix updating timeRange on builder mode when range is changed (#78007)
Update languageProvider timeRange when range is changed on builder mode
2023-11-13 14:23:40 +01:00
Torkel Ödegaard
7169bfdb30
DashboardScene: Support templateSrv.getVariables usage (#77910)
Update
2023-11-13 13:13:27 +01:00
Joey
c9faaf7600
Tempo: Fix missing deep span link (#77936)
* Fix span deep link not showing

* Update test
2023-11-13 11:10:19 +00:00
Ashley Harrison
bd85d3e25e
PlaylistPage: Skeleton loading state 💀 (#77992)
* playlist skeleton poc

* refactor into PlaylistCard

* make card actions more responsive, update skeleton color to work on secondary background

* don't loop over array

* fix unit tests
2023-11-13 10:32:42 +00:00
Ieva
eca45f6492
Chore: remove gcomOnlyExternalOrgRoleSync feature toggle (#78001)
remove gcomOnlyExternalOrgRoleSync feature toggle
2023-11-13 09:56:02 +00:00
Torkel Ödegaard
4bc322ca1d
DashboardScene: Pass panel id to PanelProps.id (#77927)
* Panel props id

* Removing panel works

* Update
2023-11-13 09:51:21 +01:00