Commit Graph

402 Commits

Author SHA1 Message Date
Giordano Ricci
e6b088fbf5
Explore: Fix shared crosshair for logs, logsvolume and graph panels (#57892)
* Explore: enable shared corsshair for logs, logsvolume & graph panel

* avoid recreating a scoped bus on every render
2022-11-03 09:55:02 +00:00
Ashley Harrison
b8303fd431
Chore: Convert SpanTreeOffset test to RTL (#56195)
* convert SpanTreeOffset tests to RTL (minus mouseenter/mouseleave tests)

* fix remaining tests
2022-11-03 09:31:09 +00:00
Ivana Huckova
a83dee6031
Elasticsearch: Add trace to logs functionality (#58063)
* Elasticsearch: Implement trace to logs

* Fix tests
2022-11-03 09:52:40 +01:00
Torkel Ödegaard
915ebcf832
Search: Refactor state and logic to be less fragmented and spread out (#57973)
* Started search state refactor

* Things are working

* Move more to statemanger

* minor tweaks

* Fixed name of hook

* revert yarn.lock changes

* Harderning StateManagerBase

* More tests and refinements

* Fixed unit test

* More polish

* fixing tests

* fixed test

* Fixed test
2022-11-03 08:29:39 +01:00
Marcus Andersson
b804b2f073
Plugins: Added hook to make it easier to track interactions in plugins (#56126)
* first stab at context away plugin tracking.

* adding a plugin context and a hook to get hold of a tracker that always appends the plugin context information.

* wip

* improved the code a bit.

* wip

* Fixed type errors.

* added datasource_uid to data sources.

* fixed error message when trying to use hook outside of context.

* small refactoring according to feedback.

* using the correct provider for data source context.

* check not needed.

* enforcing the interaction name to start with grafana_plugin_

* exposing guards for the other context type.

* added structure for writing reporter hook tests.

* added some more tests.

* added tests.

* reverted back to inheritance between context types.

* adding mock for getDataSourceSrv
2022-11-02 16:57:57 +01:00
Zoltán Bedi
26659baf8f
PostgreSQL: Migrate to React (#52831)
- Migrate Postgres query editor to react
- Add support for field aliasing in SELECT clauses to SQL based datasources

Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-11-02 11:30:35 +07:00
Torkel Ödegaard
f0ab4bea8c
Scene: SceneObject and SceneObjectBase refinements and stricter typing (#57851) 2022-10-31 15:16:16 +01:00
Adela Almasan
a5c492b033
Canvas: Add tabs to inline editor (#57778) 2022-10-28 13:36:19 -04:00
Gilles De Mey
2a36301817
Alerting: Fall back to "range" query type for unified alerting when "both" is specified (#57288) 2022-10-27 17:22:23 +02:00
Ryan McKinley
7346280316
LibraryPanels: Load library panels in the frontend rather than the backend (#50560)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-26 15:38:20 -07:00
kay delaney
b49713d323
Chore: Remove unused files (#57515) 2022-10-25 23:34:53 +01:00
Ashley Harrison
d2a70bc42d
Chore: more any/type assertion improvements (#57450)
* more friday any/type assertion improvements

* Apply suggestions from code review

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* Update public/app/angular/promiseToDigest.test.ts

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-10-25 11:04:35 +02:00
Nathan Marrs
9d857f4d61
Canvas: Improve resource picker initialization (#57319) 2022-10-24 13:40:28 -07:00
Adela Almasan
73c215ae41
Canvas: Button element (alpha) (#57491) 2022-10-23 20:39:10 -04:00
Brendan O'Handley
60b14a2ec2
Opentsdb: Allow template variables for filter keys (#57226)
* allow template variables for filter keys

* add types to interpolate var function
2022-10-20 15:53:29 -05:00
Gilles De Mey
423643aaa6
Alerting: use virtualized list of namespaces / groups for cloud rules (#56415) 2022-10-18 13:38:59 +02:00
Gábor Farkas
2815343ee5
logs: handle mixed datasources in filters (#56560)
* logs: handle mixed datasources in filters

* removed unnecessary special handling

* added explanation comment

* more consistent type-handling
2022-10-18 09:27:17 +02:00
kay delaney
ed71b7b884
Chore/React18: Remove enzyme slate tests and replace with e2e tests (#57095) 2022-10-17 16:31:59 +01:00
Alexa V
6524a0b437
Chore: Rename grafana core PanelChrome and use grafana-ui - PanelChrome component (#56659) 2022-10-17 16:03:38 +02:00
kay delaney
5d53a983d8
React18: Update useCallback arg types where needed (#57084) 2022-10-17 14:52:12 +01:00
Ashley Harrison
3cca8e3676
any/type assertion fixes (#57009) 2022-10-17 10:10:10 +01:00
kay delaney
e85917f041
Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
Ashley Harrison
5af36e48ba
convert ThresholdsEditor to RTL (#56791) 2022-10-13 08:56:36 +01:00
Ashley Harrison
7d18460d8f
Chore: convert MetricSelect test to RTL (#56801)
* convert MetricSelect test to RTL

* remove type param
2022-10-12 16:33:12 +01:00
kay delaney
45edce90d3
VariableEditor: Use new form styles (#56326) 2022-10-12 09:43:41 +01:00
Victor Marin
48c27872af
TablePanel: Footer now updates values on column filtering (#56354)
* Table footer now updates values on column filtering

* Backwards compatibility
2022-10-12 07:57:49 +03:00
Piotr Jamróz
ae927eab73
Glue: Enrich query results data frames in Explore with correlations to generate static links from correlations (#56295)
* Attach static generic data link to data frames in Explore

* WIP

* Always load correlations config when the query is run

This will be moved to Wrapper.tsx and called only once Explore is mounted

* remove comment

* Load the config when Explore is loaded

* Clean up

* Check for feature toggle, simplify cod

* Simplify the code

* Remove unused code

* Fix types

* Add a test for attaching links

* Revert package.json changes

* Display title provided in the correlation label

* Add missing mocks

* Fix tests

* Merge branch 'main' into ifrost/integration/attach-generic-data-link

# Conflicts:
#	public/app/features/explore/Wrapper.tsx
#	public/app/features/explore/state/main.ts

* Remove redundant async calls

* Do not block Wrapper before correlations are loaded (only delay the query)

* Test showing results after correlations are loaded

* Post-merge fix

* Use more consistent naming

* Avoid null assertions

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-10-11 14:40:55 +02:00
Ashley Harrison
ff41b9544b
Chore: more typing improvements to @grafana/ui (#56544)
* improve grafana-ui types

* more type improvements

* better useState type
2022-10-07 15:22:21 +01:00
Joey Tawadrous
74c809f544
Plugins: Introduce new Flame graph panel (#56376)
* Flamegraph

* Updated flame graph width/height values

* Fix top table rendering issue

* Add feature toggle for flamegraph in explore

* Update tests

* Hide flamegraph from dash panel viz list if feature toggle not enabled

* Show table if no flameGraphFrames

* Add flame graph to testdata ds

* Minor improvement
2022-10-07 11:39:14 +01:00
Beto Muniz
b5cb917dfa
Fix queries with repeated references (#56497) 2022-10-06 17:59:14 -03:00
Matias Chomicki
729ce8bb72
Loki: query editor using Monaco (#55391)
* loki: switch to a monaco-based query field, step 1 (#46291)

* loki: use monaco-logql (#46318)

* loki: use monaco-logql

* updated monaco-logql

* fix all the tests (#46327)

* loki: recommend parser (#46362)

* loki: recommend parser

* additional improvements

* more improvements

* type and lint fixes

* more improvements

* trigger autocomplete on focus

* rename

* loki: more smart features (#46414)

* loki: more smart features

* loki: updated syntax-highlight version

* better explanation (#46443)

* better explanation

* improved help-text

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

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

* Fix label

* feat(loki-monaco-editor): add monaco-logql as a dependency

* feat(loki-monaco-editor): add back range function removed during merge

* feat(loki-monaco-editor): sync imports with recent changes

* feat(loki-monaco-editor): add missing lang provider functions

* feat(loki-monaco-editor): fix imports

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

Temporarily

* Chore: remove commented code

* Chore: minor refactor to NeverCaseError

* Chore: minor code cleanups

* feat(loki-monaco-editor): add history implementation

Will see how it behaves and base the history slicing on tangible feedback

* feat(loki-monaco-editor): turn completion data provider into a class

* Chore: fix missing imports

* feat(loki-monaco-editor): refactor data provider methods

Move complexity scattered everywhere to the provider

* Chore: clean up redundant code

* Chore: minor comments cleanup

* Chore: simplify override services

* Chore: rename callback

* feat(loki-monaco-editor): use query hints implementation to parse expression

* feat(loki-monaco-editor): improve function name

* Chore: remove superfluous variable in favor of destructuring

* Chore: remove unused imports

* Chore: make method async

* feat(loki-monaco-editor): fix deprecations and errors in situation

* feat(loki-monaco-editor): comment failing test case

* Chore: remove comment from test

* Chore: remove duplicated completion item

* Chore: fix linting issues

* Chore: update language provider test

* Chore: update datasource test

* feat(loki-monaco-editor): create feature flag

* feat(loki-monaco-editor): place the editor under a feature flag

* Chore: add completion unit test

* Chore: add completion data provider test

* Chore: remove unwanted export

* Chore: remove unused export

* Chore(loki-query-field): destructure all props

* chore(loki-completions): remove odd string

* fix(loki-completions): remove rate_interval

Not supported

* fix(loki-completions): remove line filters for after pipe case

We shouldn't offer line filters if we are after first pipe.

* refactor(loki-datasource): update default parameter

* fix(loki-syntax): remove outdated documentation

* Update capitalization in pkg/services/featuremgmt/registry.go

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

* refactor(situation): use node types instead of names

* Chore: comment line filters pending implementation

It's breaking the build due to a linting error.

* Chore: update feature flag test after capitalization change

* Revert "fix(loki-completions): remove line filters for after pipe case"

This reverts commit 3d003ca4bc.

* Revert "Chore: comment line filters pending implementation"

This reverts commit 84bfe76a6a.

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2022-10-06 10:35:30 -04:00
Ashley Harrison
c5171b84a0
actually convert Cloudwatch ConfigEditor test to RTL (#56461) 2022-10-06 12:14:41 +01:00
GitStart
48ebaa48cc
Toolkit: Remove changelog command (already replaced by a github workflow) (#56073)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
2022-10-05 14:44:53 +02:00
Ashley Harrison
7ac7f844f4
improve some grafana-ui types (#56318) 2022-10-05 09:04:10 +01:00
Ryan McKinley
4fc9b9aa35
Storage: Cleanup object history API (#56215) 2022-10-04 14:57:26 -04:00
Ashley Harrison
d3f50f791c
Convert test to RTL (#56279) 2022-10-04 15:37:47 +01:00
Levente Balogh
cc6fae18db
BackendSrv: Make it possible to pass options to .get|post|patch... methods (#51316)
* feat: make it possible to pass in `options` to `.get()`, `.post()`, etc methods

* feat(Datasource): make it possible to specify `optinos` for `getResource()` and `postResource()`

* fix(BackendSrv): use partial `BackendSrvRequest`

* feat(Datasource): make it possible to set `options` for resource requests

* refactor(BackendSrv): remove internal usage of `.request()`

* fix(GettingStarted): remove unnecessary import

* fix: fix type issues by typing the delete dashboard response

* refactor: use more strict types for `params`

By reusing the type of `BackendSrvRequest.params`

* refactor: make the options paramater partial

* fix: extract `data` from the fetch response

* docs: update the deprecation notice or `BackendSrv.request()`

* refactor: use `.request()` as if it was private

* refactor: remove unnecessary change
2022-10-04 10:40:21 +02:00
Giordano Ricci
3381629d3d
Chore: Convert Wrapper to function component (#56172)
* WIP

* remove comment
2022-10-04 09:39:22 +01:00
Brendan O'Handley
82d8015469
OpenTSDB: Convert the OpenTSDB Query Editor from Angular to React (#54677)
* add query editor to module

* add metric section, add tests, update query type

* remove use of any for betterer

* fix test

* add tooltip for alias

* run runQuery on select change, fix metric select loading

* add downsample row, differentiate for tsdb version

* add tests for mteric section and downsample section

* add filter section react component and tests

* add tag section and tests

* add rate section and tests

* remove angular code

* fix styling

* remove comments

* remove unused code
2022-10-03 17:00:46 -04:00
Ashley Harrison
f2b06abb33
Convert SpanDetail/index.test.js to RTL (#56019) 2022-10-03 10:22:50 +01:00
Esteban Beltran
29ca8de6c0
Toolkit: Remove unused legacy cherrypick command (#56114) 2022-10-03 09:04:11 +02:00
Gábor Farkas
d2601003cf
Logs: move logs-functions from grafana-data to grafana-main (#55457)
* logs: move utils from grafana-data to grafana

* logs: adjust imports

* updated betterer checksum file
2022-09-30 12:16:47 +02:00
Sven Grossmann
6bc09a6390
Logs: Add Download logs button to log log-browser (#55163)
* move download functions to utils

* add downloads button

* removed unused export annotations

* changed button to `ToolbarButton`

* added tests and restructured download methods

* pin `blob-polyfill`

* add missing import

* changed type
2022-09-29 16:09:40 +02:00
aimuz
bf07deb992
Fix showWhen failure (#55337)
When a contact point configuration field has `showWhen` set on it, the contact point form was not correctly displaying. This change fixes that so that forms display correctly.
2022-09-29 15:00:49 +08:00
Victor Marin
3361f2c62d
XYChart further improvements (#55152)
* Tooltip shows all data facets. Renamed options

* Add per series line style

* Remove line style option from manual panel options

* Refactored tooltip view

* sets selected after switch to manual

* remove facet prefixes

* in manual mode pull series names from config options, not y facet

* unused import

* Point size

* x & y axes labels

* Fix manual series prep

* betterer

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-27 18:18:42 +03:00
Ashley Harrison
11eb02a183
enable rule role-has-required-aria-props (#55841) 2022-09-27 11:17:26 -04:00
GitStart
332e8477c7
Convert packages/grafana-ui/src/components/Graph/Graph.test.tsx to RTL (#55771)
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Rubens Rafael <rubensrafael2@live.com>
2022-09-27 14:26:53 +01:00
Virginia Cepeda
27f022283d
JS Agent: remove user email and add session id (#55767) 2022-09-27 08:59:32 -03:00
Marcos Vinicius
f4d7a6d869
Elasticsearch: Rename public/app/plugins/datasource/elasticsearch/elastic_response.ts to follow convention (#55533)
* Elasticsearch: Rename public/app/plugins/datasource/elasticsearch/elastic_response.ts to follow convention

* undo changes in this file

* fix import types
2022-09-26 16:53:25 +02:00
GitStart
ac875a1329
Loki: Remove any from public/app/plugins/datasource/loki/live_streams.test.ts (#55545)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>
2022-09-26 16:42:53 +02:00