Commit Graph

28517 Commits

Author SHA1 Message Date
Dominik Prokop
a6cb9fb295
GraphNG: make sure dataset and config are in sync when initializing and re-initializing uPlot (#32106)
* Make sure dataset and uPlot config are in sync when rendering uPlot

* Tests

* Fix TS
2021-03-18 17:26:57 +01:00
Joan López de la Franca Beltran
b2e82a4f37
Login: Replace command dispatch by explicit call (#32088)
* Fix LoginService.UpsertUser user creation

* Fix API AdminCreateUser user creation

* Add missing underscore import

* Fix API CompleteInvite user creation

* Fix API SignUpStep2 user creation
2021-03-18 17:16:56 +01:00
Ivana Huckova
dfd4eccc7c
Loki: Label browser UI updates (#31737)
* UI updates for Label Browser

* Revert "UI updates for Label Browser"

This reverts commit 3d34112762.

* UI updates for Label Browser

* Remove unused style
2021-03-18 16:28:02 +01:00
Ganesh Vernekar
0b788b5ce8
AlertingNG: Notification channel for emails (#31768)
* Email notification channel in ngalert

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Use existing templating system

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Update template and add unit tests

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2021-03-18 14:55:11 +00:00
Ottavio M. Hartman
7a9a52c317
Alerting: Enable Alert rule severity tag to override VictorOps Severity setting (#29392)
* add severity to victorops

* Update docs, add test

* Fix spelling and lint

* fix resolving not working

* Update docs/sources/alerting/notifications.md

* Update docs/sources/alerting/notifications.md

* Update docs/sources/alerting/notifications.md

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

* Update docs/sources/alerting/notifications.md

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

* remove table, update supported alert notifiers

* add docs

* 7.4->7.5

* fix

* Update docs/sources/alerting/notifications.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-03-18 09:50:07 -04:00
Uchechukwu Obasi
61521216ed
Docs: updates developer guide with useful resources for windows setup (#32075)
* Docs: updates developer guide with useful resources for windows setup

* fixes small grammar nits
2021-03-18 09:39:54 -04:00
Arve Knudsen
5a0780801b
SQLStore: Close session in withDbSession (#31775)
* SQLStore: Close session in withDbSession

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

* SQLStore.WithDbSession: Never use session from context

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-18 14:27:59 +01:00
Arve Knudsen
a2eda798e7
PluginManager: Make remaining plugin state non-global (#32094)
* PluginDashboards: Use plugin manager interface

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

* PluginManager: Make panels non-global

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

* PluginManager: Make apps non-global

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

* PluginManager: Make static routes non-global

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

* PluginManager: Make pluginTypes non-global

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-18 13:53:01 +01:00
Torkel Ödegaard
1454c3723d
PanelChrome: new logic-less emotion based component with no dependency on PanelModel or DashboardModel (#29456)
* WIP: Started work on a new panel chrome component

* Minor progress

* Next icons & state

* adding support for leftItems.

* fixing duplicated exports of PanelChrome.

* adding examples on loading indicator in storybook.

* adding API stability docs.

* removed dependency on stylesFactory.

* fixed docs errors.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-03-18 13:22:19 +01:00
Dominik Prokop
b0d7e3dbee
GraphNG: Fix tooltip series color for multi data frame scenario (#32098) 2021-03-18 13:16:36 +01:00
Kyle Brandt
026bf1f9ca
SSE/InfluxDB: Change InfluxQL to work with server side expressions (#31691)
* SSE/InfluxDB: Change InfluxQL to work with server side expressions
updates the request to handle EpochMS as the time range (which is what expressions sends)
and the response to use millisecond timestamps instead of seconds.
fixes #31604
similar to https://github.com/grafana/grafana/pull/31455
2021-03-18 08:02:37 -04:00
Uchechukwu Obasi
52c1d7301f
ContextMenu: changed menu item rendering to render prop pattern (#31993)
* ContextMenu: changed menu item rendering to render prop pattern to enable manual composition of menu items

* fixes affected components

* fixes small nits

* added some changes

* used a more descriptive variable name
2021-03-18 12:58:07 +01:00
Hugo Häggmark
8b2a0e3b2c
Chore: Auto adds templating label in PRs (#32085)
* Chore: Auto adds templating label in PRs

* Fixes: formatting and json
2021-03-18 12:35:07 +01:00
Hugo Häggmark
f508a16a43
LibraryPanels: Improves the Get All experience (#32028)
* LibraryPanels: Improves Get All Api

* Refactor: using useReducer instead of useState

* Refactor: adds Pagination to UI

* Tests: adds reducer tests

* Refactor: using Observable instead to avoid flickering

* Refactor: moves exclusion to backend instead

* Chore: changing back the perPage default value
2021-03-18 11:19:41 +01:00
G Gordon Worley III
0fbe7f7f52
Docs: Add mention of preferredVisualisationType in logs datasource guide (#31910)
* Add mention of preferredVisualisationType to get Log Panel to display

The instructions don't work right now. As described, it was necessary for me to set the preferredVisualisationType to 'logs' to get the log view in Explore. I spent several hours digging around the code to figure this out, so hopefully we can save others the time with this doc update.

* Update docs/sources/developers/plugins/build-a-logs-data-source-plugin.md

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>

* Update docs/sources/developers/plugins/build-a-logs-data-source-plugin.md

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>

* Update docs/sources/developers/plugins/build-a-logs-data-source-plugin.md

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-03-18 10:44:53 +01:00
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
Dimitris Sotirakis
2d72b4e69e
Prometheus: Convert Prometheus query response to dataframes (#31948)
* Convert Prometheus query response to dataframes

* Add parseResponse tests

* Fixed lint imports

* Force use UTC as timezone in timeVector

* Updated test to check timezone
2021-03-18 08:40:26 +02:00
Ryan McKinley
5bb1b1602d
Live: use StreamingDataSource for live measurments (#31713) 2021-03-17 21:46:56 -07:00
achatterjee-grafana
5286ddbbc0
Updated broken link for Graph panel documentation. (#32082) 2021-03-17 16:49:19 -04:00
Owen Diehl
7a4ab13a79
API Response implements http.ResponseWriter (#32046)
* rename response.Header -> response.SetHeader to free up method name for http.ResponseWriter ifc

* normalresponse implements http.ResponseWriter
2021-03-17 13:12:28 -04:00
Owen Diehl
36614b03f7
Data Source Proxy: Migrate proxy to its own service and make more extensible (#31927)
* datasource proxy extensions

* revert normalresponse extensions

* data proxy service impl

* lint

* api datasource proxy method

* moves datasource proxy tests into correct new pkg
2021-03-17 13:10:40 -04: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
Ganesh Vernekar
974ccf8091
AlertingNG: Fix the alerting stage for legacy alerts (#32025)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2021-03-17 16:38:33 +00:00
Marcus Efraimsson
866912d62c
Update pr commands glob paths (#32074) 2021-03-17 16:53:22 +01:00
Marcus Efraimsson
2bac4d1787
Update pr commands glob paths (#32073) 2021-03-17 16:48:21 +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
Dimitris Sotirakis
3a841ebe00
Downgrade to node:14.16.0-alpine3.13 (#32065) 2021-03-17 17:07:39 +02:00
Arve Knudsen
87c3a2b790
PluginManager: Make Plugins, Renderer and DataSources non-global (#31866)
* PluginManager: Make Plugins and DataSources non-global

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

* Fix integration tests

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

* Replace outdated command

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

* DashboardService: Ensure it gets constructed with necessary parameters

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

* Fix build

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

* DashboardService: Ensure it gets constructed with necessary parameters

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

* Remove dead code

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

* Fix test

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

* Fix test

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

* Remove FocusConvey

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

* Fix test

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

* Remove dead code

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

* Undo interface changes

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

* Backend: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler

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

* Rename to DataSourceCount

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

* Consolidate dashboard interfaces into one

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>

* Fix test

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>

* Fix tests

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

* Fix tests

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

* Fix dashboard integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-17 16:06:10 +01:00
Marcus Efraimsson
f1df32ac03
Update pr commands glob paths (#32068) 2021-03-17 15:20:20 +01:00
Uchechukwu Obasi
f93166e7b2
Legacy Input: updates story from knobs to control (#32059) 2021-03-17 14:43:31 +01:00
Dominik Prokop
48f46a597f
GraphNG: Fix PlotLegend field display name being outdated (#32064) 2021-03-17 14:40:30 +01:00
Marcus Efraimsson
c8d8dcd067
Automation: Label pull requests based on changed files (#32039)
* Automation: Label pull requests based on changed files

* Update commands

* Updates for build-packaging

* fix path to backend architecture docs
2021-03-17 12:49:57 +01:00
dependabot[bot]
b95fd1d1ce
Chore(deps): Bump github.com/aws/aws-sdk-go from 1.37.30 to 1.37.32 (#32058)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.37.30 to 1.37.32.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.37.30...v1.37.32)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-17 12:23:11 +01:00
Marcus Efraimsson
c0edf88f9f
Data proxy: Fix encoded characters in URL path should be proxied encoded (#30597)
Fix encoded characters in URL path should be proxied as encoded in the data proxy.

Fixes #26870 
Fixes #31438

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-17 12:17:41 +01:00
Sofia Papagiannaki
68b05b8aaa
AlertingNG: Unified alerting API mock (#32040)
* AlertingNG: Alertmanager mock API

* AlertingNG: Remove permissions API routes

* Add example POST payloads

* Prometheus and testing mock API
2021-03-17 12:47:03 +02:00
Uchechukwu Obasi
ee8a864615
Form: update story from knobs to controls (#32022)
* Form: update story from knobs to controls

* some code cleanup
2021-03-17 11:14:39 +01:00
Giordano Ricci
0c2045109e
Chore: Collect elasticsearch version usage stats (#31787)
* Chore: Collect elasticsearch version usage stats

* Fix lint error

* use GetDataSources from sqlstore

* Apply review suggestions

* Return error if datasource type is not specified

* Update pkg/services/sqlstore/datasource.go

* fix undefined var
2021-03-17 09:14:53 +00:00
Will Browne
8e1c2d6472
move backend docs to their relevant folder (#32041) 2021-03-17 09:41:16 +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
Andrej Ocenas
a1c7e0630d
Docs: Update section on plugin dev for explore (#31905)
* Update section on preferredVisualisationType

* wording changes

* Update docs/sources/developers/plugins/add-support-for-explore-queries.md

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

* Update docs/sources/developers/plugins/add-support-for-explore-queries.md

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

* Update docs/sources/developers/plugins/add-support-for-explore-queries.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: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-03-16 17:25:10 +01:00
Dominik Prokop
48eb747da0
Routing NG: Fix persistent modal after dashboard delete (#32033) 2021-03-16 17:10:47 +01:00
Marcus Efraimsson
a97637a133
Snapshots: Fix usage of sign in link from the snapshot page (#31986)
Fix redirect to login page from snapshot page when not authenticated.

Fixes #28547
2021-03-16 16:46:34 +01:00
Marcus Efraimsson
669a616797
Chore: Remove unused dependencies (#32031) 2021-03-16 16:26:38 +01:00
Vicky Lee
e5ca13deb6
Grafana/ui: display all selected levels for selected value when searching (#32030)
* display all levels for selected values when searching if needed

* add test
2021-03-16 15:10:05 +00:00
Kevin Minehart
6e1c5e957a
Enterprise: Add Redis caching documentation (#32001)
* Document Redis cache config in Grafana Enterprise

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-03-16 15:35:52 +01:00
Gábor Farkas
13fd2bd53f
devenv: removed min-interval setting from influxdb-datasources (#32002) 2021-03-16 14:42:28 +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