Commit Graph

17284 Commits

Author SHA1 Message Date
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
Leon Sorokin
1f4834a144
Prometheus: fix Heatmap y buckets when legendFormat: auto (#59053) 2022-11-21 10:29:37 -07:00
Sonia Aguilar
99725bf9d4
Alerting: Improve UI for making more clear that evaluation interval belongs to the group (#56397)
* In GrafanaEvaluationBehaviour component : Split evaluation interval from for duration and add button to edit to allow editing it and warning

* Move folder and group fields to the evaluation section in the alert form

* Include 'Group behaviour' info in a card and fix 'Edit group behaviour' button onClick.

* Create hook for  getting groups for a particular folder

* Use dropdown in group instead of input and fill it with groups that belong to the selected folder

* Add evaluation interval for each group in dropdown , and show warning in case user wants to update it

* Avoid saving evaluation interval when some rules in the same group would have invalid For with this change

* Clear group value when reseting the drop down

* Remove evaluationEvery from form values, show this as a label and add a button to edit the group

* Open EditRuleGroupModal for editing evaluation interval form the alert rule form

* Fix aligment in group behaviour card

* compact space in evaluation behaviour card and change group drop down label

* In EditgroupModal, in case of grafana managed group, show folder instead of namespcace label and disable the folder name input

* Add edge case in rulesInSameGroupHaveInvalidFor method when For value is zero

* Vertically align annotations input to the evaluation section in alert rule form

* Fix width when editing new group

* Add placeholder for group input

* Make folder and group in modal readonly from alert form and disable edit group button when new group

* Update texts

* Don't show evaluation behaviour section until folder and group are selected

* Update texts

* Fix merge conflits

* Fix wrong margin in evaluation label

* Remove non-used isRulerGrafanaRuleDTO method

* Remove negative margin to avoid overlaping on Firefox
2022-11-21 17:59:19 +01:00
Laura Fernández
8f567d57fa
Internationalization: Translate ViewJSONmodal and ClipboardButton (#58807) 2022-11-21 17:37:53 +01:00
Torkel Ödegaard
156ed4b56c
VizPanel: Support panel migrations and state changes (#58501)
* VizPanel: Make it more real

* Updates

* Progress on query runner and max data points from width

* Updated

* Update

* Tests

* Fixed issue with migration

* Moving VizPanel

* Fixed migration issue due to pluginVersion not being set

* Update public/app/features/scenes/querying/SceneQueryRunner.test.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Some minor review fixes

* Added expect

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-11-21 15:31:01 +01:00
Kristina
bdfa127ee5
Explore: Notify when compact URL is used (#58684)
* Add explore compact url notices

* Add error checking around data links urls

* Fix tests

* remove global flag, add test for warning in title

* Move feature tracking to initialization, add better error messaging

* Fix test

* Add compact url tests, fix styling bug, remove warning tooltip

* Fix broken check, move tests to util file
2022-11-21 08:03:50 -06:00
Josh Hunt
b1ffe18599
Chore: Fix some as HTMLElement type assertions (#58667) 2022-11-21 13:05:55 +00:00
Sonia Aguilar
ee9057a5fa
Alerting: Remove checkForPathSeparator validation in alert rule name (#59014)
Remove checkForPathSeparator validation in alert rule name
2022-11-21 11:15:00 +01:00
Ashley Harrison
598935cb34
Accessibility: Improve keyboard accessibility in AnnoListPanel (#58971)
fix keyboard accessibility in AnnoListPanel
2022-11-21 09:25:56 +00:00
Leo
14fbd44ac0
Navigation: Prevent viewer role accessing dashboard creation, import and folder creation (#58842)
hide pages related dashboard import create and folder creation for viewer role
2022-11-21 09:42:58 +01:00
Sonia Aguilar
97bf3c1dca
Alerting: Move alert rule name to the top left in alert form (#58579)
* Move alert rule name to the top left in alert form, and add a placeholder

* Update docs

* Fix lint error
2022-11-21 09:11:02 +01:00
Ashley Harrison
e19957bbc8
Accessibility: Improve keyboard accessibility in GettingStarted panel (#58966)
fix keyboard a11y in `GettingStarted` panel
2022-11-18 15:29:50 +00:00
Josh Hunt
5978dc138e
Nav: Split Admin into three sections for new IA (#58229)
* start to split admin into two sections

* most of new admin nav implemented

* landing pages

* hide admin for non-admins

* update admin redirects if not topnav

* clean up

* updated IA for admin (still WIP)

* move plugin pages into correct admin sections

* fix backend unit test

* move correlations into the correct section

* add translations for admin sections

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-18 15:11:59 +00:00
Ashley Harrison
5226a61f67
Navigation: Stop clearing search state when opening a result in a new tab (#58880)
search: only clear search state if not opening in a new tab
2022-11-18 14:17:59 +00:00
Giordano Ricci
27b5e5f781
Explore: Fix a11y issue with logs navigation buttons (#58944) 2022-11-18 14:54:56 +01:00
Giordano Ricci
b68fe6336a
Chore: move keydown handler in rich history card (#58945)
Chore: move kedown handler in rich history card
2022-11-18 14:54:20 +01:00
Giordano Ricci
44e8fb628e
Explore: Fix a11y issue with show all series button in Graph (#58943)
* Explore: Fix a11y issue with show all series button in Graph

* remove extra space

* add spacing
2022-11-18 14:52:54 +01:00
sfranzis
e823a90b82
GaugePanel: Setting the neutral-point of a gauge (#53989) 2022-11-18 12:13:31 +01:00
Torkel Ödegaard
38b980bd81
SceneObject: Prevent state mutation by using Object.freeze (#58936) 2022-11-18 10:35:27 +01:00
Ashley Harrison
d46e3916a1
Navigation: move connections + integrations to be a top level item (#58902)
* move connections + integrations to be a top level item

* add a test to check we can move apps to the root

* split out movePlugin logic into a separate function

* fix linting

* rename movePlugin -> addPluginToSection
2022-11-18 09:05:45 +00:00
Gilles De Mey
ea27eca147
Email: Use MJML email templates (#57751)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-11-17 21:41:46 +01:00
Kristina
5cad7089b3
Explore: Enable resize of split pane (#58683)
* Move layout to paneleditor, make SplitPaneWrapper more generic

* Read/write the size ratio in local storage

* Add min height to enable scrollbar

* Enable show/hide panel options

* Add new component to explore

* Add styles

* Bring in code from other branch

* Fix update size function, add min size to explore container

* Add window size, save width as a ratio

* Fix tests

* Allow for one child

* Remove children type definition

* Use library methods for min/max size instead of hooks
2022-11-17 09:27:07 -06:00
Torkel Ödegaard
0c4aa6d0d8
DashboardScene: First step to loading the current dashboard model and rendering it as a scene (#57012)
* Initial dashboard loading start

* loading dashboard works and shows something

* loading dashboard works and shows something

* Minor tweaks

* Add starred dashboards to scene list page

* Use new SceneGridLayout

* Allow switching directly from dashboard to a scene

* Migrate basic dashboard rows to scene based dashboard

* Review nit

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-11-17 07:15:51 -08:00
Levente Balogh
c093a471e6
AppRootPage: Fix passing the queryParams (#58912)
* fix(AppRootPage): push the query params properly

* refactor: remove unnecessary changes in AppRootPage

* refactor(AppRootPage): use existing utility function
2022-11-17 10:09:06 -05:00
Torkel Ödegaard
c14cbfc65d
Breadcrumbs: Remove semi-bold and change current/last breadcrumb text color (#58875) 2022-11-17 15:51:09 +01:00
Ashley Harrison
b398e8640d
Navigation: Change quick add styling (#58854)
Change quick add styling + allow for returning isOpen state to dropdown children
2022-11-17 09:03:12 +00:00
Leo
27b6b3b3bd
Folder: Replace folderId with folderUid (#58393)
* support folderuid in FolderPicker

* support folderuid in unified alerting

* support folderuid when returning to view mode after editing a panel

* support folderuid when preselecting the folderpicker in dashboard general settings

* support folderuid when saving dashboard

* support folderuid when pre-selecting folderpicker in dashboard form

* support folderuid in routes when loading a dashboard

* support folderuid when saving dashboard json

* support folderuid when validating new dashboard name

* support folderuid when moving dashboard to another folder

* support folderuid on dashboard action buttons

* support folderuid when creating a new dashboard on an empty folder

* support folderuid when showing library panel modal

* support folderuid when saving library panel

* support folderuid when importing dashboard

* fixed broken tests

* use folderuid when importing dashboards

* remove commented line

* fix typo when comparing uid values
2022-11-17 09:22:57 +01:00
matt abrams
d9b8b761e9
Query Editor: Hide overflow for long query names (#58840)
hides overflow for long query names
2022-11-16 18:22:06 +01:00
Ivan Ortega Alba
f4d238cdbd
Build: Disable flaky RuleEditor frontend test (#58844) 2022-11-16 16:41:32 +01:00
Karl Persson
9283773c12
Teams: Support paginating and filtering more then 1000 teams (#58761)
* TeamList: break out rows to its own component

* TeamsState: Add total count

* TeamList: Remove teamsCount prop

* TeamList: Restructure code and use count from backend response

* TeamList: calculate total pages using totalCount

* TeamList: Rename to state to currentPage and the reducer to
setCurrentPage

* TeamList: remove wrapper functions

* TeamList: rewrite as a functional component

* TeamList: export components for test

* TeamList: pass limit, page and query to backend

* TeamList: Rename properties in state and create actions for page and
query change

* TeamList: Add flag to control if EmptyList banner should render
2022-11-16 15:55:10 +01:00
Torkel Ödegaard
bce83485a9
Scenes: Share factory function for test data query runner (#58816) 2022-11-16 15:47:44 +01:00
Torkel Ödegaard
20133ec6fb
Variables: Use new format registry from templateSrv (#58813)
* Variables: Use new format registry from templateSrv

* Updated comment

* Fixed e2e
2022-11-16 14:55:31 +01:00
matt abrams
74010fd05d
Admin: Fix broken links to image assets in email templates (#58729)
fix broken links to image assets
2022-11-16 14:17:39 +01:00
Laura Fernández
f2cb248d93
Internationalization: Translate 'Hide / show legend' of PanelHeaderMenuItem (#58800) 2022-11-16 13:06:04 +01:00
Laura Fernández
515440979b
Internationalization: Translate ShareSnapshot label (#58802) 2022-11-16 13:04:51 +01:00
Laura Fernández
3f63ca06c3
Internationalization: Translate NavBar - 'Search dashboard' menu item (#58815) 2022-11-16 13:02:29 +01:00
Levente Balogh
4ee83a5f2b
AppRootPage: Render app plugins without pages (#58776)
fix: render app plugins that don't have a page in includes
2022-11-16 11:49:34 +01:00
Torkel Ödegaard
8c585a4ebf
Scene: Variables interpolation formats and multi value handling (#58591)
* Component that can cache and extract variable dependencies

* Component that can cache and extract variable dependencies

* Updates

* Refactoring

* Lots of refactoring and iterations of supporting both re-rendering and query re-execution

* Updated SceneCanvasText

* Updated name of file

* Updated

* Refactoring a bit

* Added back getName

* Added comment

* minor fix

* Minor fix

* Merge fixes

* Scene variable interpolation progress

* Merge fixes

* Added all format registeries

* Progress on multi value support

* Progress on multi value support

* Updates

* Progress on scoped vars

* Fixed circular dependency

* Updates

* Some review fixes

* Updated comment

* Added forceRender function

* Add back fail on console log

* Update public/app/features/scenes/variables/interpolation/sceneInterpolator.test.ts

* Moving functions from SceneObjectBase

* fixing tests

* Fixed e2e

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-11-16 11:36:30 +01:00
Giordano Ricci
2a9381e998
Explore: Refactor ExploreGraph (#58660)
* WIP

* revert collapse changes

* use HorizontalGroup instead of custom styles

* fix tests

* use import aliases
2022-11-16 11:16:27 +01:00
Laura Fernández
3cedcdedbd
Internationalization: Translate VariableInput and VariableOptions components (#58748) 2022-11-15 17:30:33 +01:00
Kristina
2055d922f3
Refactor SplitPaneWrapper to be more centralized component, refactor PanelEditor to use it (#58380)
* Move layout to paneleditor, make SplitPaneWrapper more generic

* Read/write the size ratio in local storage

* Add min height to enable scrollbar

* Enable show/hide panel options

* Change back variable name
2022-11-15 09:10:05 -06:00
Ashley Harrison
ff1afbb699
Revert "Chore: move to node 18 (#58570)" (#58754)
This reverts commit 0a9129cf90.
2022-11-15 13:47:14 +00:00
lean.dev
83bd57244d
Chore: Update version (#58750) 2022-11-15 10:03:05 -03:00
Joao Silva
20e6ac397e
Search: Fixes issue with Recent/Starred section always displaying "General" folder (#58746) 2022-11-15 13:16:03 +01:00
Ashley Harrison
028751a18a
Navigation: Add quick actions button (#58707)
* initial implementation for quick add

* add new isCreateAction prop on NavModel

* adjust separator margin

* switch to primary button

* undo changes to plugin.json

* remove unused props from interface

* use a consistent dropdown overlay type

* memoize findCreateActions

* add prop description

* use a function so that menus are only rendered when the dropdown is open
2022-11-15 12:08:15 +00:00
Torkel Ödegaard
84a69135a7
Scene: Variables and support for declaring variable dependencies and getting notified or re-rendered when they change (#58299)
* Component that can cache and extract variable dependencies

* Component that can cache and extract variable dependencies

* Updates

* Refactoring

* Lots of refactoring and iterations of supporting both re-rendering and query re-execution

* Updated SceneCanvasText

* Updated name of file

* Updated

* Refactoring a bit

* Added back getName

* Added comment

* minor fix

* Minor fix

* Merge fixes

* Merge fixes

* Some review fixes

* Updated comment

* Added forceRender function

* Add back fail on console log
2022-11-15 12:54:24 +01:00
Dominik Prokop
80e80221b9
Scenes: Grid layout (#56737)
* WIP: First approach to scene grid layout

* Flex layout

* Grid layout rows

* Allow passing custom props to scene object renderers

* Allow nesting grid layouts

* Re-layout nested grid's enclosing grids

* Update public/app/features/scenes/components/layout/SceneGridLayout.tsx

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

* Review comments

* Got rid of flex & grid child layout objects

* WIP: Recreating rows behaviour (almost working)

* Major progress on rows

* remove nested grid example (not supported)

* Remove removal damn

* Trying to use children directly

* Ts fixes

* chore: Fix TS

* Fix issue when row bboxes when not updated on layout change

* Now the tricky part

* working

* Removing some code

* needs more work

* Getting some thing working

* Getting some thing working

* fix toggle row

* Starting to work

* Fix

* Yay it's working

* Updates

* Updates

* Added some sorting of children

* Updated comment

* Simplify sorting

* removed commented code

* Updated

* Pushed a fix so we can move a panel out from a row and into the parent grid

* simplify move logic

* Minor simplification

* Removed some unnesary code

* fixed comment

* Removed unnessary condition in findGridSceneParent

* remove unnessary if

* Simplify toGridCell

* removed duplicate if

* removed unused code

* Adds grid demo with different data scenarios

* Make it green

* Demo grid with multiple time ranges

* Move child atomically

* Add tests

* Cleanup

* Fix unused import

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2022-11-15 00:49:39 -08:00
matt abrams
16aa4376ac
Transformations: Make Card Descriptions Clickable (#58717)
replace Card Meta w Card Description
2022-11-15 09:37:37 +01:00
Ryan McKinley
d33939da55
DataSourceWithBackend: Add plugin id to the request headers (#58082) 2022-11-14 19:35:50 -05:00
Laura Fernández
dd0d034796
Internationalization: Translate RefreshPicker component (#58530) 2022-11-14 17:47:15 +01:00
Laura Fernández
67bd0d5537
Internationalization: Translate TimeRangePicker component (#58470) 2022-11-14 17:16:34 +01:00
Jo
121631daae
Fix: Email and username trimming and invitation validation (#58442)
* fix: email and username trimming and invitation validation

* Trim leading and trailing whitespaces from email and username on signup

* Check whether the provided email address is the same as where the invitation sent

* Align tests

Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
2022-11-14 13:11:26 +01:00
Oscar Kilhed
75e435fb00
SQL: Fix issue where testing the datasource would always be successful if the datasourceQueryMultiStatus feature was enabled (#58671)
SQL Datasources: fix issue where testing the datasource connection would show success even when there was an error.

Co-authored-by: Victor Marin <victor.marin@grafana.com>
2022-11-11 22:41:38 +01:00
Victor Marin
6e776d0fec
MSSQL: Add connection timeout setting in configuration page (#58631)
* MSSQL add connection timeout

* add docs

* Update docs and add min value to the timeout setting
2022-11-11 14:04:08 -05:00
Ashley Harrison
500cf16142
Chore: fix some types (#58662)
chore: fix some types
2022-11-11 16:29:49 +00:00
Ashley Harrison
0bd120e01b
Navigation: fix page title spacing when there is no subtitle (#58654)
* fix page title spacing when there is no subtitle

* apply margin to whole page header
2022-11-11 09:43:11 -05:00
Virginia Cepeda
e5cb1ceae0
Alerting: Suggest previously entered custom labels (#57783)
* [Alerting] - replace label inputs with dropdowns (#57019)

* Add AlertLabelDropdown component

It will be used to pick from or create new labels

* Adapt LabelsField component to use AlertLabelDropdown instead of inputs

* Add tests for LabelsField component

Plus a few other tests were adapted to work with the label dropdowns

* Use ref in component

* Fix showing placeholders in the label dropdowns

* Minor syntax change

* Remove unneeded import after rebase

* Display custom labels

When a label key is selected, its corresponding values are shown in the dropdown

* Add tooltip explaining where labels in the dropdowns come from

* Fix import of Stack component

* Avoid duplicated values

* Improvements based on review

* Display labels for currently selected datasource only

* Refactor AlertsField to allow to choose whether to suggest labels or not

* Suggest labels for NotificationStep and tests

* Don't suggest labels in TestContactPointModal

* [LabelsField] - refactor: get dataSourceName as a parameter

* [LabelsField] - extract common code into reusable components

* Display loading spinner while fetching rules

* LabelsField - refactor

Removing the suggest prop and the default dataSource 'grafana'. Instead, the component now relies on the dataSourceName param. If it's set it means we want to show suggestions so we fetch the labels, otherwise, if not set, we show the plain input texts without suggestions.

* Add test for LabelsField without suggestions

* Show custom labels for grafana managed alerts

When the dataSourceName in the NotificationsStep component has a null value, we can assume it's because we're dealing with grafana managed alerts. In that case we set the correct value.

* Fix tests after latest changes

Since we removed the combobox from the TestContactPoints modal, tests had to be adjusted

* Update texts

* initialize all new added inputs with empty data
2022-11-11 10:29:59 -03:00
Sonia Aguilar
88a829e103
Fix: don't show an error when receiver status is not available (#58638) 2022-11-11 14:26:43 +01:00
Ashley Harrison
0a9129cf90
Chore: move to node 18 (#58570)
* bump node version to 18

* update folder to 18.x

* update README for m1 instructions

* update drone

* update unit test

* update README
2022-11-11 11:34:00 +00:00
Joey Tawadrous
c76183a961
Tempo: Fix search removing service name from query (#58630)
* Fix handleOnChange deps

* Remove eslint disable
2022-11-11 10:40:13 +00:00
Nathan Marrs
fd6edbf8c5
Canvas: Improve disabled inline editing UX (#58610) 2022-11-10 13:04:42 -08:00
sam boyer
07e5f8117f
Reconcile coremodels, entities, objects under new kind framework (#56492)
* Update thema to latest

* Deal with s/Library/*Runtime/

* Commit new, working results of codegen

* We like pointers now

* Always take runtime arg for NewBase()

* Sketchy handwavy pass at entity meta framework

* Little nibbles

* Update pkg/framework/coremodel/entityframework.cue

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>

* Move file into new framework location

* Introduce loaders, Go code

* Complete rename to kind

* Flesh out framework, add svg/dashboard examples

* Cruft removal

* Remove generated kind go files from gitignore

* Refine maturity concept, add SlotKind

* Update embed and go deps

* Export PrefixWithGrafanaCUE

* Make the loader actually work, holy crap

* Many small tweaks to type.cue

* Add Apache 2 licensing exceptions for kinds

* Add new kinds dir, start of generator

* Roll back to earlier oapi-codegen

* Introduce new grafana-specific CUE loaders

* Introduce new tidy code generators framework

* Catch up kind framework with tinkering

* Add slices for the generators

* Add write/verify step to main generator

* Many renames

* Split up kind framework cue files

* Use kind.Decl within generated kinds

* Create kind.SomeDecl wrapper type to cache lineages

* Better names again

* Get one generated implemented, hopefully

* Copy dashboard schema into new kind.cue

* Small fixes to make the initial gen work

* Put svg kind in its new home

* Add generated Go dashboard type

* More renames and cleanups

* Add base kind registry and generator

* Stop blacklisting *_gen.go files

This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.

* Change codegen output directories

pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind

* Rename pkg/framework/kind to pkg/kindsys

* Add core structured kind generator

* Add plural and machine names to kind spec

* Copy playlist over to kind system

* Consolidate kindsys files

* Add raw kind generator

* Update CODEOWNERS for kind framework

* Touch up comments a bit

* More docs tweaks

* Remove generated types to reduce noise for review

* Split each generator into its own file

* Rename Slot kind to Composable kind

* Add handwavy types for customkind loading

* Guard against init calls to framework loader

* First pass at doc on extending the kind system

* Improve attribute example in docs

* Fix wire imports

* Add basic TS types generator

* Fix composable kind category def

* No need for a separate file with generate directive

* Catch dashboard schema up

* Rename generator types to something saner and generic

* Make version configurable in ts/go generators

* Add CommonMeta to ease property access

* Add kindsys prop indicating whether lineage is group

* Put all kind categories back in a single file

* Finish with kindsys group props

* Refactor maturity progression per discussion

- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now

* Convert ts veneer index generator to modular system

* Move over to new jennywrites framework

* Strip down old coremodel generator

* Use public version of jennywrites

* Pull latest thema

* Commit generated Go types

* Add header injection postprocessor

* Move sdboyer/jennywrites to grafana/codejen

* Tweak header output

* Remove dashboard and playlist coremodels

* Fix up backend dashboards devenv test

* Fix TS import patterns to new gen filename

* Update internal imports, remove coremodel registry

* Fix compilation errors, wire generation

* Export and replace the prefix dropper

* More Go struct and field name changes

* Last name fixes, hopefully

* Fix lint errors

* Last lint error

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-11-10 12:36:40 -08:00
Nathan Marrs
47055561ec
Canvas: Fix setting icon from field data #58499 2022-11-10 10:56:31 -08:00
Alex Moreno
45facbba11
Alerting: Remove url based external alertmanagers config (#57918)
* Remove URL-based alertmanagers from endpoint config

* WIP

* Add migration and alertmanagers from admin_configuration

* Empty comment removed

* set BasicAuth true when user is present in url

* Remove Alertmanagers from GET /admin_config payload

* Remove URL-based alertmanager configuration from UI

* Fix new uid generation in external alertmanagers migration

* Fix tests for URL-based external alertmanagers

* Fix API tests

* Add more tests, move migration code to separate file, and remove possible am duplicate urls

* Fix edge cases in migration

* Fix imports

* Remove useless fields and fix created_at/updated_at retrieval

Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-11-10 16:34:13 +01:00
Gilles De Mey
738e023d13
Alerting: Fix threshold expression rewire (#58334) 2022-11-10 16:15:38 +01:00
Piotr Jamróz
039f4cb4dd
Explore: Support fields interpolation in logs panel (#58426) 2022-11-10 15:33:17 +01:00
Leon Sorokin
778337e522
BarChart: Fix coloring from thresholds and value mappings (#58285) 2022-11-10 07:43:32 -06:00
Levente Balogh
181640b080
Connections: Support standalone plugin pages (#57772)
* feat(Connections): create sub-pages wrapped by `<Page>`

* feat(Connections): rename the Connections page and update routes

* feat(Connections): use new url for editing datasources

* refactor(Connections): remove unused tab components

* feat(Connections): update routes and nav titles

* tests: fix tests for Connections

* tests: fix typo in backend tests
2022-11-10 11:14:23 +01:00
Sofia Papagiannaki
bf5a08e039
API: Support creating a nested folder (#58508)
* API: Support nested folder creation

* Update swagger

* fixup

* Update pkg/api/dtos/folder.go

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>

* Fix some tests

* create legacy folder url from title and uid

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
2022-11-10 04:41:03 -05:00
Andres Martinez Gotor
1201170724
GoogleCloudMonitoring: Refactor query type definition (#58512) 2022-11-10 09:30:47 +01:00
Galen Kistler
ee7348afee
Prometheus: Query builder label filters dropdown UI overload fix (#58266)
* WIP: try to support removing series endpoint for supported clients

* add other filter variables to match param for label values query against filter values, in order to resolve bug in which filter value options would display that aren't relevant in the current query editor context, i.e. options would display that upon select would display no data

* clean up console logs

* refactor and comment

* expanding current unit test coverage to cover calls to new API

* fix unit test

* whitespace

* prettier

* WIP: need to merge in other PR

* WIP giving up and trying again

* WIP: most functionality is working, split out shared loki/prom code

* fix bug in which search results wouldn't take other label context into the query

* Fix bug in which the previously selected value would conflict with the async search

* interpolate the label name string instead of the match promql expression

* remove type assertions

* remove type assertion

* clean up generic confusing types, and add back in a type assertion

* remove generic type

* make sure to interpolate label names

* fix bugs with variables not interpolating before query

* remove debug

* assert partial properties on QueryBuilderLabelFilter

* Force update betterer results :(

* update regex so dropdown UX more closely matches current behavior

* add eslint ignore

* add eslint ignore and update betterer
2022-11-09 14:54:51 -05:00
Ashley Harrison
159607fe6f
Navigation: Convert PluginDetails page to use new Page extensions (#58509)
* Added labels

* App page fixes

* Switch to switch

* wip

* Updates

* I am stuck

* Minor tweak

* This props interface could work

* removed change

* use new page extensions in plugin details page

* add link separator, fix action button spacing

* some renaming

* Move PageInfo into it's own folder + add tests

* add support for new props in old page header

* remove PluginDetailsHeader as it's no longer used

* Fix unit tests

* fix some badge alignments

* center align actions

* badge alignment + only show downloads for community/commercial plugins

* better link alignment

* conditionally render description

* move install control warnings to below subtitle + refactor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-09 14:44:38 +00:00
Timur Olzhabayev
008c554d7f
Echo: Add config option to prevent duplicate page views for GA4 (#57619) 2022-11-09 15:09:19 +01:00
Gareth Dawson
966b47c2ef
Loki: Rename log browser to label browser (#58416)
* rename loki log browser to label browser

* rename loki log browser to label browser
2022-11-09 09:57:05 +00:00
Torkel Ödegaard
b5651803e0
Scene: ObjectVariable for supporting the built in system variables and object scoped variables (__data for example) (#58291)
* Scene: Adds ObjectVariable to support the built-in/system variables

* fixed lint issue
2022-11-09 10:27:20 +01:00
Ashley Harrison
b3c761aaa7
Navigation: Expose new props to extend Page/PluginPage (#58465)
* add extensions and customisation to `Page`

* adjust alignment
2022-11-09 09:05:01 +00:00
Torkel Ödegaard
6ed35292fe
Variables: SceneVariable update process (#57784)
* First baby steps

* First baby steps

* No progress really

* Updates

* no progress

* refactoring

* Progress on sub menu and value selectors

* Some more tweaks

* Lots of progress

* Progress

* Updates

* Progress

* Tweaks

* Updates

* Updates to variable system

* Cleaner tests

* Update

* Some cleanup

* correct test name

* Renames and moves

* prop rename

* Fixed scene template interpolator

* More tests for SceneObjectBase and fixed issue in EventBus

* Updates

* More tweaks

* More refinements

* Fixed test

* Added test to EventBus

* Clone all scene object arrays

* Simplify

* tried to merge issue

* Update

* added more comments to interface

* temp progress

* Trying to simplify things, but struggling a bit

* Updated

* Tweaks

* Progress on fixing the select componenet and typing, and sharing code in a base class

* Updated

* Multi select

* Simpler loading state

* Update

* removed failOnConsole

* Removed old funcs

* Moved logic from update manage to MultiValueVariable

* Added tests for MultiValueVariable logic

* Made value a more abstract concept to support object values

* renamed func to getValueText

* Refactored and moved logic to VariableSet

* Added test for deactivation and query cancelling

* Tweaks

* Fixed lint issues
2022-11-09 08:02:24 +01:00
Andreas Christou
ed64133943
grafana/e2e: Update add dashboard flow (#58360)
* Update variable editor e2e flow

- Use correct selector for Variables
- Add variable query form
- Add label for variable apply button

* Use data-testid instead of aria-label

* Add jsdoc
2022-11-08 12:15:21 -05:00
Hamas Shafiq
43a0afeac4
Tempo: Fix start time column sorting when using search (#56635) 2022-11-08 16:39:21 +00:00
Laura Fernández
96d70c37bd
Internationalization: Translate TimeZonePicker component (#58461) 2022-11-08 17:25:35 +01:00
Laura Fernández
d0f173665f
Internationalization: Translate TimePickerContent component (#58316) 2022-11-08 16:30:03 +01:00
Torkel Ödegaard
50a197014f
Panels: Fixes crashing issue when migrating angular panels (#58232) 2022-11-08 16:26:02 +01:00
Matias Chomicki
25f79ef2b9
Loki: enable Monaco Query Editor by default (#58080)
* feat(loki-monaco-editor): update tests

* chore(loki): use unified datasource mock function in tests

* chore: enable monaco feature flag in tests

* feat(loki-monaco-editor): add test case for disabled feature

* feat(loki-monaco-editor): enable by default

* Revert "feat(loki-monaco-editor): enable by default"

This reverts commit 08904f94a707a4fa32aa1e7f3f0de377575a7636.

* feat(loki-monaco-editor): enable from registry

* feat(loki-monaco-editor): make feature flag frontend only
2022-11-08 10:22:40 -05:00
Laura Fernández
3790e105e5
Internationalization: Translate TimePickerFooter component (#58390) 2022-11-08 15:56:19 +01:00
Galen Kistler
9281746914
Prometheus: remove /series endpoint calls in query builder label names and values for supported clients (#58087)
* add other filter variables to match param for label values query against filter values, in order to resolve bug in which filter value options would display that aren't relevant in the current query editor context, i.e. options would display that upon select would display no data

* expanding current unit test coverage to cover calls to new API

* interpolate the label name string instead of the match promql expression
2022-11-08 08:37:11 -06:00
Ashley Harrison
831ecb467c
Add new PageInfo component (#58421) 2022-11-08 14:20:05 +00:00
Joe Blubaugh
f07da85d8b
Dashboards: Provide better error messages in SaveDashboardAsForm (#57866)
The existing code uses `instanceof Error` to check for a `message` field on the thrown object. The objects that are thrown are never instances of the error interface. This change introduces a new type that extends Error so that the check works properly and displays a meaningful error message in the UI.
2022-11-08 22:11:02 +08:00
Laura Fernández
c1d677c174
Internationalization: Translate TimeRangeContent component (#58343) 2022-11-08 14:55:50 +01:00
Giordano Ricci
e4c394dfcd
Correlations: add tracking for add, update, delete, and details expanded (#58239)
* Correlations: add tracking for add, update, delete, and details expanded

* add tests

* change delete event

* rename handlers
2022-11-08 10:10:09 +00:00
Timur Olzhabayev
228ec4c0f3
Chore: Switch Grafana to using faro libraries (#58186) 2022-11-08 10:36:27 +01:00
Gareth Dawson
2027f4702c
Loki: Add case insensitive line contains operation (#58177)
* add line-contains-case-insensitive operation definition

* add loki operation id for line-contains-case-insensitive

* make query case-insensitive when using line filter

* remove console log from operationUtils.ts

* add line-does-not-contain-case-insensitive operation definition

* add loki operation id for line-does-not-contain-case-insensitive

* make query case insensitive when using line-does-not-contain-case-insensitive

* update title and min-width for line-contains-case-insensitive

* add caseInsensitive optional parameter

* toggle case insensitive on operations

* remove console log

* update operation names

* add test coverage

* update to implement suggestions

* add suggestion
2022-11-07 17:01:06 +00:00
Andres Martinez Gotor
0a8fdc4550
GoogleCloudMonitoring: Remove unused code (#58347) 2022-11-07 17:51:49 +01:00
Matias Chomicki
17cce38545
Loki Monaco Editor: implement extracted label keys (#57368)
* feat(loki-monaco-editor): implement extracted label keys

* Chore: add missing responseUtils tests

* feat(loki-monaco-editor): suggest extracted labels

* Chore: fix test case name

* feat(loki-monaco-editor): dont suggest labels in logs query

* Chore: remove console log

* Chore: remove extracted keyword from suggested label

* feat(loki-monaco-editor): do not suggest duplicated labels

* refactor(loki-monaco-editor): pass query and offset to the completions resolver

* Revert "refactor(loki-monaco-editor): pass query and offset to the completions resolver"

This reverts commit d39464fd1a4624d5cd5420156dd2d1e2dad2eecf.

* refactor(loki-monaco-editor): refactor label completions for grouping

* Chore: remove obsolete function
2022-11-07 11:45:07 -05:00
Giordano Ricci
43436bd6f0
Explore: Remove explore2Dashboard feature toggle (#58329) 2022-11-07 16:06:40 +00:00
Zoltán Bedi
b472306239
MSSql/Postgres: Fix visual query editor filter disappearing (#58248) 2022-11-07 17:04:53 +01:00
Galen Kistler
6bc8ec0f9b
fix thanos semver string (#58335) 2022-11-07 09:03:42 -06:00
Torkel Ödegaard
1fb37b54b3
Scenes: Enforce explicit accessibility modifiers (ESLint) (#58331)
* Public test

* Update

* Update

* revert

* Added some public accessability modifiers

* Force public acessability only for scenes/* folder

* Fixes
2022-11-07 15:32:02 +01:00