Commit Graph

17280 Commits

Author SHA1 Message Date
Dominik Prokop
b58cecc788
Scenes: Basics for rendering scenes as an embedded page (#60098)
* Basics for rendering scenes as an embedded page

* Render submenu in embedded scene

* EmbeddedScene alternative for embedding within Grafana page
2022-12-12 01:25:28 -08:00
Torkel Ödegaard
50c4430661
PanelEditor: Fixes issue where panel edit would show the panel plugin options of the previous edit panel (#59861)
* PanelEditor: Fixes issues with panel edit state cleanup

* Removed console log

* Fixed test
2022-12-11 09:57:49 +01:00
xdavidwu
5d6bdc60b1
HeatmapPanel: Fix typo in variable naming (#57326) 2022-12-09 21:07:12 -06:00
Leon Sorokin
8317bf5def
BarChart: Fix value mappings (#60066) 2022-12-09 12:52:34 -05:00
Leon Sorokin
435ada45c5
TimeSeries: Better y-axis ticks for IEC units (#59984) 2022-12-09 10:25:44 -07:00
Ashley Harrison
a589929c92
Navigation: Prevent app crash when importing a dashboard with a uid of home (#59874)
* change home id to be more unique, refactor so that home circular reference is never created

* prefix starred dashboards

* update reducer
2022-12-09 12:54:00 +00:00
Andreas Christou
4730be8842
AzureMonitor: Add error indicating potential configuration issue on Resource Picker (#60041)
* Add error indicating potential configuration issue

- Update test

* Update error

- Lint update
2022-12-09 13:50:01 +01:00
Ludovic Viaud
07d6b632b5
Remove PromExploreQueryEditor and PromQueryEditor (#60020)
Remove Prom editor
2022-12-09 12:56:47 +01:00
Sonia Aguilar
cf342f1933
Alerting: Reduce number of scroll bars in rule group modal (#59725)
Reduce number of scroll bars in rule group modal
2022-12-09 12:31:42 +01:00
Josh Hunt
6280780e0c
TimeRangePicker: Fix recent ranges not showing all items (#59836)
* Fix not all recently used time ranges showing

* Refactor time picker history to store simpler json objects

* Don't store duplicate items

* update todo tests:

* Add tests for TimePickerWithHistory

* better fix for focus scope issues in test
2022-12-09 11:28:57 +00:00
Manoj Vivek
10c2bdea3e
Parca: Logo image fixed with theme agnostic colors (#59835) 2022-12-09 11:01:39 +01:00
Victor Marin
896cb9ddce
Fix index out of range in regenerateLinksSupplier (#60011) 2022-12-09 09:09:29 +02:00
Galen Kistler
e85763065c
Prometheus: Exemplar optimization (#60055)
replace inefficient forEach
2022-12-08 15:20:27 -06:00
Galen Kistler
dfc15163da
Prometheus: Fix exemplar fill color to match series color in time series. (#59908)
* Implementing new optional color property to ExemplarMarker component 
* Refactor some changes from #59743
2022-12-08 14:15:05 -06:00
Ryan McKinley
b2c4af16d7
Git: Update experimental workflow POC (#60049) 2022-12-08 13:57:33 -05:00
ismail simsek
29d2f86955
Update heatmap exemplar popover styles (#59988)
* Put traceID on top

* Update exemplar popover styles

* Remove console.log

* Make exemplar header opt-in via optional prop

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-12-08 19:55:39 +01:00
Yuri Tseretyan
a83268db7b
Alerting: skip flaky test RuleEditor recording rules.can create a new cloud recording rule (#60044) 2022-12-08 13:09:45 -05:00
Galen Kistler
f37997aec0
Prometheus: Add traceID link to heatmap exemplar popover (#60039)
* Add traceID link to heatmap exemplar popover
* Render links for each field individually

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-12-08 12:02:17 -06:00
ismail simsek
551a2ac9ec
Prometheus: Tweak query builder select component (#59749)
* Have consistent color for operators

* Add more operators and reorder them to align with dashboard filters
2022-12-08 18:52:27 +01:00
Galen Kistler
22f828300d
Prometheus: Fix exemplars not respecting corresponding series display status. (#59743)
* Exemplar filtering when series are toggled in legend UI
2022-12-08 11:46:00 -06:00
renovate[bot]
dedf292228
Update dependency @reduxjs/toolkit to v1.9.0 (#58247)
* Update dependency @reduxjs/toolkit to v1.9.0

* fix types on mockToolkitActionCreator

* Fix external AM selector tests

* timeout added in shared public dashboard test

* Revert "timeout added in shared public dashboard test"

This reverts commit 205c295192.

* update to @reduxjs/toolkit@1.9.1

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
2022-12-08 17:27:38 +00:00
Ashley Harrison
a3681a3353
Command Palette: Links now work when grafana is served under a subpath (#60033)
strip base when pushing urls to locationService
2022-12-08 15:00:07 +00:00
Ludovic Viaud
694dc60724
Prometheus: Add traceID field on top of the exemplar popover (#59920)
Prioritize trace link
2022-12-08 14:53:07 +01:00
Ivana Huckova
3c9ccd4512
Loki: Usage for queries not from dashboards (#60017)
Loki: Usage for queries not from dashboars
2022-12-08 13:04:05 +01:00
Ivana Huckova
e2077e9659
Dashboard: Run requests with correct app type (#60010)
Dashboard: Run quries with correct core app
2022-12-08 11:52:28 +01:00
Ivana Huckova
4b56493789
Elasticsearch: Add tracking for plugin adoption stats (#59954)
* Elasticsearch: Add tracking

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

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

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

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

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

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

* Refactor getLineLimit

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

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

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

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

* Update not tracking for volume queries

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2022-12-08 11:28:40 +01:00
Ivana Huckova
601df109af
Loki: Remove annotation, context and volume tracking (#59962)
* Loki: Remove annotation and context tracking

* Implement log volume
2022-12-08 10:05:11 +01:00
kay delaney
955bf55c6a
Datasource Onboarding: Create initial data source onboarding page (#58795) 2022-12-07 23:29:38 +00:00
Daniel Lee
74167b4d44
UsageInsights: Record events for Explore queries (#59931)
* usageinsights: record events for Explore queries

* usageinsights: make the source field optional

It is not logical to have it for an event like the dashboard-view

* usageinsights: add comment to Explore test

Explain why we are reversing a previous decision
2022-12-07 21:19:35 +01:00
Shirley
5c08f03512
CloudWatch: Fix deeplinks to still be able to pass log group names (#59809)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-12-07 11:40:15 -05:00
Shirley
e8ed79873a
CloudWatch: return silently in case of missing log groups or incomplete query (#59701)
* Remove defaultLogGroups check in filterQuery
2022-12-07 16:37:35 +01:00
Ivana Huckova
1aa94165d9
Loki: Do not track samples (#59960) 2022-12-07 16:24:22 +01:00
Sonia Aguilar
55055d0b9b
Alerting: Fix RuleEditor flaky test for existing grafana managed alert (#59780)
* Fix RuleEditor flaky test for existing grafana managed alert

* Fix RuleEditor flaky test for creating a new grafana managed alert

* Fix tests for cloud rules

* Split tests for different rule types

* Move common clickSelectOption method to helpers

* Remove from RuleEditorCloudRules.test.tsx  a repeated cloud rule test

* Move existing grafana rule test case to a new file

* Split RuleEditorCloudRules test: move checking only allowed data sources test case to a new test file

* Re-use common ui const

* Re-use renderRuleEditor method

* Create getDiscoverFeaturesMock to reduce code
2022-12-07 16:15:33 +01:00
Torkel Ödegaard
7b58fb3a20
Scenes: Fix flaky scenes time range test (#59900)
* Scenes: Fix flaky scenes time range test

* Update public/app/features/scenes/core/SceneTimeRange.test.tsx
2022-12-07 11:52:35 +01:00
Polina Boneva
db1e19fe86
Dashboard: Making a dashboard editable does not allow resizing of panels (#59255)
* DashboardGrid should rerender ReactGridLayout when mutable dashboard updates

* add missing prop to test
2022-12-07 12:46:10 +02:00
Ashley Harrison
5d0029c647
Navigation: handle case where navIndex is undefined (#59826)
handle case where navIndex is undefined
2022-12-07 10:16:55 +00:00
Conor Evans
dce7f50d59
CloudWatch: Fix - make sure dimensions are propagated to alert query editor (#58281)
* fix(unified-alerting/cloudwatch): propagate dimensions to alert

Signed-off-by: Conor Evans <coevans@tcd.ie>

* add unit test

Signed-off-by: Conor Evans <coevans@tcd.ie>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-12-07 09:42:04 +01:00
Sven Grossmann
d0eeff2fa0
Loki: Add tracking of executed queries (#59887)
* add query tracking

* add app

* add comment

* use `reportInteraction` not `console.log`

* add test to `queryUtils`

* organize imports

* add datasource tests

* change `metrics` to `metric`

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* change `parseToArray` to `parseToNodeNamesArray`

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-12-06 15:54:20 -05:00
Ivana Huckova
fdc3adb2c9
Loki: Add tracking for on dashboard load (#59914)
Loki: Add on dashboard load tracking
2022-12-06 21:15:55 +01:00
Matias Chomicki
7e339decfe
JavaScript Unit Tests: Enable shouldFailOnLog only for CI environments (#59901)
Tests: enable shouldFailOnLog only for CI environments
2022-12-06 19:38:55 +01:00
Torkel Ödegaard
18d09cd3fe
PanelEdit: Fixes broken panel edit splitter logic (#59859)
* Alt panel edit fix

* fix fix
2022-12-06 18:21:03 +01:00
Sven Grossmann
932349b5ab
Loki: Fix wrongly escaped label values when using LabelFilter (#59812)
* change backticks to quotes

* add unescaping to `addFilterAsLabelFilter`

* fix removal of wrong quotes

* change unescape order
2022-12-06 12:30:03 +01:00
Ashley Harrison
46adfb596d
Command Palette: Maintain page state when changing theme (#59787)
* use same function as the change theme keybindings

* rename toggleTheme service to just theme
2022-12-05 16:12:56 +00:00
Andrej Ocenas
c6840cfdec
Tempo: Fix traceQL suggestions for tag names with dots (#59736) 2022-12-05 17:05:22 +01:00
Ivana Huckova
e356a56741
Elasticsearch: Fix removing of empty settings from query in backend implementation (#59704)
* Elasticsearch: Fix removing of empty settings from query in backend implementation

* Update

* Update

* Update pkg/tsdb/elasticsearch/time_series_query.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-12-05 16:06:55 +01:00
Ida Štambuk
3544250baf
Accessibility: Make QueryEditorHelp examples keyboard interactive (#59355)
* Cloudwatch: A11y - Make example log keyboard interactive

* Change all cheat sheets to buttons

* Make suggestions block
2022-12-05 16:03:24 +01:00
Erik Sundell
32309a8373
Datasource: Fix - apply default query also to queries in new panels (#59625)
* apply default query also to new panels

* add comment

* add tests
2022-12-05 15:44:04 +01:00
ismail simsek
ba2e226ba9
Prometheus: Send time range params when requesting labels (#59648)
* Send time range params when requesting labels

* Update public/app/plugins/datasource/prometheus/datasource.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Send params when calling values too

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-12-02 19:11:34 +01:00
Andreas Christou
c52d4e2a64
AzureMonitor: Automate location retrieval (#59602)
* Automate location retrieval

- Add function to retrieve provider information
- Add function to retrieve subscription locations
- Add parsers for each function
- Add types
- Update resourcePickerData with new functions
- Remove old location metadata file

* Improve types

- Add types for responses
- Use correct name parameter
- Update response parser (parseProvider unnecessary)

* Fix tests

- Add necessary mocks

* Fix logic and ensure maps are consistent

* Add tests

* Review

* Lint issue
2022-12-02 13:23:15 +00:00
Sonia Aguilar
020b9960c8
Alerting: Move modal buttons before the rules table (#59703)
Move modal buttons before the rules table
2022-12-02 13:51:01 +01:00
Karl Persson
6d1bcd9f40
DataSourcePermissions: Handle licensing properly for ds permissions (#59694)
* RBAC: add viewer grand if dspermissions enforcement is not enabled

* RBAC: Change permissions based on role prefix

* RBAC: Add option to for permission service to add a license middleware

* RBAC: Remove actions from query struct
2022-12-02 13:19:14 +01:00
Joao Silva
7b47021d19
A11y: Remove unnecessary onClick from LegendSeriesItem (#59671) 2022-12-02 12:10:21 +01:00
Shirley
1c5a3a7d2c
CloudWatch: Create deeplinks from log group ARNs (#59646) 2022-12-02 11:25:34 +01:00
Ashley Harrison
2ac235eaff
Chore: remove preloading roboto font (#59664)
remove preloading roboto font
2022-12-02 09:30:47 +00:00
Shirley
ada0c771ef
CloudWatch: Return with error message for empty logs query string (#59584) 2022-12-02 10:01:01 +01:00
Marcus Andersson
7f92f1df00
Schema: Refactor plugin code generation (#58901)
* wip

* wip

* almost there..

* wip - change so it can run.

* treelist is working.

* support CODEGEN_VERIFY env variable

* use log.fatal

* comment out old PluginTreeList code generation

* cleanup

* rename corelist package files

* fix makefile

* move pkg/codegen/pluggen.go to pkg/plugins/codegen

* copy and refactor files to pkg/plugins/codegen

* use pkg/plugins/codegen instead of pkg/codegen for core plugins code gen

* remove unneeded files

* remove unused code to resolve linting errors

* adapters first hack

* added flattener

* add back ignore build tags to go generate file

* cleaned up the code a bit.

* seems to work, needs to do some refactoring of the GoTypesJenns and TSTypesJenny.

* one more step, going to get upstream changes in this branch.

* working but need to run import tmpl in jenny_schemapath to have the proper imports.

* added header to generated files.

* added missing jenny.

* preventing plugins with multiple decls/schemas to insert multiple lines in corelist.

* fixed so we use Slot type from kindsys to detect if its group.

* adding a go jenny that only runs if the plugin has a backend.

* added version object to generated ts.

* generating the ts types with the same output as prior to this refactoring.

* removed code that is replaced by the jenny pattern.

* removed the go code that isn't used anymore.

* removed some more unused code and renamed pluggen to util_ts

* fixed linting issue.

* removed unused vars.

* use a jenny list postprocessor for header injection

* moved decl and decl_parser to pfs.

* removed the pre-pended header in the gotypes jenny since it is done in the postprocess.

* moved decl to pfs.

* removed unused template.

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-12-02 08:22:28 +01:00
Leon Sorokin
e1e858323a
TimeSeries: Fix rendering when zooming to time ranges between datapoints (#59444) 2022-12-01 16:01:35 -07:00
Brendan O'Handley
f9ef0eb414
Dataplane: Deprecate timeseries-many in favor of timeseries-multi (#59070)
* deprecate timeseries-many in favor of timeseries-multi

* deprecate timeseries-many, do not just remove it

* undo changes to jsonc files

* update deprecation message

* return TimeSeriesMulti for prepareTimeSeries transformer
2022-12-01 15:27:31 -05:00
Gilles De Mey
c3a8590fe5
Alerting: Reduce number of buildinfo calls (#59319) 2022-12-01 11:05:28 -05:00
Ashley Harrison
94c5be8dfb
Navigation: Remember expanded sections in megamenu (#59661)
use local storage to remember which sections of megamenu are expanded
2022-12-01 16:04:36 +00:00
owensmallwood
97e81ecbde
PublicDashboards: Modal warns when using unsupported datasources (#58926)
Adds warning to pubdash modal when dashboard uses datasources not supported by pubdash
2022-12-01 10:02:10 -06:00
Konrad Lalik
d2c129fbac
Alerting: Add alert rule cloning action (#59200)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-12-01 16:21:54 +01:00
Joao Silva
379cde3a72
FolderPicker: Fixes issue with typing to search for folder (#59434) 2022-12-01 13:34:07 +01:00
Ashley Harrison
dab83c6855
Theme: Use Inter font by default (#59544)
* Switch to using Inter font by default

* run toggles_gen_test
2022-12-01 11:59:37 +00:00
Ivana Huckova
a2ed586576
Elasticsearch: Migrate frontend query builder tests to backend (#59578)
* WIP: Migrated first batch of tests

* Migrate more tests

* Migrate rest of the tests

* Update comments

* Update

* Update

* Remove newline
2022-12-01 12:09:12 +01:00
Torkel Ödegaard
5281cff94d
Variables: Url sync for MultiValueVariable (#59371)
* Initial take on variable url sync

* Url sync is working

* Fixing test
2022-12-01 09:48:26 +01:00
Artur Wierzbicki
009d65b794
Add query library behind dev-mode-only feature flag (#55947)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: drew08t <drew08@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-11-30 15:33:40 -08:00
Ryan McKinley
14a080ec12
EntityStore: Rename ObjectStore to EntityStore (part 2) (#59616) 2022-11-30 17:52:15 -05:00
Leo
ce630b2dc5
Folder: Fix top folder creation (#59422)
fix top folder creation
2022-11-30 18:51:14 +01:00
Josh Hunt
93eb8cb51d
CommandPalette: Add actions for entire Nav tree (#58138)
* wip for exposing full nav tree in command palatte

* Expose whole nav tree in command palette

* give search an icon

* comments

* remove unused index variable

* navigate to parents

* include image icons

* comment
2022-11-30 12:34:25 -05:00
Joey Tawadrous
b12b5ed92f
Remove fire text in Phlare ds (#59484)
* Renames

* Rename to phlareql

* Go renames
2022-11-30 17:22:47 +00:00
Torkel Ödegaard
6625147e74
PanelEdit: Fixes alignment issue with collapse button (#59414)
* PanelEdit: Fixes alignment issue with collapse button

* Fix
2022-11-30 15:06:32 +00:00
Alex Khomenko
c3d13a0e2f
Admin: Combine org and admin user pages (#59365)
* Admin: Add unified users page

* Admin: Combine admin and org components

* Admin: Add combined route

* Admin: Show combined page in nav

* Admin: Update translation

* Admin: Update description

* Admin: Update description on backend

* Admin: Update translations

* Admin: Use dynamic imports
2022-11-30 15:24:53 +02:00
Dimitris Sotirakis
ba0b2dfa1a
Security: Fix XSS in runbook URL (#59540)
Fix XSS in runbook URL

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-30 12:37:16 +02:00
Gabriel MABILLE
5bb99775bb
Fix: Unlocking the UI for AuthProxy users (#59507)
Unlocking the UI for AuthProxy users

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2022-11-30 09:53:00 +01:00
Jack Westbrook
207b2993b2
Plugins Catalog: Only allow admins to access plugins catalog (#57101)
* feat(plugins-catalog): only allow admins to access plugins catalog routes

* add backend check

* fix(plugins-catalog): update route role access to include server admins

Co-authored-by: Will Browne <will.browne@grafana.com>
2022-11-30 09:41:28 +01:00
mikkancso
c72322874d
Connections: Update "Your connections/Data sources" page (#58589)
* navtree.go: update Data sources title and subtitle

* DataSourceList: move add button to header

* DataSourcesList: add buttons to items

The action buttons are added inside `<Card.Tags>` so that they end up at
the right end of the card, as it was designed.

The "Build a Dashboard" button's functionality is not defined yet.

* DataSourcesListHeader: add sort picker

* fix css

* tests: look for the updated "Add new data source" text

* tests: use an async test method to verify component updates are wrapped in an act()

* update e2e selector for add data source button

* fix DataSourceList{,Page} tests

* add comment for en dash character

* simplify sorting

* add link to Build a Dashboard button

* fix test

* test build a dashboard and explore buttons

* test sorting data source elements

* DataSourceAddButton: hide button when user has no permission

* PageActionBar: remove unneeded '?'

* DataSourcesList: hide explore button if user has no permission

* DataSourcesListPage.test: make setup prop explicit

* DataSourcesList: use theme.spacing

* datasources: assure explore url includes appSubUrl

* fix tests and add test case for missing permissions

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-11-30 09:41:01 +01:00
Leon Sorokin
122f0d947e
BarChart: when horiz, allow rotation and skipping of y tick labels (#59354) 2022-11-29 21:46:39 -05:00
Andrej Ocenas
038c97f31c
TestDatasource: Add scenario for generating trace data (#59299) 2022-11-29 22:50:01 +01:00
Sonia Aguilar
1020e33409
Add discord as a possible receiver in cloud rules (#59366) 2022-11-29 17:23:21 +01:00
Giordano Ricci
dc918f7e91
Grafana UI: Add experimental InteractiveTable component (#58223)
* wip

* move table

* refine example

* move to experimental

* add row expansion example

* add expanded row to kitchen sink

* add column prop docs

* add props docs

* remove useless example

* WIP

* use unique id per row & proper aria attrs for expander

* add custom cell rendering example

* Remove multisort

* rename shrink to disableGrow

* move isTruthy type guard to @grafana/data

* add missing prop from TableData interface

* make column id required

* fix correlations table

* expand on docs

* remove leftover comment

* rename to InteractiveTable

* add some tests

* add expansion tests

* fix tests

* revert unneeded changes

* remove extra header rule
2022-11-29 16:18:55 +00:00
Ashley Harrison
191ca1df86
Chore: some type fixes (#59030)
some type fixes
2022-11-29 15:52:08 +00:00
linoman
6cc56311d9
Auth: Display id Provider label in orgs/users view (#58033)
* Add frontend test

* Add frontend label component

* Adjust backend tests

* Retrieve auth IDP labels for users at org/users.

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Kalle <kalleep@users.noreply.github.com>
Co-authored-by: Jo <Jguer@users.noreply.github.com>
2022-11-29 15:20:28 +01:00
Galen Kistler
5b7ef92399
Prometheus: Remove raw query toggle (#59069)
* remove the raw query option toggle from the prometheus query builder
2022-11-29 08:12:46 -06:00
Gareth Dawson
6b5ebf2b4b
Loki: Add improvements to loki label browser (#59387)
* improvements

* refactor label browser modal

* feat(label-browser-modal): fetch labels on modal open

* apply suggestions

* check for log labels after languageProvider start

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-11-29 14:07:34 +00:00
Torkel Ödegaard
1395436dce
Scenes: Url sync (#59154)
* Scene url sync

* muu

* Progress

* Time range stuff

* Progress

* Progress

* Adding tests

* Rennamed interface

* broken test

* handling of unique url keys

* Fixing isuse with unique key mapping and depth

* Testing grid row expand sync

* Updates

* Switched from Map to Object

* Now arrays work

* Update public/app/features/scenes/core/types.ts

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Update public/app/features/scenes/core/SceneTimeRange.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Update public/app/features/scenes/core/SceneObjectBase.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-11-29 14:49:26 +01:00
Levente Balogh
778fb07464
Plugins: Make the Plugin Details page reusable (#58741)
* refactor(PluginDetails): use react-router hooks instead of props

* Wip

* refactor: remove unnecessary constant

* feat: use the original plugin details page under connections

* chore: use better wording in the not-found warning

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* chore: use the renderer utility everywhere in the test

* chore: don't show a title while loading a plugin

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-11-29 13:45:03 +01:00
Ashley Harrison
5011b259c7
Chore: ignore eslint rules in Dropdown/TopNavBarMenu (#59385)
ignore eslint rules in dropdown/topnavbarmenu
2022-11-29 11:13:21 +00:00
Torkel Ödegaard
fd39417db5
VizPanel: Fixes sizing issues (#59456) 2022-11-29 11:02:47 +01:00
Piotr Jamróz
454c8841a4
Glue: Show data links only for fully interpolated correlations (#59052)
* Create data link filters for Explore

* Add comments and make the code more explicit
2022-11-29 10:09:38 +01:00
Kyle Cunningham
839465ae44
Various Panels: Remove beta label from Bar Chart, Candlestick, Histogram, State Timeline, & Status History Panels (#58557)
* Remove beta label from numerous panels.

* Update backend snapshot to fix test

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-11-29 14:26:05 +07:00
Zoltán Bedi
71e4a8261d
SQL Datasources: Fix annotation migration (#59438) 2022-11-29 07:56:59 +01:00
Ivana Huckova
d6dd86d273
Elasticsearch: Run explore queries trough backend if feature toggle enabled (#59394) 2022-11-28 17:26:45 +01:00
Andre Pereira
8dbde1b921
Tempo: TraceQL table and editor (#59313)
* Tempo: Add the ability to show/hide the Span column in the table when using TraceQL

* Add optional chaining

* Update tests

* Show subcols in a subtable

* Add more space for the subtable

* Remove unused import

* Better expander icon. Improved the subtable styling. Integrated with real data

* Fix expanding the wrong index when table already has an expanded row

* ⚠️ Hack ⚠️ - Fix table links

* Link to spans

* Tempo: [TraceQL] Don't wrap the autocomplete vals for the status tag in quotes

* TraceQL result table improvements and fixes

* Include span name in the subtable

* Loop through data only if it is not nullish

* Integrate traceql with sub-tables

* Added booleans as keywords. Make query editor multiline

* Make date format consistent between trace and span

* Reset expanded indexes when data or subdata change

* Dynamic attributes by trace

* Fix test. Cleanup and refactor

* Tiny refactor

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-11-28 16:13:03 +00:00
Sonia Aguilar
a5c58e46f2
Fix Silence table grid layout (#59415) 2022-11-28 17:10:39 +01:00
Andrej Ocenas
e033775264
NodeGraph: Allow usage with single dataframe (#58448) 2022-11-28 15:03:00 +01:00
Leon Sorokin
13d5ad2ce2
BarChart: fix hover overlay for hz stacked (#59359) 2022-11-28 06:29:00 -06:00
Josh Hunt
b0e886840d
Internationalization: Add language preference analytics (#59230)
* Report change languange

* clean defaults.ini

* Add language to rudderstand user identify call

* undo changes not intended
2022-11-28 07:11:55 -05:00
Erik Sundell
254577ba56
CloudWatch: Cross-account querying support (#59362)
* Lattice: Point to private prerelease of aws-sdk-go (#515)

* point to private prerelease of aws-sdk-go

* fix build issue

* Lattice: Adding a feature toggle (#549)

* Adding a feature toggle for lattice

* Change name of feature toggle

* Lattice: List accounts (#543)

* Separate layers

* Introduce testify/mock library

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* point to version that includes metric api changes (#574)

* add accounts component (#575)

* Test refactor: remove unneeded clientFactoryMock (#581)

* Lattice: Add monitoring badge (#576)

* add monitoring badge

* fix tests

* solve conflict

* Lattice: Add dynamic label for account display name (#579)

* Build: Automatically sync lattice-main with OSS

* Lattice: Point to private prerelease of aws-sdk-go (#515)

* point to private prerelease of aws-sdk-go

* fix build issue

* Lattice: Adding a feature toggle (#549)

* Adding a feature toggle for lattice

* Change name of feature toggle

* Lattice: List accounts (#543)

* Separate layers

* Introduce testify/mock library

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* point to version that includes metric api changes (#574)

* add accounts component (#575)

* Test refactor: remove unneeded clientFactoryMock (#581)

* Lattice: Add monitoring badge (#576)

* add monitoring badge

* fix tests

* solve conflict

* add account label

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* fix import

* solve merge related problem

* add account info (#608)

* add back namespaces handler

* Lattice: Parse account id and return it to frontend (#609)

* parse account id and return to frontend

* fix route test

* only show badge when feature toggle is enabled (#615)

* Lattice: Refactor resource response type and return account (#613)

* refactor resource response type

* remove not used file.

* go lint

* fix tests

* remove commented code

* Lattice: Use account as input when listing metric names and dimensions (#611)

* use account in resource requests

* add account to response

* revert accountInfo to accountId

* PR feedback

* unit test account in list metrics response

* remove not used asserts

* don't assert on response that is not relevant to the test

* removed dupe test

* pr feedback

* rename request package (#626)

* Lattice: Move account component and add tooltip (#630)

* move accounts component to the top of metric stat editor

* add tooltip

* CloudWatch: add account to GetMetricData queries (#627)

* Add AccountId to metric stat query

* Lattice: Account variable support  (#625)

* add variable support in accounts component

* add account variable query type

* update variables

* interpolate variable before its sent to backend

* handle variable change in hooks

* remove not used import

* Update public/app/plugins/datasource/cloudwatch/components/Account.tsx

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update public/app/plugins/datasource/cloudwatch/hooks.ts

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* add one more unit test

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* cleanup (#629)

* Set account Id according to crossAccountQuerying feature flag in backend (#632)

* CloudWatch: Change spelling of feature-toggle (#634)

* Lattice Logs (#631)

* Lattice Logs

* Fixes after CR

* Lattice: Bug: fix dimension keys request (#644)

* fix dimension keys

* fix lint

* more lint

* CloudWatch: Add tests for QueryData with AccountId (#637)

* Update from breaking change (#645)

* Update from breaking change

* Remove extra interface and methods

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* CloudWatch: Add business logic layer for getting log groups (#642)



Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Lattice: Fix - unset account id in region change handler (#646)

* move reset of account to region change handler

* fix broken test

* Lattice: Add account id to metric stat query deep link (#656)

add account id to metric stat link

* CloudWatch: Add new log groups handler for cross-account querying (#643)

* Lattice: Add feature tracking (#660)

* add tracking for account id prescense in metrics query

* also check feature toggle

* fix broken test

* CloudWatch: Add route for DescribeLogGroups for cross-account querying (#647)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>

* Lattice: Handle account id default value (#662)

* make sure right type is returned

* set right default values

* Suggestions to lattice changes (#663)

* Change ListMetricsWithPageLimit response to slice of non-pointers

* Change GetAccountsForCurrentUserOrRole response to be not pointer

* Clean test Cleanup calls in test

* Remove CloudWatchAPI as part of mock

* Resolve conflicts

* Add Latest SDK (#672)

* add tooltip (#674)

* Docs: Add documentation for CloudWatch cross account querying (#676)

* wip docs

* change wordings

* add sections about metrics and logs

* change from monitoring to observability

* Update docs/sources/datasources/aws-cloudwatch/_index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* apply pr feedback

* fix file name

* more pr feedback

* pr feedback

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* use latest version of the aws-sdk-go

* Fix tests' mock response type

* Remove change in Azure Monitor

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-11-28 12:39:12 +01:00
Victor Marin
16af756d50
TablePanel: Add support for Count calculation per column or per entire dataset (#58134)
* WIP

* TablePanel: Add support for Count calculation per column or per entire dataset

* refactor

* refactor

* refactor + fixes

* refactor + tests

* Docs and cue model fix
2022-11-28 10:16:35 +02:00
Gábor Farkas
7ba86dc1dc
Elastic: always return DataFrames from the datasource's query method (#58636)
* elastic: response parsing: convert TableModel to DataFrame

* elastic: response parsing: convert JSONDocumentData to DataFrame

* elastic: response parsing: convert TimeSeries to DataFrame

* elastic: unit tests: type fixes

* elastic: fixed unit test
2022-11-28 08:57:56 +01:00
Torkel Ödegaard
f3f1c5aa32
Scene: Fixes infinite update loop (#59306)
* Scene: Fixes infinite update loop

* fixed lint issue
2022-11-25 14:20:56 +01:00
Ivana Huckova
28c390bc90
Loki: Fix adhoc parsing if multiple stream selectors and some empty (#58658) 2022-11-25 14:00:48 +01:00
Gilles De Mey
49f91721ec
Alerting: fix "no permissions" alert flashing (#59300) 2022-11-24 19:58:02 +01:00
Sofia Papagiannaki
f5c41ea497
Nested Folders: More API fixes (#59316)
* Nested Folder: Fix create, use camel case for JSON properties

* Fix get parents if the folder does not exist

* Add store test for get parents
2022-11-24 13:28:53 -05:00
Laura Fernández
45d3125919
OptionsUI: SliderValueEditor does not get auto focused on slider change (#59209) 2022-11-24 18:21:33 +01:00
Matias Chomicki
ff87a2641f
Loki Variable Query Editor: Improve stream selector tooltip text (#59311)
* feat(loki-variable-query-editor): improve stream selector tooltip text

* Chore: improve sample stream selector

* Chore: update sample stream selector in tooltip

* Chore: add example of interpolated stream selector
2022-11-24 11:41:02 -05:00
Torkel Ödegaard
d76638338d
PanelEdit: Fixes bug with not remembering panel options pane collapse/expand state (#59265) 2022-11-24 16:03:26 +01:00
Karl Persson
a53f57cc43
Navigation: Support rbac for new dashboard, import dashboard and new folder (#59303)
RBAC: Support rbac for new dashboard, import dashboard and new folder
page
2022-11-24 15:25:51 +01:00
renovate[bot]
e84a01e870
Update jest monorepo to v29 (#58261)
* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-24 14:00:41 +00:00
Ivan Ortega Alba
1a6b46e98d
Scenes: Add support for Datasource variables (#59147) 2022-11-24 13:53:31 +01:00
Victor Marin
0da77201bf
TimeseriesPanel: Preserve string fields for data link interpolation (#58424)
* TimeseriesPanel: Preserve string fields for data link interpolation

* clean code

* Modify tests so that string fields are allowed only when a valid time/number dataframe exists

* performance mods

* fix wrong length

* remove console.log

* Check if aligned dataframe has links
2022-11-24 14:44:32 +02:00
Sven Grossmann
400ada1ad0
Logs: Fix misalignment of LogRows (#59279)
* add default display flex

* changed to `text-align: left`
2022-11-24 13:21:55 +01:00
Oscar Kilhed
be73418d00
PostgreSQL: Fix missing CA field from configuration (#59280)
* PostgreSQL: Fix missing CA field from configuration
2022-11-24 12:52:10 +01:00
Andres Martinez Gotor
276b54fe9d
Azure Monitor: Fix empty/errored responses for Logs variables (#59240) 2022-11-24 11:25:40 +01:00
Ryan McKinley
5888f53aab
Angular: auto-migrate graph panel when angular is disabled (#59247) 2022-11-23 13:32:52 -08:00
Ryan McKinley
0a7a5b13fe
Heatmap: Remove legacy angular based implementation (#59249)
remove angular heatmap
2022-11-23 10:46:21 -08:00
Andre Pereira
183b279274
Explore: Sub-tables support for Table component (#58682)
* First commit with working version of sub-tables using subData array

* Update TableContainer and query result to support a dataframe array for the table result

* Fix border issue by moving the subtable to above the cells in the DOM

* Allow header to be configurable using custom options.

* Update TablePanel to support sub-tables

* Fix main row links

* Added tests

* Fix TablePanel correctly splitting frames and sub-frames by using refId
2022-11-23 17:49:32 +00:00
Ashley Harrison
d33b4918cd
Chore: more any/type assertion improvements (#59229)
more any/type assertion improvements
2022-11-23 16:54:57 +00:00
Gareth Dawson
a098bdef58
Loki: Make label browser accessible in query builder (#58525)
* add label browser button to query editor header

* add dynamic button label text

* add LabelBrowserModal.tsx

* toggle label browser modal on click

* pass required props to LabelBrowserModal

* add placeholder to text input

* render label browser inside of the modal

* change button based on label status

* remove label browser button from code mode

* fix element overlap in label browser

* fix undefined app in feature tracking

* remove all any types

* add tests for label browser button

* update modal component width

* update label loading function

* add tests to LabelBrowserModal

* fix broken mock datasource

* update test names

* use stack component for button spacing

* revert modal width

* update label search placeholder

* remove unused import

* add test assertion for closed modal

* remove redundant if statement

* remove unnecessary code

* update error message and fix position

* fix input placeholder text
2022-11-23 16:48:41 +00:00
Gareth Dawson
94372f5f23
Loki: Remove raw query toggle (#59125)
* set default query expression

* always show raw query

* remove raw query title

* remove test for raw query toggle

* remove raw query toggle

* remove default expression

* hide raw query preview if empty

* remove e2e test for raw query toggle

* update test name
2022-11-23 16:07:59 +00:00
Sonia Aguilar
980a2cb949
Use Stack from experimental instead of css styles for flex containers (#59201) 2022-11-23 15:43:38 +01:00
Josh Hunt
ba0ac08465
Internationalization: Enable internationalization by default (#59204)
* Enable internationalization feature flag by default

* Change i18n feature to beta

* Set i18n feature flag to stable

* update features
2022-11-23 14:23:26 +00:00
Hamas Shafiq
6d94fa6aa5
Tempo: Send the correct start time when making a TraceQL query (#59128) 2022-11-23 13:45:10 +00:00
Grafana I18n Bot
343f65fffb
I18n: Crowdin sync (#59210)
* New translations grafana.json (French)

* New translations grafana.json (Spanish)

* New translations grafana.json (German)

* New translations grafana.json (Chinese Simplified)
2022-11-23 07:24:54 -05:00
Josh Hunt
f180bb46f8
I18n: Translate Dashboard Starred notification (#59138) 2022-11-23 13:12:33 +01:00
Leo
7d82a27835
Folder: Provide adhoc ui for nested folder creation (#59126)
chore: provide adhoc ui for nested folder creation
2022-11-23 13:08:36 +01:00
Ashley Harrison
c2f31c2685
Navigation: always show GetStartedWithPlugin even if there's install control wa… (#59127)
always show `GetStartedWithPlugin` even if there's install control warnings
2022-11-23 11:34:00 +00:00
Selene
a0334a92f5
Solo Panel: Configurable timezone (#59153)
* Allow to set timezone in query

* Use optional timestamp

* Update timeZone
2022-11-23 12:14:35 +01:00
Josh Hunt
c02f2321c1
I18n: Fix variables not interpolating with pseudo localisation (#59145)
* I18n: Don't pseudolocalise string variables

* clean up
2022-11-23 10:32:20 +00:00
Zoltán Bedi
75097b99fb
SQL: Fix code editor for SQL datasources (#58116)
* SQL: Fix code editor for sql datasources

* Fix: mysql completion with defaultdb
2022-11-23 10:36:07 +01:00
Konrad Lalik
cae5d89d0f
Alerting: Add dashboard and panel picker to the rule form (#58304)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-11-23 10:27:49 +01:00
Laura Fernández
4a628f18b0
Internationalization: Translate menu items (#59088) 2022-11-23 09:34:53 +01:00
Leon Sorokin
9512f1e1af
StateTimeline: Prevent label text from overflowing state rects (#59169)
Co-authored-by: Vegard Vatn <vegard.vatn@avento.no>
2022-11-22 20:58:48 -07:00
Leon Sorokin
2a8706b025
Heatmap: Fix tooltip y range of top and bottom buckets in calculated heatmaps (#59172)
Co-authored-by: xdavidwu <xdavidwuph@gmail.com>
2022-11-22 20:54:54 -07:00
Nathan Marrs
e157ef1171
Canvas: Add icon value mapping (#59013) 2022-11-22 14:39:19 -08:00
Drew Slobodnjak
ee8f292c6a
Geomap: Improve location editor (#58017)
* add custom component for location editor

* FC cleanup

* Apply filter to add location fields call

* Create custom editor for location mode

* Apply validation logic and render warning

* Improve alert styling

* Add help url button to location alert

* Add success alert for auto

* Remove completed TODOs

* Only use alert on error, not success

* Change location mode to dropdown

* Change alert severity to less severe, info

* Prevent auto field selection during manual

* Update location testing to be for auto mode

* Run geo transformer editor init once

* Fix breaking test

* Clean up some anys

* Update styling for alert

* Remove auto success styling

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-11-22 11:24:56 -08:00
Ashley Harrison
824a562b03
Navigation: share logic between buildBreadcrumbs and usePageTitle (#58819)
* simplify usePageTitle logic a bit

* use buildBreadcrumbs logic in usePageTitle

* always add home item to navTree, fix some tests

* fix remaining unit tests
2022-11-22 16:48:07 +00:00
Ashley Harrison
26a7423151
Chore: add some unique keys to prevent warnings (#59143)
add some unique keys to prevent warnings
2022-11-22 16:42:21 +00:00
Kristina
d5274dfdda
Explore: Skip flaky query history test (#59135)
Skip flaky query history test
2022-11-22 10:52:50 -05:00
Joao Silva
f8dc333ee4
Preferences: Add confirmation modal when saving org preferences (#59119) 2022-11-22 16:47:42 +01:00
Andres Martinez Gotor
5b1ff83ee9
Azure Monitor: Fix resource picker selection for subresources (#56392) 2022-11-22 16:43:57 +01:00
Andres Martinez Gotor
3bea8f2462
Azure Monitor: Fix namespace selection for storageaccounts (#56449) 2022-11-22 16:43:35 +01:00
Ivan Ortega Alba
f98ec2c582
Scenes: Add custom variable support (#59057) 2022-11-22 16:30:16 +01:00
Ashley Harrison
6f26668a9f
Chore: Document theme toggle keybinding (#59031)
* make theme toggle keybinding dev only

* fix bug + add support for theme change keybinding
2022-11-22 14:01:51 +00:00
Josh Hunt
460be70261
Internationalization: Change locale preference to language (#58359)
* backend locale -> language

* frontend locale -> language

* sample.ini and tests

* fix few last locale -> language

* fix few last locale -> language
2022-11-22 12:18:34 +00:00
Sonia Aguilar
9c4b78ae4f
Alerting: add group name validation in alert rule form (#59095)
Add group name validation in alert rule form
2022-11-22 12:26:07 +01:00
kay delaney
850f5fa8d7
LibraryPanels: Fix issue where viewer with folder edit permissions could not update library panel (#58420)
* LibraryPanels: Fix issue where viewer with folder edit permissions could not update library panel
2022-11-22 10:05:55 +00:00
linoman
f8f61c1a69
Auth: Add expiry date for service accounts access tokens (#58885)
* Add new configuration option for SA tokens

* Add new expiry date option to frontend components

* Add backend validation


Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-11-22 10:08:40 +01:00
Zoltán Bedi
38f25a0bf5
MS/My/PostgresSQL: Migrate annotation query (#58847) 2022-11-21 19:46:04 +01:00