Commit Graph

13482 Commits

Author SHA1 Message Date
Torkel Ödegaard
eed1f36613
Links: Fix links to other apps outside Grafana when under sub path (#36498) 2021-07-07 15:25:59 +02:00
Thomas Cave
3e95c3826a
CloudWatch Logs: If Grafana Live isn't enabled, don't use the Live Channel (#36358)
* If Live isn't enabled, don't use the Live Channel

* ..Import Config if you want to use it!
2021-07-07 13:39:32 +02:00
Torkel Ödegaard
a241f03167
TimeSeries: Support coloring series and line by thresholds or gradient color scales (#35910)
* TimeSeries: Adds support for color scheme series and line colors

* Updates

* fixed device issue

* Evaluate series color in legend

* two fixes

* It works with points

* Added test dashboard

* Minor fix

* Reset color mode to palette when switching to panel that supports by series mode

* Add support for relative thresholds

* Updated snapshots
2021-07-07 12:40:40 +02:00
Michael Alex
7538739881
Fixed a typo in AnalyticsConfig.test.tsx file (#36439) 2021-07-07 09:12:59 +02:00
Dominik Prokop
b361fc751c
PanelOptions: Don't mutate panel options/field config object when updating (#36441)
* PanelOptions: Don't mutate panel options/field config object when updating

* Review

* maybe faster, plus value === '' fix

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-07 08:58:07 +02:00
Zoltán Bedi
55e763b4cd
Prometheus: interpolate variable for step field (#36437)
* Prometheus: interpolate variable for step

* Add test for variable interpolation
2021-07-07 08:43:46 +02:00
Ben Bodenmiller
0c20cc1d12
Chore: remove extra "only" (#36494) 2021-07-06 20:45:55 -07:00
Torkel Ödegaard
17707d886a
PanelEditor: Fixes issue minor UI issue with editing non data panels (#36463) 2021-07-06 18:01:13 +02:00
Matthias Blümel
b49b7faeee
Transformation: show message if not applied on single frame (#36469)
* Transformation: show message if not applied on single frame

* Use FieldValidationMessage component instead

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-07-06 16:41:28 +02:00
Ashley Harrison
cc4d301d50
Annotations: Add typeahead support for tags in builtin annotations (#36377)
* Annotations: create React component, naive attempt at hooking together

* Annotations: Use query object instead of passing annotation

* Annotations: Hook up the new api to get annotation tags

* Annotations: Use InlineFieldRow instead of gf-form-inline

* Annotations: Use InlineSwitch instead of gf-form-switch

* TagFilter: Add support for allowCustomValue

* Annotations: Update to match backend api

* Annotations: Add basic tests, expose inputId on `TagFilter`

* Annotations: Fix test name and reorder tests slightly

* Annotations: Use FieldSet instead of gf-form-group

* Refactor: fixes annotation queries

* Annotations: Everything working, just types to fix...

* Annotations: Fix types?

* Revert "Annotations: Fix types?"

This reverts commit 6df0cae0c9.

* Annotations: Fix types again?

* Annotations: Remove old angular code

* Annotations: Fix unit tests for AnnotationQueryEditor

* Annotations: Check if it's an annotation query immediately

* Annotations: Prevent TagFilter overflowing container when there are a large number of tags

* Change to new form styles

* Annotations: Add id's + fix unit tests

* Updated wording

* Annotations: Allow custom value to preserve being able to use template variables

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-07-06 10:50:46 +01:00
Josh Hunt
2a4191a2ee
AzureMonitor: Fix issue where resource group name is missing on the resource picker button (#36400)
* AzureMonitor: Fix issue where resource group name is missing in the UI

* fix
2021-07-06 11:22:47 +02:00
fabio-silva
d87e086d6f
Dashboard: avoid and correct invalid date ranges (i.e. to < from) (#34543)
* Dashboard: invert invalid date ranges from URL

* Dashboard: discard invalid date ranges from inputs

* Dashboard: move time range reset

* Dashboard: simplify undefined dashboard verification

* Dashboard: show form error on invalid date range

* Dashboard: rename function to isRangeInvalid

* Dashboard: refactor invalid check functions

* Dashboard: different error messages for date picker

* Dashboard: add date tests to TimeRangeForm
2021-07-06 10:46:17 +02:00
Ivana Huckova
b77f6d59bd
Loki: Add support for ad-hoc filtering in dashboard (#36393)
* Add support for ad-hoc filtering in dashboards

* Add tests

* Add documentation

* Update docs/sources/variables/variable-types/add-ad-hoc-filters.md

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

* Remove unused import

* Refactor and simplify

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-06 10:30:27 +02:00
Ivana Huckova
666656c925
Loki: Add $__range variable (#36175)
* Add  variable to Loki

* Add tests

* Update, remove redundant options

* Add missing import

* Update docs/sources/datasources/loki.md

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

* Update docs/sources/datasources/loki.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-06 08:56:01 +02:00
Ryan McKinley
3a6ec01c05
Dashboards: load dashboards from a data source (#36366) 2021-07-05 15:35:10 -07:00
Andres Martinez Gotor
759f9c44cb
Add a button to clear Azure Monitor Logs credentials (#36256) 2021-07-05 11:12:56 +02:00
Armand Grillet
7fb233cfb1
Theme: Add margin-bottom to .markdown-html tables (#36415) 2021-07-05 08:40:56 +02:00
Ivana Huckova
09e49f6118
Docs: Improve title and documentation for share shortened link in Explore (#36380)
* Improve title and documentation for share shortened link in Explore

* Update docs/sources/explore/_index.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-02 16:14:55 +02:00
Karl Persson
2fd7031102
Access Control: Add fine-grained access control to explore (#35883)
* add fixed role for datasource read operations

* Add action for datasource explore

* add authorize middleware to explore index route

* add fgac support for explore navlink

* update hasAccessToExplore to check if accesscontrol is enable and evalute action if it is

* add getExploreRoles to evalute roles based onaccesscontrol, viewersCanEdit and default

* create function to evaluate permissions or using fallback if accesscontrol is disabled

* change hasAccess to prop and derive the value in mapStateToProps

* add test case to ensure buttons is not rendered when user does not have access

* Only hide return with changes button

* remove internal links if user does not have access to explorer

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-07-02 14:43:12 +02:00
Selene
ef05596e07
Allow white labeling loading logo (#36174)
* Allow to whitelabeling loading logo

* Add loading_logo to documentation

* Change loading_logo to loading_logo_url
2021-07-02 14:17:10 +02:00
Torkel Ödegaard
09fed51be5
Snapshots: Fixex snapshots absolute time range issue (#36350) 2021-07-02 13:05:11 +02:00
Hugo Häggmark
b741245960
DashboardQueryRunner: Fixes unrestrained subscriptions being created (#36371) 2021-07-02 10:52:13 +02:00
Tharun Rajendran
36592e0927
Chore: Add tests for ChangePasswordPage and SendResetMailPage (#36313)
* added tests for changePassword and forgotPassword  component

* added tests for ChangePassword screen in user profile section

* addressed review changes
2021-07-01 17:01:09 +03:00
Olof Bourghardt
16f7e61639
Prometheus: use TimeSeries instead of Graph in Prometheus 2.0 Stats dashboards (#36120)
* changed panels to TimeSeries

* Change panels to time series in Prometheus Stats dashboards

* Change Grafana metrics panels to time series

* Change name of datasource
2021-07-01 14:08:42 +02:00
Ivana Huckova
742c737784
Logs panel: Add option to show common labels (#36166)
* Add common labels to Logs panel

* Clean up and add tests

* Update documentation

* Update public/app/plugins/panel/logs/LogsPanel.tsx

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Fix type error

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-07-01 14:06:58 +02:00
Marcus Andersson
c9e28044f1
Alerting: view to display alert rule and its underlying data. (#35546)
* add page and basic things

* quick annotations

* added so we can run queries on the view rule page.

* wip.

* merge

* cleaned up the combined rule hook.

* readd queries

* fixing so you can run queries.

* renamed variable.

* fix rerenders and visualizing

* minor fixes.

* work in progress.

* wip

* a working version that can be tested.

* changing check if we have data.

* removed unused styling.

* removed unused dep.

* removed another dep.

* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts

Co-authored-by: Domas <domas.lapinskas@grafana.com>

* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts

Co-authored-by: Domas <domas.lapinskas@grafana.com>

* refactored and changed UI according to figma.

* resseting menu item.

* removing unused external link.

* refactor according to feedback.

* changed so we always fetch the rule.

* fixing so datasource only is displayed once. Also changed so we only navigate to alert list when rule has been deleted.

* removed unused dep.

* Will display query as json if we can't find data source.

* changed to a function instead of the React.FC.

* refactoring of id generation and added support to generate ids for native prometheus alerts without ruler.

* set max width on page content

* added page where you can easily link to a rule in grafana.

* listing rules with same name.

* fixing error cases.

* updates after pr feedback

* more pr feedback

* use 1h-now as timerange

* remove unused import

* start on test

* add test for cloud case

* add ruleview render test

* add render tests for grafana and cloud alerts

* add mock for backendsrv

* add rendering test for the find route

* check if cards are rendered

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-07-01 12:02:41 +02:00
Jack Westbrook
4434eeaf59
Profile: Fix failing FE reducer test (#36331) 2021-07-01 09:58:49 +02:00
Leon Sorokin
b8010ba9f5
Web compat: polyfill MediaQueryList.addEventListener() for Safari < 14 (#36274) 2021-06-30 21:36:03 -05:00
Zoltán Bedi
8aeb1cc030
Prometheus: Fix performance issue in editor when too many ids (#36176) 2021-06-30 21:28:18 +02:00
Tharun Rajendran
3b4916853c
chore: Signup Page Component tests (#36279)
* added tests for SignupPage component

* added tests for VerifyEmailPage component

* addressed review changes

* removed id for button and followed consistent id naming pattern
2021-06-30 17:11:27 +02:00
Tharun Rajendran
9f3e84b16c
Routes: Redirect signup user and verify email if settings is disabled (#36303)
Fixes #31635
2021-06-30 13:56:09 +02:00
Giordano Ricci
1490c255f1
Elasticsearch: Persist custom value for size option in Terms Bucket Agg (#36194)
* Add custom hook to handle creatable select options

* Refactor Terms Settings Editor

* Make props of Bucket Aggregation settings editors consistent

* Rename hook to something more descriptive

* Move render test helper

* Add tests

* small refactor

* Remove useless test
2021-06-30 11:20:28 +02:00
Torkel Ödegaard
6f38883583
Graph: Workaround for DashboardQueryRunner race condition (#36254)
* Graph: Workaround for DashboardQueryRunner race condition

* Removed deepClone
2021-06-30 10:36:05 +02:00
Leon Sorokin
f9fb5ba637
TimeSeries: Bring back axis label padding (#36281)
* TimeSeries: bring back some axis label padding

* Update snaps

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-06-30 10:02:56 +02:00
Simon Podlipsky
9dc3c7cc69
Update DashboardGrid.tsx (#36246) 2021-06-30 09:06:17 +02:00
Hugo Häggmark
3999d670cf
Chore: adds buffersize to ReplaySubject (#36286) 2021-06-30 09:05:04 +02:00
Ivana Huckova
abb1c10776
Update getTimeRangeParams to return start & end instead of from & to (#36268) 2021-06-29 18:06:42 +02:00
Tharun Rajendran
c3e26657e9
LoginPage: add tests (#36226)
* added tests for LoginPage component

* addressed review changes and removed snapshot
2021-06-29 17:08:50 +03:00
Giordano Ricci
0a2a6690d9
Elasticsearch: Allow case sensitive custom options in date_histogram interval (#36168)
* Elasticsearch: make interval select handle case-sensitive input

* Elasticsearch: Allow case sensitive custom options in date_histogram interval

* asd is not a good input id
2021-06-29 09:51:05 +01:00
Ryan McKinley
ab2f6fe24c
Live: attach stream info to streaming frames (#35465) 2021-06-28 14:57:10 -07:00
Ryan McKinley
b361921bb2
Live: support tempate variables in query (#36193) 2021-06-28 22:27:03 +02:00
Avneep Dhanju
32aa162d7c
AzureMonitor: Add curated dashboards for Azure services (#35356)
* AzureMonitor: Curated dashboards.

* Adding ADX insights and minor fixes.
2021-06-28 17:55:26 +01:00
Ivana Huckova
a721dd42b3
Explore: Fix import of queries between SQL data sources (#36210)
* Remove datasource property when importing same ds type queries

* Refactor imported queries

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-06-28 16:12:46 +02:00
Ester Martí Vilaseca
81a79aef23
Elasticsearch: add rate aggregation (#33311)
* Elasticsearch: add first version of rate aggregation

* Add test for rate aggreation settings editor

* Fix unit

* Add default value for mode for rate agg

* Add todo

* Revert "Add default value for mode for rate agg"

This reverts commit a44c985d8b.

* Fix width when select is empty

* Add rate aggregation to elasticsearch models

* Remove rate aggregation from extended stats

* Move elastic2 docker block & add elastic (latest)

* Add versionRange to rate aggregation

* add 7.10 elasticsearch version option

* Set supportsInlineScript to true for rate aggregation

* Remove fixed width from select

* Change seconds label for rate aggregation unit options dropdown

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Elfo404 <me@giordanoricci.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-06-28 11:55:31 +01:00
Giordano Ricci
a97259f07d
Elasticsearch: Name fields after template variables values instead of their name (#36035)
This reverts commit 185bf8f9a2.
2021-06-26 18:37:44 +01:00
Ashley Harrison
b8b90ec74f
TimeSeries: Preserve RegExp series overrides when transforming from old graph (#36134) 2021-06-25 09:50:08 +01:00
Piotr Jamróz
dcfe78f23b
Explore: Fix unexpected error when loading Explore 2021-06-24 16:16:23 +02:00
kay delaney
aae3b76d84
Chore: Upgrade typescript to version 4.3.4, storybook to 6.3.0 (#35374)
* Chore: Upgrade typescript to version 4.3.4, storybook to 6.3.0
2021-06-24 15:29:03 +02:00
Tobias Skarhed
4be9afb7e2
Signup: Add verify email route (#36113) 2021-06-24 13:07:14 +02:00
Ivana Huckova
d1df0727e7
Loki: Fix highlight of logs when using filter expressions with backticks (#36024)
* Add highlight for backticks and queries with parser

* Fix escaping for backticks and quotes
2021-06-24 12:55:25 +02:00