Commit Graph

12510 Commits

Author SHA1 Message Date
Josh Hunt
4c0acf335b
Grafana-UI: Refactor Checkbox to fix alignment issues (#36164)
* Grafana-UI: Fix Checkbox vertical layout issues

* reorganise css

* WIP for fixing checkboxes in manage dashboards

* Cleanup checkbox and fix issue in Dashboard manage page

* update tests
2021-07-08 14:09:58 +02:00
kay delaney
8d66db09bf
Timeseries Panel: Retain alerts when migrating from old graph (#36514)
Closes #36106
2021-07-08 10:47:32 +02:00
Dominik Prokop
7df0010412
TimeSeries panel: Allow adding annotations from the panel (#36220)
* First stab on UI for adding annotations in time series panel

* Extend panel context with annotations api

* Annotations editor UI & CRUD

* Prevent annotation markers to overflow uPlot canvas

* Do not overflow graphing area with region annotations

* Align annotation id type

* Fix exemplar markers positioning

* Use clipping region rather than adjusting annotation region bounds

* Smaller icons

* Improve annotation tooltip and editor auto positioning, reorg code

* Renames

* Enable annotations ctx menu only when adding annotations is allowed

* Wrap setSelect hooks diring init hook

* Use TagFilter instead of TagsInput

* Add id to annotation events

* Add support for cmd+click for adding point annotations

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-07-08 10:39:03 +02:00
Nathan Rodman
a0dac9c6d9
Alerting: Add alertmanager notifications tab (#35759)
* Add alertmanager notifications tab

* Link to silences page from am alert

* Include summary for alertmanager group

* Fix colors for am state

* Add horizontal dividing line

* PR feedback

* Add basic unit test for alert notificaitons

* Rename Notificaitons component file

* Polling interval to groups

* Add alertmanager notifications tab

* Link to silences page from am alert

* Include summary for alertmanager group

* PR feedback

* Add basic unit test for alert notificaitons

* Rename Notificaitons component file

* Alerting: make alertmanager notifications view responsive (#36067)

* refac DynamicTableWithGuidelines

* more responsiveness fixes

* Add more to tests

* Add loading and alert state for notifications

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-07-07 16:17:26 -07:00
Kevin Minehart
ec45afa6b0
include URL arguments in dashboard resource request (#36526)
* include URL arguments in dashboard resource request
2021-07-07 21:42:49 +02:00
Torkel Ödegaard
a67eaf6b62
DashboardPage: Refactor state to fix state timing bugs and reduce unnecessary re-renders (#36460)
* DashboardPage: Refactoring state handling to improve performance and fix bugs with state out of sync

* Fixed exit panel editor timing issues

* New tests in RTL

* Updated comment

* Removed unused imports
2021-07-07 18:39:45 +02:00
Torkel Ödegaard
96a51561a3
Angular: Fixing some annoying depreaction warnings (#36466) 2021-07-07 18:39:10 +02:00
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
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
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