Commit Graph

12391 Commits

Author SHA1 Message Date
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
Dominik Prokop
7e21863982
GraphNG: Init refactorings and fixes (#29275)
* When comparing field config, shallowly compare custom config

* Refactoring plot init and data update (WIP)

* GraphNG: Fixed points mode

* Fixed min & max from frame config

* Fixed axis left / right auto logic

* Minor tweak to cursor color

* Fixed time axis now that uPlot deals in milliseconds as well

* fixed ts issue

* Updated test

* Fixed axis placement logic again

* Added new unit test for axis placement logic

* Removed unused props

* Fixed zoom issue due to uPlot time resolution change

* Add back millisecond time tick support

* Comment out GraphNG test

* Fixed being able to switch legend on/off

* Updated unit tests

* GraphNG: Fixed hiding axis

* Frame comparison: allow skipping properties

* Update y-axis ranges without reinitializing uPlot

* update snap

* GraphNG: Fixed axis label placement and spacing issues

* update snaps

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-11-23 19:07:02 +01:00
Marcus Andersson
81859880d3
Annotations: fixing so when changing annotations query links submenu will be updated. (#28990)
* fixing so changes to annotations query links will update submenu.

* Refactored so we dont use the events to trigger a refresh but instead recreating the annotations list instead of mutating the existing list.

* updated snapshot.

* uppdates according to feedback.

* fixed so it also works to update a annotation.
2020-11-21 12:35:18 +01:00
Giordano Ricci
f5916260bd
Chore: Allow reducerTester to work with every data type & payload-less actions (#29241) 2020-11-20 13:11:52 +00:00
Ivana Huckova
6838af5ce1
Explore/Prometheus: Update default query type option to "Both" (#28935)
* Update default option to 'both'

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

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

* Fix running of queries for both

* Update wording

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-11-20 12:08:10 +01:00
Ivana Huckova
4c103663fb
Loki/Explore: Add query type selector (#28817)
* Create query type switcher

* Add and update tests

* Add handling in datasource

* Refactor

* Update tests, when checking higlighting, suppy logs

* Remove both option as redundant

* Add tooltip, remove old comments

* Remove unused importts

* Remove console.log, update width

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

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

* Update tests

* Prettier fixes

* Fix test

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2020-11-20 11:12:34 +01:00
Hugo Häggmark
9ba8114bd4
Variables: New Variables are stored immediately (#29178)
* Refactor: Adds getNextAvailableId

* Refactor: Hides DependencyGraph button if there are no dependencies

* Refactor: Changes the new button

* Refactor: Removes usages of NEW_VARIABLE_ID

* Refactor: Reverts the new button
2020-11-20 10:51:32 +01:00
Dominik Prokop
a312f1ae80
Increase search limit on team add user and improve placeholder (#29258) 2020-11-20 08:57:19 +01:00
Dominik Prokop
671b319315
Fix warnings for conflicting style rules (#29249)
* Bump popper

* Bump react-transition group

* Fix react conflicting style ruls warning

* Fix ts
2020-11-20 08:12:42 +01:00
Timothy Palpant
c94e8e61a9
Make backwards compatible (#29212) 2020-11-19 21:08:16 +01:00
Torkel Ödegaard
993adb72e0
TimeRegions: Fixed issue with time regions and tresholds due to angular js upgrade (#29229) 2020-11-19 14:37:04 +01:00
Hugo Häggmark
32d4c8c6bc
CloudWatch: Support request cancellation properly (#28865) 2020-11-19 14:10:38 +01:00
Hugo Häggmark
f9281742d7
CloudMonitoring: Support request cancellation properly (#28847) 2020-11-19 14:09:08 +01:00
Kyle Brandt
0cb29d337a
Expressions: Move GEL into core as expressions (#29072)
* comes from grafana/gel-app
* remove transform plugin code
* move __expr__ and -100 constants to expr pkg
* set OrgID on request plugin context
* use gtime for resample duration
* in resample, rename "rule" to "window", use gtime for duration, parse duration before exec
* remove gel entry from plugins-bundled/external.json
which creates an empty array for plugins
2020-11-19 07:17:00 -05:00
Andrej Ocenas
66cdc18705
Refactor/Explore: Inline datasource actions into initialisation (#28953)
* Inline datasource actions into initialisation

* Fix datasource change

* Fix rich history

* Fix test

* Move rich history init to Wrapper

* Remove console log

* TS fixes

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2020-11-19 11:33:52 +01:00
Alex Khomenko
2c4899a4cd
Grafana UI: Card API refactor (#29034)
* Refactor API

* Fix types

* Cleanup

* Remove useMemo

* Update actions

* Update story

* Align secondary actions

* Replace snapshot tests

* Update docs

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

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

* Allow overriding child props

* Fix types and remove alpha tags

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2020-11-19 09:48:56 +02:00
Zaki Haris
6d0a98b249
Plugins: Changed alertlist alert url to view instead of edit (#29060) 2020-11-18 20:15:26 +01:00
Torkel Ödegaard
ec218de05e
React: Upgrading react to v17, wip (#29057)
* React: Upgrading react, wip

* build(grafana-ui): bump react to v17

* build: get enzyme running with react 17

* chore(grafana-ui): declare isMemo namedExport for rollup

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2020-11-18 19:37:17 +01:00
Ryan McKinley
d85d547ab3
BackendSrv: support binary responseType like $http did (#29004) 2020-11-18 09:35:28 -08:00
Ryan McKinley
1895626080
GraphNG: update the options config (#28917) 2020-11-18 08:46:44 -08:00
Will Browne
2939caf9a2
Permissions: Validate against Team/User permission role update (#29101)
* validate against role field update

* lowercase error string

* make all msgs consistent style

* fix wording

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

* sayonara simple json

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-18 15:36:41 +01:00
Dominik Prokop
0cfb967404
ESlint: React fixes part 1 (#29062)
* Eslint: allign with latest grafana-eslint-config

* fix ts

* Fix react/jsx-key

* Fix react/no-children-prop

* Fix react/jsx-no-target-blank
2020-11-18 15:36:35 +01:00
Hugo Häggmark
4b711372c5
Tests: Adds expects for observables (#28929)
* Tests: Adds expects for observables

* Refactor: renames matcher

* Chore: changed jest version and removed as dev dependency

* Refactor: Changes after PR review

* wip

* Chore: revert

* Chore: Adds jest-matcher-utils

* Chore: fixed merge error

* Tests: Removed inline snapshots as they are env dependent

* Tests: missed a snapshot

* Refactor: Removed type file after PR comments
2020-11-18 15:18:55 +01:00
Hugo Häggmark
112a755e18
Variables: Adds new Api that allows proper QueryEditors for Query variables (#28217)
* Initial

* WIP

* wip

* Refactor: fixing types

* Refactor: Fixed more typings

* Feature: Moves TestData to new API

* Feature: Moves CloudMonitoringDatasource to new API

* Feature: Moves PrometheusDatasource to new Variables API

* Refactor: Clean up comments

* Refactor: changes to QueryEditorProps instead

* Refactor: cleans up testdata, prometheus and cloud monitoring variable support

* Refactor: adds variableQueryRunner

* Refactor: adds props to VariableQueryEditor

* Refactor: reverted Loki editor

* Refactor: refactor queryrunner into smaller pieces

* Refactor: adds upgrade query thunk

* Tests: Updates old tests

* Docs: fixes build errors for exported api

* Tests: adds guard tests

* Tests: adds QueryRunner tests

* Tests: fixes broken tests

* Tests: adds variableQueryObserver tests

* Test: adds tests for operator functions

* Test: adds VariableQueryRunner tests

* Refactor: renames dataSource

* Refactor: adds definition for standard variable support

* Refactor: adds cancellation to OptionPicker

* Refactor: changes according to Dominiks suggestion

* Refactor:tt

* Refactor: adds tests for factories

* Refactor: restructuring a bit

* Refactor: renames variableQueryRunner.ts

* Refactor: adds quick exit when runRequest returns errors

* Refactor: using TextArea from grafana/ui

* Refactor: changed from interfaces to classes instead

* Tests: fixes broken test

* Docs: fixes doc issue count

* Docs: fixes doc issue count

* Refactor: Adds check for self referencing queries

* Tests: fixed unused variable

* Refactor: Changes comments
2020-11-18 15:10:32 +01:00
Dominik Prokop
05fbc614bd
Refactor declarative series configuration to a config builder (#29106)
* Wip: refactor declarative series configuration to a config builder

* Fix plugins initialization

* Config builder reorg and tests

* Typecheck

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

* Scales config tweak

* Temp disable tests

* Disable some tests temporarily
2020-11-18 11:14:24 +01:00
Miguel Carvajal
a134ed7bf9
Panels: fix positioning of the header title (#29167)
the menu toggle icon is now absolute positioned and it no longer  affects the centering of the menu title
2020-11-18 10:10:43 +01:00
Marcus Andersson
4c0aa4acd5
DashboardLinks: will only refresh dashboard search when changing tags for link. (#29040)
* fixing so we dont run multiple dashboard links searches when changing variables.

* changed so we fetch the list when open the dashboard links dropdown.

* removed verification of unneccesary requests.
2020-11-18 07:11:36 +01:00
Torkel Ödegaard
0f3bebb38d
Snapshots: Fixes so that dashboard snapshots show data when using Stat, Gauge, BarGauge or Table panels (#29031) 2020-11-17 10:25:36 +01:00
Domas
3423ef864c
respect fronted-logging.enabled flag (#29107) 2020-11-17 08:49:39 +01:00
Torkel Ödegaard
28ce2f12ed
Legend/GraphNG: Refactoring legend types and options (#29067)
* Legend/GraphNG: Refactoring legend types and options

* Rename label

* Minor update

* Fixed legend placement crash issue

* remove unused

* Minor tweaks and fixes
2020-11-13 17:08:55 +01:00
Timothy Palpant
fc7edab8fd
Plugins: Implement testDatasource for Jaeger (#28916)
* Implement testDatasource for Jaeger

* Unit tests

* Run prettier
2020-11-13 13:11:24 +01:00
Torkel Ödegaard
dff451992d
Graph: Fixes stacking issues like floating bars when data is not aligned (#29051)
* Graph: Remove interpolation logic from graph stacking

* Improving tooltip
2020-11-13 10:32:08 +01:00
kay delaney
1bb61660f1
Chore: Migrate Dashboard List panel to React (#28607)
* Chore: Migrate Dashlist to React
Closes #28491
2020-11-12 16:21:09 +00:00
Domas
76df096791
Logging: Log frontend errors (#28073)
* basic frontend  Sentry integration

* backend endpoint to capture sentry events

* WIP!

* log user email for frontend logs

* remove debug logging

* lint fixes

* Fix type exports & property names

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

* additional struct naming fix

* rename log endpoint, config section & interface

* add sentry sample rate to config

* refac to use EchoSrv

* log user id

* backend tests

* tests for SentryEchoBackend

* sentry echo backend tests

* CustomEndpointTransport tests

* Update pkg/api/frontend_logging_test.go

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

* Update conf/defaults.ini

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

* Update pkg/api/frontend_logging_test.go

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

* don't export unnecesasrily

* update go.sum

* get rid of Convey in tests, use stdlib

* add sentry config to sample.ini

* cleanup to set orig logging handler in test

* Apply suggestions from code review

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

* PR feedback changes

* lock sentry version

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-12 12:29:43 +01:00
Sofia Papagiannaki
0c054d1a9f
Fix for multi-value template variable for project selector (#29042) 2020-11-12 11:03:51 +02:00
vishesh92
c93dfeaac4
Fix links to logql docs (#29037) 2020-11-11 20:00:47 +01:00
Chris Cowan
4ed7612e57
Elasticsearch: Add Moving Function Pipeline Aggregation (#28131)
* Elasticsearch: Add Moving Function Pipeline Aggregation

* Removing support for moving average in 7.x

* Fixing getMetricAggTypes to handle undefined esVersion

* Adding moving_fn to go code

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

Co-authored-by: Giordano Ricci <grdnricci@gmail.com>

* Adding test for esversion 70

* Removing default value for script, adding placeholder instead

* Fixing formatting

* Adding code for handling missing or obsolete aggregations

Co-authored-by: Giordano Ricci <grdnricci@gmail.com>
2020-11-11 17:42:28 +00:00
Torkel Ödegaard
040cfe074f
MutableDataFrame: Remove unique field name constraint and values field index and unused/seldom used stuff (#27573)
* MutableDataFrame needs work

* Updated users of values

* Update test

* Fixed ts issue

* Updated tests
2020-11-11 18:21:51 +01:00
Valentin Agachi
2c724e0aa2
Explore: support ANSI colors in live logs (#28895)
Closes #28893

Co-authored-by: Ivana <ivana.huckova@gmail.com>
2020-11-11 14:58:45 +01:00
Jack Westbrook
6d40206431
Dashboard: remove usage of Legacyforms (#28707)
* refactor(dashboard): remove usage of legacyform components in sharemodal

* refactor(dashboard): replace legacyform components

* refactor(dashboard): remove ng-if and correct typo in content of sharesnapshot

* feat(grafana-ui): set displayName prop for Switch component

* refactor(dashboard): migrate TimePickerSettings legacyform components

* refactor(queryoptions): migrate switch and input to nextgen components

* refactor(sharesnapshot): prefer InlineFieldRow over gf-form-group

* refactor(shareembed): styling fixes

* refactor(timepickersettings): prefer double bang over nullish coalescing operator

* fix(grafana-ui): switch uses id prop if passed in

* feat: connect labels and switches with ids
2020-11-11 14:52:22 +01:00
Giordano Ricci
d99c553a71
Elasticsearch: interpolate variables in Filters Bucket Aggregation (#28969) 2020-11-11 12:56:43 +00:00
Torkel Ödegaard
cbd28cd28b
Annotations: Fixes error when trying to create annotation when dashboard is unsaved (#29013) 2020-11-11 12:18:45 +01:00
David
28383bcfac
TraceViewer: Make sure it does not break when no trace is passed (#28909)
* TraceViewer: Make sure it does not break when no trace is passed

- exit trace conversion early when there is no trace data
- added test to cover missing trace for trace viewer

* Review feedback

* Use RTL for new test

* Exit early if trace or traceID is not there
2020-11-11 12:10:12 +01:00
Paul Dee
9f48bdb016
MySQL: Update README.md (#29003)
* Update README.md

sp

[skip ci] [ci skip]

* Update public/app/plugins/datasource/mysql/README.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-11-11 07:47:08 +01:00
Torkel Ödegaard
99b6ea47c0
IntervalVariable: Fix variable tooltip (#28988) 2020-11-11 07:45:12 +01:00
Hugo Häggmark
7abf0506b1
MSSQL: Support request cancellation properly (Uses new backendSrv.fetch Observable request API) (#28809)
* MSSQL: Support request cancellation properly (Uses new backendSrv.fetch Observable request API)

* Tests: fix test typings
2020-11-11 06:19:43 +01:00
Hugo Häggmark
8f4e50f439
Variables: Fixes loading with a custom all value in url (#28958) 2020-11-11 06:19:09 +01:00
Ryan McKinley
028c770963
StatPanels: set default to last (#28617) 2020-11-10 09:41:57 +01:00
Torkel Ödegaard
71fffcb17c
GraphNG: Using new VizLayout, moving Legend into GraphNG and some other refactorings (#28913)
* Graph refactorings

* Move legend to GraphNG and use new VizLayout

* Things are working

* remove unused things

* Update

* Fixed ng test dashboard

* Update

* More refactoring

* Removed plugin

* Upgrade uplot

* Auto size axis

* Axis scaling

* Fixed tests

* updated

* minor simplification

* Fixed selection color

* Fixed story

* Minor story fix

* Improve x-axis formatting

* Tweaks

* Update

* Updated

* Updates to handle timezone

* Updated

* Fixing types

* Update

* Fixed type

* Updated
2020-11-09 15:31:03 +01:00
Andrej Ocenas
76f4c11430
CloudWatch Logs: Change what we use to measure progress (#28912) 2020-11-09 15:17:56 +01:00
Andrej Ocenas
5bed54170e
Chore: Split Explore redux code into multiple sections (#28819)
* Split main reducer from item reducer

* Move query related redux to separate file

* Split more parts and tests

* Fix import

* Remove unused code

* Update public/app/features/explore/state/datasource.ts

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

* Add section comments

* Rename ExploreItem to ExplorePane

* Fix imports

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2020-11-09 14:48:24 +01:00
Torkel Ödegaard
8499d1408d
TestData: Fix issue with numeric inputs in TestData query editor (#28936) 2020-11-09 14:48:08 +01:00
Dominik Prokop
2ddda8f452
Plugins signing: Fix docs urls (#28930) 2020-11-09 13:32:48 +01:00
Dominik Prokop
2ea4a36bf7
Field color: handling color changes when switching panel types (#28875)
* FieldColor: Per panel settings to filter out supported modes

* Updates

* Updated solution

* Update panel plugin API for standard options support

* Update FieldColorConfigSettings interface

* Change color mode correctly when changing plugin type

* Render only applicable color modes in field color config editor

* Apply field config API changes

* TS fixes

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-11-09 13:11:09 +01:00
Marcus Andersson
2887f3f68b
Variables: make sure that we support both old and new syntax for custom variables. (#28896) 2020-11-09 10:37:59 +01:00
Sofia Papagiannaki
5b00b500a7
Chore: Fix spelling issue (#28904) 2020-11-09 09:39:15 +02:00
Paul Dee
0cbf034483
Loki: Correct grammar in DerivedFields.tsx (#28885)
grammarz 😉
2020-11-06 09:00:28 +01:00
Ryan McKinley
7308028a90
PanelHeader: show streaming indicator (and allow unsubscribe) (#28682) 2020-11-05 08:03:34 -08:00