Commit Graph

18837 Commits

Author SHA1 Message Date
Gilles De Mey
8a8b5da1ee
Alerting: Use monaco editor for admin page (#69514) 2023-06-07 16:21:36 +02:00
Gilles De Mey
a91de30f99
Alerting: Support newer http_config struct (#69452) 2023-06-07 16:21:22 +02:00
Matias Chomicki
e31ea1da9d
Query Splitting: Display progress of sub-requests using an annotation frame (#69574)
* Loki Query Splitting: Add and update loading frame to merged response

* Update unit test

* Loki Query Splitting: use data frame constructor function
2023-06-07 13:52:06 +00:00
Ivana Huckova
14d2f371a4
Loki: Fix including of template variables in variable query editor (#69698) 2023-06-07 15:38:45 +02:00
Victor Marin
6561f3a7a6
Lower Drag and Drop file size limit to 500kb (#69640) 2023-06-07 15:43:16 +03:00
Andreas Christou
a6484c6f81
Azure: Fix Kusto auto-completion for Azure datasources (#69685)
* Fix Kusto auto-completion not working in HG

* Add update to script paths

* Update CODEOWNERS

* Missed the ts
2023-06-07 11:49:43 +01:00
Ashley Harrison
0e28d6143b
Nested folders: Improve loading states (#69556)
* loading states!

* fix uncontrolled checkbox

* cleaner css

* improve flickering title

* make sure @grafana/ui has the same version of react-loading-skeleton

* fix unit test + add tooltip text

* better way of restoring focus

* only restore focus when loading

* missing !

* use aria-label instead of tooltip
2023-06-07 11:21:44 +01:00
Sonia Aguilar
848eb01a89
Alerting: Fix broken UI because of query being optional for some ExpressionQuer… (#69650)
* Fix broken UI because of query being optional for some ExpressionQuery coditions field

* Delete query field from conditions in utils.test.ts
2023-06-07 10:58:08 +02:00
Ryan McKinley
e17ef5e504
Pyroscope: Rename phlare to grafana-pyroscope-datasource (#68859) 2023-06-07 06:09:29 +03:00
Giordano Ricci
cefcbfa5ed
Explore: Run remaining queries when one is removed from a pane (#69643) 2023-06-06 23:28:33 +01:00
Adela Almasan
76b05b80a4
Legend: Sort by name (#69490) 2023-06-06 15:16:16 -05:00
Jev Forsberg
c0a1fc2cbd
SQL Datasources: Reinstate SQL data source behavior around database selection when default configured databases already exist (#65659)
* badlm0mma/sql_datasource_update/ initial notes

* baldm0mma/sql_datasource_update/ solution

* baldm0mma/sql_datasource_update/ clean datasetSelector

* baldm0mma/sql_datasource_update/ clean up queryEditor.tsx

* baldm0mma/sql_datasource_update/ clewan up queryHeader.tsx

* baldm0mma/sql_datasource_update/ clean up tableSelector.tsx

* baldm0mma/sql_datasource_update/ clean up mysqlDatasource.ts

* baldm0mma/sql_datasource_update/ clean up configurationEditor.tsx

* baldm0mma/sql_datasource_update/ rem conlog from queryEditor.tsx

* baldm0mma/sql_datasource_update/ rem conlog from queryEditor.tsx

* baldm0mma/sql_datasource_update/ remove conlog in tableSelector.tsx

* baldm0mma/sql_datasource_update/ rem conlog in sqlDatasource.ts

* baldm0mma/sql_datasource_update/ update deafult database value in sqlDatasource.ts

* baldm0mma/sql_datasource_update/ update logic to accomidate no preconfig

* baldm0mma/sql_datasource_update/ update props

* baldm0mma/sql_datasource_update/ update prop names

* baldm0mma/sql_datasource_update/ update prop names in tableSelector

* baldm0mma/sql_datasource_update/ update annos in datasetSelector

* baldm0mma/sql_datasource_update/ update naming

* baldm0mma/sql_datasource_update/ update to standard langauae

* baldm0mma/sql_datasource_update/ update prop names

* baldm0mma/sql_datasource_update/ update annos in datasetSelector

* baldm0mma/sql_datasource_update/ remove unused import in tableSelector.tsx

* baldm0mma/sql_datasource_update/ remove addDefaultdataset

* baldm0mma/sql_datasource_update/ reset query when needed

* baldm0mma/sql_datasource_update/ update asymc return val

* baldm0mma/sql_datasource_update/ remove psql query editor

* baldm0mma/sql_datasource_update/ remove con logs in defaults.ts

* baldm0mma/sql_datasource_update/ revert postgres changes

* baldm0mma/sql_datasource_update/ update postgres naming

* baldm0mma/sql_datasource_update/ add altert

* baldm0mma/sql_datasource_update/ update annos and add alerts and alert logic

* baldm0mma/sql_datasource_update/ update postgres nomenclature

* baldm0mma/sql_datasource_update/ update annos and remove con logs

* baldm0mma/sql_datasource_update/ update nomenclature

* baldm0mma/sql_datasource_update/ drone fix

* baldm0mma/sql_datasource_update/ export and format

* baldm0mma/sql_datasource_update/ update docs for mysql datasource with dataset dropdown disable info

* baldm0mma/sql_datasource_update/ update mssql docs

* baldm0mma/sql_datasource_update/ update postgres docs and alert logic

* baldm0mma/sql_datasource_update/ add tests

* baldm0mma/sql_datasource_update/ update docs

* baldm0mma/sql_datasource_update/ update test names

* baldm0mma/sql_datasource_update/ update alert language

* baldm0mma/sql_datasource_update/ correct spelling

* baldm0mma/sql_datasource_update/ update postgres query builder image

* baldm0mma/sql_datasource_update/ update annos

* baldm0mma/sql_datasource_update/ update tests

* baldm0mma/sql_datasource_update/ docs updated

* baldm0mma/sql_datsource_update/ refactor determinePlaceholder

* Update public/app/features/plugins/sql/components/QueryEditor.tsx

spelling

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* Update public/app/features/plugins/sql/components/QueryEditor.tsx

spelling

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* baldm0mma/sql_datasource_update/ remove superfluous cleanup data from tests

* baldm0mma/sql_datasource_update/ update spelling

* Update public/app/features/plugins/sql/components/SqlComponents.test.tsx

spelling

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* baldm0mma/sql_datasource_update/ add logic to prevent db call for tables if dataset it nullish

* baldm0mma/sql_datasource_update/ update alert tests

* baldm0mma/sql_datasource_update/ update button text

* baldm0mma/sql_datasource_update/ update tests to preferred standard

* baldm0mma/sql_datasource_update/add feature flag

* baldm0mma/sql_datasource_update/ update mssql docs

* baldm0mma/sql_datasource_update/ add feature flag to registry

* baldm0mma/sql_datasource_update/ adjust table and dataset dropdown logic

* baldm0mma/sql_datasource_update/ update testing to deal with feature flag

* baldm0mma/sql_datasource_update/ update wioth cascadeDisable

* baldm0mma/sql_datasource_update/ update naming

* baldm0mma/sql_datasource_update/ update tests to reflect enabled feature flag

* baldm0mma/sql_datasource_update/ update annotations

* baldm0mma/sql_datasource_update/ update annos in queryEd

* baldm0mma/sql_datasource_update/ update test names

* baldm0mma/sql_datasource_update/ update anno issues

* baldm0mma/slq_datasource_update/ add query to sqlDatasource with error

* baldm0mma/sql_datasource_update/ update docs language

* baldm0mma/sql_datasource_update/ remove notes to self

* baldm0mma/sql_datasource_update/ add QueryEditorFeatureFlag.utils.ts

* baldm0mma/sql_datasource_update/ update database into json

* baldm0mma/sql_datasource_update/ found file

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

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>

* baldm0mma/sql_datasource_update/ update feature flag and toggles

* baldm0mma/sql_datasource_update/ add hasConfigIssue, update annos, rethink disable logic

* baldm0mma/sql_datasource_update/ update warning language

* baldm0mma/sql_datasource_update/ update button content

* baldm0mma/sql_datasource_update/ update jsonData logic in frontendsettings.go

* baldm0mma/sql_datasource_update/ update jsonData logic

* baldm0mma/sql_datasource_update/ update annos in frontendsettings.go

* baldm0mma/sql_datasource_update/ update sql editor docs

* baldm0mma/sql_datasource_update/ update mysql docs

* baldm0mma/sql_datasource_update/ update postgres docs

* baldm0mma/sql_datasource_update/ remove unused code in datasetSelector.tsx

* baldm0mma/sql_datasource_update/ update syntax conventions

* baldm0mma/sql_datasource_update/ add logs

* baldm0mma/sql_datasource_update/ remove unused code

* baldm0mma/sql_datasource_update/ remove conlogs

* baldm0mma/sql_datasource_update/ update tests

* baldm0mma/sql_datasource_update/ add second error to query

* baldm0mma/sql_datasource_update/ run make gen-cue

* baldm0mma/sql_database_update/ lint registry

* baldm0mma/sql_datasource_update/ update registry

* baldm0mma/sql_datasource_update/ upate datasource logic

* baldm0mma/sql_datasource_update/ add logs

* baldm0mma/sql_datasource_update/ add comms to self

* baldm0mma/sql_datasource_update/ comment out false pos tests, and add investigatory comments

* baldm0mma/sql_database_update/ update query error to only test for config change if query was made in "builder" mode

* baldm0mma/sql_datasource_update/ update annos in frontendsettings.go

* baldm0mma/sql_datasource_update/ update error logic to datasource

* baldm0mma/sql_datasource_update/ remove alerts from query editor

* baldm0mma/sql_datasource_update/ remove unused imports

* baldm0mma/sql_datasource_update/ update tests

* baldm0mma/sql_datasource_update/ remove comments

* baldm0mma/sql_datasource_update/ remove logs in queryGroup.tsx

* baldm0mma/sql_datasource_update/ remove outdated annotation in datasetSelector.tsx

* baldm0mma/sql_datasource_update/ remove superfluous test and update test description

* baldm0mma/sql_datasource_update/ remove feature flag

* baldm0mma/sql_datasource_update/ add back feature flag

* baldm0mma/sql_datasource_update/ update to enums

* baldm0mma/sql_datasource_update/ update panel caps

* baldm0mma/sql_datasource_update/ update dataset selector to default update the database correctly

* baldm0mma/sql_datasource_update/ move onChange into conditional

* baldm0mma/sql_datasource_update/ add logic for previous datasets choice

* baldm0mma/sql_datasource_update/ add back previous logic for assigning default datasets

* baldm0mma/sql_datasource_update/ update useEffect dep array

* baldm0mma/sql_datasource_update/ remove feature toggle

* baldm0mma/sql_datasource_update/ add feature toggle

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2023-06-06 10:28:52 -06:00
Josh Hunt
52c4761218
Fix: Fix dashboards not showing in folders with search v2 enabled (#69638)
* Fix: Fix dashboards not showing in folders with search v2 enabled

* tests
2023-06-06 16:26:06 +00:00
Giordano Ricci
067bbcbe56
Explore: Refactor & centralize URL/state sync (#66286)
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-06-06 15:31:39 +01:00
Alexa V
07dd90b5a8
Dashboards: Variables - Improve slow template variable loading due same variable loaded multiple times on time range change (#66965) 2023-06-06 16:12:09 +03:00
ismail simsek
e770bd6cd1
Chore: InfluxDB - Restructure the folders (#69554)
* Move useUniqueId to a general place

* Use new built-in useId hook

* Rename query builder and metadata query

* Move and rename the query builder tests

* Refactor query_builder and metadata_query

* Fix test

* Fix test

* Restructure folders

* update texts

* Update the mock

* Fix test

* update imports

* update imports again
2023-06-06 14:28:59 +02:00
Ivan Ortega Alba
819041c732
Schema: Improve Dashboard kind docs and remove deprecated props (#69359)
Remove unused properties: 
  * `FieldColorModeId.PaletteSaturated`: It doesn't exist and it is not a valid palette.
  * `VariableModel.rootStateKey`: It is not persisted in the DB, so it shouldn't be in the schema. It is a property only used in the frontend to store the Redux store key.
  * `VariableModel.error`: It is not persisted in the DB, so it shouldn't be in the schema. It is a property only used in the frontend to store fetching errors.
  * `Panel.thresholds`: old property only existing in previous versions of the dashboard schema.
  * `Panel.timeRegions`: old property only existing in previous versions of the dashboard schema.
2023-06-06 14:28:10 +02:00
ismail simsek
ae0f94e616
InfluxDB: Refactor query_builder and metadata_query (#69550)
* Move useUniqueId to a general place

* Use new built-in useId hook

* Rename query builder and metadata query

* Move and rename the query builder tests

* Refactor query_builder and metadata_query

* Fix test

* Fix test
2023-06-06 13:58:51 +02:00
Ivana Huckova
49c940de23
Loki: Add step parameter to Loki query (#69558) 2023-06-06 13:20:27 +02:00
Ashley Harrison
48e328c1dd
Login: Show additional information when prompting to change password (#69537)
* add some information to the password change screen

* update threshold cause pa11y is stupid

* override the loginlayout title if changing password

* remove top padding from inner box
2023-06-06 11:24:46 +01:00
Sven Grossmann
a81cee1d05
Loki: Fix parsing of escaped quotes in LogQL (#69584)
* fix parsing issue

* replace escaped quotes
2023-06-06 11:07:21 +02:00
Ida Štambuk
f6d3a5cc94
GrafanaUI: Set default value for QueryField onBlur prop (#69487) 2023-06-06 10:44:27 +02:00
Tobias Skarhed
134839d701
CI: Add i18n verification step (#69384)
* Add i18n verification step

* Add check for extracted translations

* Run extract

* Add newline for pseudo

* Format JSON output with prettier

* Print file diff

* Actually run make drone

* Only deo git diff on locales

* Update error message

* Verify that step fails on dynamic phrases

* Verify that it passes when fixed

* Verify that dynamic phrase fails, for real this time

* Extract error messages

* Change echo

* Fix string format

* Try double escaping

* Escape for Drone substitution

* Update character escape

* Remove dynamic phrase

* Verify multiple keys

* Remove double keys

* Readd en locale because of reasons

* Undo changes

* Format lint_frontend.star

* Update error message

* Update .drone.yml

* Add quotes for echo

* Verify fail to extract

* Fix diff stat command

* Reset footer changes
2023-06-06 09:29:04 +02:00
ismail simsek
a0dd981f85
Chore: Rename influxql query builder and metadata request files (#69549)
* Move useUniqueId to a general place

* Use new built-in useId hook

* Rename query builder and metadata query

* Move and rename the query builder tests
2023-06-05 21:57:21 +02:00
Sven Grossmann
9d2f4786c7
Log Row: Fix menu styling and dimensions (#69569)
* fix wrong logrowmenu styling

* fix imports
2023-06-05 20:24:41 +02:00
Galen Kistler
fa2e27e175
Prometheus: Query Cache refactor (#66891)
* Pull out datasource specific implementation into calling context to make query cache generic
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-06-05 11:42:15 -05:00
Andreas Christou
7bd85faa7f
CloudMonitoring: Correctly set new query on type change (#69573)
Correctly set new query on type change
2023-06-05 10:40:58 -06:00
Ivana Huckova
3150d80428
Loki: Fix error when empty template variables response (#69373)
* Loki: Fix error when empty template variables

* Update

* Add test

* Add test for statsMetadataRequest
2023-06-05 15:16:12 +02:00
ismail simsek
97221595c1
Chore: Move useUniqueId to a general place (#69542)
* Move useUniqueId to a general place

* Use new built-in useId hook
2023-06-05 14:38:54 +02:00
Zoltán Bedi
8914b8b96f
Elasticsearch: Fix Typescript errors (#69535) 2023-06-05 13:58:09 +02:00
Josh Hunt
394ff9fcde
NestedFolders: Improve performance of Browse Dashboards by loading one page at a time (#68617)
* wip for pagination

* kind of doing pagination, but only for the root folder

* wip

* wip

* refactor paginated fetchChildren

* make sure dashboards are loaded if a folder contains only dashboards

* rename lastKindHasMoreItems

* load additional root pages

* undo accidental commit

* return promise from loadMoreChildren, and prevent loading additional page while a request is already in flight

* rename browseDashboards/fetchChildren action so it's more clear

* starting to revalidate children after an action

* unset general uid

* comment

* clean up

* fix tests omg

* cleanup

* fix items not loading after invalidating loaded cache

* comment

* fix lints
2023-06-05 10:21:45 +00:00
Ivana Huckova
4c794fe8b9
Loki: Add comment explaining interpolation of some variables at backend (#69460)
* Loki: Add comment explaining interpolation of some variables at backend

* Update content
2023-06-05 11:28:04 +02:00
Esteban Beltran
1ed4c0382b
Plugins: Add Initial implementation for frontend plugins sandboxing (#68889) 2023-06-05 10:51:36 +02:00
ismail simsek
6c7b17b59f
InfluxDB: Strong types and backend migration preparation (#69469)
* Type definitions

* Move non-backend-migration code into unified place

* Update public/app/plugins/datasource/influxdb/datasource.ts
2023-06-03 12:39:01 +02:00
ismail simsek
17836c5895
Chore: Typo fixes in comments (#69475)
Typo fixes in comments
2023-06-02 21:16:38 +02:00
Ida Štambuk
6bc467f8e7
Don't display stackTraces list if passed an empty array (#69484) 2023-06-02 21:10:40 +02:00
Ryan McKinley
422684d8b0
Plugins: Support changing plugin IDs (hardcoded) (#67867) 2023-06-02 10:46:12 -07:00
Brendan O'Handley
4fdccef7b3
Prometheus: Fix bug when adding a query in mixed datasource (#69424)
default query needs to not be a function separate from ds
2023-06-02 12:24:42 -04:00
Arati R
6cb1a5e368
Nested folders: Add alert rule counts and deletion to folder registry (#67259)
* Let alert rule service implement registry service
* Add count method to RuleStore interface
* Add implementation for deletion of alert rules
* Rename uid to folderUID in registry methods
* Check forceDeleteRule value for registry deletion
* Register alerting store with folder service
* Move folder test functions to separate package
* Add testing for alert rule counting, deletion
* Remove redundant count method
* Fix deleteChildrenInFolder signature
* Update pkg/services/ngalert/store/alert_rule.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Add tests for nested folder deletion
* Refactor TestIntegrationNestedFolderService
* Add rules store as parameter for alertng provider

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-06-02 16:38:02 +02:00
Virginia Cepeda
e6e88aa528
Alerting: Display error if repeat interval is lower than group interval (#69413)
* Display error if repeat interval is lower than group interval

* Small change

* Update tests
2023-06-02 11:18:26 -03:00
Soham
8165d9934b
MSSQL: Change encrypt default value to false (#69351)
change encrypt default value to false
2023-06-02 13:31:43 +02:00
Ivana Huckova
21021502b5
Loki: Remove unused datasource prop from LokiQueryBuilderOptions (#69445)
Loki: Remove unused props from LokiQueryBuilderOptions
2023-06-02 13:26:20 +02:00
Ivana Huckova
06003c98c8
Loki: Add predefined operations functionality behind feature flag (#69379)
* Add feature toggle for lokiPredefinedOperations

* Add config editor for predefined operations

* Add predefined patterns to editor

* Update content in tooltip

* Update public/app/plugins/datasource/loki/configuration/QuerySettings.tsx

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

* Update public/app/plugins/datasource/loki/components/LokiQueryEditor.tsx

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

* Add experimental badge

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-06-02 12:52:36 +02:00
Matias Chomicki
ee0ee70aa1
Loki: Exclude queries using DISTINCT from query splitting (#69377)
* Query utils: add function to identify distinct queries

* Chore: return false when the expected node is found

* Query splitting: exclude distinct queries from splitting

* Group queries excluded from splitting
2023-06-02 12:50:23 +02:00
Levente Balogh
7b2bd48677
Plugin Extensions: Custom limits for extensions-per-plugin (#69430)
* feat(plugins): remove global limit on extensions per placement

* feat: add a way to limit extension per plugin at the getter

* test(plugins): fix failing getPluginExtensions test

* refactor(panelmenu): put back limit of 2 extensions per plugin

* tests: add a test for checking all extensions are returned by default

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-06-02 11:09:25 +02:00
Levente Balogh
d25cea90b0
Datasources: Make the datasources config extendable by plugins (#68064)
* feat: add a new UI extension type: component

* fix: remove reference to not existing type

* chore: update betterer results

* review: use a single type notation in import

* review: stop exporting `PluginExtensionBase`

* refactor: make extension config types more explicit

By using some repetition now these types are much easier to oversee.

* feat: add a new extension point to the datasources config

* fix: export tcontext type from grafana-data

* chore: update betterer results

* chore: fix tests

* feat: extend the context shared with extensions

* feat: stop omitting jsonData props & update context type

* tests: update tests
2023-06-02 11:01:36 +02:00
Ashley Harrison
5a98348faf
Chore: remove i18n toggle (#69389)
* remove i18n toggle

* remove beta badge on language picker

* remove toggle from go code

* Revert "remove beta badge on language picker"

This reverts commit 3b76300aa7.
2023-06-02 09:24:40 +01:00
Sven Grossmann
cb4ad588b9
Log Context: Fix split view button using the wrong query (#69369)
* fix wrong query used in split button

* refactor into one function

* don't act?
2023-06-01 20:39:13 +02:00
Taewoo K
4ab863d122
add datasource type (#69407) 2023-06-01 13:35:43 -04:00
Gábor Farkas
4cbe20ca5a
logs: context: removed unused code (#69392) 2023-06-01 15:23:30 +00:00