Commit Graph

16560 Commits

Author SHA1 Message Date
Hamas Shafiq
295c36e4ec
Tempo: Move interfaces & TempoQueryType from datasource.ts to types.ts (#54621) 2022-09-05 15:46:10 +01:00
Ivan Ortega Alba
fbfe2b2800
Library Panel: Allow to delete it when disabled or deprecated (#54662) 2022-09-05 16:45:45 +02:00
Hamas Shafiq
413c7c7d99
Tempo: Cache autocomplete values for tags (#54622) 2022-09-05 15:44:44 +01:00
Michael Musenbrock
78833b4a47
Alerting: Display alert's 'Created' time in local time instead of UTC (#54414)
Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com>

Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com>
2022-09-05 16:36:52 +02:00
Torkel Ödegaard
11de1dfe40
TopNav: Plugin page layouts / information architecture (#53174)
* Change nav structure when topnav is enable to do initial tests with new information architecture

* Support for nested sections

* Updated

* sentance case

* Progress on plugin challange

* Rewrite to functional component

* Progress

* Updates

* Progress

* Progress on things

* missing file

* Fixing issue with runtime, need to use setter way to set component exposed via runtime

* Move PageLayoutType to grafana/data

* Fixing breadcrumb issue, adding more tests

* reverted backend change

* fix recursive issue with cleanup
2022-09-05 14:56:08 +02:00
Ashley Harrison
a423c7f22e
Add scrolling to SectionNav (#54698) 2022-09-05 12:39:54 +01:00
Victor Marin
aee13563ce
Fix StateTimeline duration bug + add hidden tooltip option (#54697) 2022-09-05 14:11:06 +03:00
Ashley Harrison
8d489dfd9b
Navigation: Landing pages behind feature toggles (#54576)
* super quick attempt

* feature toggle everything

* only construct alertNav if there are navChildren

* fix toggle name

* plugin landing pages poc

* add apps route + put behind feature toggle

* use toIconName

* rename to NavLandingPage

* feature toggle new routes

* don't modify GetServerAdminNode

* some fairly hacky code to check if the plugin has a root page

* remove trailing slash
2022-09-05 10:07:13 +01:00
Victor Marin
6d2352735d
XYPanel: Improvements (#54220)
* Fix panel option bugs and make tooltip options work

* Support multiple series in explicit mode. Rename XY/Explicit to Auto/Manual

* Fixes

* Fix

* Legend improvements

* Rewrite Pure Component to Function Component

* Add datalinks support

* Legend fixes and CR modifications

* Fix bugs that crash panel
2022-09-05 11:03:17 +03:00
Ryan McKinley
7e53bd107c
Panels: Add troubleshooting snapshot (#54417) 2022-09-02 15:38:35 -07:00
Adela Almasan
37a0207463
Canvas: Phantom mouse down fix (#54673) 2022-09-02 12:58:49 -07:00
Drew Slobodnjak
600ea254af
Geomap: Fix duplicate layer bug (#54660)
* Geomap: Fix duplicate layer bug

* Remove dependency on name parameter
2022-09-02 10:53:21 -07:00
Ashley Harrison
0ab548a8b5
Chore: fixing some anys/type assertions (#54661)
* fixing some anys/type assertions

* make types consistent
2022-09-02 16:39:09 +00:00
linoman
d2bb72fb3c
Login: Remove single admin team restriction (#54534)
* Remove single member team restriction

* Add label when permissions list is empty

* Fix unit tests

* Add co-author.

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-09-02 18:16:39 +02:00
Josh Hunt
6b197f3fa9
Chore: Use react-highlight-words types (#54627) 2022-09-02 16:36:44 +01:00
Leon Sorokin
28426219ce
TimeSeries: fix padding, force 0-100% y range when % stacked (#54197) 2022-09-02 09:26:04 -05:00
Ashley Harrison
3e8d178fc1
convert LokiQueryEditor test to RTL (#54639) 2022-09-02 15:11:13 +01:00
Ashley Harrison
22e5ee3b52
update LokiExploreQueryEditor test to RTL (#54644) 2022-09-02 14:46:14 +01:00
Ashley Harrison
11689c0385
convert ConfigEditor test to RTL (#54636) 2022-09-02 12:48:37 +01:00
Hamas Shafiq
21dd60ba60
Tempo: Map the status tag to status.code for autocomplete (#54593) 2022-09-02 11:55:55 +01:00
Hamas Shafiq
d79830fdd7
Chore: Replace deprecated toPromise() calls with lastValueFrom (#54234) 2022-09-02 11:17:36 +01:00
Kian Eliasi
6e4900dc45
Footer: Add release notes url to version label (#52909)
* Add release note url to footer's version label

* Filter out pre-release versions in release notes link at the footer

* correct links for beta/prerelease release notes

* make all links target blank

* Fix TeamPages test

Co-authored-by: joshhunt <josh@trtr.co>
2022-09-02 06:05:27 -04:00
Matthew Jacobson
d706320d0a
Alerting: Fix UI bug when setting custom notification policy group by (#54607)
Custom values were not being displayed in the multiselect for notification policy `Group by` even though
they were correctly being saved.
2022-09-01 19:06:42 -04:00
Hamas Shafiq
e17c2f1cb5
Tempo: Add an options component under the TraceQL query field (#54435) 2022-09-01 22:49:27 +01:00
Andrej Kiripolský
59ba64f29b
Dashboard: Fix typos in feedback request sentence (#54429)
* Fix typo in feedback request

* prettier

Co-authored-by: Domas <domasx2@gmail.com>
2022-09-01 09:29:52 -05:00
Murtaza Ahmedi
f6827a0518
Plugins Catalog: Allow to filter plugins using special characters (#54474) 2022-09-01 16:25:25 +02:00
Josh Hunt
fd7a30c0a9
Fix: Restore Grafana and Dashboard data source icons (#54580) 2022-09-01 09:46:06 -04:00
Beto Muniz
29ff97a4b8
Fix create a dashboard from Explorer and edit panel flow (#54551) 2022-09-01 10:18:57 -03:00
Dominik Prokop
4ec03bad64
Revert 54400 (#54570)
* Revert "Add FocusScope to PanelEditor when open in the Dashboard Page so that a11y focus never catches invisible content. (#54400)"

This reverts commit ef32050508.

* Betterer <3
2022-09-01 05:42:06 -07:00
Josh Hunt
c3633feea8
Chore: Remove Dashboard IconName type assertions (#54573)
* Chore: Remove Dashboard IconName type assertions

* fix lint
2022-09-01 13:26:28 +01:00
Josh Hunt
caa0c91b1c
Chore: Remove Nav + story IconName type assertions (#54572)
* Chore: Remove some IconName type assertions

* fix actually importing the function

* fix lint

* fix lint
2022-09-01 13:23:41 +01:00
Josh Hunt
f15ce633c9
Navigation: Don't round app plugin icon images (#54543)
* Navigation: Don't round app plugin icon images

* round icon
2022-09-01 10:28:50 +01:00
Hamas Shafiq
610952ca8a
TestData DB: Fix node graph not showing when the Data type field is set to random (#54298) 2022-09-01 09:53:33 +01:00
Hamas Shafiq
028ba2bf95
Chore: Change JSON file to JSON File for consistency with other tabs (#54453) 2022-09-01 09:09:13 +01:00
Galen Kistler
d19a125ada
Prometheus: report metrics browser toggle click interaction (#54546)
* report metrics browser toggle click interaction

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-08-31 14:43:00 -05:00
Andre Pereira
e3c72ef5b7
Tempo: Improve TraceQL editor autocomplete (#54461)
* Detect spansets and improve autocomplete

* Better situation detection. Autocomplete scopes

* Remove scopes from tag name to get autocomplete

* Stronger regexes. More autocomplete tests

* Split big regex in smaller regexes

* Fix autocomplete when writing a string value with spaces

* Added test for the space inside string value autocomplete case

* Syntax highlight fix when using >< operators
2022-08-31 17:31:54 +01:00
Kristina
5069747893
Fix RefID and mixed datasource equality (#54536) 2022-08-31 10:22:13 -05:00
owensmallwood
f4bbce15a0
Public Dashboards: Add Expressions Support (#54336)
Adds support for expressions with public dashboards
2022-08-31 09:11:10 -06:00
Kristina
38c1f3d054
Explore: Add Mixed Datasource (#53429)
* Toggle on the mixed mode option

* Ensure switching to mixed gives existing query prev datasource

* WIP - Populate datasource when switching between mixed and not

* WIP - handle change from mixed

* Remove preimport filter, refine filter to work for queries

* WIP debugging datasource transition

* Ensure creating a new query gets target data source if switching with no matches between

* Add mixed datasource to rich history display

* Cleanup console logs, add relevant comments

* Add feature toggle for mixed datasource

* Fix Wrapper tests

* Fix tests!

* Fix test types and add feature tracking

* Remove unnecessary default, remove explore/mixed workarounds for D2E

* Move display text logic to mixed datasource file

* Add in the default query parameters to a generated empty query

* Condense some code

* Apply suggestions from code review

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Add more logic around mixed datasource being off for explore

* Build out logic to handle different datasource scenarios

* Add tests

* Finalize last test

* Fix mixed URL with mixed ds off, and relevant test

* Fix datasource to explore workflow

* Add datasource change function, call import queries if needed

* add logic for changing single query ds

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-08-31 09:24:20 -05:00
Torkel Ödegaard
e5fba788d6
AppRootPage: Fixes issue navigating between two app plugin pages (#54519)
* AppRootPage: Fixes issue where it was not possible to navigate to another plugin

* Externalize react-router

* fixing test
2022-08-31 15:36:08 +02:00
Victor Marin
51e2f57ac9
Hidden series stay hidden in legend when toggling visibility (#54139) 2022-08-31 13:49:24 +03:00
Matias Chomicki
6e6069a2ba
Loki: Create Variable Query Editor for Loki. (#54102)
* feat(loki-query-editor): create base editor component

* feat(loki-query-editor): update editor to use loki query type

* feat(loki-query-editor): add custom variable support to datasource

* feat(loki-query-editor): prevent errors when no label is present

* Add unit test for LokiMetricFindQuery

* Update datasource test

* Add component test

* Add variable query migration support

* feat(loki-query-editor): add migration support for older-format variables

* Fix enum capitalization for consistency

* Move attribute to the top of the class

* Remove unnecessary from()

* Update capitalization of new enum

* Fix enum capitalization in component

* feat(loki-query-editor): replace unnecessary class with class method
2022-08-30 18:18:51 +02:00
Nathan Marrs
acbbdccba9
Canvas: Fix minor duplication bug #54462 2022-08-30 08:27:00 -07:00
Esteban Beltran
fc348e6279
Plugins Catalog: Use appSubUrl to generate plugins catalog urls (#54426)
* Plugins Catalog: us appSubUrl to generate plugins catalog urls

* add tests for PluginList with app sub url

* remove unnecessary comments
2022-08-30 12:34:41 +02:00
Ashley Harrison
db4a2d58a1
convert DerivedField test to RTL (#54334) 2022-08-30 10:28:06 +01:00
Polina Boneva
ef32050508
Add FocusScope to PanelEditor when open in the Dashboard Page so that a11y focus never catches invisible content. (#54400) 2022-08-30 12:08:31 +03:00
Ashley Harrison
5e394c0385
Convert influxdb ConfigEditor test to RTL (#54332) 2022-08-30 09:30:10 +01:00
Yaelle Chaudy
711c504b39
Azure Monitor: Updated grafana_ds_azuremonitor_dashboard_loaded event, replaced array of queries for stats (#54286)
* Replaced array of queries for stats

* Added ds_version prop

* Added ds_version to tests

* Extracted event name to tracking file

* Extracted event to tracking file

* Removed ds_version - useless for core plugin

* Addressed comments

* Added note to event documentation
2022-08-30 09:55:40 +02:00
Esteban Beltran
56bceacfb1
Navigation Bar: Remove plugins link under Server Admin (#54386)
* Navigation Bar: Remove plugins link under Server Admin

* Modify frontend to handle admin plugins as just plugins

* update assets and documentation mentioned path

* Fix copy to remove redundant text
2022-08-30 03:40:04 -04:00
Adela Almasan
89236cf418
Geomap: Cleanup (#54415) 2022-08-29 17:34:42 -04:00
Ezequiel Victorero
722aca5c53
Public Dashboards: use intervalMs and maxDataPoints from request (#53613) 2022-08-29 18:13:06 -03:00
Adela Almasan
07dcb64e38
Geomap: Fix tooltip display (#54245) 2022-08-29 09:29:54 -05:00
Ivan Ortega Alba
4a0a6c8fd4
Analytics: Rename create dashboard event (#54390) 2022-08-29 16:26:54 +02:00
Adam Simpson
87375f570d
QueryEditorRow: filter data on mount (#54260)
This works correctly on initial dashboard load. However, when an action
is taken that triggers a "re-mount", e.g. opening the options pane on
the right side of the page, the `data` prop becomes undefined.
2022-08-29 13:49:58 +00:00
Nathan Marrs
3be3b02f59
Geomap: cleanup (#54328) 2022-08-26 16:03:20 -05:00
Adela Almasan
0707d682e0
Geomap: Local color range for dimensions (#54348)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-08-26 15:39:59 -05:00
Brendan O'Handley
20d0aa9904
OpenTsdb: migrate annotations from angular to react (#53856)
* remove annotation angular dependency and migrate annotations

* add nullish coalescing operator

* remove annotations angular partial

* make annotation queries code and errors more readable

* handle the betterer issue with '^ Unexpected any. Specify a different type' at top of file

* run precommits

* run prettier
2022-08-26 13:44:10 -04:00
Ryan McKinley
2db6a199b8
Preferences: Support setting any dashboard as home, not just the starred ones (#54258) 2022-08-26 12:40:40 -04:00
Hamas Shafiq
93c5c175fe
Jaeger: Show a better error msg if no service is selected when using search (#54172) 2022-08-26 17:09:18 +01:00
Ivan Ortega Alba
c66c275342
SearchSrv: stop using IDs (#54296)
* SearchSrv: stop using IDs

* Remove IDs from test
2022-08-26 15:41:47 +02:00
Maria Alexandra
f4fa3e4ff4
Panel edit: Run queries when time range changes in table view (#53111) 2022-08-26 15:36:42 +02:00
Galen Kistler
6ed0787376
InfluxQL: Quoting tag values in the query editor (#54187)
* Quote numeric values in query editor
2022-08-26 08:26:44 -05:00
renovate[bot]
6f72c4d10d
Update dependency @testing-library/user-event to v14.4.3 (#54292)
* Update dependency @testing-library/user-event to v14.4.3

* use ReturnType instead of using a nested import

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-26 13:30:34 +01:00
Ashley Harrison
91948ce554
Convert elasticsearch ConfigEditor.test.tsx to RTL (#54301) 2022-08-26 13:29:31 +01:00
Giordano Ricci
b4334b26aa
Chore: add missing properties to mocks (#54290)
* Chore: add missing properties to mocks

* update snapshot
2022-08-26 12:17:04 +01:00
Giordano Ricci
c68d7f1e35
Correlations: Add CorrelationSettings Page (#53821)
* GrafanaUI: add option to close DeleteButton on confirm click

* add datasource readOnly info to frontend settings

* move isTruthy utility type guard

* add generic non-visualization table component

* Add correlations settings page

* add missing readOnly in mock

* Fix typo

* avoid reloading correlations after add/remove

* use DeepPartial from rhf

* validate source data source

* fix validation logic

* fix navmodel test

* add missing readonly property

* remove unused styles

* handle multiple clicks on elements

* better UX for loading states

* fix remove handler

* add glue icon
2022-08-26 11:27:28 +01:00
Vadim Beskrovnov
37fde2eec6
Dashboard save: Persist details message when navigating through dashboard save drawer's tabs. (#54084)
* Dashboard: Fix `changes note` textarea to save draft when going to other tabs

* Do not show Changes tab if there are no changes

* Fix comments

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-08-26 03:25:40 -07:00
renovate[bot]
2f4c8e1b3d
Update dependency eslint-plugin-react to v7.31.0 (#49214)
* Update dependency eslint-plugin-react to v7.31.0

* fix displayName for OldNavOnly

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-26 10:31:16 +01:00
Josh Hunt
ebbeed8ad7
I18n: Use locale preference (#53293) 2022-08-26 10:27:14 +01:00
Artur Wierzbicki
74158ed66b
Search: use SQL search as a fallback during bluge's initial indexing (#54095)
* Search: use SQL search as a fallback when bluge indexing is ongoing

* Search: lint

* Search: feedback fixes - return an empty frame with a special name

* Search: revert readiness check query type

* Search: remove println

* remove sleep, get coffee
2022-08-26 12:36:41 +04:00
Ivan Ortega Alba
c332bf885c
Migrate to UID: Stop using search result ID (#54099)
* DashList: Stop using IDs

* DashLinks: Stop using IDs

* BackendSrv: Do not use ID for search endpoint

* DashboardDataDTO: Remove ID

* Remove unused properties from DashboardSearchItem
2022-08-26 09:42:46 +02:00
Leo
e27769da9c
use navId and subtitle on api keys page (#54247) 2022-08-26 09:28:17 +02:00
Matias Chomicki
cd617b6520
Loki: refactor mock instance creation and clean up datasource test (#54176)
* refactor(loki-test): move mock creation to mock module

* refactor(loki-test): allow to pass custom settings to the mock constructor

* refactor(loki-test): refactor mock factory in datasource test

* refactor(loki-test): revert change in undefined test case for dsMaxLines

* refactor(loki-test): move type assertion to mock definition

* refactor(loki-test): fix more type issues

* refactor(loki-explore-query-editor): refactor test to use createLokiDatasource() and fix type issues

* refactor(loki-test): replace makeMockLokiDatasource with metadataRequest factory

* fix: remove any

* fix(loki-test): fix remaining usages of any

* Fix: add missing exported type
2022-08-26 09:26:48 +02:00
Gábor Farkas
448a67ab43
elastic: use millisecond-intervals (#54202) 2022-08-26 08:56:39 +02:00
Victor Marin
07c9c8ffd7
Histogram cue model fixes (#54022) 2022-08-26 09:45:19 +03:00
Adela Almasan
cea2b4b7b8
Geomap: Spatial operations location options transform e2e test (#54162) 2022-08-25 17:34:24 -04:00
Artur Wierzbicki
5c0bf2ba39
Storage: fix creating a new dashboard with dashboardsFromStorage feature flag enabled 2022-08-25 14:04:09 -04:00
GitStart
468597b687
Elasticsearch: Remove any from public/app/plugins/datasource/elasticsearch/components/AddRemove.test.tsx (#54232)
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: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>
Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: juliopiubello <juliopiubellow@gmail.com>
2022-08-25 17:33:16 +02:00
Brendan O'Handley
c9a3b2d420
use metadata endpoint (#53980) 2022-08-25 10:59:49 -04:00
Ashley Harrison
d765aaff49
use navId + pageNav on datasource pages (#54218) 2022-08-25 13:58:41 +01:00
Mihály Gyöngyösi
aace0b1e7f
Admin: Create/Edit Team/ServiceAccount UI changes (#53889)
* RolePicker: Handle inherited with

* Small ammendment to Create Service Account layout

* RolePicker: introduce maxWidth prop

* Clean up

* Change VerticalGroup spacing to large on Team Settings page

* Introduce constant for submenu width

* Update public/app/core/components/RolePicker/RolePicker.tsx

Simplify style parameter

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Add description to the improved calculation

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-08-25 13:30:11 +02:00
Leo
9f8cb17b01
Navigation: Use new page layout in Service accounts item page (#54200)
* use navId, pageNav and update alignments of service account page

* Fixing item header when feature is disabled

* Fix orgs item page

* Minor tweak to subtitle for service account item page

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-08-25 13:11:30 +02:00
Hamas Shafiq
5148464c88
Jaeger: Make search form fields more consistent with Tempo (#54026) 2022-08-25 09:51:21 +01:00
Dominik Prokop
8eac5706fd
AdHoc variable: Correctly preselect datasource when provisioning (#54088)
* Adhoc variable: Correctly preselect datasource when provisioning

* Fix test

* Remove data sources from ad hoc variable state in favor of DataSourcePicker
2022-08-25 00:56:45 -07:00
Yaelle Chaudy
d0d6562f63
AzureMonitor: Added ARG query function for template variables (#53059)
* Added ARG query functionfor template variables

* removed unused import

* Tweak tests

* Fix tests

* Renamed query function - added 'Azure'

* Revert "Renamed query function - added 'Azure'"

This reverts commit a046bcdd7c.

* Adressed comments

* Fix uncaught error issue

* revert last commit

* Add back errorMessage check
2022-08-25 09:38:43 +02:00
Gábor Farkas
60d1668d74
Elasticsearch: Respect time range in ad hoc filters (#53874)
* elastic: respect time range in ad hoc filters

* added unit test
2022-08-25 09:29:15 +02:00
Dominik Prokop
f9a49aa3ed
Fix: Correctly migrate mixed data source targets (#54152)
* Failing test case

* Fix mixed datasource targets migration
2022-08-25 00:07:10 -07:00
Ryan McKinley
b483ac322f
Chore: replace React.FC<Props> with simple function component (#54123) 2022-08-24 16:54:34 -04:00
Andre Pereira
c8f2148f75
Tempo: Basic PoC of the upcoming TraceQL editor in Explore (#54028)
* First working version of the TraceQL editor with syntax highlighting and autocomplete

* Add feature flag around the new editor option

* Fix tests and cleanup

* Fix misspelling
2022-08-24 17:57:59 +01:00
Ryan McKinley
94b4f6f459
Search: Show all dashboards in the folder view (#54163) 2022-08-24 12:10:34 -04:00
Torkel Ödegaard
264645eecd
TopNav: Dashboard settings (#52682)
* Scenes: Support new top nav

* Page: Make Page component support new and old dashboard page layouts

* Pass scrollbar props

* Fixing flex layout for dashboard

* Progress on dashboard settings working with topnav

* Updated

* Annotations working

* Starting to work fully

* Fix merge issue

* Fixed tests

* Added buttons to annotations editor

* Updating tests

* Move Page component to each page

* fixed general settings page

* Fixed versions

* Fixed annotation item page

* Variables section working

* Fixed tests

* Minor fixes to versions

* Update

* Fixing unit tests

* Adding add variable button

* Restore annotations edit form so it's the same as before

* Fixed semicolon in dashboard permissions

* Fixing unit tests

* Fixing tests

* Minor test update

* Fixing unit test

* Fixing e2e tests

* fix for e2e test

* fix a11y issues

* Changing places Settings -> General

* Trying to fix a11y

* I hope this fixes the e2e test

* Fixing merge issue

* tweak
2022-08-24 18:05:12 +02:00
Ryan McKinley
fe61a97c9d
TextPanel: Support code formats (#53850) 2022-08-24 08:13:00 -07:00
Jeff Levin
f5b99e5ca7
add tests for api urls (#54116)
Create function for generating api urls and add tests
2022-08-24 08:51:35 -06:00
Laura Benz
95ec6f6c0f
Explore: Improve a11y of query row collapse button (#53827)
* refactor: convert to IconButton

* refactor: adjust attributes
2022-08-24 15:38:16 +02:00
Ashley Harrison
211c9991c5
Navigation: Add responsive behaviour to ToolbarButtonRow (#53739)
* hacky first attempt

* slightly cleaner...

* behaviour mostly working...

* remove unnecessary wrapper

* css tweaks

* much cleaner implementation with intersectionobserver

* set style props directly on children

* separate story, integrate when toggle is off

* improve story, integrate when toggle is on

* remove styles from DashNavTimeControls

* mock IntersectionObserver for all unit tests

* prettier

* don't use dropdown anymore

* add some basic documentation

* add right alignment to scenes toolbarbuttonrow

* just use the react children api to prevent duplicating children
2022-08-24 11:19:36 +01:00
Matias Chomicki
1642716978
Chore(loki): remove any from DerivedFields test (#53547) 2022-08-24 10:06:28 +02:00
Torkel Ödegaard
8880cbd7f6
AngularPanels: Fixing changing angular panel options not taking having affect when coming back from panel edit (#54087) 2022-08-24 08:35:44 +02:00
Kristina
5f57edd08a
Allow for clickable link (#54067) 2022-08-23 12:17:58 -05:00
Ryan McKinley
1d4e01f8ba
Transformers: Support inner vs outer join (#53913) 2022-08-23 10:14:03 -07:00
eledobleefe
1766ea9fdf
Navigation: Use new page layout in Server Admin > Orgs pages (#54018) 2022-08-23 18:38:46 +02:00
Isabella Siu
4f2b66ac1d
CloudWatch: Log group variable should get all log groups (#54062) 2022-08-23 11:43:30 -04:00
Andreas Christou
1f17e9a044
Update effects to avoid retrieving metrics descriptors except on project name update (#54091) 2022-08-23 16:42:59 +01:00
Esteban Beltran
6fe7a1f034
Icons: Move unicons icons to the repository and generate the iconsBundle.js with nodejs (#53766) 2022-08-23 15:47:14 +02:00
Karl Persson
c9661a5be1
RBAC: Only display unique permissions in list (#54074)
* PermissionList: Only display one row for each user, team or builtin role
2022-08-23 15:34:31 +02:00
Hamas Shafiq
afa7e8d8de
Tempo: Make TempoQuery.search & SearchQueryParams.tags optional (#54052) 2022-08-23 12:27:19 +01:00
Hamas Shafiq
5f80bf5297
Tempo: Remove unused functions in datasource.ts (#54081) 2022-08-23 12:02:43 +01:00
Karl Persson
cc78486535
RBAC: Display indicator if a permission is inherited (#54080)
* RBAC: Add IsInherited property

* PermissionList: Display inherited indicator
2022-08-23 05:34:19 -04:00
Ryan McKinley
13aacf3590
Geomap: Fix geohash editor settings #54058 2022-08-22 14:12:21 -07:00
sam boyer
4d433084a5
plugins: New static scanner and validator, with Thema slot support (#53754)
* coremodels: Convert plugin-metadata schema to a coremodel

* Newer cuetsy; try quoting field name

* Add slot definitions

* Start sketching out pfs package

* Rerun codegen with fixes, new cuetsy

* Catch up dashboard with new cuetsy

* Update to go1.18

* Use new vmuxers in thema

* Add slot system in Go

* Draft finished implementation of pfs

* Collapse slot pkg into coremodel dir; add PluginInfo

* Add the mux type on top of kernel

* Refactor plugin generator for extensibility

* Change models.cue package, numerous debugs

* Bring new output to parity with old

* Remove old plugin generation logic

* Misc tweaking

* Reintroduce generation of shared schemas

* Drop back to go1.17

* Add globbing to tsconfig exclude

* Introduce pfs test on existing testdata

* Make most existing testdata tests pass with pfs

* coremodels: Convert plugin-metadata schema to a coremodel

* Newer cuetsy; try quoting field name

* Add APIType control concept, regen pluginmeta

* Use proper numeric types for schema fields

* Make pluginmeta schema follow Go type breakdown

* More decomposition into distinct types

* Add test case for no plugin.json file

* Fix missing ref to #Dependencies

* Remove generated TS for pluginmeta

* Update dependencies, rearrange go.mod

* Regenerate without Model prefix

* Use updated thema loader; this is now runnable

* Skip app plugin with weird include

* Make plugin tree extractor reusable

* Split out slot lineage load/validate logic

* Add myriad tests for new plugin validation failures

* Add test for zip fixtures

* One last run of codegen

* Proper delinting

* Ensure validation order is deterministic

* Let there actually be sorting

* Undo reliance on builtIn field (#54009)

* undo builtIn reliance

* fix tests

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-08-22 12:11:45 -04:00
Ashley Harrison
3cf95d7eee
Chore: fix some anys pt.2 (#53928)
* correctly type some more any's

* undo this change for now...
2022-08-22 16:51:33 +01:00
Josh Hunt
2b17e5354a
Chore: Remove needless eslint ignore comment from variable utils (#54050) 2022-08-22 16:50:24 +01:00
Vadim Beskrovnov
7caba545ec
A11y: Fix a11y for toolbar buttons in PanelEditor (#53864)
Co-authored-by: Vadim Beskrovnov <vbeskrovnov@fb.com>
2022-08-22 17:08:22 +02:00
renovate[bot]
013dda7bb8
Remove dependency jest-mock-console (#52872)
* Update dependency jest-mock-console to v2

* let's remove jest-mock-console

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-22 15:47:45 +01:00
Gábor Farkas
35253a909d
Elasticsearch: remove already-disabled code (#52932)
* elastic: removed unused code from go-part

* elastic: removed unused code from js-part
2022-08-22 16:25:20 +02:00
Josh Hunt
9db9ebce02
Typed variables pt6: Clean up and test variable type guards (take 2) (#54025)
* Add fixture-factories for all variable types

* clean up variable guards

* add tests for isMulti, hasCurrent, and hasOptions variable type guards

* create VariableSupport type to try and work around ts wonkiness
2022-08-22 14:45:40 +01:00
renovate[bot]
4c8ea0bb89
Update dependency @lezer/common to v1 (#50866)
* Update dependency @lezer/common to v1

* Bump lezer/lr as well

* Fix broken code

* Add new lezer-promql and update lezer-logql

* Change to prometheus lezer-promql, fix lezer-logql code

* Update tests for Loki

* fix typeErrors

* fix tests by adding new error node to expected objects

* refactor usages of node references to differentiate usage from node object

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
Co-authored-by: gtk-grafana <galen.kistler@grafana.com>
2022-08-22 08:45:29 -05:00
Gilles De Mey
0923d2455c
Alerting: Show alerting enabled for Alertmanager data sources (#54023) 2022-08-22 14:34:55 +02:00
Ashley Harrison
0f4b8c5e54
convert AzureCredentialsForm test to RTL (#53959) 2022-08-22 13:22:19 +01:00
Karl Persson
ef25d297d6
RBAC: Display groups for custom roles (#54020)
* RolePicker: Default to "Other" for roles without group

* RolePicker: Add GroupType enum and calculate group options based on
group type

* RolePicker: Display groups for custom roles

* RolePicker: Remove unused code

* RolePicker: Restructure

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-08-22 14:21:12 +02:00
Ashley Harrison
f91f05f32c
Chore: convert DebugSection test to RTL (#53965)
* convert DebugSection test to RTL

* remove unused import
2022-08-22 13:19:46 +01:00
Hamas Shafiq
895616a231
Tempo: Remove spanName from the query object if undefined (#53945) 2022-08-22 11:52:36 +01:00
eledobleefe
8cdfedc559
A11y: Update buttons in Explore page to not use HTML Title for tooltip (#53894) 2022-08-22 11:19:22 +02:00
Polina Boneva
51d173711f
A11y: do not change the focus when switching between Viz/Suggestions/Library Panels views (#53814) 2022-08-22 12:12:39 +03:00
Takuya Kosugiyama
2ff007b266
Cloud Monitoring: Support SLO burn rate (#53710) 2022-08-22 10:11:54 +02:00
Ryan McKinley
7cbf6015db
StructureRev: use deep equals for structure revision change detection (#53920) 2022-08-19 08:29:23 -07:00
Esteban Beltran
edb54fc8d3
Fix: Rename timezones prop to timezone for plugins compatibility (#53926) 2022-08-19 16:59:56 +02:00
Ashley Harrison
b6835ef87d
convert TestRuleResult to RTL (#53953) 2022-08-19 15:00:53 +01:00
Ashley Harrison
0550808126
use navId over navModel, add page descriptions + create pageNav for child pages (#53936) 2022-08-19 13:32:43 +01:00
Hamas Shafiq
6b1804b6c0
Tempo: Set the default query type even if queryType was set to 'clear' (#53887) 2022-08-19 09:41:39 +01:00
eledobleefe
f926020c1b
Chore: Improve FolderSettingsPage test (#53601) 2022-08-19 10:25:33 +02:00
Ashley Harrison
78995e252a
implement responsive breadcrumb behaviour (#53764) 2022-08-19 09:17:52 +01:00
Ryan McKinley
7755f4c4ba
Inspect: show DataFrame JSON *before* transformation and field config are applied (#53867) 2022-08-18 15:06:33 -07:00
Alex Karacaoglu
9be73e758d
Transforms: Allow for clearing of select fields for outer join and grouping to matrix transformations (#53916) 2022-08-18 14:19:59 -07:00
Jo
4a9137ac40
API Keys: Add revocation for SATs (#53896)
* add apikey is_revoked field

* add token store tests

* Apply suggestions from code review

* remove unused fields
2022-08-18 16:54:39 +02:00
Galen Kistler
8b18530cb8
Prometheus: properly de-accumulate multi-heatmap responses (#53688)
* Implement workaround to #3373, grouping heatmaps by query before sorting prevents bug when calculating a heatmap with multiple values for the same label on the x-axis

* Group heatmap frames prior to sort by the concatenation of their values, excluding quantile (le)

* add unit tests for multiple query and multi-dimensional query

* replace final le value with more apt quartile label

* unify quantile labels

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-08-18 09:54:09 -05:00
Victor Marin
ae69b1d99c
HistogramPanel: Generate .cue model (#53826)
* Generate .cue model for histogram panel

* Docs

* Refactor PR
2022-08-18 16:19:11 +03:00
Zoltán Bedi
ea5e58a051
BarChart/PieChart: create/update models.cue (#52988)
* Reverse engineering barchart models.cue from models.gen.ts

* Barchart models.cue and import fixes

* Add models.cue for piechart

* Use single-item syntax to dodge cuetsy bug

* Add some docs

Co-authored-by: sam boyer <sdboyer@grafana.com>
2022-08-18 14:46:36 +02:00
Mihály Gyöngyösi
a915977002
Teams: Add TeamRolePicker to the Create and Edit Team pages (#53775)
* Add TeamRolePicker to CreateTeam and TeamSettings pages

* Align tests to the changes

* Change TeamRolePicker

* Add useRoleOptions hook

* Clean up

* Requested changes by reviewers

* Fixes

* Fixes
2022-08-18 13:21:06 +02:00
Karl Persson
4ff4aaab23
RBAC: Remove builtin role code (#53767)
* remove rbacBuiltInRoleAssignmentEnabled from frontendsettings

* RBAC: Remove RBACBuiltInRoleAssignmentEnabled

* RBAC: Remove code for builtin role

* RolePicker: Remove unused prop

* RolePicker: Rename builtinRole to basicRole

* RolePicker: Rename onBuiltinRoleChange to onBasicRoleChange

* RolePicker: Rename properties
2022-08-18 12:25:37 +02:00
Hamas Shafiq
a6ff6cd0c1
Tempo: Remove unused theme param in getStyles (#53823) 2022-08-18 09:55:24 +01:00
Oscar Kilhed
e877c1da90
Revert "BarchartPanel: Fix color from thresholds show incorrectly (#52038)" (#53806)
This reverts commit 11c79cd6da.
2022-08-18 08:47:17 +02:00
Artur Wierzbicki
2a0ae74f96
Live: fix StreamingDataFrame length on replace action and schema change (#53796)
* streaming-data-frame

* add more expect.length in tests
2022-08-18 00:58:38 +04:00
Brendan O'Handley
085258c035
Influxdb Datasource: Remove angular dependencies for Influxdb influxql annotations (#52546)
* migrate influxQL annotations to react and build new annotation editor

* use es-lint ignore for any type in migration

* changes for PR comments

* handle annotation editor on load error without query

* correct label for ann editor query

* add null coalesce operator and remove comment

* fix tooltip
2022-08-17 13:20:46 -04:00
Karl Persson
57d87389e0
RBAC: Remove user permissions in org when user is removed (#53782)
* RBAC: Add orgID to DeleteUserPermissions

* RBAC: Refactor query to delete all permissions in specified org, 0
deletes all permissions

* Delete user permission in org when user is removed

* Remove call to delete permissions in frontend

* Remove user permissions if removed orgs is detected during oauth sync

Co-authored-by: Jo <joao.guerreiro@grafana.com>
2022-08-17 16:32:02 +02:00
Beto Muniz
d4a63aca64
InfluxDB: Remove browser ('direct' access) mode. (#53529)
* Remove InfluxDB browser ('direct' access) mode.

* Improve text usage and clarity
2022-08-17 09:40:21 -03:00
Andrej Ocenas
f30795b088
Prometheus: Throw error on direct access (#50162)
* Disable direct access

* Hide access select if Server mode is already selected

* Update docs

* Add more tests

Co-authored-by: Beto Muniz <contato@betomuniz.com>
2022-08-17 09:37:29 -03:00
Victor Marin
2d391c98d2
Histogram: Fix panel hide when clicking on legend (#53651) 2022-08-17 13:40:38 +03:00
Gilles De Mey
0523eba2a9
Alerting: Read group details before saving (#53586) 2022-08-17 11:56:54 +02:00
Gilles De Mey
68f6ae5de1
Alerting: Hide "no rules" message when we are fetching from data sources (#53778) 2022-08-17 11:54:51 +02:00
Esteban Beltran
81957732ab
Chore: Replace react-inlinesvg usage for the Icon component (#53736) 2022-08-17 09:09:58 +02:00
Hamas Shafiq
860fd83ab4
Jaeger: Remove advanced options toggle & show advanced options by default (#53774)
Jaeger: Remove advanced options toggle & show advanced options by default
Jaeger: Make the width of all labels in the search form the same
Jaeger: Fix typo in the tooltip for the "Limit" field
Chore: Re-add durationPlaceholder constant
2022-08-16 19:27:43 +02:00
Ashley Harrison
7eab08364e
Navigation: Improve responsiveness of TopSearchBar (#53777)
* remove some magic numbers + used grid for better responsiveness

* remove old responsive styles
2022-08-16 15:09:22 +01:00
Konrad Lalik
f3085b1cac
Alerting: Improve Mimir AM interoperability with Grafana (#53396) 2022-08-16 16:01:57 +02:00
Gilles De Mey
fb93b60fcc
Alerting: Support for re-ordering alert rules in a group (#53318)
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-08-16 14:42:02 +02:00
Hamas Shafiq
3e209c06f3
Tempo: Fix typo in the tooltip for 'Limit' (#53750) 2022-08-16 06:52:44 -04:00
Ivan Ortega Alba
38c690ecb0
Revert "Analytics: Use Fullstory to get behavioral data (#53732)" (#53762)
This reverts commit 961479b111.
2022-08-16 12:45:14 +02:00
Ivan Ortega Alba
961479b111
Analytics: Use Fullstory to get behavioral data (#53732) 2022-08-16 10:32:00 +02:00
Torkel Ödegaard
c8fc840865
Fix initDashboard bug (#53722)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-08-16 03:24:04 -04:00
sam boyer
4a5afe4fb6
openapi: Use indentations for human-readable JSON (#53707) 2022-08-15 15:39:18 -04:00
Zoltán Bedi
835562bb68
GeoMap: Fix tooltip not showing values (#53738) 2022-08-15 16:39:00 +02:00
Mihály Gyöngyösi
1c0ab501aa
UsersTable: Display Disabled flag in Organizations' Users table (#53656)
* Add disabled column to Org's Users table

* fix typo

* Change column order

* Add test for testing whether GetOrgUsers populates the DTO correctly
* Remove type assertion
2022-08-15 10:58:58 +02:00
Drew Slobodnjak
e9e5c97807
Geomap: Update language to match documentation and remove beta (#53703)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-12 21:33:30 -04:00
Leo
0ce89dbcb6
use dash-db type when searching for dashboard (#53607) 2022-08-12 16:14:04 +02:00
Andreas Christou
d6a0a5c9ed
Set projectName in componentDidMount to ensure GCE project is set (#53652)
- Update componentDidMount to call ensureGCEDefaultProject to correctly set project name for GCE Service Account auth
- Set state appropriately
- Update test
2022-08-12 14:54:19 +01:00
Andreas Christou
cace6f06d1
Fix webpack issue (#53666) 2022-08-12 13:53:35 +00:00
Sonia Aguilar
f416651842
Show alerting availability in data source details (#53391)
* Show alerting availability in data source details

* Show tooltip info in data source dropdown when creating an alert

* return earlier in HeaderExtras component

* Use getDataSourceSrv().getInstanceSettings instead of getDataSourceSrv().get to simplify

* Make information icon clickable and open a new window with documentation url
2022-08-12 15:32:07 +02:00
Ivana Huckova
fde5147d71
Loki, Prometheus: Fix passing of query with defaults to code mode (#53646) 2022-08-12 15:00:55 +02:00
Ivana Huckova
f34a03b2f1
Loki: Rename Labels to Label filter and update placeholders (#53446)
* Loki: Rename Labels to Label filter and update placeholders

* Update label

* Replace Label filter with Label filters based on suggestion
2022-08-12 07:38:34 -04:00
Andreas Christou
d4f382892d
CloudMonitor: Fix to hide queries when used in conjunction with Expressions (#53537)
* Correctly pass all original query parameters on interpolation

* Add datasource tests

- Update props on mock query
- Add mock instance settings
- Add util function to generate template variables
- Add datasource test file
- Correct setting of templateSrv
- Update betterer results

* Simplify test and pass templateSrv appropriately

* Fix lint issue

* Simplify test and add type that supports parital nested objects

* Update test and remove unneeded util function

* Rename to avoid duplicate mock
2022-08-12 11:02:56 +01:00
Karl Persson
7e16d5b4b4
RBAC: Fix various ui issues for role picker (#53589)
* RolePicker: Check if user has permissions to delegate roles

* UserRolePicker: Require both UserRolsAdd and UserRolesRemove for chaning
roles

* RolePicker: Add option for controlling if roles can be updated to
RolePicker

* UserOrgs: Dont try to fetch roles with wrong permission

* RolePicker: make usage consistent with allowed actions

* RolePickerMenu: Remove unused property

* UserOrgs: Check for correct permission

* UserRolePicker: add apply to controll apply behaviour instand of
updateDisabled

* UserOrgs: Check for correct permission when trying to update roles

* RolePicker: Disable button if no roles or org role can be updated

* RolePicker: Always close on update

* RolePicker: Fix issue with updating immutable value

* ServiceAccountsListItem: Pass correct value to RolePicker

* ServiceAccountCreatePage: Pass correct value
2022-08-12 09:16:16 +02:00
Adela Almasan
1f93216f1d
Layers check (#53611) 2022-08-11 17:39:18 -04:00
Gilles De Mey
e9980a9bb8
Alerting: Adds interval and For to alert rule details (#53211) 2022-08-11 18:49:21 +02:00
Matias Chomicki
8d69acb9f8
Chore(loki): remove any from LokiQueryField test (#53548) 2022-08-11 18:08:23 +02:00
Matias Chomicki
df8d1de94f
Chore(loki): remove any from config editor test (#53475) 2022-08-11 18:08:05 +02:00
Giordano Ricci
c1b30c56c9
Correlations: Add GetCorrelation(s) HTTP APIs (#52517)
* Correlations: Get Single correlations

* Correlations: Get all correlations for given source ds

* Correlations: Get all correlations

* add tests

* add DB indices

* fix lint errors

* remove skip from tests

* use DatasourceService in test
2022-08-11 16:58:11 +01:00
Ivana Huckova
8813cbfb62
Loki: Update copy for missing label filter error message (#53449)
* Loki: Update copy for missing label filter

* Update
2022-08-11 17:57:10 +02:00
Hamas Shafiq
6592b03f12
Jaeger: Extract inline CSS into getStyles 2022-08-11 16:41:59 +01:00
Hamas Shafiq
20caed026f
Jaeger: Improve JSON file upload error msg 2022-08-11 16:23:19 +01:00
Andres Martinez Gotor
a31d96d20a
Prometheus: Promote Azure auth flag to configuration (#53447) 2022-08-11 16:12:57 +02:00
timkendrickmw
85dbacafdb
GrafanaUI: improve Prometheus getQueryHints performance (#52148) 2022-08-11 15:47:07 +02:00
Ivan Ortega Alba
6423485061
Preferences: Use search endpoint to get missing dashboard (#53540) 2022-08-11 10:34:01 +02:00
Zoltán Bedi
818bc88242
MSSQL: Don't inject angular dependency (#53546) 2022-08-11 09:43:20 +02:00
Yaelle Chaudy
dfe33a63fb
Datasources: Emit event on dashboard load with queries info (#52052)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Andres Martinez <andres.martinez@grafana.com>
2022-08-11 09:30:14 +02:00
Levente Balogh
d7556bd189
fix: use type instead of uid to get datasource metadata (#53543) 2022-08-11 07:24:39 +02:00
owensmallwood
dc23643bee
Public Dashboards: Usage Insights (#52768) 2022-08-10 14:14:48 -03:00
Josh Hunt
081d6e9d3e
Typed variables pt5: Remove generics from getInstanceState (#53018)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* use typescript/no-redeclare for compatibility with ts overloads

* remove generics from getVariable() and overload it to only return undefined based on arguments

* update usages of getVariable()

* Remove generic from getInstanceState

* update usages of getInstanceState

* fix lint
2022-08-10 16:06:49 +01:00
Josiah (Jay) Goodson
7d7890e23c
Transform: Add a limit transform (#49291)
* Add a limit transform

* Add a limit transform

* Simplify filter code

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-08-10 07:21:11 -07:00
Leo
4926767737
Dashboard: Reverted the changes of hiding multi-select and all variable in the datasource picker (#53521)
* REVERT PanelEdit: Hide multi-/all-select datasource variables in datasource picker, PR 52142

* user essentials mob! 🔱

lastFile:public/app/features/dashboard/dashgrid/PanelChrome.tsx

* user essentials mob! 🔱

lastFile:public/app/features/dashboard/dashgrid/PanelChrome.tsx

* removed todo comments

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
2022-08-10 15:30:00 +02:00
Ashley Harrison
26e81cad21
Add tests for Breadcrumbs (#53514) 2022-08-10 12:56:25 +01:00
Leo
c4984854b6
added dashboard uid when tracing header in browsermode (#53232) 2022-08-10 10:36:19 +02:00
Ashley Harrison
6d495a6a8e
Navigation: Improve breadcrumb accessibility (#53471)
* refactor breadcrumbs into their own folder, add appropriate accessibility

* rename Breadcrumb to BreadcrumbItem
2022-08-10 09:24:21 +01:00
Ivan Ortega Alba
742686bab1
Library Panels: Use UIDs to list Dashboards using a panel (#53477) 2022-08-10 03:43:09 -04:00
Kian Eliasi
e3c50f0cd6
Chore: Remove any from public/app/plugins/datasource/elasticsearch/hooks/useNextId.test.tsx (#53427)
* Remove any from public/app/plugins/datasource/elasticsearch/hooks/useNextId.test.tsx

* Fix lint and update betterer results
2022-08-10 09:25:35 +02:00
Adela Almasan
45750da667
Geomap: Set markers color based on selected color field #53493 2022-08-09 15:42:37 -07:00
Peter Holmberg
509e34cfe7
Alert list panel: Add view mode "Stat" (#53281)
* add stat mode

* remove unused import
2022-08-09 16:37:09 +02:00
Matias Chomicki
27e2953951
Loki: Rewrite getHighlighterExpressionsFromQuery to use Loki parser (#53316)
* refactor(loki): use Loki parser in getHighlighterExpressionsFromQuery

* fix(highlighter): update regex to properly identify term quotes

* refactor(highlighter): determine quote type by string comparison

* Chore: remove empty line
2022-08-09 15:23:14 +02:00
Victor Marin
3893c46976
Histogram: Send proper dataframe to PlotLegend (#53284)
* Send proper dataframe to PlotLegend

* Update dataFrameFieldIndex for multiple frames
2022-08-09 15:39:42 +03:00
Ashley Harrison
8185b6fdf7
refactor component to be more dumb, use LinkButton for icons and fix alignment (#53383) 2022-08-09 11:46:27 +01:00
Alex Ratner
fecf4c41ad
Dashboard: Spelling corrections in end-user visible dialogs (#53340) 2022-08-09 10:19:30 +02:00
Brendan O'Handley
7aeb8b4cdf
Prometheus: Remove metadata endpoint (#53428)
* remove prom metadata endpoint until we have a fix for detecting versions and implementations

* fix linting issue
2022-08-08 18:37:12 -04:00
Seth Falco
a8666370be
fix: add promql placeholder text (#53321) 2022-08-08 19:11:45 +02:00
matt abrams
d69457d5e5
revise to match docs (#53354) 2022-08-08 18:49:54 +02:00
Brendan O'Handley
85db523dd5
Graphite Plugin: fix annotation migration regression with ref-ids (#53361)
* fix regression with ref-ids

* remove duplicate check for annotations in fix
2022-08-08 12:32:35 -04:00
eledobleefe
9930fd522d
Chore: convert DashboardGrid test to RTL (#53405) 2022-08-08 17:43:35 +02:00
kay delaney
1772bd4238
Chore: Reduce usage of v1 theme (#53245) 2022-08-08 16:37:06 +01:00
Gilles De Mey
f0594ebace
Alerting: Fix alert detail layout issue (#53256) 2022-08-08 16:57:34 +02:00
kay delaney
c2d3b45bf4
Chore: Make "why-did-you-render" a dynamic import (#53121) 2022-08-08 15:33:49 +01:00
Ashley Harrison
f1295e4bd0
Chore: Update version of @grafana/eslint-config (#53403)
* use let/const over var

* use new version of @grafana/eslint-config
2022-08-08 15:19:15 +01:00
Matias Chomicki
6f01930e9d
Chore: remove any from test (#53260) 2022-08-08 11:26:12 +02:00
Leo
64967325b2
Search: Migrated impressions to use dashboardUID (#53090)
* used dashboarduid in impressions

* handle scenario to convert all ids saved in storage to uids
2022-08-08 11:13:19 +02:00
ismail simsek
a40c1e227c
Prometheus: Use lezer-promql types instead of hardcoded strings (#53287)
* Prometheus: Use lezer-promql types instead of hardcoded strings

* Update comment line

* Removing more hardcoded values
2022-08-08 10:14:12 +02:00
Teddy Lin
42f9a6e67b
Azure Monitor: Add Network Insights Dashboard (#50362) 2022-08-08 09:38:23 +02:00
Krzysztof Dąbrowski
2dab7ad890
Login: allow basic users to reset password when LDAP or Auth Proxy is enabled (#52331) 2022-08-08 05:12:39 +00:00
Josh Hunt
4b4d546e32
Typed variables pt4: Remove generics from getVariable (#53017)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* use typescript/no-redeclare for compatibility with ts overloads

* remove generics from getVariable() and overload it to only return undefined based on arguments

* update usages of getVariable()

* Fix Interval variable options picker not working
2022-08-05 13:44:52 +01:00
Drew Slobodnjak
64721bfa94
Geomap: Do not show markers with empty coordinates (#53330)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-04 21:17:32 -04:00
lean.dev
e8e7b59bb0
Implementing OpenApi 3 specs (converted from Swagger 2) (#53243)
* Adding OpenApi target to makefile, to covert swagger spec into OpenAPI 3
* Adding endpoint to server swaggerui with new openapi3 specs
* Passing output file as parameter for OpenApi3 specs
* Implement workaround for missing host and prefix domain
2022-08-04 13:51:12 -03:00
Ivana Huckova
bf3fa4a445
Loki: Fix producing correct log volume query for query with comments (#53254)
* Loki: Remove comments from log volume query

* Update, add more tests

* Update based on suggestions

* Update

* Update tests to use it.each
2022-08-04 17:58:39 +02:00
Joao Silva
a84873a52b
i18n: Translates the Share Panel modal (#53297) 2022-08-04 16:43:49 +01:00
Gilles De Mey
ca2b97b095
Alerting: Adds support for editing group details for Grafana managed rules (#53120) 2022-08-04 11:39:28 -04:00
eledobleefe
c65b4c732f
Chore: Convert FolderSettingsPage.test.tsx to RTL (#53307) 2022-08-04 16:00:04 +02:00
Levente Balogh
2bf37a0d35
Data Connections: Remove the placeholder for Recorded Queries (#53230)
* feat(Data Connections): remove the Recorded Queries tab

* chore: remove the Recorded Queries from the nav
2022-08-04 06:39:06 +00:00
Drew Slobodnjak
fe0f193189
Geomap: Add measuring tools (#51608)
* Geomap: add measuring tools

* Add measure type selection

* Add controls and state to measure overlay

* Override tooltip mouse events when menu active

* Move measure tools to top right

* Lay groundwork for units and consolidate measuring

* Create measure vector layer class

* Improve styling to match other overlay controls

* Consolidate styling and use theme2

* Update unit language and add km2

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-03 16:19:30 -07:00
Adela Almasan
6c58ea66a9
Canvas: Fix inconsistent border behavior (#53262) 2022-08-03 16:23:08 -05:00
Adela Almasan
d54e55ea9a
Canvas: Fix duplicated option editors functionality (#53184)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-03 12:49:35 -07:00
Beto Muniz
4c02d072e3
Ensure that tooltip and legend have same parameters to calculate and display label equally (#53176) 2022-08-03 14:47:22 -03:00
gtk-grafana
f8d6730134
Metrics: Refactor use of lezer nodes to reference ID instead of name (parsing.ts) (#53177)
* Update public/app/plugins/datasource/prometheus/querybuilder/shared/parsingUtils.ts

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

* Since loki is still passing in node type strings, update the getAllByType shared function to allow string or number types

* add todo to remove string type when last datasource has migrated

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-03 09:57:29 -05:00
gtk-grafana
7f165729b0
remove string constant and use ids provided in lezer-promql library (#53180) 2022-08-03 09:56:32 -05:00
Sofia Papagiannaki
5fec6cc4f5
API: Fix snapshot responses (#52998)
* API: Fix response status when snapshots are not found

* API: Fix response status when snapshot key is empty

* Apply suggestions from code review
2022-08-03 10:31:23 -04:00
Matias Chomicki
97ce40577b
Loki: Fix types in querybuilder state test (#53223)
* Chore: add missing refId property to LokiQuery type

* Chore: fix types in Loki querybuilder state test

* Chore: remove unnecessary added property to LokiQuery
2022-08-03 15:59:33 +02:00
Ivana Huckova
3877964470
Loki: Remove some of any assertions from tests (#53114)
* Loki: Remove some of any assertions from tests

* Remove unnecessary as assertions
2022-08-03 15:57:38 +02:00
Grafana I18n Bot
1c1f72b1aa
I18n: Crowdin sync (#53222)
* New translations messages.po (French)

* New translations messages.po (French)
2022-08-03 09:49:53 -04:00
ismail simsek
87af08129c
Prometheus: Add tests for new explain section (#53182)
* Prometheus: Add tests for new explain section

* Update public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryBuilder.test.tsx

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

* Mock MonacoQueryFieldWrapper

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-03 15:48:16 +02:00
Jack Westbrook
d87bf30e9e
Build: Introduce ESM and Treeshaking to NPM package builds (#51517)
* Revert "Chore: Bump terser to fix security vulnerability (#53052)"

This reverts commit 7ae74d2a18.

* feat: use tsc and rollup directly with esbuild and publishConfig, files props

* refactor(grafana-data): fix isolatedModules re-export type error

* refactor(grafana-data): import paths from src not package name

* refactor(rollup): fix dts output.file

* chore(grafana-schema): delete dashboard_experimental.gen.ts - cannot work with isolatedModules

* refactor(grafana-e2e-selectors): fix export types isolatedModules error

* refactor(grafana-runtime): fix isolatedModules re-export type error

* refactor(grafana-ui): fix isolatedModules re-export type error

* feat(grafana-ui): use named imports for treeshaking

* refactor(grafana-ui): use named imports for treeshaking

* feat: react and react-dom as peerDeps for packages

* feat(grafana-ui): emotion packages as peerDeps

* feat(grafana-e2e): use tsc, rollup, esbuild for bundling

* chore(packages): clean up redundant dependencies

* chore(toolkit): deprecate unused package:build task

* chore(schema): put back dashboard_experimental and exclude to prevent isolatedModules error

* docs(packages): update readme

* chore(storybook): disable isolatedModules for builds

* chore: relax peerDeps for emotion and react

* revert(grafana-ui): put @emotion dependencies back

* refactor: replace relative package imports with package name

* build(packages): set emitDeclaration false for typecheck scripts to work

* test(publicdashboarddatasource): move test next to implementation. try to appease the betterer gods

* chore(storybook): override ts-node config for storybook compilation

* refactor(grafana-data): use ternary so babel doesnt complain about expecting flow types

* chore(toolkit): prefer files and publishConfig package.json props over copying

* build(npm): remove --contents dist arg from publishing commands

* chore(packages): introduce sideEffects prop to package.json to hint package can be treeshaken

* chore(packages): remove redundant index.js files

* feat(packages): set publishConfig.access to public

* feat(packages): use yarn berry and npm for packaging and publishing

* refactor(packages): simplify rollup configs

* chore(schema): add comment explaining need to exclude dashboard_experimental

* revert(toolkit): put back clean to prevent cli failures

* ci(packages): run packages:pack before a canary publish

* chore(gitignore): add npm-artifacts directory to ignore list

* test(publicdashboarddatasource): fix module mocking

* chore(packages): delete package.tgz when running clean

* chore(grafana-data): move dependencies from devDeps to prevent build resolution errors
2022-08-03 15:47:09 +02:00
Giordano Ricci
09c4dbdb9f
Correlations: Add UpdateCorrelation HTTP API (#52444)
* Correlations: add UpdateCorrelation HTTP API

* handle correlation not found

* add tests

* fix lint errors

* add bad request to API spec

* change casing

* fix casing in docs

* fix tests

* update spec
2022-08-03 14:18:51 +01:00
Artur Wierzbicki
f61a97a0ab
Search: rename remove search constraints (#53190) 2022-08-03 16:44:51 +04:00
Mihály Gyöngyösi
dc775c7577
RolePicker: Fix RolePicker menu positioning (#53201)
Fixes #52800
2022-08-03 14:35:51 +02:00
Josh Hunt
c7d3fec515
Typed variables pt3: Type VariableState with TypedVariableModel (#53015)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* undo whatever changes i did to swagger spec
2022-08-03 12:38:59 +01:00
Josh Hunt
8f81c4d2ce
Chore: reformat swagger specs, again (#53205) 2022-08-03 12:18:52 +01:00
Andrey Smirnov
fc9577b76d
MegaMenu: Fix broken hamburger toggle (#52770)
* MegaMenu: Fix broken hamburger toggle

* oops

* MegaMenu: move NavBarToggle to FocusScope
2022-08-03 12:08:39 +01:00
Matias Chomicki
7cf2b68e0a
Loki: Remove hardcoded values for LokiOperationId (#53168) 2022-08-03 12:50:43 +02:00
Josh Hunt
805203dba9
Chore: Prettier ignore api-merged & api-spec swagger api specs (#53170)
* Prettier ignore api-merged & api-spec swagger api specs

* add enterprise
2022-08-03 11:41:31 +01:00
user10x
fb00a11b5f
rename table_model.ts => TableModel.ts (#51659)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-03 10:33:13 +00:00
J-Loup
2054414d37
Frontend: Make datalinks work with status history and state timeline (#50226)
* fix datalinks for state and status panels

* Add close button on tooltip

* fix links from all series displayed in tooltip

* Allow annotations creation, tweak UI

* Nits

* Remove unused property

* fix returns made from review

* setupUPlotConfig renamed to addTooltipSupport

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
2022-08-03 11:58:01 +03:00
Harry Tennent
c56aae6f63
Docs: update annotations API docs to include required field (#52644)
* Update annotations.md

A minor change to include the required fields when creating a new annotation via the annotations API. The error message when fields are missing is not descriptive and there is no indication in the current documentation (that I can see anyway) that would indicate these fields are required.

* Update annotations.md

Update required json body fields to only include fields that are actually required.

* Add required field in Swagger

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-08-03 08:01:25 +00:00
ismail simsek
920ee16b54
Update LokiQueryCodeEditor test title (#53181)
* Update LokiQueryCodeEditor test title

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryCodeEditor.test.tsx
2022-08-03 09:59:02 +02:00
Gilles De Mey
b7e11358cf
Alerting: Fix crash when viewing alert group without interval (#53166) 2022-08-03 08:22:52 +02:00
Scott Lepper
fe7add0bc6
ref experimental query editor (#53061)
* ref experimental query editor
2022-08-02 11:44:06 -04:00
Ivana Huckova
5009c330ca
Loki: Add tests for explain section in builder and code editor (#53113)
* Loki: Add tests for new explain section

* Update any assertions
2022-08-02 17:20:22 +02:00
idafurjes
fab6c38c95
Chore: Split get user by ID (#52442)
* Remove user from preferences, stars, orguser, team member

* Fix lint

* Add Delete user from org and dashboard acl

* Delete user from user auth

* Add DeleteUser to quota

* Add test files and adjust user auth store

* Rename package in wire for user auth

* Import Quota Service interface in other services

* do the same in tests

* fix lint tests

* Fix tests

* Add some tests

* Rename InsertUser and DeleteUser to InsertOrgUser and DeleteOrgUser

* Rename DeleteUser to DeleteByUser in quota

* changing a method name in few additional places

* Fix in other places

* Fix lint

* Fix tests

* Chore: Split Delete User method

* Add fakes for userauth

* Add mock for access control Delete User permossion, use interface

* Use interface for ream guardian

* Add simple fake for dashboard acl

* Add go routines, clean up, use interfaces

* fix lint

* Update pkg/services/user/userimpl/user_test.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/services/user/userimpl/user_test.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/services/user/userimpl/user_test.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Split get user by ID

* Use new method in api

* Add tests

* Aplly emthod in auth info service

* Fix lint and some tests

* Fix get user by ID

* Fix lint
Remove unused fakes

* Use split get user id in admin users

* Use GetbyID in cli commands

* Clean up after merge

* Remove commented out code

* Clena up imports

* add back )

* Fix wire generation for runner after merge with main

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-08-02 16:58:05 +02:00
Andres Martinez Gotor
43955bdebd
Azure Monitor: Early error if the client secret is not set (#53106) 2022-08-02 16:53:05 +02:00