Commit Graph

12448 Commits

Author SHA1 Message Date
Torkel Ödegaard
72736bd2a1
PanelEdit: Update UI if panel plugin changes field config (#29898) 2020-12-17 13:30:55 +01:00
Alexander Zobnin
ae575158ed
Elasticsearch: Remove timeSrv dependency (#29770)
* Elasticsearch: use time range from queries or default one

* Fix tests

* Fix language provider tests

* Elasticsearch: remove timeSrv dependency for logs context (#29841)

* Elasticsearch: remove timeSrv dependency for logs context

* Add tests & slighlty improve getIndexList

Co-authored-by: Elfo404 <gio.ricci@grafana.com>
2020-12-17 14:24:20 +03:00
Torkel Ödegaard
1ee9745794
PanelEdit: Need new data after plugin change (#29874)
* PanelEdit: Need new data after plugin change

* Updated
2020-12-17 11:45:28 +01:00
Dominik Prokop
332f2f1ae8
Field Config API: Add ability to hide field option or disable it from the overrides (#29879)
* Add ability to hide field option or disable it from the overrides

* Rename options

* Tests
2020-12-17 09:20:47 +01:00
Torkel Ödegaard
7adccf1e67
SharedQuery: Fixes shared query editor now showing queries (#29849)
* SharedQuery: Fixes shared query editor now showing queries

* fixed updating state when query change
2020-12-17 06:23:27 +01:00
Ryan McKinley
8250b59dfe
GraphNG: support fill gradient (#29765) 2020-12-16 11:17:56 -08:00
Ivana Huckova
6cdf0ab5d9
Keep query keys consistent (#29855) 2020-12-16 18:24:47 +01:00
Torkel Ödegaard
1506ec7bfc
InlineForms: Changes to make inline forms more flexible for query editors (#29782)
* Chore: Remove internal import for QueryEditorRow

* WIP inline forms fixes

* Added segment group component

* Added component status doc tag

* Chore: add as prop to InlineLabel to control rendered element (#29876)

* Use div for InlineLabel & fix iconbuttons positioning

Co-authored-by: Elfo404 <gio.ricci@grafana.com>
2020-12-16 15:14:19 +01:00
maximka
e491bdabe2
Dashboard: Increase folder name size in search dashboard (#29821)
* Increase folder name size in search dashboard

* Use new fontsize in dashboard list panel as well

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-16 10:17:47 +02:00
Hugo Häggmark
7c55621749
MSSQL: Config UI touches (#29834) 2020-12-16 08:01:41 +01:00
Ryan McKinley
d54e62197a
QueryOptions: Open QueryEditors: run queries after changing group options #29864 2020-12-16 07:24:56 +01:00
Hugo Häggmark
662eb6506b
Variables: Fixes so numerical sortorder works for options with null values (#29846) 2020-12-16 06:50:54 +01:00
Diana Payton
aa8fb1ae98
MS SQL: Fix MS SQL add data source UI issues (#29832)
* Update config.html

* Update mssql.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-15 08:17:21 -08:00
Ivana Huckova
2a76195aed
Loki: Remove unnecessary deduplication (#29421)
* Remove unnecessary deduplication

* Remove dedup test as we are not doing dedup on all logs  anymore

* Create unique ids in Loki

* Fix comment

* Fix comment

* Store prev response uids in usedUids

* Revert "Store prev response uids in usedUids"

This reverts commit 05c496e2a8.

* Add comment
2020-12-15 15:18:12 +01:00
Hugo Häggmark
dd326d296e
Varibles: Fixes so clicking on Selected will not include All (#29844) 2020-12-15 15:04:34 +01:00
Dominik Prokop
683ce69347
Link suppliers: getLinks API update (#29757)
* ContextMenuPlugin WIP

* Remove Add annotations menu item from graph context menu

* ts ifx

* WIP

* Tests updates

* ts check fix

* Fix rebase

* Use replace function in angular graph data links
2020-12-15 13:29:37 +01:00
Hugo Häggmark
5f4b528122
Select: Changes default menu placement for Select from auto to bottom (#29837)
* Select: Changes default menuPlacement from auto to bottom

* Tests: Fixes snapshot
2020-12-15 12:46:31 +01:00
Alex Khomenko
b1a57c6f77
Chore: Automatically infer types for dashgrid connected components (#29818)
* Refactor DashboardPanel

* Refactor PanelEditor

* Fix missing initializer

* Update public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx

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

* Simplify type

* Remove unused type

* Move prop connectors on top

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2020-12-15 13:18:40 +02:00
Ivana Huckova
dbf0470994
Chore: Remove unused Loki and Cloudwatch syntax providers (#29686)
* Remove syntax provider in Cloudwatch

* Remove syntax provider and refactor useLokiLabels
2020-12-15 12:17:29 +01:00
Ivana Huckova
854f6229f7
Pass row (#29839) 2020-12-15 12:16:52 +01:00
Dominik Prokop
69b05aae46
GraphNG: Context menu (#29745)
* Refactor Context menu and add Menu component to grafana/ui

* ContextMenuPlugin WIP

* Fix docs issues

* Remove Add annotations menu item from graph context menu

* ts ifx
2020-12-15 10:53:04 +01:00
Dominik Prokop
92527c2647
GraphNG: Enable scale distribution configuration (#29684)
* Enable scale distribution configuration

* use uPlot's rangeLog() instead of rangeNum() for log scales

* merge master

* Remove unsupported log bases

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-12-15 10:18:30 +01:00
Ivana Huckova
3ee2e49d9a
Explore: Improve Explore performance but removing unnecessary re-renders (#29752)
* Fix Explore and Logs rerenders

* Create ReturnToDashboardButton

* Add test for new component

* Remove queryKeys change on keystroke

* Move rendering conditions to Button

* Remove redundant logic
2020-12-15 10:12:53 +01:00
Hugo Häggmark
681cefbb18
DashboardDS: Fixes display of long queries (#29808) 2020-12-15 10:08:02 +01:00
Ryan McKinley
530e0f86e4
QueryEditor: do not auto refresh on every update (#29762) 2020-12-14 12:22:21 -08:00
Giordano Ricci
93649e1fb5
Elasticsearch: ensure query model has timeField configured in datasource settings (#29807) 2020-12-14 14:36:07 +00:00
Torkel Ödegaard
98c0b09564
Sliders: Update behavior and style tweak (#29795)
* Sliders: Update behavior and style tweak

* More style tweaks, and changed new graph opacity option from 0 - 1 to 1 to 100

* Updated point size max

* Fixed hooks useCallback dependency issue

* Update test
2020-12-14 11:34:12 +01:00
Andrej Ocenas
f7ebb10dc5
Explore: Fix remounting of query row (#29771)
* Use passed data source in init

* Dummy commit
2020-12-11 15:50:59 +01:00
Peter Holmberg
edbde6c06b
Expressions: Add placeholders to hint on input (#29773)
* math placeholder

* resample changes
2020-12-11 15:19:24 +01:00
Peter Holmberg
6118ab415d
Alerting: Next gen Alerting page (#28397)
* create page and sidebar entry

* add components for query editor and definition

* split pane things

* add reducer and action

* implement split pane and update ui actions

* making things pretty

* Unify toolbar

* minor tweak to title prefix and some padding

* can create definitions

* fix default state

* add notificaion channel

* add wrappers to get correct spacing between panes

* include or exclude description

* implement query editor

* start on query result component

* update from master

* some cleanup and remove expressions touch ups

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-11 14:49:14 +01:00
David Boslee
d0f52d5334
AlertListPanel: Add options to sort by Time(asc) and Time(desc) (#29764)
This also makes all the sortOrderOptions available when using
the "changes" showOption.

Resolves: #29156
2020-12-11 06:57:08 +01:00
Zoltán Bedi
b3838d372e
Tracing: Release trace to logs feature (#29443)
* Remove feature flag

* Add data source setting for Jaeger

* Refactor trace to logs settings

* Fix tests

* Get ds settings in two steps

* Add info to settings

* Update docs for trace to logs

* Update yarn.lock

* Apply suggestions from code review

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

* Update TraceToLogsSettings after merge with master

* Add config for tags

* Add tags to check for keys

* Apply suggestions from code review

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

* Update docs

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2020-12-10 19:42:43 +01:00
Chris Cowan
491a4dc967
Elasticsearch: View in context feature for logs (#28764)
* Elasticsearch: View in context feature for logs

* Fixing unused type

* Limit show context to esVersion > 5

* Fixing scope for showContextToggle; removing console.log

* Fix typing; adding check for lineField

* Update test to reflect new sorting keys for logs

* Removing sort from metadata fields

* Adding comment for clarity

* Fixing scenerio where the data is missing

* remove export & use optional chaining

Co-authored-by: Elfo404 <gio.ricci@grafana.com>
2020-12-10 11:19:14 +00:00
Uchechukwu Obasi
4ea2c7d2b1
ChangePassword: improved keyboard navigation (#29567)
* ChangePassword: improved keyboard navigation

* updated skip button with appropriate tag

* applied box shadow to skip button
2020-12-10 09:41:44 +01:00
Torkel Ödegaard
955c96ffd8
GrafanaDataSource: Fix selecting -- Grafana -- data source, broken after recent changes (#29737) 2020-12-10 09:26:28 +01:00
Ivana Huckova
e313c0cea0
@grafana/ui: Fix UI issues for cascader button dropdown and query input (#29727)
* Fix broken cascader width

* Remove text cursor in area where it does not affect slate
2020-12-09 19:01:28 +01:00
Domas
7d9a528184
Logging: rate limit fronted logging endpoint (#29272)
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2020-12-09 16:22:24 +01:00
Giordano Ricci
7f0802a9c9
Elasticsearch: Deprecate browser access mode (#29649)
* Elasticsearch: Show deprecation warning when selecting browser access mode

* Docs: Show deprecation warning for Elasticsearch Browser access mode
2020-12-09 13:27:40 +00:00
Giordano Ricci
58b63a1678
Elasticsearch: Fix query initialization action (#29652) 2020-12-09 12:53:59 +00:00
Chris Cowan
82b21fe35e
Transformer: Rename metrics based on regex (#29281)
* Grafana: Rename By Regex Transformer

* Removing unused deps

* Add scrollIntoView() to TranformTab.content()

* Exporting RenameByRegexTransformerOptions

* Add doc block to renameByRegex transformer

* Adding doc block for RenameByRegexTransformerOptions

* removing scrollIntoView() for transform tab

* Adding back in scrollIntoView() for transform panel

* Tests: fixes e2e tests

* Apply to displayName instead of just the name of the frame

* Rewrite docblock to match new functionality

* Adding documentation

* Changing TLD to domain name

* Fixing typo

* Update docs/sources/panels/transformations/types-options.md

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

* Update docs/sources/panels/transformations/types-options.md

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

* Update docs/sources/panels/transformations/types-options.md

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

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2020-12-09 11:31:13 +01:00
Hugo Häggmark
3f2b28975c
Variables: Fixes upgrade of legacy Prometheus queries (#29704)
* Variables: Fixes upgrade of legacy queries

* Chore: changes after PR comments
2020-12-09 11:18:58 +01:00
Ryan McKinley
7974972d49
GraphNG: fix bars migration and support color and linewidth (#29697) 2020-12-08 12:50:18 -08:00
Shahzad
3bd4b8756a
PanelHeader: Fix panel header description inline code wrapping (#29628) 2020-12-08 19:55:50 +01:00
Ryan McKinley
e8ae6fd01f
GraphNG: simple settings migration from flot panel (#29599) 2020-12-08 08:13:39 -08:00
Ryan McKinley
3ce93050e0
GraphNG: replace bizcharts with uPlot for sparklines (#29632) 2020-12-08 08:13:12 -08:00
Torkel Ödegaard
a7afab4b8a
Typescript: Fixing typescript strict error, and separate check from publishing (#29679)
* Typescript: Fixing typescript string error, and seperate check from publishing

* now should pass
2020-12-08 12:56:37 +01:00
Leon Sorokin
fee0d44e5c
GraphNG: rename "points" to "showPoints" (#29635)
* rename "points" to "showPoints"

* rename ShowPoints enum to PointVisibility
2020-12-07 09:29:34 -06:00
Torkel Ödegaard
874f2fafb2
Expressions: Restore showing expression query editor even if main data source is not mixed (#29656) 2020-12-07 15:37:30 +01:00
Ivana Huckova
589b5e110c
Loki: Retry web socket connection when connection is closed abnormally (#29438)
* Add retryWhen to Loki socket

* Refactor,

* Add info message after 10 reconnections, remove console log

* Add test

* Specify response in tests

* Check specific lines for content

* Remove unused imports

* Replace AppEvents with console.warn

* Add limit of re-connections
2020-12-07 10:13:57 +01:00
Dominik Prokop
56e7ce6f16
GraphNG: Fix annotations and exemplars plugins (#29613) 2020-12-07 09:16:13 +01:00
Leon Sorokin
2d156a385b
GraphNG: fix and optimize spanNulls (#29633)
* fix and optimize spanNulls

* AsZero implies spanNulls = true, to prevent null-scanning

* move spanNulls toggle below fillOpacity
2020-12-06 19:26:00 -06:00
Leon Sorokin
2f92794c94
GraphNG: rename GraphMode to DrawStyle (#29623) 2020-12-04 13:08:25 -06:00
Ryan McKinley
a36bd89581
GraphNG: add spanNulls config option (#29512) 2020-12-04 10:38:45 -08:00
Ryan McKinley
716117b7da
Stat/Gauge: expose explicit font sizing (#29476) 2020-12-04 10:03:59 -08:00
Ivana Huckova
3018c6a1b1
Prometheus: Fix link to Prometheus graph in dashboard (#29543)
* Fix Promlink to have href after componentDidMount

* Refactor to hooks and react testing library

* Update

* Update snapshot test
2020-12-04 17:01:43 +01:00
Giordano Ricci
bb45f5fedc
Elasticsearch: Migrate queryeditor to React (#28033)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-04 14:29:40 +00:00
Torkel Ödegaard
3d6380a0aa
QueryGroup & DataSourceSrv & DataSourcePicker changes simplify usage, error handling and reduce duplication, support for uid (#29542)
* Starting moving more stuff into data source picker

* WIP progress

* Progress on datasource picker rethink

* Things are working now some details to figure out

* Removed commented part

* Complex work on getting data source lists

* Fixed variable support showing correct data sources

* Tried fixing dashboard import but failed

* Fixes

* Fixed import dashboard

* Fixed unit test

* Fixed explore test

* Fixed test

* Fix

* fixed more tests

* fixed more tests

* fixed showing which option is default in picker

* Changed query variable to use data source picker, updated tests and e2e

* Fixed more tests

* Updated snapshots, had wrong typescript version
2020-12-04 14:24:55 +01:00
Torkel Ödegaard
c62a0aa4d0
Elastic: Fixes config UI issues (#29608)
* Elastic: Fixes config UI issues

* Fixed index name input issue
2020-12-04 13:12:14 +01:00
Dominik Prokop
563478ece7
GraphNG: Fix issues with plugins not retrieving plot instance (#29585)
* Fix issues with plugins not retrieving plot instance

* Review
2020-12-04 12:44:46 +01:00
Mathieu Rollet
985c7934d9
Login: Fixes typo in tooltip (#29604)
See "log in" (verb) vs "login" (noun) : https://english.stackexchange.com/a/5304/354852
2020-12-04 10:06:01 +01:00
Marcus Andersson
de395f24e4
Panel: making sure we support all versions of chrome when detecting position of click event. (#29544)
* making sure we are always using int value when compairing coordinates.

* removed unused import.

* Using Math.floor instead.

* removed unused dep.
2020-12-04 09:42:45 +01:00
JoeyLemur
1f466f3a64
Add Microsoft.Network/natGateways (#29479)
Adds Microsoft.Network/natGateways to the supported namespaces in Azure Monitor Datasource (issue #29383)
2020-12-03 19:59:46 +01:00
kay delaney
56db402d0f
Chore: Upgrade typescript to 4.1 (#29493)
* Chore: Upgrade typescript to 4.1
2020-12-03 15:05:59 +00:00
Ryan McKinley
3c9310e93c
GraphNG: support auto and explicit axis width (#29553)
* auto axis

* auto axis

* expand everyhting with the same scale/unit

* expand everyhting with the same scale/unit
2020-12-03 09:30:40 +01:00
Ryan McKinley
0b6434d0e8
Overrides: show category on the overrides (#29556) 2020-12-02 22:17:24 -08:00
Leon Sorokin
22ec38b043
GraphNG: Bars, Staircase, Smooth modes (#29359)
* initial impl of Bars, Staircase, Smooth modes

* fix fillTo for staircase and smooth paths

* fix pointSize

* [bars] adjust gap factor & reduce bar width to include stroke width. remove rounding to favor gap & width uniformity over edge crispness.

* remove line path fallback for too-dense data

* "Auto" points mode implies "Never" for Bars

* slightly reduce x axis tick density

* fix bars height calc, make bars crisp again.

* [bars] don't use hard-coded 'x' scale key

* refactor catmullRomFitting() to accept x & y coord arrays. restrict to processing only visible data range.

* move path building functions to own file

* export typed functions

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-12-02 16:41:24 -06:00
Jack Westbrook
aa70a38391
Dashboards: hide playlist edit functionality from viewers and snapshots link from unauthenticated users (#28992)
* feat: hide snapshots menu item from viewers

* feat(playlists): prevent viewers from creating/editing playlists

* feat: prevent viewers seeing playlist nav link if no playlists

* refactor(playlist): rename isViewer property to canEditPlaylists

* revert(playlists): put back note if viewer and no playlists

* refactor(snapshots): consider admin/editor permission in folders/dashboards for displaying menu item

* feat(snapshots): only show snapshot nav item if user is signed in

* fix(snapshots): revert snapshots to previous state if delete snapshot api error
2020-12-02 15:51:22 +01:00
Torkel Ödegaard
068fef8c7c
QueryEditors: Refactoring & rewriting out dependency on PanelModel (#29419)
* Removing PanelModel usage from query rows

* More work removing dependency on panel model

* Before big change to query options

* Query options now have no dependency on panel model

* Test page is working

* Shared query now works again

* Rename component

* fix after merge

* Fixed issue with old angular editors
2020-12-02 15:42:54 +01:00
Ivana Huckova
2a61d7ff9f
IntelliSense: Fix autocomplete and highlighting for Loki, Prometheus, Cloudwatch (#29381)
* Pass languages directly to SlatePrism plugin

* Update

* Remove unused variables

* Update packages/grafana-ui/src/components/DataLinks/DataLinkInput.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

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

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

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

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

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

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

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

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Try Prism import instead of languages

* Update webpack

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2020-12-02 14:09:55 +01:00
Hugo Häggmark
3dcfe54d8d
Variables: Fixes Textbox current value persistence (#29481)
* Variables: Fixes savequery for Constant and TextBox variables

* Refactor: reverts textbox changes

* Refactor: Fixes dashboard export and tests

* Refactor: hides or migrates Constant variables

* Tests: fixes snapshots

* Variables: Fixes Textbox current value persistance

* Refactor: fixes PR comments and adds e2e tests
2020-12-02 14:08:35 +01:00
Uchechukwu Obasi
88b1517794
Icon: Changed the icon for signing in (#29530)
* Icon: changed the icon for signing in

Signed-off-by: Uchechukwu Obasi <obasiuche62@gmail.com>

* fixes test-frontend (I hope)
2020-12-02 13:50:53 +01:00
Marcus Andersson
863dbc7ba8
PanelEdit: making sure the correct datasource query editor is being rendered. (#29500)
* making sure we try to use the selected db in the query row.

* fixing so we use || instead of ??.
2020-12-02 11:04:42 +01:00
Chi-Hsuan Huang
73518bf1e7
Chore: Enable remaining eslint-plugin-react rules (#29519)
* Chore: Enable eslint react/no-render-return-value rule

Eanble the rule and remove the unused render return

part of: #29201

* Chore: Enable eslint react/no-children-prop rule

Not linting issues after turning on this. No other file changes requried

part of: #29201

* Chore: Enable eslint react/no-unknown-property rule

Correct enable-background to enableBackground

part of: #29201

* Chore: Enable eslint react/no-unescaped-entities rule

Replaced " with &quot; replaced ' with &apos;

part of: #29201
2020-12-02 10:03:37 +01:00
Uchechukwu Obasi
53cd59a5a5
Datasources: fixed long error message overflowing container (#29440)
* Fixed: error message overflow container

Signed-off-by: Uchechukwu Obasi <obasiuche62@gmail.com>

* used min-width property for better styling

Signed-off-by: Uchechukwu Obasi <obasiuche62@gmail.com>

* Switched to Alert component

* Fixed passing aria-label to Alert component

* Fixed e2e test (I hope)

* another attempt to fix e2e

* Fixed display name

Co-authored-by: Uchechukwu Obasi <obate@Uchechukwus-MacBook-Pro.local>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-02 09:30:28 +01:00
Ivana Huckova
a54e0ff79d
Loki: Add query type and line limit to query editor in dashboard (#29356)
* WIP Add line limit and query type switch toLoki dashboard editor

* Refactor, reuse code for both - Explore and Dashboard

* Üpdate snapshot tests

* Refactor and unify

* Rename test file

* Update test
2020-12-01 20:43:35 +01:00
Torkel Ödegaard
34f2a72ff2
DataLinks: Removes getDataSourceSettingsByUid from applyFieldOverrides (#29447)
* DataLinks: Removes getDataSourceSettingsByUid from applyFieldOverrides and data linking code

* Fixed test

* Fixed a few tests

* Fixed unit tests

* Removed old getDataSourceSettingsByUid from interface, still there for runtime backward compatability
2020-12-01 19:10:23 +01:00
Zoltán Bedi
9913ac73fb
Bug: trace viewer doesn't show more than 300 spans (#29377)
* Fix: trace viewer scroll issue

* Fix lazy loading

* Listview test fixes

* Move scrollElement to props
2020-12-01 17:43:56 +01:00
Ryan McKinley
e0dee06252
Live: publish all dashboard changes to a single channel (#29474) 2020-12-01 07:56:56 -08:00
Chi-Hsuan Huang
546f569e0c
Chore: Enable eslint-plugin-react partial rules (#29428)
* Chore: Enable eslint react/display-name

Enable react/display-name and fixed the corresponding linting issue

part of: #29201

* Chore: Enable eslint react/no-deprecated

Enable react/no-deprecated and add the UNSAFE_ prefix for deprected methods

part of: #29201

* Chore: Enable eslint react/no-find-dom-node

Enable react/no-find-dom-node rule and use ref instead

part of: #29201

* Test: Update TeamGroupSync test snapshot

Since we added the displayName for ToolTip compontent and tag name is changed.

* Fix: Fixed ClickOutsideWrapper render

The props.children might contains numbers of nodes which make cloneElement failed. Change to simply use a div to wrapper
the children and assign the ref to div for this feature

* Style: Use shorthand method definition style for inline component

* Fix: Rebase master and fix linting

Rebase from master branch and fix new displayName linting warning
2020-12-01 16:19:52 +01:00
Paweł Ślusarczyk
ccac8d2294
Alerting: Update alertDef.ts with more time options (#29498)
there was a troublesome jump between time ranges of 1h and 24h in previous version
2020-12-01 15:34:15 +01:00
Torkel Ödegaard
38caa80acd
DataSourceSrv: Look up data source by uid and name transparently (#29449)
* Datasources: Look up data source by uid or name transparently

* comment tweak

* Removed config

* fixed type issues

* Initialize datasource srv

* Added deprecation notice

* Renamed getSettingsFor to getInstanceSettings

* fixed ts issue
2020-12-01 15:17:33 +01:00
Hugo Häggmark
fb622650f3
Variables: Fixes Constant variable persistence confusion (#29407)
* Variables: Fixes savequery for Constant and TextBox variables

* Refactor: reverts textbox changes

* Refactor: Fixes dashboard export and tests

* Refactor: hides or migrates Constant variables

* Tests: fixes snapshots
2020-12-01 15:02:49 +01:00
Zoltán Bedi
207831fa39
Prometheus: don't override displayName property (#29441)
* Prometheus: don't override displayName property

* Rename displayName to displayNameFromDS for consistency
2020-12-01 10:36:38 +01:00
Totalus
754aca25c5
Transformation: added support for excluding/including rows based on their values. (#26884)
* Adding FilterByValue transformer skeleton

* Connecting options with Editor

* Improving UI and making deep copy of options on change.

* Improving Transformation Editor UI

* Implementing Regex filtering

* Adding valueFilters.ts and creating filter registry

* Connecting the test function

* Correcting TypeScript errors

* Using FilterInstance instead of simple Filter test function

* Adding field.type as filter options

* Improving UI. Adding custom placeholder depending on filter.

* Implementing a few more filter types

* Implementing more filters

* Return original data if no filter were processed

* Improving UI

* Correcting TS errors

* Making sure inequality transform are invalid until the filterExpression is not empty

* Cleanup in the UI file

* Improving UI (highlight invalid fields)

* Only show filterType that are supported for the selected field

* Adding tests + correction of a filter

* Adding transformer test

* Adding doc

* Cleanup

* Typing props for FilterSelectorRow component

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Moving rendering in the JSX

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Memoizing filterTypeOptions computation

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Improve code compactness

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Cleanup + solving TS errors

* Updating some labels

* Wrapping stuff around useMemo and useCallback

* Using cloneDeep from lodash

* Don't highlight field name input if null

* Removing time type fields in selectable options

* We want loose equality in this scenario.

* Adding `onChange` to useCallback dependencies

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Include or exclude matching any or all conditions

* Correcting field name matching

* Cleanup

* Don't highlight the filterExpression input when its empty

* Adding Range filter

* Updating doc

* Correcting TS error

* Only showing the Match All/Match Any option if more than one condition

* Two inputs for the Range filter instead of one

* Improving invalid highlight for Range filter type

* Cleanup

* Improving labels in UI

* Using ButtonSelect to improve UI

* editor UI updates.

* Updating tests

* Adding component for Regex

* Improve TS typing

* Adding components for the other filter types.

* Cleanup

* Correct error

* Updating valueFilter.test.ts

* Updating filterByValue.test.ts

* Reverting and removing Range filter

* Update docs/sources/panels/transformations.md

* starting to implement poc.

* added a small poc.

* wip

* added tests.

* added structure for dynamic value matcher editors.

* added more support.

* added some more value matchers.

* removed unused value filters.

* added some more matchers.

* adding more matchers.

* added a range matcher.

* fixing some tests.

* fixing tests.

* remove unused dep.

* making the matching a bit more performant.

* UX improvements and alignment fixes

* fixed delete button.

* fixed some spacing in the UI.

* added docs for matchers.

* adding docs and exposing value matcher types.

* will store dateTime as string.

* updated docs according to feedback.

* moved filter by value in transformation list.

* Improved description.

* added regex value filter.

* added support for regex.

* fixing failing tests.

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-01 10:22:37 +01:00
Ryan McKinley
097dcc456a
MinMax: keep global min/main in field state (#29406) 2020-11-29 09:22:16 -08:00
Todd Campbell
643f790753
Alerting: Add support for Sensu Go notification channel (#28012)
* Add support for Sensu Go notification channel

Similar to current support for the older "Core" version of
Sensu, this commit add support for the newer version.

Closes #19908

Signed-off-by: Todd Campbell <todd@sensu.io>

* fix linter errors

Signed-off-by: Todd Campbell <todd@sensu.io>

* Apply suggestions from code review

PR review suggestions

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

* Fix no new variables error

* Replace convey testing with testify

Signed-off-by: Todd Campbell <todd@sensu.io>

* Wording suggestions

Signed-off-by: Todd Campbell <todd@sensu.io>

* Add docker compose environment for testing/maintenance

Signed-off-by: Todd Campbell <todd@sensu.io>

* Renamed and fixed docker-compose.yaml to work in devenv

Signed-off-by: Todd Campbell <todd@sensu.io>

* Change sensugo web UI port to 3080 so as not to conflict with grafana

Signed-off-by: Todd Campbell <todd@sensu.io>

* Apply suggestions from code review

Set the API key as a secure value.

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

* Add Sensu Go information to notifications doc

Signed-off-by: Todd Campbell <todd@sensu.io>

* Update pkg/services/alerting/notifiers/sensugo.go

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

* change assert to require for Error/NoError tests

Signed-off-by: Todd Campbell <todd@sensu.io>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-11-27 19:09:24 +02:00
Hugo Häggmark
dece028820
Variables: Fixes issue with upgrading legacy queries (#29375)
* Variables: Fixes issue with upgrading legacy queries

* Tests: adds tests for upgradeLegacyQueries
2020-11-27 10:20:57 +01:00
Torkel Ödegaard
2179aa0fa7
Queries: Extract queries from dashboard (#29349)
* Moving query stuff out of dashboard folder

* Moved more stuff

* Moving more stuff

* Update

* WIP test page

* Minor change

* Before big changes

* Fixed test
2020-11-26 18:12:02 +01:00
Torkel Ödegaard
bba1208c3d
PanelEvents: Refactors and removes unnecessary events, fixes panel editor update issue when panel options change (#29414)
* Refactoring some events to new events

* More refactoring

* Make panel editor subscribe to new event

* Minor change and comment added

* Updated snapshot
2020-11-26 15:14:57 +01:00
Peter Holmberg
26e3b61f92
Fix: Correct panel edit uistate migration (#29413) 2020-11-26 14:57:32 +01:00
Peter Holmberg
06e48cb869
Fix: Migrate Panel edit uiState percentage strings to number (#29412) 2020-11-26 13:27:50 +01:00
Alexandru Bumbacea
16107f3784
* prometheus fix variables fetching when customQueryParameters used #28907 (#28949) 2020-11-26 10:56:14 +01:00
Hugo Häggmark
b904e0c621
Chore: Removes observableTester (#29369) 2020-11-26 10:32:02 +01:00
Ryan McKinley
ae7328fbd5
Arrow: cast timestams to Number (#29402) 2020-11-25 15:14:21 -08:00
Ryan McKinley
a33249fecc
PanelEditor: allow access to the eventBus from panel options (#29327) 2020-11-25 11:32:14 -08:00
kay delaney
2af4deedd2
Panels/DashList: Fix order of recent dashboards (#29366)
Closes #29182
2020-11-25 13:39:02 +00:00
Peter Holmberg
0b2a6ec7fe
Core: Move SplitPane layout from PanelEdit. (#29266)
* move split pane logic to its own component

* fix update function typing

* destruct updateuistate

* updates after review

* reword the rightpane to work for text panel
2020-11-25 11:24:06 +01:00
Hugo Häggmark
04d857dfe6
Variables: Adds description field (#29332)
* Variables: Adds description field

* Refactor: Adds new Form components

* Refactor: Fixes aria labels

* Refactor: removes skipped tests

* Refactor: Breaks out smaller select components

* Refactor: removes gf-form div

* Refactor: Breaks up several more selects into smaller components

* Chore: Fixes typings
2020-11-25 10:21:48 +01:00
Torkel Ödegaard
8e9778215b
Heatmap: Fixes issue introduced by new eventbus (#29322) 2020-11-24 09:31:25 +01:00
Ivana Huckova
83329ae7e4
Explore/Logs: Update Parsed fields to Detected fields (#28881)
* Change all parsed fields and functions to detected fields

* Update

* Sneak in UI improvement, add tooltip

* Update docs/sources/whatsnew/whats-new-in-v6-5.md

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

* Update docs/sources/whatsnew/whats-new-in-v6-5.md

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

* Remove changes from old Whats new

* Rename LogMessageParsed

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-11-23 20:10:09 +01:00