Commit Graph

12834 Commits

Author SHA1 Message Date
Marcus Andersson
69201bbf8c
Plugins: moving the DataSourcePicker to grafana/runtime so it can be reused in plugins (#31628)
* moved the datasource picker to grafana-runtime.

* fixed imports.

* added e2e selectors as an external package.

* adding react as external package.

* exposing dependent types for DataSourcePicker.

* added docs for ui components.

* moving component to components.
2021-03-18 10:44:26 +01:00
Denis Hilt
8fafe95728
DashNav: Pass typed event through the DashNav button onClick handler (#32084)
* Pass typed event thorough the DashNav button onClick handler

Event.stopPropagation() method needs to be called in some cases. This change addresses typescript error Type '(event: ...) => void' is not assignable to type '() => void'.

* Pass typed event thorough the DashNav button onClick handler

* Import MouseEvent from React
2021-03-18 08:23:58 +01:00
Ryan McKinley
5bb1b1602d
Live: use StreamingDataSource for live measurments (#31713) 2021-03-17 21:46:56 -07:00
Torkel Ödegaard
e935e4979f
TimePicker: Fixes hidden time picker shown in kiosk TV mode (#32062)
* TimePicker: Fixes hidden time picker shown in kiosk TV mode

* Use kioskmode passed via props

* Update snaps

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-03-17 18:03:05 +01:00
Gábor Farkas
8285a34f4c
influxdb: raw-influxql editor: fix state-management bug (#32035)
* influxdb: raw-influxql editor: state-management bug fixed

* influxdb: simplified code
2021-03-17 16:32:40 +01:00
Marcus Andersson
93f17bd2b3
Graphite: Support request cancellation properly (Uses new backendSrv.fetch Observable request API) (#31928)
* changed so we use fetch.

* moved tests to be at the same level as the datasource.

* fixing tests after migrating to fetch.

* removed unused dep.

* refactorings according to feedback.

* adding missing typing.
2021-03-16 18:21:38 +01:00
Joan López de la Franca Beltran
610999cfa2
Auth: Allow soft token revocation (#31601)
* Add revoked_at field to user auth token to allow soft revokes

* Allow soft token revocations

* Update token revocations and tests

* Return error info on revokedTokenErr

* Override session cookie only when no revokedErr nor API request

* Display modal on revoked token error

* Feedback: Refactor TokenRevokedModal to FC

* Add GetUserRevokedTokens into UserTokenService

* Backendsrv: adds tests and refactors soft token path

* Apply feedback

* Write redirect cookie on token revoked error

* Update TokenRevokedModal style

* Return meaningful error info

* Some UI changes

* Update backend_srv tests

* Minor style fix on backend_srv tests

* Replace deprecated method usage to publish events

* Fix backend_srv tests

* Apply suggestions from code review

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Minor style fix after PR suggestion commit

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Prettier fixes

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-03-16 17:44:02 +01:00
Dominik Prokop
48eb747da0
Routing NG: Fix persistent modal after dashboard delete (#32033) 2021-03-16 17:10:47 +01:00
Dominik Prokop
e967ad9ca9
Routing NG: Fix time range zoom not working when refresh enabled (#32023)
* Fix time range zoom not working when refresh enabled

* Review update
2021-03-16 14:25:40 +01:00
Zoltán Bedi
bb8a703428
Exemplars: always query exemplars (#31673)
* Exemplars: always query exemplars

* Update exemplar button to be an eye

* Add tooltip to eye button
2021-03-16 13:58:51 +01:00
Piotr Jamróz
6495a73ebd
Graphite: fix autocomplete when tags are not available (#31680)
* Return empty list of tags when tags are not available

In some configurations graphite-web fail to return the list of tags. It shouldn't however prevent displaying list of metrics (which is concatenated with tags).

* Populate jsonData with default version of Graphite

The version of Graphite is preselected in the dropdown but was not saved in jsonData initially.

* Fix a typo

* Show a popup with an error message

* Always use the latest Graphite value as the default one when creating a datasource

* Move autocomplete error handling to GraphiteQueryCtrl

* Test error handing in Graphite autocomplete

* Test default Graphite version fallback

* Rename graphite_versions.ts to versions.ts

* Remove redundant import

* Code formatting, minor renaming

* Remove redundant error info
2021-03-16 10:59:53 +01:00
Gábor Farkas
cbaf700d64
influxdb: switch the raw influxql editor from angular to react (#31860)
* influxdb: switch the raw influxql editor from angular to react

* influxdb: raw-influxql: better callback-naming

* influxdb: raw-influxql: use custom hook

* influxdb: flux: raw-editor: add unit tests
2021-03-16 10:47:33 +01:00
Zoltán Bedi
fe763d7d92
Chore: Jaeger ds to use new fetch api (#31969) 2021-03-16 09:39:35 +01:00
Dominik Prokop
0d92425bb8
RoutingNG: Fix infinite loop caused by history state not being cleaned up (#31952)
* Fix infinite loop caused by history state not being cleaned up

* Ude forceRouteReload counter instead of bool flag

* Review fix
2021-03-16 09:27:32 +01:00
Ryan McKinley
7552711660
Streaming: use StreamingDataFrame for testdata client streaming example (#31998) 2021-03-15 12:16:40 -07:00
Komalis
50e5342379
InfluxDB: Support region annotations (#31526) 2021-03-15 17:29:11 +01:00
Hugo Häggmark
bc60ce9cce
Variables: Fixes filtering in picker with null items (#31979)
* Variables: Fixes filtering in picker with null items

* Chore: some cleanup
2021-03-15 15:45:32 +01:00
Piotr Jamróz
f97384c2f9
Replace AppEvents with notifyApp in Explore (#31864)
* Replace AppEvents with notifyApp in Explore

* Replace AppEvents with notifyApp in Explore-related components
2021-03-15 15:11:52 +01:00
Ivana Huckova
240e65f693
Loki: Fix autocomplete when re-editing Loki label values (#31828)
* Allow re-editing of labels in Loki queries

* Update public/app/plugins/datasource/loki/language_provider.ts
2021-03-15 14:11:43 +01:00
Josh Hunt
2fb92789e7
Query editor: avoid avoiding word wrap on query editor components (#31949) 2021-03-15 10:15:14 +00:00
Peter Holmberg
9ffd88b103
AlertingNG: Refactor the query preview component (#31281)
* refactor to purecomponent

* use subscription in component

* correct onRunQueries

* move more things from render function

* fix issue with no queries

* pr feedback

* revert to FC

* redo some code layout, simplify if

* minor fixes after review
2021-03-15 10:17:21 +01:00
Hugo Häggmark
31ab1a4afe
Variables: Ensures all variable values are strings (#31942)
* Variables: Ensures all variable values are strings

* Chore: remove redundant typings

* Chore: fixes tests
2021-03-15 08:52:44 +01:00
Hugo Häggmark
66177e9463
PanelInspect: Interpolates variables in CSV file name (#31936)
* PanelInspect: Variables in CSV file name are interpolated

* Chore: fixes failing test
2021-03-15 08:44:13 +01:00
Ivana Huckova
91dde5c980
Loki: Fix type errors in language_provider (#31902)
* Add initial stat for logLabelOptions

* Refactor, update, remove

* Simplify
2021-03-12 15:21:30 +01:00
Alex Khomenko
8404d54277
Variables: Do not reset description on variable type change (#31933) 2021-03-12 13:49:19 +02:00
Piotr Jamróz
d0fa7b81f0
Prevent submitting the datasource form in Loki's datasource configuration page (#31823) 2021-03-12 09:25:41 +01:00
Torkel Ödegaard
82e9d59121
GraphContextMenu: Fixes add annotation action & data links that cause full page reload (#31915)
* GraphContextMenu: Fixes add annotation action

* Fixed issue with data links causing full page reload

* A better solution to closing context menu
2021-03-12 07:25:14 +01:00
Gábor Farkas
3139a60012
influxdb: flux-editor: fix html.onchange bug with angular, improve types (#31765)
* influxdb: flux-editor: fix html.onchange bug with angular, improve types

* influx: flux: simplified bug-fix
2021-03-11 17:24:48 +01:00
Chris Cowan
ee547b4410
Elasticseach: Support histogram fields (#29079) 2021-03-11 17:09:28 +01:00
kay delaney
48d2dff987
Migration/AlertList: Migrates AlertList from AngularJS to React (#31872)
* Migration/AlertList: Migrates AlertList from AngularJS to React
2021-03-11 14:53:13 +00:00
Uchechukwu Obasi
f51653647d
Menu: refactor MenuItem and MenuGroup to be standalone component (#31639)
* Menu: refactor MenuItem and MenuGroup to be standalone component

* fixes small nits

* Chore: Refactored other components to correspond with the new Menu system (#31676)

* fixes affected components using Menu

* fixes affected components using Menu components

* fixes frontend test- I hope

* fixes frontend docs test- I hope

* fixes frontend docs test- I hope

* fixes frontend docs test- I hope

* fixes frontend docs test- I hope

* fixes frontend docs test- I hope

* added support for accessibility

* fixes frontend test- I hope

* Improve storybook story and simplify ButtonSelect

* Fixed broken graph context menu

* fixes frontend test- I hope

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-03-11 15:35:17 +01:00
Dominik Prokop
77a024abb3
Add deprecation warnigns to $location patch (#31898) 2021-03-11 15:05:35 +01:00
Josh Hunt
13a47aede2
AzureMonitor: Migrate Metrics query editor to React (#30783)
* AzureMonitor: Remove anys from datasource to get the inferred type

* AzureMonitor: Cast some datasource types

TODO: we want proper types for these

* AzureMonitor: Initial react Metrics editor components

* start dimension fields

* replace replaceTemplateVariable with datasource.replace, and rename onQueryChange to onChange

* actually just do template variable replacement in the datasource

* don't use azureMonitorIsConfigured

* Refactors, mainly around the metric metadata

 - Convert all the metric metadata options for the Select before its set into state
 - Stop using SelectableValue because it's basically any when all the properties are optional
 - the onChange function passed to the fields now just accepts the direct value, rather than wrapped in a SelectableValue

* added proper fields, and adding and removing for DimensionFields

* Update query with Dimension changes

* Width

* subscription and query type fields

* Should be feature complete now, more or less

* fix missing import

* fix lint issues

* set default subscription ID

* Starting to write some tests

* tests for query editor

* Remove subscription ID from the label in Metrics

But we keep it there for the angular stuff

* MetricsQueryEditor tests

* Update index.test.tsx

* fix tests

* add template variables to dropdowns

* clean up

* update tests

* Reorganise react components

* Group query fields into rows

* Rename Option type, add Azure response type

* Refactor Metrics metric metadata

 - Types the Azure API
 - Moves default metadata values into datasource

* nit

* update test
2021-03-11 11:37:39 +00:00
Hugo Häggmark
9f92eb6859
AnnotationList: Adds spacing to UI (#31888)
* AnnotationList: Adds spacing to UI

* Tests: updates snapshots

* Chore: updates after PR comments
2021-03-11 11:59:35 +01:00
Torkel Ödegaard
0179d23af0
DataQueryRequest: Remove unused props (#31876) 2021-03-11 10:39:41 +01:00
Piotr Jamróz
31cc36dbb0
Loki: Remove $__rate_interval from LogQL autocomplete (#31825)
* Remove $__rate_interval from LogQL autocomplete

* Remove unused const
2021-03-11 09:26:15 +01:00
Oscar Kilhed
e7757b0175
Add datalinks support to PieChart v2 (#31642)
* Remove default value for multiSelect

* Add data links support for PieChart v2

* Temporarily fix story

* Refactor PieSlice, deduplicate colors

* Add field config to context menu of pie chart

* Add custom key to legend

This is a bit hacky. When there are multiple DisplayValues with the same
title the react keys collide and LegendListItems are not cleared
correctly.

* Forgot to add the interface

* Fix missing tooltip in edit mode
2021-03-10 23:02:04 +01:00
Dominik Prokop
a55a272276
Routing NG: Replace Angular routing with react-router (#31463)
* Add router packages

* Get react app root work instead of Angular one

* Logger util

* Patch Angular routing ($routeProvider, $routeParamsProvider)

* Use react-router-dom history instead of separate dependency

* Add test routes

* Sidemenu - use Link instead of anchors

* Patch Angular $location service (stub)

* WIP: geting rid of $location provider from TimeSrv

* Intercept anchor clicks to use history under the hood

* Sync Redux location slice with history state

* Make login/logout work

* Debug routes for testing

* Make force login work

* Make sure query param change does not recreate page components

* Hide side menu in specified locations

* Make the dashboar route query parameters work, make panel edit menu work

* Enable more routes

* Fix side menu

* Handle view modes

* Disable playlist routes

* Make SafeDynamicImport work again

* Bring back router-debug

* Separate redux location sync from route rendering

* Refactor updateLocation to thunk and move force refresh(login) to it

* Fixing init dashboard issue

* Support switching between dashboards without an unmount of DashboardPage

* More fixes for init dashboard and panel edit

* More type fixes

* Moving angular location wrapper out of main LocationService, and fixing typescript issues

* Fixed last typescript errors

* LocationService: Move to runtime and  remove getLocationService and export singleston const instead (#31523)

* Moving location service implementation to runtime and removing get function and making it a package const singleton

* Added test that used locationService directly

* removed unused import

* AngularApp: Moving angular dependencies and the app boot out of the main app into it's own file  (#31525)

* Fixes angular panels by calling the monkey patch

* Moving angular stuff to to it's own files

* udpated

* Fixing clicking on divs and spans inside anchor

* Moving app notifications out of angular app and removing angular directive wrapper

* Moving search from angular to react and removing angular search wrapper

* Clean up, tried to remove the redux location wrapper but requires a big update for DashboardPage, so adding it back

* Moving AppWrapper to root to limit circular dependencies (app/core -> app/routing and back)

* Open and close search now works

* Hide sidemenu when in kiosk mode

* Restoring some keybindings like ESC key

* Removed kiosk events and simplified it, just handled through updating URL

* Fixing typescript errors

* Simplified GrafanaRouteComponentProps and renamed to ContainerProps

* renamed back

* Changed AlertRuleList to use GrafanaRouteComponentProps and location.search passed to it

* Removing the reloadOnSearch property, this is not needed now for react as react by default does not unmount components when only url match or query parmas change

* SafeDynamicImport causing unmount un every search update, not sure how to fix yet

* Fix signature for SafeDynamicImport so we do not create new route components on every route render

* Removing the redux location wrapper as it was causing errors, and making dashboard page work with RouteProps (location, match) etc

* Updating DashboardPage and SoloPanelPage to use match params and history location

* Fixed DashboardPage tests

* Fixing solo route tests

* LocationService: Rename getCurrentLocation to just getLocation

* do not intercept link clicks with target blank or self

* Experimental useUrlParams hook

* Update DataSourceSettingsPage to use router match params

* fix links with urls that have no starting / to work like before

* Fix forceLogin

* Add queryParams to GrafanaRouteComponentProps

* PanelEditor get rid of updateLocation and location state

* Improve grafana route query params typing

* Add getSearchObject to LocationService

* Use DashboardPAge queryParams instead of location.search parsing

* Fix DashboardPage typing

* Fix some tests weirdness

* Bring back KeyboardSrv

* Fixes typescript issues

* Team pages now use router match params

* Get rid of  from GrafanaRouteComponent props

* Removed unnessary calls to getSearchObject when calling locationService.partial

* Updated DashboardPage tests after queryParams was added

* Fixing dashboard settings back

* GrafanaRoute: Adding tests and remove use of global locationService

* Fixing tests and typescript errors

* Bring back kiosk modes and add tests

* Fix TimeSrv tests

* Fix typecheck errors

* Fixing tests

* Updated SideMenu test to react-testing and wrapped component in Router, and fixed issue importing createMemoryHistory

* Get rid of routeChange event from TimeSrv from

* Fixed TopSectionItem test

* Trying to make basename work but failing

* Update TopSectionItem snapshot

* Fix TopSectionItem snapshot test

* Fix API keys creation

* Remove Angular dependencies from KeybindingSrv (#31617)

* Remove Angular dependency from KeybindingsSrv

* Fix tests and typecheck issues

* basename is starting to work

* Make dashboard save work

* KeybindingSrv: Remove as angular service and no usage angular scope

* So long bridge_srv, we won't miss you

* Update snapshots

* Dashboard: Refactoring ChangeTracker to use History api and no angular (#31653)

* Dashboard: Refactoring ChangeTracker to use History api and no angular

* Updated

* Removed logging

* fixed unit tests

* updated snapshots

* Mechanism for force reloading routes (#31683)

* e2e: Fixes various things in e2e scenarios after router migration (#31685)

* Explore: Update reading query params from router props and updating location via locationService (ReactRouter)  (#31688)

* RoutingNG: Initial explore redux location to router location migration

* Updated explore Wrapper tests

* Fixing more tests

* remove loggin

* rename back to make naming consistent

* Fixing return to dashboard button

* fixing navigation to explore from dashboard

* updated routeProps

* Updated tests

* Make DashboardListPage work

* Fixing navigation after add new data source, and fixes explore e2e

* Fixing solo panel page

* PluginsPage now works

* RoutingNG: When parsing and rendering url search/query params preseve old logic of handling booleans and arrays (#31725)

* RoutingNG: When parsing and rendering url search/query params preserve old logic of handling booleans and arrays

* Fixed test

* Make snapshots list work

* fixed alert notification channel edit page

* Simplify LocationService, did not need special handling for login or forceLogin as target _self on link already handles that

* fixed UserAdminPage

* fixed edit orgs page

* Fixing LdapPage

* fixing dashboard import

* Fixed new folder page

* Fixed data source dashboards page

* fixing Folder permissions and folder settings page

* fixing snapshot list page nav model

* remove unused file

* Added placeholder page for playlist

* Moved browser compatability to index-template

* Restored 404/default page

* Fixed reset password page

* Fixed SignUpInvited page

* Fixing CreateTeam, Create user page, add panel widget

* Restore browwser file to make tests happy

* Fixed unit tests

* Removed unused import

* Replacing usage of updateLocation

* Fixed test

* Updating search filters to use history / location service for filters

* remove unused file

* AppRootPage fixed

* Fixing test and search issue

* Changes to support enterprise extensions

* remove console.log

* Removing more use of redux location

* Fixed signup page

* removed unused old angular controllers

* Fixing bugs

* one final bugfix

* Removed location from redux state

* Fixing ts issues and tests

* Fixing test issue

* fixing tests

* Fixing tests

* removed unused stuff

* Fixed search test

* Adding some doc comments

* Routing NG: Angular location provider patch (#31773)

* Patch Angulars $location provider

* Update public/app/angular/bridgeReactAngularRouting.ts

* Remove only test

* Update tests, disable loggers in test env

* Routing NG: remove $location provider usage (#31816)

* Remove dashboard_loaders

* Remove $location from Analytics service, track page views form GrafanaRoute

* Remove NotificationsEditCtrl

* Remove Angular dependencies from uploadDashboardDirective

* Update public/app/features/dashboard/containers/DashboardPage.tsx

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

* Update public/app/features/dashboard/containers/DashboardPage.tsx

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

* Remove unused test helpers (#31831)

* Playlist react (#31829)

* playlist list in react

* Playlist start

* Things started to work

* Updated

* Handle empty list

* Fix ts

* Fixes and kiosk mode stuff

* Removed unused events

* fixing ts issue

* Another ts issue

* Fixing tests

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* fixed test

* Update public/app/AppWrapper.tsx

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

* Update public/app/AppWrapper.tsx

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

* Remove Angular dependency from DashboardLoaderSrv (#31863)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-03-10 18:03:36 +01:00
Andrej Ocenas
def58f1f4a
Zipkin: Use new trace data format (#31830)
* Use new trace api for zipkin

* Fix datasource tests
2021-03-10 17:45:03 +01:00
Erik Sundell
f135d75a22
CloudWatch: Consume the grafana/aws-sdk (#31807)
* consume the grafana/aws-sdk

* upgrade aws-sdk
2021-03-10 14:19:39 +01:00
Alex Khomenko
598a44076a
Remove invalid attribute (#31848) 2021-03-10 10:24:14 +02:00
kay delaney
06a6fb405c
Library Panels: Add "Discard" button to panel save modal (#31647)
* Library Panels: Add "Discard" button to panel save modal
2021-03-09 17:05:38 +00:00
Ivana Huckova
53ba6456d4
Loki, Prometheus: Change the placement for query type explanation (#31784)
* Fix tooltip in the way

* Add more info for instant query

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

* Update public/app/plugins/datasource/prometheus/components/PromExploreExtraField.tsx
2021-03-09 14:17:04 +01:00
kay delaney
3d459b556a
Panel/PluginList: Migrate to React (#31738)
* Panel/PluginList: Migrate to React
2021-03-09 12:22:59 +00:00
Hugo Häggmark
63746d027b
Variables: Improves inspection performance and unknown filtering (#31811)
* Refactor: moves inspect calculation to Redux

* Refactor: adds valid filters and tests
2021-03-09 12:49:05 +01:00
Giordano Ricci
7e0b1f2619
Templating: use dashboard timerange when variables are set to refresh 'On Dashboard Load' (#31721)
* Templating: use dashboard timerange when variables are set to load 'On Dashboard Load'

* Add test
2021-03-09 09:20:21 +00:00
Oscar Kilhed
f951672e90
Change piechart plugin state to beta (#31797) 2021-03-09 09:19:45 +01:00
Ivana Huckova
445132a904
Fix escaping in ANSI and dynamic button removal (#31731) 2021-03-08 12:24:44 +01:00
Alex Khomenko
ab2f405205
Search: Make items more compact (#31734) 2021-03-06 10:51:09 +02:00
Caleb Collins-Parks
0b6b8de6f8
loki_datasource: add documentation to label_format and line_format (#31710)
* add documentation to label_format and line_format

* fix linting

* Remove extra space
2021-03-05 23:27:14 +01:00
Ryan McKinley
a61e636bcd
DataFrameJSON: introduce a json format that supports same semantics as arrow (#31010) 2021-03-05 12:24:43 -08:00
Zoltán Bedi
29c998f9eb
Tempo: Convert tempo to backend data source2
This reverts commit c15d1f498a.
2021-03-05 14:28:17 +01:00
Giordano Ricci
64a8514e47
Elasticsearch: Fix script fields in query editor (#31681)
* Elasticsearch: Fix script fields in query editor

* properly name bucke_script deries
2021-03-05 12:48:45 +00:00
Dominik Prokop
fdc6f2cc6f
DataLinks: Bring back single click links for Stat, Gauge and BarGauge panel (#31692)
* Bring back clickable Stat, Gauge and BarGauge panels

* Demo dashboard

* Add DataLinksContextMenu tests

* Only use new UI for data links, revert panel links logic
2021-03-05 10:29:19 +01:00
Giordano Ricci
bbee7da3e0
Elasticsearch: revert to isoWeek when resolving weekly indices (#31709)
* Elasticsearch: revert to isoWeek when resolving weekly indices

* Add type assertion explainer
2021-03-05 09:28:46 +00:00
Leon Sorokin
c64c0b0725
BarChart: fix single numeric field regression (#31703) 2021-03-04 14:27:14 -06:00
Zoltán Bedi
c15d1f498a
Revert "Tempo: convert to backend data source (#31618)" (#31702)
This reverts commit 862f09376f.
2021-03-04 21:20:26 +01:00
Zoltán Bedi
862f09376f
Tempo: convert to backend data source (#31618)
* Tempo: Support opentelemetry response

* Tempo: convert Tempo to backend data source

* Update data source test

* Fix lint issues

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Return error when trace not found

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-04 18:23:02 +01:00
kay delaney
0b4305c2c3
Library Panels: Choosing library panel now updates plugin type (#31643)
* Library Panels: Choosing library panel now updates plugin type
2021-03-04 13:17:57 +00:00
Hugo Häggmark
e87d48921e
Admin: Keeps expired api keys visible in table after delete (#31636)
* Admin: Keeps expired keys visible in table after delete

* Chore: covers component in tests before refactor

* Refactor: splitting up into smaller components

* Chore: fixes a small issue with the validation

* Chore: forgot to export type
2021-03-04 13:20:38 +01:00
Josh Hunt
d566d2e164
AzureMonitor: Add deprecation message for App Insights/Insights Analytics (#30633)
* AzureMonitor: Add deprecation message for Application Insights/Insights Analytics

relates to #30184

(also some prettier changes came along for the ride)

* reorder query type options

* Rearrange documenation, move Logs up

* Fix Logs heading

* deprecation documentation

* finish up docs

* update link

* Apply doc suggestions from code review

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/azuremonitor.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* clean up docs

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-03-04 09:46:44 +01:00
Torkel Ödegaard
4c5321bd99
Color: Fixes issue where colors where reset to gray when switch panels (#31611) 2021-03-04 08:04:45 +01:00
Alexander Emelin
8016b3c5ca
Live: Use pure WebSocket transport (#31630) 2021-03-04 09:06:42 +03:00
Ivana Huckova
4c2e5fcbd0
Explore/Logs: Escaping of incorrectly escaped log lines (#31352)
* POC: Escaping of incorrectly escaped log lines

* Remove unused import

* Fix test, change copy

* Make escapedNewlines optional

* Fix typechecks

* Remove loading state from the escaping button

* Update namings
2021-03-03 18:32:27 +01:00
kay delaney
9e0d84f1cf
Library Panels: Change unsaved change detection logic (#31477)
* Library Panels: Change unsaved change detection logic
Change logic from diffing panel models to setting dirty flag
2021-03-03 14:16:54 +00:00
Alex Khomenko
e21b2748f6
DashList: Sort starred and searched dashboard alphabetically (#31605) 2021-03-03 08:59:01 +02:00
David
091e3cf4f8
Loki: Label browser (#30351)
* Loki: Label browser

- replaces stream cascader widget which made it hard to find relevant streams
- multi-step selection allows for selecting a couple of labels first, then find the relevant values
- supports facetting which makes impossible label combinations hard to choose

* Remove unused label hook

* Remove unused label styles

* Use global time range for metadata requests

* Preselect labels if not many exist

* Status and error messages

* Status fixes

* Remove unused import

* Added logs rate button

* Close popup when clicked outside (not working for timepicker :( )

* Change button label

* Get rid of popup and render browser inline

* Review feedback

* Wrap label values and prevent empty lists

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-03-02 16:58:14 +01:00
Hugo Häggmark
d306f417d3
LibraryPanels: No save modal when user is on same dashboard (#31606) 2021-03-02 15:37:36 +00:00
Ivana Huckova
d5fee5a3f5
Loki: Add support for alerting (#31424)
* Create Loki backend template

* Update endpoint

* Adjust step

* Add test

* Change to use Loki client

* Address feedback, improve errors and comments

* Linting

* Update pkg/tsdb/loki/loki.go

* Update pkg/tsdb/loki/loki.go

* Update pkg/tsdb/loki/loki.go
2021-03-02 14:55:16 +01:00
Andrej Ocenas
c113d3ce72
Tracing: Specify type of the data frame that is expected for TraceView (#31465)
* Use dataframe API for jeager

* Move types around

* Fix imports

* Simplify the data frame type

* Add comment

* Move the transform to separate file

* Fix logs timestamp

* Add/update tests for trace view

* Fix lint

* Add test to compare old and new format rendering

* Fix test imports

* Update data source tests
2021-03-02 13:59:35 +01:00
Hugo Häggmark
d84cfdbb0f
LibraryPanels: Adds version column (#31590)
* Refactor: adds version column and fixes tests

* Chore: adds version check when patching the library panel

* Refactor: adds support for version in FrontEnd
2021-03-02 13:33:26 +01:00
Oscar Kilhed
b36314d03f
PieChart: Add color changing options to pie chart (#31588)
* Allow changing of series color for PieChart

* Use useTheme hook

* Remove duplicate import
2021-03-02 13:18:03 +01:00
Gábor Farkas
6a07a0fe93
Explore: keep enabled/disabled state in angular based QueryEditors correctly (#31558)
* Explore: handle query.hide changes in angular-based query editors

* simplify code, no need for custom "this"
2021-03-02 12:36:18 +01:00
Giordano Ricci
3cf0103782
Elasticsearch: Fix impossibility to perform non-logs queries after importing queries from loki or prometheus in explore (#31518)
* Chore: remove isLogsQuery flag from ES datasource

* Minore chores

* Update public/app/plugins/datasource/elasticsearch/datasource.ts

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-03-02 09:10:41 +00:00
Hugo Häggmark
a2fe6ef92c
TestData: Fixes never ending annotations scenario (#31573) 2021-03-02 09:06:09 +01:00
Ivana Huckova
bb6488338b
Loki: Refactor line limit to use grafana/ui component (#31509)
* Refactor line limit to use grafana/ui component

* preprocess lines reefactor

* Revert "preprocess lines reefactor"

This reverts commit 9e9c034269.
2021-03-01 16:08:53 +01:00
Torkel Ödegaard
fcac61203e
PieChart: Update text color and minor changes (#31546) 2021-03-01 14:08:48 +01:00
Oscar Kilhed
10def28989
PieChart: Improve piechart legend and options (#31446)
* Add percent of total to piechart legend

* Remove defaults

* Add label selector

* Fix multiselect option ui

* Add percent of total to piechart legend

* Add label selector

* add multiselect options ui

* change how pie chart labels are displayed

* Fixed right aligned values in legend

* added titles to display values so they show in table mode

* Move legend display value options to below other options

* Add addMultiSelect method to ui builder

* Use addMultiSelect on builder

* Use multiselect for the legend columns and update the panel test dashboard

* Remove explicit typing on addMultiselect and remove non existing properties from piechart story

* Add release tag

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-03-01 11:18:24 +01:00
Torkel Ödegaard
e9d2592481
Variables: Fixes error with: cannot read property length of undefined (#31458)
* Variables: Fixes error with: cannot read property length of undefined

* A different fix
2021-02-27 18:03:31 +01:00
Ivana Huckova
2d9f460e19
LogsPanel: Show all received logs (#31505)
* Show all received logs in LogsPanel

* Remove rowLimit
2021-02-26 15:33:34 +01:00
Torkel Ödegaard
eddc163e78
AddPanel: Design polish (#31484)
* AddPanel: Design fixes

* More design updates

* More tweaks

* Updated snapshot

* Modal fixes

* Updated field labels

* Move icon to left again
2021-02-26 12:29:28 +01:00
Gábor Farkas
c433393533
influxdb: flux: handle is-hidden (#31324) 2021-02-26 10:27:07 +01:00
msober
4c0e2c3174
Graph: Fix tooltip not showing when close to the edge of viewport (#31493) 2021-02-26 09:57:04 +01:00
Torkel Ödegaard
c41b559063
FolderPicker: Remove useNewForms from FolderPicker (#31485)
* FolderPicker: Remove useNewForms from FolderPicker

* Updated snapshot
2021-02-26 08:42:00 +01:00
Ryan McKinley
f451695ea6
Grafana datasource: support multiple targets (#31495) 2021-02-25 22:50:15 -08:00
Dimitris Sotirakis
554055e39d
Convert annotations to dataframes (#31400)
* Stop using transformation to tables

* Update datasource.ts to parse from dataframes

* Add test on transformToDataframe func

* Remove parseResponse and do the work inside parseToAnnotations method

* Name the dataframe after the RefID

* Small fix when mapping to annotation

* Add tests in annotation_query_test.go class

* Small fix in loop iteration

* Change for loop signature
2021-02-25 18:29:17 +02:00
kay delaney
8379f36a68
Library Panels: Don't list current panel in available panels list (#31472) 2021-02-25 13:20:02 +00:00
Jack Westbrook
ad68f3c5e6
DashboardSettings: Migrate Link Settings to React (#31150)
* feat(dashboardsettings): migrate dashboard links EmptyListCTA to react

* feat(dashboardsettings): initial commit of links settings migration to react

* feat(dashboardsettings): add links form functionality

* refactor(dashboardsettings): separate out linksettings components and concerns

* Updates to links list

* Form improvements

* test(dashboardlinks): update links so tests run

* refactor: move _.move to arrayMove for testing purposes

* test(dashboardsettings): initial commit of link settings tests

* refactor(app): put back lodash move method for backwards compatibility

* test(dashboardsettings): add links settings tests

* style(dashboardsettings): camelcase constants

* chore(dashboardsettings): delete old angular links settings view

* fix(dashboardsettings): forceupdate links on submenuVisibilityChanged and correct imports

* chore: remove reference to old angular link settings components

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-02-25 11:50:10 +01:00
kay delaney
47d2a8085b
Frontend changes for library panels feature (#30653)
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-02-25 10:26:28 +00:00
Torkel Ödegaard
584886fa46
AppPlugins: Options to disable showing config page in nav (#31354)
* AppPlugins: Options to disable showing config page in nav

* rename

* Added autoEnabled

* updated

* Things are working sort of

* Simplify
2021-02-25 10:00:21 +01:00
Ricky Putra
0e43d96b13
Heatmap: Fix missing/wrong value in heatmap legend (#31430)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-02-25 09:07:22 +01:00
Tania B
fb2402013b
Remove UserSyncInfo.tsx (#31450) 2021-02-24 18:52:29 +02:00
Chris Cowan
65b1e536d7
Elasticsearch: Add word highlighting to search results (#30293)
* Elasticsearch: Add word highlighting to logs

* Remove unused deps; refactor matching code to remove matchAll

* Adding searchWords test

* Adding two matches for highlighting

* Adding code comments

* formatting comments
2021-02-24 16:31:17 +00:00
Erik Sundell
055590890c
CloudWatch: Make it possible to specify custom api endpoint (#31402)
* wip: add endpoint field

* add endpoint to config and make sure it's part of the cache key

* update docs

* improve endpoint paragraph

* Update docs/sources/datasources/cloudwatch.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update public/app/plugins/datasource/cloudwatch/components/ConfigEditor.tsx

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* goimports

* Update docs/sources/datasources/cloudwatch.md

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* update snapshot

* Update docs/sources/datasources/cloudwatch.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-02-24 16:05:14 +01:00
Zoltán Bedi
04a067e599
TraceViewer: Fix show log marker in spanbar (#30742)
* TraceViewer: Fix show log marker in spanbar

* Revert changes and use UITooltip and UIPopover

* Change logmarker color

* e2e: wait for trace view

* Record cypress run ONLY FOR TESTING

* Move fixture to e2e

* Get details TEST ONLY

* test

* Use jaeger's theme instead of grafana's

* Revert "Record cypress run ONLY FOR TESTING"

This reverts commit 35c087b3c5.

* Revert "Move fixture to e2e"

This reverts commit fab88cc54c.
2021-02-24 14:18:52 +01:00
Torkel Ödegaard
59c060f1f1
Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view (#31431)
* Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view

* Slight tweak
2021-02-24 11:12:11 +01:00
Giordano Ricci
4429f2cf58
Elasticsearch: Fix query initialization logic & query transformation from Promethous/Loki (#31322)
* Elasticsearch: Fix query initialization logic

* Only import prometheus & loki queries as log queries
2021-02-23 21:58:07 +00:00
ying-jeanne
c57047a420
Postgres: allow providing TLS/SSL certificates as text in addition to file paths (#30353)
* postgres SSL certification

* add back the UI to configure SSL Authentication files by file path

* add backend logic

* correct unittest

* mini changes

* Update public/app/plugins/datasource/postgres/config_ctrl.ts

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* mutex

* check file exist before remove

* change permission

* change default configuremethod to file-path

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* rename sslconfiguremethod to sslconfigurationmethod

* frontend update

* solve comments

* Postgres: Convert tests to stdlib

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Postgres: Be consistent about TLS/SSL terminology

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* fix init inconsistancy

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* naming convention

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix TLS issue

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* change permissions

* Fix data source field names

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up HTML

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Improve popover text

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix SSL input bug

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo unnecessary change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up backend code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix build

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* More consistent naming

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Enforce certificate file permissions

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* add settings

* Undo changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* fix windows file path

* PostgresDataSource: Fix mutex usage

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/postgres/postgres.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* fix compilation

* fix unittest

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* mock function

* change kmutex package

* add kmutex into middleware

* lock connection file per datasource

* add unittest regarding concurrency

* version should be equal

* adding unittest

* fix the loop

* fix unitest

* fix postgres unittst

* remove comments

* move dataPath from arg to tlsManager struct field

* Use DecryptedValues method

Use cached decrypted values instead of
using secure json data decrypt which will
decrypt unchanged values over and over again.

* remove unneeded mutex in tests and cleanup tests

* fix the lint

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-02-23 22:10:55 +01:00
Zoltán Bedi
2c62425be7
TraceViewer: Fix trace to logs icon to show in right pane (#31414) 2021-02-23 19:44:31 +01:00
Ivana Huckova
dce67db6ba
Prometheus: Use configured HTTP method for /series and /labels endpoints (#31401)
* Run post-friendly request with set method first

* Improve messaging, retry only when post and specific status code

* Add comments

* Fix backend

* Update public/app/plugins/datasource/prometheus/datasource.ts
2021-02-23 16:31:03 +01:00
Rubycut
833446645a
Add eu-south-1 cloudwatch region, closes #31197 (#31198) 2021-02-23 10:42:54 +01:00
Zoltán Bedi
67c215f5f1
Chore: Upgrade eslint packages (#31408) 2021-02-23 10:02:07 +01:00
Ivana Huckova
4ca3dccb6d
Prometheus: Change default httpMethod for new instances to POST (#31292)
* Implement POST to specific endpoints and change POST as default

* Add tests for PromSettings

* Add tests to dataosurce.ts for new functionality

* Remove /label /series implementation

* Update public/app/plugins/datasource/prometheus/configuration/PromSettings.tsx
2021-02-22 17:35:15 +01:00
Alex Khomenko
6db4b40d5b
Data source list: Use Card component (#31326)
* Replace DataSourcesListItem with Card

* Add tests

* Remove unused styles

* Make card heading semi bold

* Make heading semi-bold

* Show type name instead of type id

* Fix key warning

* Update Card

* Fix tests

* Make typeName optional

* remove styling that was just a test

* Make typeName non-optional and fix tests

* Update list key

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-02-22 14:02:10 +02:00
Hugo Häggmark
6f3088ae85
AdHocVariables: Fixes crash when values are stored as numbers (#31382) 2021-02-22 10:35:36 +01:00
Torkel Ödegaard
372ae7fdd3
Chore: Fix strict errors, down to 416 (#31365) 2021-02-22 10:06:07 +01:00
Torkel Ödegaard
3e55c967ee
Theming: Support for runtime theme switching and hooks for custom themes (#31301)
* WIP Custom themes

* Load custom themes from URL and via event

* Dynamic page background

* Header color change

* Fixing tests and emotion warnings

* Fixed test

* moving cx to getStyles

* Review fixes

* minor change
2021-02-20 09:02:06 +01:00
Zoltán Bedi
114c426f34
Zipkin: Show success on test data source (#30829)
* Zipkin: Show success on test data source

Add zipkin example app to devenv
Migrate to fetch api in data source

* Add back return types for functions
2021-02-19 15:38:16 +01:00
Dominik Prokop
0d6e5298b7
DatasourceSrv: Fix instance retrieval when datasource variable value set to "default" (#31347)
* Failing tests

* Fixed
2021-02-19 12:31:28 +01:00
Gábor Farkas
7ccba047c6
QueryEditor: handle query.hide changes in angular based query-editors (#31336)
* handle query.hide changes in angular query-editors

* better comment
2021-02-19 09:49:59 +01:00
Torkel Ödegaard
2b7628c69e
DashboardLinks: Fixes another issue where dashboard links cause full page reload (#31334) 2021-02-19 08:26:22 +01:00
Hugo Häggmark
3c1f27b0e6
Chore: reduce strict errors for variables (#31241)
* Chore: reduces a lot of variable errors

* Chore: reduces variable Editor errors

* Chore: reduces variable Picker errors

* Chore: reduce error count

* Chore: reduces errors for ChangeEvent instead of FormEvent

* Chore: reduces errors with CombinedState

* Chore: reduces ComponentType errors

* Chore: reduce errors in reducers

* Chore: reduces misc errors

* Chore: reduce AdhocPicker errors

* Chore: reduce error limit

* Update public/app/features/variables/adhoc/picker/AdHocFilterValue.tsx

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

* Chore: updates after PR comments

* Chore: small refactor

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-02-18 06:21:35 +01:00
kay delaney
bbf12088d6
Introduce functions for interacting with library panels API (#30993) 2021-02-17 13:40:10 +00:00
Alex Khomenko
c21e45e428
Search: display sort metadata (#31167)
* Search: display metadata

* Search: update SortPicker icon

* Search: display folder meta data

* Search: reset sort picker on layout change

* Search: align tags in Card component

* Search: replace hyphen with dash

* Search: preserve sort state on layout change

* Search: update tests

* Search: fix tests

* Update pkg/services/search/hits.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/search/components/SearchItem.tsx

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/search/components/SearchItem.tsx

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/search/types.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Search: fix type error

* Search: add General folder name and adjust icon margin

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-02-17 14:06:19 +02:00
Torkel Ödegaard
c0015034a3
Folders: Editors should be able to edit name and delete folders (#31242)
* Folders: Editors should be able to edit name and delete folders

* Fixed so that we only build nav model in one place
2021-02-17 12:40:28 +01:00
Marcus Efraimsson
8f20b13f1c
Snapshots: Disallow anonymous user to create snapshots (#31263) 2021-02-17 09:51:50 +01:00
Josh Hunt
85e186cf10
Grafana-UI: Add id to Select to make it easier to test (#31230)
* Prettier formatting

* Grafana-UI: Add support for id and inputId props to Select

* Grafana-UI: Add aria-label to Select

* Grafana-UI: InlineField and Field get ID from inputId prop

For Select

* Fix tests using TagFilter

* Update Select prop documentation

* Update Field tests to use screen instead

* Fix the last few tests
2021-02-16 16:19:55 +00:00
Ivana Huckova
4f61edd28d
Prometheus: Fix enabling of disabled queries when editing in dashboard (#31055)
* Fix disable bug by passing hide prop

* Make more universal fix

* Revert to original fix

* Update public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx

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

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-02-16 16:23:26 +01:00
Ivana Huckova
350dcb999a
Loki: Add line limit for annotations (#31183)
* Add line limit to Annotation query editor

* Refactor to keep type consistent
2021-02-16 13:27:17 +01:00
Torkel Ödegaard
e4672906f0
SqlDataSources: Fixes the Show Generated SQL button in query editors (#31236)
* SqlDataSources: Fixes the Show Generated SQL button in query editors

* No need to protect against duplicate events now that the event emitter is isolated for each editor
2021-02-16 13:10:40 +01:00
dupondje
884a99e375
Disable Change Password for OAuth users (#27886) 2021-02-16 10:20:41 +01:00
Torkel Ödegaard
4dfce12a81
TagsInput: Design update and component refactor (#31163)
* TagsInput: Design update and component refactor

* Update packages/grafana-ui/src/components/TagsInput/TagsInput.tsx

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

* Update packages/grafana-ui/src/components/TagsInput/TagsInput.tsx

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

* Update packages/grafana-ui/src/components/TagsInput/TagsInput.tsx

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

* Update packages/grafana-ui/src/components/TagsInput/TagsInput.tsx

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

* Updated

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-02-16 09:39:11 +01:00
Hugo Häggmark
f993f2c7cc
Variables: Adds back default option for data source variable (#31208)
* Variables: Adds back default option for data source variable

* Chore: updates after PR comments
2021-02-16 06:51:34 +01:00
Dominik Prokop
9c08b34e71
GraphNG: refactor core to class component (#30941)
* First attempt

* Get rid of time range as config invalidation dependency

* GraphNG class refactor

* Get rid of DataFrame dependency from Plot component, get rid of usePlotData context, rely on XYMatchers for data inspection from within plugins

* Bring back legend

* Fix Sparkline

* Fix Sparkline

* Sparkline update

* Explore update

* fix

* BarChart refactor to class

* Tweaks

* TS fix

* Fix tests

* Tests

* Update packages/grafana-ui/src/components/uPlot/utils.ts

* Update public/app/plugins/panel/timeseries/plugins/ContextMenuPlugin.tsx

* GraphNG: unified legend for BarChart, GraphNG & other uPlot based visualizations (#31175)

* Legend experiment

* Nits
2021-02-15 16:46:29 +01:00
Tania B
f9a293afea
Remove last synchronisation field from LDAP debug view (#30984)
* Remove last synchronisation field from LDAP debug view

* Apply review comments
2021-02-15 17:11:17 +02:00
Torkel Ödegaard
205dc0a2f6
Graph: Make axes unit option work even when field option unit is set (#31205)
* Graph: Make axes unit option work even when field option unit is set

* Updated tests
2021-02-15 13:57:18 +01:00
Peter Holmberg
12dcba5d0b
AlertingNG: Test definition (#30886)
* break out new and edit

* changed model to match new model in backend

* AlertingNG: API modifications (#30683)

* Fix API consistency

* Change eval alert definition to POST request

* Fix eval endpoint to accept custom now parameter

* Change JSON input property for create/update endpoints

* model adjustments

* set mixed datasource, fix put url

* update snapshots

* run test response through converters

* remove edit and add landing page

* remove snapshot tests ans snapshots

* wrap linkbutton in array

* different approaches to massage data

* get instead of post

* use function to return instances data

* hook up test button in view

* test endpoint for not saved definitions

* function that return query options

* Chore: fixes strict error

* hide ng alert button

* typings

* fix setAlertDef error

* better message when you have queries but no data

* NGAlert: Refactoring that handles cleaning up state (#31087)

* Chore: some refactorings of state

* Chore: reduces strict null errors

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-15 13:56:59 +01:00
Torkel Ödegaard
50faeb3078
DataSourceSrv: Filter out non queryable data sources by default (#31144) 2021-02-15 11:27:16 +01:00
Torkel Ödegaard
0c3c17592e
QueryEditors: Fixes issue that happens after moving queries then editing would update other queries (#31193) 2021-02-15 11:24:03 +01:00
Sofia Papagiannaki
dde11215e9
Alerting: Fix modal text for deleting obsolete notifier (#31171) 2021-02-15 10:31:08 +02:00
Hugo Häggmark
39993a6884
Variables: Fixes missing empty elements from regex filters (#31156)
* Variables: Fixes missing empty elements from regex filters

* Chore: cleanup comment

* Chore: removes unused import
2021-02-15 06:04:08 +01:00
Torkel Ödegaard
b3c32277dd
StatPanels: Fixes to palette color scheme is not cleared when loading panel (#31126) 2021-02-13 11:35:39 +01:00
Andrej Ocenas
b0bd242eda
Explore/Refactor: Simplify URL handling (#29173)
* Inline datasource actions into initialisation

* Simplify url handling

* Add comments

* Remove split property from state and split Explore.tsx to 2 components

* Add comments

* Simplify and fix splitOpen and splitClose actions

* Update public/app/features/explore/ExplorePaneContainer.tsx

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>

* Update public/app/features/explore/state/explorePane.test.ts

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>

* Update public/app/features/explore/Wrapper.tsx

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

* Fix test

* Fix lint

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-02-12 21:33:26 +01:00
Torkel Ödegaard
9629dded42
DashboardLinks: Fixes links always cause full page reload (#31178) 2021-02-12 18:08:18 +01:00
Erik Sundell
92ae019f8e
CloudWatch: Ensure empty query row errors are not passed to the panel (#31172)
* ensure empty errors are not passed to the panel

* make it a oneliner
2021-02-12 15:49:33 +01:00
Alex Khomenko
6f1a38cbe2
Variables: Extend option pickers to accept custom onChange callback (#30913)
* Rename DashboardPicker props

* Extend variable option pickers to allow providing custom onchage callback

* Update public/app/features/variables/pickers/OptionsPicker/actions.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Update public/app/features/variables/pickers/OptionsPicker/actions.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Update public/app/features/variables/pickers/OptionsPicker/actions.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Update public/app/features/variables/textbox/TextBoxVariablePicker.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Codeformat

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-12 16:00:12 +02:00
Zoltán Bedi
8c35ed4014
Prometheus: Multiply exemplars timestamp to follow api change (#31143) 2021-02-12 14:47:47 +01:00
Torkel Ödegaard
a17661d198
DashboardListPanel: Fixes issue with folder picker always showing All and using old form styles (#31160) 2021-02-12 10:29:59 +01:00
Torkel Ödegaard
cb5928fdb7
PieChart: Progress on new core pie chart (#28020)
Use visx for the Pie chart plugin.

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-02-11 14:32:33 +01:00
Dominik Prokop
8d339a279b
Eslint: no-duplicate-imports rule (bump grafana-eslint-config) (#30989)
* Eslint: no-duplicate-imports rule (bump grafana-eslint-config)

* Chore: Fix duplicate imports (#31041)

* Rebased this branch into eslint-no-duplicate-imports

* updated some changes

* merged uncaught duplicate imports

* fixes frontend test- I hope

* fixes e2e test- I hope

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-02-11 13:45:25 +01:00
Zoltán Bedi
cc463f30a4
Exemplars: Change CTA style (#30880)
* Exemplars: Change CTA style

* Address review feedbacks

* Fix table column aligning

* Minor alignments + uncontrolled component warning fix
2021-02-10 18:02:48 +01:00
Andrej Ocenas
e0448513eb
Influx: Make max series limit configurable and show the limiting message if applied (#31025)
* Add configuration in ConfigEditor and default to 1000

* Show data in explore if any even if there is an error

* Update pkg/tsdb/influxdb/flux/executor.go

* Better handling of defaults

* Add test for runQuery to show data even with error

* Update public/app/store/configureStore.ts

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>

* Update public/app/plugins/datasource/influxdb/components/ConfigEditor.tsx

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

* Update tooltip

* Update input

* Lint fixes

* Update snapshots

* Update decorator tests

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-02-10 15:23:19 +01:00
Giordano Ricci
c7e007d199
Elasticsearch: fix log row context erroring out (#31088) 2021-02-10 13:33:59 +00:00
Ivana Huckova
b2ca9cbda6
Prometheus: Fix issues with ad-hoc filters (#30931)
* Don't add {} to non-metrics starting with quotes

* Fix for using template variables

* Fix adding of filter to timerange

* Fix adding of filter to labels provided with group modifier

* Fix adding of filters to Grafana's variables

* Shorten tests

* Refactor and split
2021-02-10 14:02:42 +01:00
Ivana Huckova
16c25102bc
LogsPanel: Add deduplication option for logs (#31019)
* WIP: Add dedup functionality to logs panel

* Simplify, clean up

* Change ordering of customizations based on how it is in Explore

* Update public/app/plugins/panel/logs/LogsPanel.tsx

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>

* Update public/app/plugins/panel/logs/LogsPanel.tsx

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
2021-02-10 14:01:59 +01:00
JC Bize
ea605fdeac
Transformations: Fixed typo in FilterByValue transformer description. (#31078) 2021-02-10 10:43:24 +01:00
Torkel Ödegaard
d6e8e47698
CDN: Add CDN upload step to enterprise and release pipelines (#31058)
* CDN: Fixing drone CI config

* was in wrong dir when I executed command

* removed whitespace

* Update path

* Update Drone master and enterprise piplelines with CDN Upload

* Update test

* removed whitespace

* Go back to public folder defined

* updated build-pipeline

* Updated drone

* wrong version
2021-02-10 08:58:41 +01:00
Erik Sundell
9679b15ef9
Chore: Replace native select with grafana ui select (#31030)
* use react select instead of simple select

* cleanup

* rename selectable value prop

* remove not used import
2021-02-10 08:50:47 +01:00
Torkel Ödegaard
758d1386cd
DashboardSettings: Update to new form styles (#31022)
* DashboardSettings: Update to new form styles

* Improve header margin and fixing issue in permissions tab

* Updated

* Switch to radio

* Remove unused import
2021-02-09 20:41:07 +01:00
Hugo Häggmark
f43d834a59
Alerting: Fixes so notification channels are properly deleted (#31040) 2021-02-09 15:29:50 +01:00