Commit Graph

12022 Commits

Author SHA1 Message Date
Torkel Ödegaard
b6d76cdba7
PanelEdit: Vertically align padding for panel edit option group body (#27310)
* PanelEdit: Center padding for panel edit group body

* fixed padding
2020-09-04 22:03:26 +02:00
kay delaney
444f2d5896
Dependencies: Adds @testing-library/user-event for best practices (#27397)
Adds @testing-library/user-event so that best practices can be followed
when writing tests
2020-09-04 16:38:27 +01:00
Pranit Bauva
a54df0c3cd
Login: Honour root_url for Forget Password related links (#27368)
Closes #27226
2020-09-04 13:58:22 +02:00
Hugo Häggmark
bba4770509
PanelInspector: Adds a Raw display mode but defaults to Formatted display mode (#27306)
* PanelInspector: Fields with overrides are formatted correct in CSV

* Refactor: adds raw format

* Refactor: changes switch to Formatted values

* Tests: adds tests for applyRawFieldOverrides and getRawDisplayProcessor

* Test: change to utc timeZone

* Refactor: changes after PR comments
2020-09-04 11:21:24 +02:00
Ryan McKinley
ae385983f4
InfluxDB: support flux editor for template queries (#27370) 2020-09-03 14:11:39 -07:00
Ryan McKinley
b867050cfb
Annotations: improve datasource annotation types and add basic query properties (#27342) 2020-09-03 10:41:25 -07:00
Hugo Häggmark
d633cc3c09
Tests: removes unused stuff and replaces monaco transpile with mock (#27324) 2020-09-03 08:54:46 +02:00
Ryan McKinley
febbc60e8b
RangeUtils: migrate logic from kbn to grafana/data (#27347) 2020-09-02 23:54:06 -07:00
Hugo Häggmark
ff1149ac39
Table: Adds column filtering (#27225)
* Table: Adds column filters

* Refactor: adds filter by value function

* Refactor: some styling and sorting

* Refactor: Moves filterByValue to utils

* Tests: add filterByValue tests

* Refactor: simplifies filteredValues

* Refactor: adds dropshadow

* Refactor: keeps icons together with label and aligns with column alignment

* Refactor: hides clear filter if no filter is active

* Refactor: changes how values in filter are populated

* Refactor: adds filterable field override

* Tests: fixed broken tests

* Refactor: adds FilterList

* Refactor: adds blanks entry for non value labels

* Refactor: using preFilteredRows in filter list

* Refactor: adds filter input

* Refactor: fixes issue found by e2e

* Refactor: changes after PR comments

* Docs: adds documentation for Column filter

* Refactor: moves functions to utils and adds tests

* Refactor: memoizes filter function

* Docs: reverts docs for now
2020-09-01 17:06:35 +02:00
Torkel Ödegaard
1f6c2dbcfb
Thresholds: Fixed issue with thresholds in overrides not working after save and reload (#27297)
* WIP: Fix null thresholds in overrides when loading

* Fix thresholds on load instead of in apply field overrides

* simplify expression

* fixed ts issue

* Updated test

* Updated another test

* Updated another test
2020-09-01 16:00:38 +02:00
Hugo Häggmark
8ec2aa02c6
Loki: Replaces dataSourceRequest with fetch (#27265)
* Loki: Replaces dataSourceRequest with fetch

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

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

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2020-09-01 06:21:21 +02:00
Torkel Ödegaard
4b8f4df18d
Graph: Preseve existing data links in field config when loading dashboard (#27295)
* Graph: Preseve existing data links in field config

* ts fix
2020-08-31 17:53:21 +02:00
Totalus
7db42f0a3c
Transformations: Adding group by and aggregate on multiple fields transformation
* Adding Occurences transformer

* Adding test for Occurences Transformer

* Cleanup. Adding a test.

* Adding doc

* Modifying UI to support custom calculations options

* Implementing data transformation

* Finalizing calculations implementation

* Cleanup

* Using Fields instead of arrays in data grouping

* Renaming transformation to GroupBy

* Adding some doc

* Apply suggestions (solving TS typing errors)

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

* Tweaking UI

* Preventing of selecting twice the same field name.

* Removing console print. No calculations by default.

* Forgot to add the current value to the GroupBy selector

* Solving some typing issues and prettyfier errors

* Cleanup

* Updating test

* Ensure proper copy of options (solves some issues)

* Check if the fields exist in the data before processing

* Adding missing import in test file

* If group by field not specified, return all data untouched.

* Adding another missing import in test

* Minor updates

* Implementing GroupBy multiple fields + Improve field typing

* Removing console prints

* Allowing the exact number of fields to be added as aggregation

* Centering remove button icon

* Cleanup

* Correcting TS error

* Chaging transformer options structure

* Sorting so GroupBy fields appear on top

* Cleanup

* Simplifying some operations. Adding curly brackets.

* Changing some labels on the UI

* Updating test

* Cleanup

* Updating doc

* Fixed field list. Storing options as Record instead of Array.

* Update test

* Cleaned up the group by editor UI code.

* changed the transform to a table layout instead of a flexbox layout.

* cleaned up group by transformer.

* removed unused imports.

* Added some more tests.

* Added one more test and cleaned up code.

* fixed failing test.

* Fixed so we we have the proper casing on naming.

* fixed so we don't wrap on the first row.

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2020-08-31 10:46:30 +02:00
Dominik Prokop
6dbb803b3f
Transformations: enable transformations reordering (#27197)
* Transformations: enable queries reorder by drag and drop

* Satisfy ts

* Update unicons and replace ellipsis with draggabledot

* remove import

* Remove that snap

* Review

* review 2
2020-08-31 08:47:27 +02:00
Steven Vachon
611d416f91
Selector improvements for E2E (#27271) 2020-08-28 12:59:56 -04:00
Torkel Ödegaard
7d72837d40
DataFrame: Data source field naming control that does not use field.config.displayName (#27186)
* Field naming simple fix

* fixed unit tests

* Updated to use displayNameDS config

* Update packages/grafana-data/src/types/dataFrame.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Updated name

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-08-28 18:22:01 +02:00
Steven Vachon
c45cf83776
@grafana/e2e: selector improvements (#27235)
* Added labels and selectors for explore page

* Added selector for annotations

* Used selector for time picker label
2020-08-27 10:36:24 -04:00
Ivana Huckova
58627a0c38
Loki: Re-introduce running of instant queries (#27213)
* Run instant queries for loki

* Add catch for instant query errors, update test
2020-08-27 10:32:36 +02:00
kay delaney
262a42b249
UI/ClickOutsideWrapper: Adds parent prop for situations where event should be on document (#27221) 2020-08-27 09:18:34 +01:00
Torkel Ödegaard
093477c036
Dashlist: Tweaked design of folder addition (#27241) 2020-08-27 09:49:07 +02:00
Torkel Ödegaard
5e27654298
Dashboard: Ignore cancelled api request error when loading dashboard (#27232) 2020-08-27 08:55:26 +02:00
Alex Khomenko
a1e6090008
Grafana-UI: BarGauge docs (#27188)
* Grafana-UI: Add mdx file

* Grafana-UI: remove _BarGauge.scss

* Grafana-UI: Update snapshot

* Grafana-UI: Fix tests

* Grafana-UI: Use selector
2020-08-26 14:44:08 +03:00
Simon Podlipsky
7121d1e63f
Chore: Use uuid v4 as an identifier instead of Date.now() (#27178) 2020-08-26 11:38:39 +02:00
Michel Engelen
ad2e74d1fe
Dashboard: Adds folder name and link to the dashboard overview on the homepage (#27214)
* Chore: Added foldername to the dashboard overview on the startpage

## Dashlist

### added
- new `<span>` containing `dash.folderTitle`
- styling for the newly created `<span>`

### changed
- added sass-nesting to classes in `_panel_dashlist.scss`

closes #26869

* Chore: Added foldername to the dashboard overview on the startpage

## Dashlist

### changed
- added `ng-if` directive to the dashlist-folder span

* Chore: Added foldername to the dashboard overview on the startpage

## Dashlist

### changed
- added folder-icon and removed brackets to indicate `folderTitle`
- changed font-size of folderTitle-`span` and added left margin
2020-08-26 10:13:20 +02:00
Zoltán Bedi
86e44eec02
Prometheus: fix rate_interval to use min step properly (#27168)
* Prometheus: fix rate_interval to use min step properly

* Update docs/sources/features/datasources/prometheus.md

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

* Simplify `getRateIntervalScopedVariable` (#27174)

Signed-off-by: beorn7 <beorn@grafana.com>

* Modify rate_interval tests to use createQuery

* Change test wording + intervalfactor

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Björn Rabenstein <beorn@grafana.com>
2020-08-25 18:55:08 +02:00
Torkel Ödegaard
ddabf4ade1
Transforms: Labels to fields rewrite that uses merge transform inside it (#27125)
* testing things

* POC: Simplify labels to fields by using merge transform inside it

* removed old code

* Fixed test ts issues

* Added valueLabel field option

* Updated merge transform tests to not expect a sort

* fixed type

* refactoring to minimize nesting
2020-08-25 09:40:49 +02:00
Simon Podlipsky
84eb03e7e5
BackendSrv: Use uuid v4 as an identifier instead of Date.now() (#27176) 2020-08-25 08:58:21 +02:00
Dominik Prokop
f7950491a3
Field overrides: Overrides UI improvements (#27073)
* Add filter name by regex matcher for overrides

* Update docs

* Introduce UI improvements to overrides list

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

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

* Review improvements

* Fix merge

* Remove ellipsis

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2020-08-24 12:07:44 +02:00
Hugo Häggmark
09a1af3f91
Variables: Fixes issue with All variable not being resolved (#27151)
* Variables: Fixes issue with All variable not being resolved

* Tests: update tests according to changes
2020-08-24 09:29:21 +02:00
Hugo Häggmark
a73e6f728d
Prometheus: Use fetch instead of deprecated datasourceRequest (#27090)
* Prometheus: replaces dataSourcRequest with fetch

* Tests: fixes typings

* Refactor: removes unnecessary from operator

* Refactor: removes weird json() function calls

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

* Update public/app/plugins/datasource/prometheus/metric_find_query.test.ts

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

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2020-08-21 06:03:59 +02:00
Fredrik Enestad
e962f02fbc
Explore/Loki: Toggle parsed fields in logs view (#26178)
* POC for toggling parsed fields in Explore/Loki

* fixed issues

* add clear button for toggled parsed fields

* fix test-frontend failures

* use blue eye instead of eye/eye-slash and update tooltips

* break out parseMessage

* move indicator to meta data section

* clean up LogRowMessageParsed

* better label

* clean up after making optional
2020-08-20 16:28:10 +02:00
Alex Khomenko
6b2d44416d
Testing: Use React Testing Library (#27072)
* Add RTL

* Add setupTests.ts

* Refactor DashboardSearch tests
2020-08-20 16:21:42 +03:00
Hugo Häggmark
3504009914
FolderPicker: Fixes not being able to create new folder (#27092)
* FolderPicker: Fixes not being able to create new folder

* Update public/app/core/components/Select/FolderPicker.tsx

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

* Refactor: Fixes import issues for tests that do not mock GrafanaBootConfig

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-08-20 14:54:58 +02:00
Torkel Ödegaard
451af74728
Table: Support date unit formats on string values (#26879)
* DisplayProcessor: Support parsing strings as dates and using date units on strings

* Updated test

* Updated test
2020-08-20 12:50:45 +02:00
Hugo Häggmark
9e357d84a4
BackendSrv: Queues data source requests but passes through api requests (#26947)
* Refactor: initial commit

* wip

* Refactor: getting into a simpler model

* Refactor: adds some comments

* Refactor: renames statuses according to PR comments

* Refactor: adds more comments

* Tests: adds tests for FetchQueue

* Tests: adds tests for ResponseQueue

* Tests: adds tests for FetchQueueWorker

* Tests: simplified the tests for ResponseQueue

* Refactor: adds http2 scenario

* Refactor: using Cfg instead of global variable

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

* Refactor: reverted change in frontendsettings.go

* Tests: fix test mocks

* Fix: changes how cfg.Protocol gets its value

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-20 11:32:10 +02:00
Arve Knudsen
95432fb684
InfluxDB: Update Flux placeholder URL with respect to latest Go client (#27086)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-20 09:46:43 +02:00
Torkel Ödegaard
5aba6fde41
Rendering: Fixed issue rendering text panel to image via image renderer plugin (#27083)
Fixes #26996
2020-08-20 08:52:26 +02:00
Torkel Ödegaard
37b3087b2c
PanelHeader: Fix issue with panel header text ellipsis showing before needed (#27082) 2020-08-20 08:51:59 +02:00
kay delaney
a1f90521a0
CloudWatch Logs: Move query response stats to appropriate FrameMeta property (#26732)
* CloudWatch Logs: Move query response stats to appropriate FrameMeta property
2020-08-19 15:18:04 +01:00
Hugo Häggmark
0755390286
MixedDatasource: Shows retrieved data even if a data source fails (#27024)
* MixedDatasource: Shows data for working data sources and error for erroneous

* Tests: remove funky import

* Tests: fixes types
2020-08-19 08:52:40 +02:00
Ivana Huckova
3d18c4d614
Pass scoped vars to create label (#27047) 2020-08-19 08:29:23 +02:00
Ivana Huckova
eafc132d3d
Loki: Add scopedVars support in legend formatting for repeated variables (#27046)
* Pass scoped vars to createMetricLabel

* Add tests

* Refacotr

* Update tests

* Update test
2020-08-19 08:28:50 +02:00
Zoltán Bedi
f33158dcdf
Prometheus: parse value as number when label is le (#26375)
* Prometheus: parse value as number when label is le

* Convert prometheus table value back to string for modify query
2020-08-18 14:47:25 +02:00
Hugo Häggmark
bd75adf515
Templating: Fixes so texts show in picker not the values (#27002) 2020-08-17 07:04:27 +02:00
Sofia Papagiannaki
7ad1e3663c
Playlists: Remove API validation for empty playlists and remove redundant API call (#26982)
* Remove validation from empty playlists

* Remove redundant API call

Frontend used to call /api/playlists/:id/items directly after /api/playlists/:id but items are already included in the first response
2020-08-14 11:59:50 +03:00
Ivana Huckova
bb0f17ce59
Loki: Fix refresh on time range change for template variable queries (#26968)
* Pass timerange and aadd tests

* Update test
2020-08-14 10:33:37 +02:00
Ivana Huckova
1915d10980
Remove brackets from escaped value if just 1 value (#26995) 2020-08-13 19:15:34 +02:00
Zoltán Bedi
aae25c5308
Prometheus: add $__rate_interval variable (#26937)
* Add rate interval variable to prometheus data source

* Add tests + auto complete

* Fix prometheus tests

* Add doc

* Modify test title

* Modify kbn method name after merge
2020-08-13 18:58:40 +02:00
Torkel Ödegaard
5398ef1103
Templating: Fixed recursive url update issue for textbox variable (#26981)
* Templating: Fixed recursive url update issue for textbox variable

* Updated link

* updated e2e
2020-08-13 14:38:27 +02:00
Ivana Huckova
eeeea7fb8d
Explore: Capitalize dedup strategy in radio buttons for consistency (#26961)
* Update LogsDedupStrategy enum to keep consistent with radio button capitalization

* Revert "Update LogsDedupStrategy enum to keep consistent with radio button capitalization"

This reverts commit 0b05cd4e00.

* Capitalize dedup strategy in radio buttons
2020-08-13 11:40:58 +02:00