Commit Graph

5374 Commits

Author SHA1 Message Date
Alexa V
b4a7427f31
[Chore] Refactor Panel Menu Rudderstack events and add missing instrumentation (#66850) 2023-04-28 12:19:39 +02:00
Esteban Beltran
0ec40a51eb
Toolkit: Remove deprecated package:build, node-version-check and toolkit:build commands (#67475) 2023-04-28 11:53:23 +03:00
Esteban Beltran
82838a2176
Toolkit: Remove deprecated plugin:github-publish command (#67471) 2023-04-28 09:54:16 +02:00
Kyle Cunningham
1fbac96bd4
SQL Datasources: Update behavior of default connection limits (#66687)
* Update behavior of defaults in connection limits

* Refactor to use config object instead

* Refactor remove unneeded function

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-04-28 13:23:08 +07:00
Torkel Ödegaard
ea536411f1
DataSourceSettings: Fix recent changes to HttpDataSourceSettings (#67436) 2023-04-28 07:17:18 +02:00
Ryan McKinley
f5d97c677b
TimeSeries: Explicitly add transformer when timeseries-long exists (#64092) 2023-04-28 06:10:02 +03:00
Ryan McKinley
ca1f79b9ba
Kindsys: Target k8s style resource definitions (#67008)
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-04-27 23:32:38 +03:00
Ryan McKinley
8352e716dd
ArrayDataFrame: Convert to a simple utility function rather than dynamically loaded values (#67427) 2023-04-27 12:38:19 -07:00
Andreas Christou
63383ef545
AzureMonitor: Application Insights Traces (#64859)
* Build out barebones Traces editor

- Add Traces query type and operation ID prop to query type
- Add necessary header types
- Update resource picker to appropriately work with traces query type
- Build out TracesQueryEditor component
- Include logic to retrieve operationId's for AI Workspaces
- Add backend route mapping
- Update macro to use timestamp as default time field for traces

* AzureMonitor: Traces - Response parsing (#65442)

* Update FormatAsField component

- Add trace ResultFormat type
- Generalise FormatAsField component
- Add component to TracesQueryEditor
- Remove duplicate code in setQueryValue

* Add custom filter function to improve performance

* Add basic conversion for logs to trace

- Add serviceTags converter
- Pass through required parameters (queryType and resultFormat)
- Appropriately set visualisation

* Update parsing to also fill trace tags

- Add constant values for each table schema (include legacy mapping for now if needed)
- Add constant for list of table tags
- Set the foundation for dynamic query building
- Update query to build tags value
- Appropriately set operationName
- Update tagsConverter to filter empty values

* Fix lint and test issues

* AzureMonitor: Traces - Data links (#65566)

* Add portal link for traces

- Pull out necessary values (itemId and itemType)
- Appropriately construct
- Fix ordering

* Set default format as value

- Also set default visualisation

* Fix event schema

* Set default formatAsField value

* Include logs link on traces results

- Adapt config links to allow custom title to be set

* Correctly set operationId for query

* Update backend types

- Include OperationID in query
- Pass forward datasource name and UID

* Ensure setTime doesn't consistently get called if operationID is defined

* Add explore link

- Update util functions to allow setting custom datalinks

* Fix tests

* AzureMonitor: Traces - Query and Editor updates (#66076)

* Add initial query

- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building

* Add entirely separate traces query property

- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query

* Update FormatAsField to be entirely generic

* Update query building to be done in backend

- Add required mappings in backend
- Update frontend querying

* Fix query and explore data link

* Add trace type selection

* Better method for setting explore link

* Fix operationId updating

* Run go mod tidy

* Unnecessary changes

* Fix tests

* AzureMonitor: Traces - Add correlation API support (#65855)

Add correlation API support

- Add necessary types
- Add correlation API request when conditions are met
- Update query

* Fix property from merge

* AzureMonitor: Traces - Filtering (#66303)

* Add initial query

- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building

* Add entirely separate traces query property

- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query

* Update FormatAsField to be entirely generic

* Update query building to be done in backend

- Add required mappings in backend
- Update frontend querying

* Fix query and explore data link

* Add trace type selection

* Better method for setting explore link

* Fix operationId updating

* Run go mod tidy

* Unnecessary changes

* Fix tests

* Start building out Filters component

- Configure component to query for Filter property values when a filter property is set
- Add setFilters function
- Add typing to tablesSchema
- Use component in TracesQueryEditor

* Update Filters

- Asynchronously pull property options
- Setup list of Filter components

* Update filters component

- Remove unused imports
- Have local filters state and query filters
- Correctly set filters values
- Don't update query every time a filter property changes (not performant)

* Update properties query

- Use current timeRange
- Get count to provide informative labels

* Reset map when time changes

* Add operation selection

* Reset filters when property changes

* Appropriate label name for empty values

* Add filtering to query

* Update filter components

- Fix rendering issue
- Correctly compare and update timeRange
- Split out files for simplicity

* Add checkbox option to multiselect

- Add custom option component
- Correctly call onChange
- Add variableOptionGroup for template variable selection

* Fix adding template vars

* Improve labels and refresh labels on query prop changes

* AzureMonitor: Traces - Testing (#66474)

* Select ds for template variable interpolation

* Update az logs ds tests

- Add templateVariables test
- Add filter test
- Update mock
- Remove anys

* Update QueryEditor test

- Update mocks with timeSrv for log analytics datasource
- Fix query mock
- Use appropriate and consistent selectors

* Add TracesQueryEditor test

- Update resourcePickerRows mock to include app insights resources
- Remove comments and extra new line

* Add FormatAsField test

- Remove unneeded condition

* Update resourcePicker utils test

* Don't hide selected options in filters

* Fix multi-selection on filters

* Add TraceTypeField test

- Add test file
- Update selectors (remove copy/paste mistake)
- Update placeholder text for select and add label

* Add basic filters test

* Begin filters test

* Update filters test

* Add final tests and simplify/generalise addFilter helper

* Minor update to datasource test

* Update macros test

* Update selectors in tests

* Add response-table-frame tests

* Add datasource tests

- Use sorting where JSON models are inconsistent
- Update filters clause
- Dedupe tags
- Correct operationId conditions

* Don't set a default value for blurInputOnSelect

* Simplify datasource test

* Update to use CheckGoldenJSON utils

- Update with generated frame files
- Remove redundant expected frame code
- Update all usages

* Fix lint

* AzureMonitor: Traces feedback (#67292)

* Filter traces if the visualisation is set to trace

- Update build query logic
- Added additional test cases
- Return an error if the traces type is set by itself with the trace visualisation
- Add descriptions to event types
- Update tests

* Fix bug for error displaying traces

* Update mappings and add error field

- Update tests
- Remove unnecessary comments

* Switch location of Operation ID field

* Re-order fields

* Update link title

* Update label for event type selection

* Update correct link title

* Update logs datalink to link to Azure Logs in explore

* Fix lint
2023-04-27 20:24:11 +01:00
Juan Cabanas
fc3737bf4f
PublicDashboards: Email sharing users page (#67124) 2023-04-27 14:20:03 -03:00
Kristian Bremberg
35407142d0
Feature: Trusted Types support (#64975)
* Draft: Feature: Trusted Types support

* remove trusted-types package

* Create policy before jQuery and Angular is loaded and add feature flag

* Add trustedTypePolicies

* Sanitize scriptURL

* Add TT meta tag for test env

* Move trusted types into core

* Add DOMParser support for TrustedHTML

* Seperate RSS sanitization and add better TrustedHTML support

* Get test CSP header from config

* Remove dompurify dep from core

* Add documentation for trusted types

* Apply suggestions from code review

Co-authored-by: Kristian Bremberg <114284895+KristianGrafana@users.noreply.github.com>

* Add comment about Github discussion thread and things breaking

* Remove changes from News panel

* Remove TT feature toggle

* Expose TT and CSPReportOnly to frontend

* Log errors in console when CSP report only is enabled

* Log error for reporting and remove test mode

* Only insert CSP header in HTML for dev env

* Update docs

---------

Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2023-04-27 18:20:37 +02:00
Adela Almasan
62587eee88
Timeseries: Update auto-migration e2e test (#67402) 2023-04-27 10:20:07 -05:00
Brendan O'Handley
0a9240aeba
Prometheus: Configuration page overhaul (#66198)
* organize layout, make design uniform, add doc link

* fix e2e test

* move overhauled config parts into prometheus code

* update tooltips with doc links

* clean component styles for section padding, top and bottom 32px

* make additional settings subsection headers h6

* use secondary gray for section descriptions

* fix merge issues

* change inlineswitch to switch only in prom settings because the other components are shared

* remove legacy formfield and input, replace with inlinefield and input from grafana-ui

* find more formfield and UI design fixes like changing inlineformlabel to inlinefield

* remove unused inline form label

* replace legacy duration validations with <FieldValidationMessage>

* fix styles secondary gray from theme

* change language, headings and datasource -> data source

* update alert setting styles with new component

* update prom url heading and tooltip

* update default editor tooltip and set builder as default editor

* update interval tooltip

* update prom type tooltip

* update custom query params tooltip

* update exemplar internal link tooltip

* fix inline form styling inconsistency

* allow for using the DataSourceHTTPSettings component without the connection string

* remove overhaul component, re-use dshtttps comp, and use connection input in config editor

* make tooltips interactive to click links

* consistent label width across the elements we can control for now, fix exemplar switch

* make connection url a component

* refactor onBlur validation

* remove unused component

* add tests for config validations

* add more meaningful health check

* fix e2e test

* fix e2e test

* fix e2e test

* add error handling for more url errors

* remove unnecessary conversion

* health check tests

* Clean up the health check

* health check unit tests

* health check unit tests improved

* make pretty for drone

* lint check go

* lint check go

* add required attr to connection component

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

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

* fix read only issue for provisioned datasources

* validate multiple durations for incremental query setting

* use sentence case for headers

* use className consistently for styles

* add tests for url regex

* remove console logs

* only use query as healthcheck as the healthy api is not supported by Mimir

* fix exemplar e2e test

* remove overhaul prop from custom headers setting component

* remove connection section and use DatasourceHttpSettings connection with custom label and interactive tooltip

* add spaces back

* spaces

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-27 09:43:54 -04:00
Joao Silva
48933e121f
GrafanaUI: Add indeterminate state to Checkbox (#67312) 2023-04-27 15:18:23 +02:00
Adela Almasan
2beee35567
Timeseries: Time regions migration (#66998)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-27 05:28:58 +03:00
Ryan McKinley
5c4ecf7a86
Chore: Stop using ArrayVector and MutableField (#67333) 2023-04-27 01:28:54 +03:00
Andre Pereira
fb45cb6237
Explore: Update table min height (#67321)
* Set table min content height to 300px

* Cleanup code that changes height of table component
2023-04-26 22:21:29 +01:00
Todd Treece
a420040c73
Chore: Remove CRD generation (#67286) 2023-04-26 09:52:13 -04:00
Juan Cabanas
4b3aead2d0
DataLinks: encoded URL fixed (#66418) 2023-04-26 10:46:21 -03:00
Esteban Beltran
22713186cb
Toolkit: Remove plugin:ci-build plugin:ci-package plugin:ci-report and related files (#67212) 2023-04-26 15:01:32 +02:00
Juan Cabanas
47aa8c7654
PublicDashboards: HoverWidget in panel fix (#66685)
Hover widget modified for public dashboards.
2023-04-26 09:06:38 -03:00
Ashley Harrison
e6e741546f
Nested folders: Create basic Move/Delete modals (#67140)
* add modal scaffolding

* add some unit tests

* remove dummy api, add some TODO comments

* small test refactor

* another small test refactor

* fix unit tests due to aria-label/data-testid change
2023-04-25 17:08:40 +01:00
Torkel Ödegaard
de18ed6659
PanelContext: Add functionality to update data from panel (#66993) 2023-04-25 14:55:50 +02:00
Esteban Beltran
c7aafea370
Toolkit: Remove deprecated plugin:sign command (#67130) 2023-04-25 15:24:16 +03:00
Esteban Beltran
0d0c6401e3
Toolkit: Remove deprecated searchTestData (#67134) 2023-04-25 11:52:59 +02:00
Adela Almasan
c4c747cca6
e2e: Update annotation marker selector (#67135) 2023-04-24 18:51:15 +00:00
Galen Kistler
a6577cc6fd
Revert "Prometheus: Add Victoria metrics to Prometheus type dropdown in datasource config" (#67150)
Revert "Prometheus: Add Victoria metrics to Prometheus type dropdown in datasource config (#66984)"

This reverts commit 7cb4d65584.
2023-04-24 12:59:27 -05:00
Kyle Brandt
e57e0769ca
Prometheus: Enable prometheusDataplane by default (#67100)
* Prometheus: Enable prometheusDataplane by default
and related mitigation toggle dataplaneFrontendFallback
original PRs with the toggles:
 - https://github.com/grafana/grafana/pull/65237
 - https://github.com/grafana/grafana/pull/62694
2023-04-24 20:29:54 +03:00
Ashley Harrison
dcf53dbb3b
ConfirmModal: make button styling consistent (#67142)
* stop using fill="outline" for confirm modal dismiss button

* kick drone
2023-04-24 17:53:28 +01:00
Esteban Beltran
872e79f687
Toolkit: Remove plugin:dev and plugin:test (#67125) 2023-04-24 17:18:42 +02:00
Victor Marin
efd0e9cbea
Datagrid Panel: Edit data within your dashboards (#66353)
* wip

* Datagrid WIP: snapshotting when data edited, better UI for adding column/rows, refactors

* wip

* WIP

* wip

* Add series selector

* Delete selection on key press

* wip

* Multiple row select and delete

* wip

* draggable rows/columns, better column width calculator

* bug fixes

* scrollbars

* add feature flag

* bugfixes

* bugfixes

* bugfixes

* bugfixes

* Add possibility to rename column

* Input fixes

* bugfixes

* bugfixes

* performance optimisations

* WIP component refactoring and optimisations

* comment bit of code to remove error for testing

* fix column move and payload types

* WIP refactors and tests

* e2e tests

* queryGroup subscription refactor

* queryGroup - add component on update, fix failing tests

* refactor querygroup

* querygroup refactor

* tests

* fix codeowners validation

* lint fixes

* revert convertFieldType modification in favor of already merged mod + re-add mistakenly deleted line

* remove //ts-ignores

* Minor style tweaks

* fix

* align colors with theme

* fixes

* refactor

* add test for convertFieldType transformer and write todo

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-24 17:46:31 +03:00
Laura Fernández
07373705d9
Grafana UI: Improve AutoSaveField component (#66751) 2023-04-24 12:42:42 +02:00
Konrad Lalik
91704cf7de
Alerting: Loki-based alert state history modal (#66595)
* adds alertstatehistory backend config to grafanaBootData

* add alertStateHistory api

* show different ASH modal when using loki implementation

* group log lines by instance (unique set of labels)
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>

* render log lines for each instance
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>

* Add visual improvements to the log record of state changes

* Add values to log records

* compute common labels and show unique labels

* Add state changes visualization

* fix common labels extraction

* Code cleanup

* Add timespan-based log record view

* WIP

* scroll to timestamp - poc

* Use SortedVector for timestamp field

* add conditional accessor for frames

* update some of the log formats and styles

* Timestamp-based visualization with scrolling

* minor improvements

* Split Loki's state history viewer into multiple files

* Add memoization to prevent graph rerender on filter updates

* make chart size shrink when fewer instances

* style updates

* show warning when instances are hidden

* Add basic label-based filtering

* Improve label-based filtering

* Add regex validation

* Improve no instances message when everything was filtered out

* Update warning message

* Move timeline viewer to a separate file, refactor handling timeline pointer changes

* Remove unused component, add comments

* Fix test snapshot, fix type error

* adds tests for common.ts

* Add tests for converting log records into data frames

* Add basic component test, fix type guards

* Use a constant for timeseries limit

* Improve a11y, update component test

* Memoize AlertStateTag, migrate from deprecated ArrayVector

* Update public/app/features/alerting/unified/components/rules/state-history/common.ts

* Move helper hook into a separate file. Add Search input component

* Change the limit of visible time series on the timeline

* Add LogRecordViewer perf improvements, refactor timeline cursor events tracking

* Use callback to pass timeline refs

* Add grouping tests for the log record viewer

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-04-24 09:28:11 +02:00
Leon Sorokin
faad4b92ad
GrafanaDS: Add support for annotation time regions (#65462)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2023-04-21 23:25:50 +03:00
Galen Kistler
7cb4d65584
Prometheus: Add Victoria metrics to Prometheus type dropdown in datasource config (#66984)
* add VictoriaMetrics to prometheus type dropdown
2023-04-21 09:12:28 -05:00
Joey
6522bb377e
Tracing: Rename feature toggle (#66833)
Rename feature toggle so something more specific so new work can use older feature toggle name
2023-04-21 11:31:24 +01:00
Torkel Ödegaard
1ff9c47c7b
ThemeDemo: Add transparent to ThemeDemo (#66994) 2023-04-21 11:09:46 +02:00
Ryan McKinley
607b94aaa2
FieldValues: Use standard array functions (#67012) 2023-04-20 22:03:38 -07:00
Leon Sorokin
b24ba7b7ae
FieldValues: Use plain arrays instead of Vector (part 3 of 2) (#66612)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-20 17:59:18 +03:00
Andreas Christou
b16a8bd6a8
grafana/e2e: Put E2E select updates in selectOption (#66972)
Put E2E select updates in selectOption and force
2023-04-20 15:40:45 +01:00
Sven Grossmann
1e53a87d76
Log Context: Add button to open the context query in a split view (#66777)
* add show context button

* improve type definition

* change to default `maxLines`

* remove context query

* add provider to tests

* add test for split view button

* improve documentation

* add tests for `getLogRowContextQuery`

* refactor LogsContainer functions

* fix spelling

* add `contextQuery` as state

* fix tests

* fix lint

* do not use callIfDefined

* make button secondary
2023-04-20 14:21:14 +02:00
Andreas Christou
b1129a4375
grafana/e2e: Include wait in selectOption (#66894)
Update e2e select with wait
2023-04-20 12:32:14 +02:00
Josh Hunt
e0c5b4f0e0
NestedFolders: Basic item selection (#66843)
* NestedFolders: Item selection state

* Select children in state

* Unselect parents when children are unselected

* remove unneeded comment

* tests

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit
2023-04-19 22:44:07 +03:00
Ivana Huckova
33186e3e23
Explore: Fix using data source line limit when opening logs sample in split view (#66601)
* Logs sample: Use data source max lines setting when opening logs in split view

* Add internal tags
2023-04-19 17:04:47 +02:00
Esteban Beltran
5dac0c9871
Toolkit: Remove plugin:create and component:create commands (#66729) 2023-04-19 15:15:37 +02:00
Ivan Ortega Alba
c7af53b79f
[Under FF] New DS Picker with advance mode (#66566)
* Add a wrapper to switch between the previous and new DS picker depending on the feature toggle advancedDataSourcePicker.

* Add a new component to represent the modal DS picker, which we will refer as advanced DS picker
Integrate this into the Edit panel, for now, until we're ready to replace everywhere the grafana-runtime DS picker by the wrapper.

* Replace Drawer component with the dropdown

* Adjust the first version of the styles to fit into this Figma design

* Adjust the design of the FileDropzoneDefaultChildren to match with the new DS modal but everywhere else is used nowadays.

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2023-04-19 16:08:09 +03:00
juanicabanas
97a0527b44
Variables: Add new format id (#66793) 2023-04-18 18:24:56 -07:00
Ryan McKinley
987eff82a3
FieldValues: Implement array accessors for deprecated Vector types (#66807) 2023-04-19 00:07:27 +03:00
Ryan McKinley
9452c0d718
Annotations: Support filtering the target panels (#66325)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-04-18 15:39:30 -05:00
Stephanie Hingtgen
255d8f3326
Plugins: Remove secure socks proxy feature toggle (#66611) 2023-04-18 11:11:23 -06:00