Commit Graph

12049 Commits

Author SHA1 Message Date
Torkel Ödegaard
7f6e979056
Fixes typescript issues (#27565) 2020-09-14 10:02:25 +02:00
Torkel Ödegaard
b37e132cec
Annotations: Fixes issue with showing error notice for cancelled annotation queries (#27557) 2020-09-14 09:59:12 +02:00
Torkel Ödegaard
8759a91222
PanelEdit: Drag and drop query order & UI tweaks (#27502)
* PanelEdit: Drag and drop query order & UI tweaks

* Fixed width of title issue

* added correct color and hover

* Updated e2e tests
2020-09-14 08:54:42 +02:00
Marcus Andersson
0c8390cea2
Templating: global/system variables should be properly replaced in templated values. (#27394)
* Fixed so we try to use the variables in the redux store to replace values in template variables.

* First draft of working version.

* Including fieldPath when adding :text format.

* cleaned up code by introducing helper function.

* some minor refactoring.

* Added tests and support for multi variables.

* added test and code to handle the All scenario of a multivariable.

* fixed according to feedback.

* added docs.

* added text format to gdev dashboard.

* updated e2e tests.

* make sure we use the same function for formatting och variable lable.

* increased the number to 22.

* changed label for tests to be All.

* existing format should be respected.
2020-09-14 08:05:51 +02:00
Ryan McKinley
5d11d8faa3
Annotations: add standard annotations support (and use it for flux queries) (#27375) 2020-09-11 08:09:44 -07:00
Berbe
794333de3d
Binary-prefixed data rates (#27022)
* Dashboard: Merge Data units categories

Prefixes already allow to distinguish IEC units from SI ones
+ Prefer using binary function over decimal one when equal

* Dashboard: Clarify SI & binary prefixes

* Dashboard: Homogeneise rate units

* Dashboard: Add Binary (IEC) prefix for data rates
2020-09-11 10:42:54 +02:00
Torkel Ödegaard
0132bca93a
Notifications: UX tweak to redesign of form and sections to make it left aligned and cleaner (#27479)
* UX: Redesign of form and sections to make it left aligned and cleaner

* reduced padding

* design tweaks
2020-09-11 08:10:07 +02:00
Zoltán Bedi
a7ac3f1419
Prometheus: Fix min step variable interpolation (#27505)
* Add missing dependency to lockfile

* Prometheus: Fix min step variable interpolation
2020-09-10 20:31:53 +02:00
Peter Holmberg
400aafa3b3
Migration: Edit notification channel (#25980)
* implement edit page

* connectWithCleanup

* remove angular related code

* use loadingindicator

* use the correct loading component

* handle secureFields

* fixed implementation of secure fields

* Keep secureFields after rerendering the form

* CollapsableSection and Page refactor

* use checkbox instead of switch

* fix comment

* add cursor to section

* Fixed issues after PR review

* Fix issue with some settings being undefined

* new reducer and start with test

* algorithm to migrate secure fields

* UX: Minor UI Tweaks

* Added field around checkboxes, and missing required field

* fixed test

* tests for util

* minor tweaks and changes

* define as records

* fix typ error

* forward invalid to textarea and inputcontrol

* merge formdata and redux data in test

* fix issue with creating channel

* do not figure out securefields in migration

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-09-09 12:46:19 +02:00
Giordano Ricci
1e2f3ca599
Explore: Expand template variables when redirecting from dashboard panel (#27354)
* Explore: Add interpolateVariablesInQueries to opentsdb  datasource

* Explore: Add interpolateVariablesInQueries to cloudwatch datasource

* Explore: Add interpolateVariablesInQueries to CloudMonitoring datasource

* Explore: Add interpolateVariablesInQueries to Azure datasource

* Explore: Add dimensions to interpolateMetricsQueryVariables in cloudwatch datasource
2020-09-09 10:00:43 +01:00
Hugo Häggmark
5520cd2c68
Chore: fixes build errors (#27466) 2020-09-09 08:57:07 +02:00
Torkel Ödegaard
431a53594b
Inspect: Fixed missing rows issue in inspect data (#27422) 2020-09-09 08:47:18 +02:00
Hugo Häggmark
b3fb25010c
DashboardSettings: Fixes auto refresh crash with space in interval (#27438)
* DashboardSettings: Fixes auto refresh crash with space in interval

* Tests: fixes typings

* Refactor: validets onBlur and other PR comments

* Tests: adds component tests

* Refactor: changes after PR feedback
2020-09-09 07:45:51 +02:00
Liam Stanley
023054bc62
heatmap: reduce the aggressiveness of hiding ticks/labels (#27016) 2020-09-09 06:53:17 +02:00
Kyle Brandt
9bab551d8b
AzureMonitor: change filterDimensions property to match what is stored (#27459)
Changes the dimensionsFilters property to dimensionsFilter in the Azure Monitor Datasource's AzureMonitor service to make what is sent to match the saved model.

Before this, the property that the backend was expecting was not available in the case of alerting, where the stored model is fetched.

This also fixes a panic when there is a dimension alias but no dimension
2020-09-08 15:12:08 -04:00
Alex Khomenko
32f99669ff
Search: refactor tests to use react-testing-library (#27352)
* Search: refactor SearchItem.test.tsx

* Search: refactor SearchResults.test.tsx

* Search: mock search_srv

* Search: refactor SearchResultsFilter.test.tsx

* Search: remove redundant mocks

* Search: fix type errors

* Search: move selectors to e2e-selectors
2020-09-08 18:01:38 +03:00
Peter Holmberg
cf2597421b
Analytics: Respect appsuburl in tracking url (#27442)
* add suburl if it exists

* remove log

* remove another log
2020-09-08 15:38:04 +02:00
Dominik Prokop
377485cf4c
Panel view: Make sure repeated panel has inView property set correctly (#27424)
* Make sure repeated panel has inView property set correctly

* Test

* Update public/app/features/dashboard/state/DashboardModel.ts

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

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2020-09-08 14:19:54 +02:00
Melchior MOULIN
dfc78d0979
Explore: Transform prometheus query to elasticsearch query (#23670)
* Explore: Transform prometheus query to elasticsearch query

Enable a way to transform prometheus/loki labels to elasticsearch query.
This make a link between metrics to logs.
Examples:
A prometheus query : rate(my_metric{label1="value1",label2!="value2",label3=~"value.+",label4!~".*tothemoon"}[5m])
Will be this elasticsearch query when switching to elasticsearch datasource:  __name__:"my_metric" AND label1:"value1" AND NOT label2:"value2" AND label3:/value.+/ AND NOT label4:/.*tothemoon/

* fix test

* remove non needed async

* Use prism token instead of regex

* fix test ./scripts/ci-frontend-metrics.sh

* mock timesrv and TemplateSrv in test

* Remove unnecessary await/async

Co-authored-by: Melchior MOULIN <m.moulin@criteo.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2020-09-08 12:34:11 +02:00
Alex Khomenko
6fabfee097
Search: replace cog icon (#27440) 2020-09-08 12:04:40 +03:00
Zoltán Bedi
09c9571462
Explore: table result should not override display property (#27411) 2020-09-08 11:04:25 +02:00
Domas
9acb99904a
Elasticsearch: Fixes localized dates in index pattern (#27351)
Fixes #8403
2020-09-07 18:27:56 +02:00
Kamal Galrani
f6c31c2e10
Fixes signup workflow and UI (#26263)
* fixes signup flow

* Apply suggestions from code review

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

* Update ForgottenPassword.tsx

* fixes build failure

* fixes build failure

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2020-09-07 18:24:46 +03:00
Torkel Ödegaard
61bd33c241
System: Date formating options (#27216)
* Add support for local time formats in graph panel

* Enfore 24h format for backward compatibility

* Use existing Intl.DateTimeFormatOptions

* Pre-generate time scale, add tests

* Move localTimeFormat, add local format to units

* updated default fallback

* #25602, use navigator.languages to enforce locale in formatting

* Making options

* Worked new system settings

* things are working

* Local browser time formats working

* Support parsing dates in different formats

* settings updated

* Settings starting to work

* Fixed graph issue

* Logs fix

* refactored settings a bit

* Updated and name change

* Progress

* Changed config names

* Updated

* Updated

* Updated test

* Synced description

* fixed ts issue

* Added version notice

* Ts fix

* Updated heatmap and test

* Updated snapshot

* Updated

* fixed ts issue

* Fixes

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2020-09-07 16:19:33 +02:00
kay delaney
783391a861
CloudWatch Logs: Adjusts CloudWatch Logs timeout logic (#26621)
* CloudWatch Logs: Adjusts CloudWatch Logs timeout logic

Previously CloudWatch Logs queries would time out if,
after a number of attempts, a response was received with no additional data.
This commit changes the behavior so that a consecutive number of requests
yielding no additional data must be made before we cancel the query
2020-09-07 14:41:36 +01:00
Sofia Papagiannaki
b3b28e9f25
Failed to load application files message improvement (#26214)
* Failed to load application files message improvement

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-09-07 10:53:13 +03:00
Hugo Häggmark
72c3257d19
BackendSrv: Uses credentials and defaults to same-origin (#27385)
Co-authored-by: Liu Yang yangliuyu@163.com
2020-09-04 22:11:34 +02:00
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