Commit Graph

12736 Commits

Author SHA1 Message Date
Domas
9d8f61c738
Alerting: allow creating/editing recording rules for Loki and Cortex (#38064) 2021-08-24 10:31:56 +02:00
Vicky Lee
c5f384c654
docs: update cloud data sources README links (#37820)
* docs: update cloud data sources README links

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

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

* Apply suggestions from code review

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

* Update public/app/plugins/datasource/grafana-azure-monitor-datasource/README.md

* Update public/app/plugins/datasource/cloud-monitoring/README.md

Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-24 10:11:07 +02:00
Olof Bourghardt
05b0df2254
Zipkin: support running queries with keyboard shortcut (#37960)
* Zipkin: replace input field with QueryField component

* Fix failing tests

* Remove console.log

* Partially migrate test to react

* Zipkin: finish migration from enzyme to react

* Remove comments
2021-08-24 09:52:34 +02:00
Villena Guillaume
4cb87b6b60
Annotations Panel: Show annotations end time if present (#38425)
* Annotation Panel: Show annotation end time if present

* Added hyphen between dates
2021-08-23 20:57:44 -07:00
Ryan McKinley
425ec7ca9e
Schema: create a new schema package for basic models (#38409) 2021-08-23 13:03:41 -07:00
Tharun Rajendran
2156980edb
Datasource: add button to navigate to explore from settings (#36119)
Fixes #13737
2021-08-23 09:23:49 -06:00
Connor Lindsey
a2525005e5
Manually set query type in Tempo explore on component mount (#38408)
* Manually set query type in Tempo explore on component mount
2021-08-23 07:51:45 -06:00
Peter Holmberg
eba21f3145
Alerting: Append appSubUrl to links if present (#38069)
* append appSubUrl if present

* remove null check
2021-08-23 14:57:30 +02:00
Villena Guillaume
1b3eecddcd
Annotation Panel: Fix annotation with end time not being centered (#38423)
* Annotation Panel: Fix annotation with end time not being centered

* Update public/app/plugins/panel/annolist/AnnoListPanel.tsx

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

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-23 12:03:27 +01:00
Ryan McKinley
8c4c05493b
Dashboard: keep live timeseries moving left (v2) (#37769) 2021-08-20 14:48:55 -07:00
Ryan McKinley
b88f8bacf3
DataFrame: add frame type key to DataFrame structure (#38092) 2021-08-20 09:26:40 -07:00
Will Browne
ae17cce316
Plugins: Add Hide OAuth Forward config option (#36306)
* add prop

* add angular conf

* invert naming

* undo md changes

* fix wording

* y u fail 4 me

* refactor(datasourcesettings): rename hideForwardOAuthIdentityOption prop

* refactor(datasourcesettings): rename scope.hideForwardOAuthIdentityOption

* Update contribute/style-guides/e2e.md

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

* feat(datasourcehttpsettings): add showForwardOAuthIdentityOption to angular wrappers & template

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-20 15:53:54 +02:00
Olof Bourghardt
5231660627
Explore: use GrafanaTheme2 (LiveLogs component) (#37452)
* Explore: use GrafanaTheme2

* Explore: add correct style values. Add theme.v1 to the styles that were uncertain

* Logs: add use of GrafanaTheme2 in varioius log components

* Styles: add some of the correct values recieved via feedback

* Add correct style values

* Update public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Update public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Update public/app/plugins/panel/dashlist/styles.ts

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Explore: fix failing tests

* Explore: add styling values from v2

* Fix small type error

* Replace v1 styles with v2 styles

* Remove forgotten v1 values

* Remove more v1 style values

* Apply correct style value to LogRowMessage

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-08-20 14:53:03 +02:00
Hugo Häggmark
a0773b290b
Dashboard: Prevents folder change when navigating to general settings (#38103)
* Dashboard: Prevents folder change when navigating to general settings

* Tests: fixes broken tests

* Chore: changes from PR feedback
2021-08-20 11:53:48 +02:00
Nathan Rodman
df791ae2af
Alerting: Add custom grouping for alert groups (#37378)
* Group alertmangaer alerts by custom grouping

* Filter am groups

* Style filter components

* Style filter bar and add clear functionality

* rename components to alert group

* use query params for group filters

* filter style improvements

* add tests for group by

* Add grouping banner to better highlight groupings

* clean up hook logic
2021-08-19 09:22:52 -07:00
Connor Lindsey
6ed60c0bec
Tempo: Use echo endpoint when testing Tempo datasource (#38018)
* Use echo endpoint when testing Tempo datasource

* Remove unreachable error message

* Null check response
2021-08-19 09:56:03 -06:00
Connor Lindsey
76b891b001
Tempo: Add Tempo search behind feature flag (#37765)
* Add Tempo search behind feature flag

* Add query fields for Tempo search

* Only show loki search if a logs-to-traces datasource is set up

* Refactor tempo search to use separate fields for service name, span name, and tags

* Add tests to buildSearchQuery

* Move search to separate component and rename type to native search

* Improve Tempo tokenizer syntax
2021-08-19 09:15:46 -06:00
Josh Hunt
17306217aa
AzureMonitor: Support PostgreSQL and MySQL Flexible Servers (#38075) 2021-08-19 16:56:58 +02:00
Tobias Skarhed
1f091c448f
Template variables: Keyboard navigation improvements (#38001)
* Fix variable labels

* Add proper labeling for input

* Add ids to PickerRenderer

* Fix tests

* Update PR feedback

* OptionsPicker: Change to id

* Inherit aria attributes

* Add checkbox role

* Fix typo

* Add proper label reference

* Update role and label

* Prevent spreadng non-DOM attributes

* Move form layout to other component

* Remove haspopup

* Add testid to selector

* Add HTMLProps extension

* Use list

* Move styles outside of class

* Add cx
2021-08-19 16:28:25 +02:00
Olof Bourghardt
28cf93e42c
Explore: use GrafanaTheme2 (LiveTailButton component) (#37516)
* Explore: use GrafanaTheme2 in LiveTailsButton

* Remove unused theme
2021-08-19 16:17:28 +02:00
Ivana Huckova
7f8576ee37
Postgres: For template queries return [] and not error (#38060)
* Postgres: For template queries return [] and not error

* remove the console error

* update mssql and mysql

Co-authored-by: Ying WANG <ying.wang@grafana.com>
2021-08-19 13:43:41 +02:00
Leon Sorokin
ecfa32c8cb
AnnotationEditor: simplify plugin (#37463) 2021-08-19 06:40:40 -05:00
Hugo Häggmark
4ba2636aba
Dashboard: Fix so panels are rendered correctly on SoloPanelPage (#38050)
* Dashboard: Fix so panels are rendered correctly on SoloPanelPage

* Refactor: narrows down the path
2021-08-19 08:47:37 +02:00
Hugo Häggmark
dba15190af
Chore: Upgrades rxjs to 7.3.0 (#37913)
* Chore: upgrades rxjs to 7.3.0

* Chore: replaces toPromise with lastValueFrom

* Chore: removes unused mock that caused test error

* Chore: fixes build error in PieChartPanel

* Chore: fixed build error in requestAllIndices

* Chore: fixes comment

* Chore: trying to reduce docs errors

* Chore: searches for explicit api extractor warnings

* Chore: updates rxjs-spy to 8.0.0

* Chore: reverts to main

* Chore: upgrade rxjs and rxjs-spy
2021-08-19 06:38:31 +02:00
Villena Guillaume
646d95b8fb
TimeSeries: Support Ctrl key for marking annotations (#38034) 2021-08-18 16:38:02 -05:00
Leon Sorokin
49b129b110
GraphNG: fix mem leaks & avoid plot re-inits (#38017)
* State timeline: fix mem leak caused by excessive plot re-init

* Update PlotTooltipInterpolator type

* Do not reference config object in the setCursor hook

* fix excessive BarChart re-init caused by shallow diff of text config

* one less error

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-18 13:43:53 -05:00
Ole Ernst
c0d6fc0255
avoid duplicate log in development environment (#36609)
avoid logging performance metrics in production environment
2021-08-18 19:45:54 +02:00
Oscar Kilhed
21f45d4927
Postgres UUID group issue (#37999)
* Add UUID to types that can be grouped by

* Remove noop switch
2021-08-18 16:17:30 +02:00
Peter Holmberg
a7b22a73b6
Alerting: Add Copy link to Alert on View rule page (#37967)
* add button to page

* add url to getText

* reorder imports

* build url function

* remove log

* encode
2021-08-18 14:25:56 +02:00
Domas
cb9912ec0a
Alerting: button to test contact point (#37475) 2021-08-18 10:16:35 +03:00
Ryan McKinley
16b1922cdc
Devenv: remove unused options from timeseries panel (#37980) 2021-08-17 16:29:15 -07:00
Nathan Rodman
b153bb6101
Alerting: Add alertmanager notifications panel (#37078)
* Add filter parsing to rule list filters

* Add unit tests for label parsing

* Make label operators an enum

* add example for parsing function

* Update labels operator regex

* Use tooltip for query syntax example

* refactor to use Matchers for filtering

* wip: initial alertmanager notifications panel

* Panel for alertmanager notificaitons

* add filtering for notifications list

* remove icon

* rename am notifications to alert groups

* naming fixes

* Feature toggle

* Add toggle for expand all

* add pluralize

* add action buttons

* test work in progress

* Tests for alert groups panel

* Add useEffect for expandAll prop change

* Set panel to alpha state

* Fix colors

* fix polling interval callback

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

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-08-17 15:02:03 -07:00
Nathan Rodman
6579872122
Alerting: update matchers field operators to Select (#37809)
* Alerting: update matchers field operators to Select

* Add matcher field to routes

* fix default values

* min-width for matcher operator

* dry up matcher field options

* change MatcherField name to MatcherValue
2021-08-17 14:48:39 -07:00
Ryan McKinley
2ff4b028c8
Core: move dimensions out of geomap into app/features (#37946) 2021-08-17 13:43:54 -07:00
Piotr Jamróz
d93d989a5a
Graphite: Migrate to React (part 4 & 5: group all components) (#37590)
* Add UMLs

* Add rendered diagrams

* Move QueryCtrl to flux

* Remove redundant param in the reducer

* Use named imports for lodash and fix typing for GraphiteTagOperator

* Add missing async/await

* Extract providers to a separate file

* Clean up async await

* Rename controller functions back to main

* Simplify creating actions

* Re-order controller functions

* Separate helpers from actions

* Rename vars

* Simplify helpers

* Move controller methods to state reducers

* Remove docs (they are added in design doc)

* Move actions.ts to state folder

* Add docs

* Add old methods stubs for easier review

* Check how state dependencies will be mapped

* Rename state to store

* Rename state to store

* Rewrite spec tests for Graphite Query Controller

* Update docs

* Update docs

* Add GraphiteTextEditor

* Add play button

* Add AddGraphiteFunction

* Use Segment to simplify AddGraphiteFunction

* Memoize function defs

* Fix useCallback deps

* Update public/app/plugins/datasource/graphite/state/helpers.ts

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

* Update public/app/plugins/datasource/graphite/state/helpers.ts

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

* Update public/app/plugins/datasource/graphite/state/helpers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Add more type definitions

* Remove submitOnClickAwayOption

This behavior is actually needed to remove parameters in functions

* Load function definitions before parsing the target on initial load

* Add button padding

* Fix loading function definitions

* Change targetChanged to updateQuery to avoid mutating state directly

It's also needed for extra refresh/runQuery execution as handleTargetChanged doesn't handle changing the raw query

* Fix updating query after adding a function

* Simplify updating function params

* Migrate function editor to react

* Simplify setting Segment Select min width

* Remove unnecessary changes to SegmentInput

* Extract view logic to a helper and update types definitions

* Clean up types

* Update FuncDef types and add tests

* Show red border for unknown functions

* Autofocus on new params

* Extract params mapping to a helper

* Split code between params and function editor

* Focus on the first param when a function is added even if it's an optional argument

* Add function editor tests

* Remove todo marker

* Fix adding new functions

* Allow empty value in selects for removing function params

* Add placeholders and fix styling

* Add more docs

* Create basic implementation for metrics and tags

* Post merge fixes

These files are not .ts

* Remove mapping to Angular dropdowns

* Simplify mapping tag names, values and operators

* Simplify mapping metrics

* Fix removing tags and autocomplete

* Simplify debouncing providers

* Ensure options are loaded twice and segment is opened

* Remove focusing new segments logic (not supported by React's segment)

* Clean up

* Move debouncing to components

* Simplify mapping to selectable options

* Add docs

* Group all components

* Remove unused controller methods

* Create Dispatch context

* Group Series and Tags Sections

* Create Functions section

* Create Section component

* use getStyles

* remove redundant async/await

* Remove

* remove redundant async/await

* Remove console.log and silent test console output

* Do not display the name of the selected dropdown option

* Move Section to grafana-ui

* Update storybook

* Simplify SectionLabel

* Fix Influx tests

* Fix API Extractor warnings

* Fix API Extractor warnings

* Do not show hidden functions

* Use block docs for better doc generation

* Handle undefined values provided for autocomplete

* Section -> SegmentSection

* Simplify section styling

* Remove redundant div

* Simplify SegmentSection component

* Use theme.spacing

* Use empty label instead of a single space label

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-08-17 18:50:31 +02:00
Ashley Harrison
f8d7726187
DashboardGrid: compare window width against theme breakpoints (#37868) 2021-08-17 16:53:25 +01:00
Josh Hunt
1e221b6452
AzureMonitor: Show error message when subscriptions request fails in ConfigEditor (#37837)
* Fix jsdoc description for datasourceRequest

* Align default subscription width with other fields

* AzureMonitor: Show error message when requesting default subscriptions in ConfigEditor

* update snapshots:
2021-08-17 16:46:15 +01:00
Andrej Ocenas
11c848f00d
Tempo: Service map (#37661)
* Add prometheus queries

* Add stats

* Refactor transform

* Fix stat format

* Refactor transform

* Hide behind feature flag

* Better linking error messages

* Add test

* Add test for datasource

* Fix lint

* Make optionality checking more explicit
2021-08-17 15:48:29 +02:00
Hugo Häggmark
0d2aaed3e8
Annotations: Fixes so alert annotations are visible in the correct Panel (#37959) 2021-08-17 15:14:11 +02:00
Josh Hunt
afabc617ed
AzureMonitor: Apply query migrations in QueryEditor (#37704)
* move query migrations out of the angular controller

* Migrate queries in QueryEditor

* finish up migrations

* update deprecated comment

* remove comment
2021-08-17 14:03:18 +02:00
sam boyer
6aba592741
Schema: get all devenv dashboards passing validation (#37857)
* Strip nulls (again)

* Add stripnulls script

* Add transformations field

* Close FieldConfig struct; proper plugin validating

* s/graph/viz/ field in histogram dashboard

* Use ui.GraphFieldConfig in histogram model

* Add models for stat, gauge, barguage panel plugins

Also toss necessary shared types into cue/ui/gen.cue, with TODOs to move
them appropriately later.

* Add required license headers

* Heap of updates to cue UI components

* Fix barchart types and one old devenv input

* Use the GraphFieldConfig directly for timeseries

* Add models.cue for a few panel plugins

Barchart, state-timeline, and status-history

* Enable the test validating all devenv dashboards!!

* Fix effects of not checking after making comments

* Update packages/grafana-ui/src/options/models.gen.ts

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

* Realign and unalign cue with ts types

* Update devenv test to sniff for null errors

Best option we have right now for helping people to know they need to
strip nulls from devenv dashboards.

* Add speculative default for barchart stacking

* Fixup some dated devenv dashboards

timeline-modes needed to be regenerated with the appropriate tooltip
values included, per typing requirements, and timeline-demo needed to
have the `mode` field removed, as it is not intended to be persisted.

* Add necessary missing options for various panels

* Regenerate devenv dashboards

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-17 07:11:57 -04:00
Josh Hunt
368da73ac4
AzureMonitor: Fix crash from infinite render loop (#37924) 2021-08-17 11:50:37 +01:00
Olof Bourghardt
f433cfd8d9
Explore: add functionality for supporting different step modes in prometheus (#37829) 2021-08-17 07:48:45 +02:00
Atif Shoukat Ali
f6c9c196ba
Live: No connection warning for user with no org (#37943) 2021-08-16 22:11:39 -07:00
Ashley Harrison
344c43f2e8
PanelEdit: Fix 'Actual' size by passing the correct panel size to DashboardPanel (#37885) 2021-08-16 16:01:54 +01:00
Tobias Skarhed
89572926c3
Search: Make search icon keyboard navigable (#37865)
* Make search icon keyboard navigable

* Update text

* Update test

* Remove unused line

* Add global focus-visible styles for button
2021-08-16 15:51:44 +02:00
Maria Alexandra
1735f9a56b
Navigation: Add aria-label to top section links to improve a11y for screen readers (#36953) 2021-08-16 15:10:57 +02:00
Olof Bourghardt
d26f3cdd03
Loki: add support for resolution (#36710)
* Add input to specify min step

* Add stepInterval to as input to component

* Add onBlur to Input component

* Loki: add functionality for min step

* Loki: change name on props to step to make it more clear

* Loki: add resolution as a query option

* Loki: Add min,max,exact as step options

* Loki: add functionality for different step modes

* Loki: fix bug where step function isn't working

* Loki: fix bug where exact step isn't working

* Loki: change width of step input field

* Loki: add tests for adjustInterval function

* Loki: add check for max step oprio to make sure it's not below the safe interval

* Loki: fix bug with some tests

* Loki: fix bug with tests

* Explore: add tooltip to loki step function

* Loki: remove resolution as a logs option

* Loki: update snapshots

* Fix failing tests

* Loki: add select component for choosing resolution

* Loki: add functionality for calculating correct interval with resolution applied

* Loki: remove functionality for step mode

* Loki: remove tests for step mode

* Loki: add tooltip to line limit and resolution

* Loki: add backend support for resolution

* Loki: fixed backend bug where resolution was undefined

* Loki: add check for resolution
2021-08-16 14:02:13 +02:00
Domas
5ab8d6a3b9
remove guideliens form rule list state table (#37839) 2021-08-16 10:12:07 +03:00
Ivana Huckova
15edaa5837
Add pattern parser to syntax (#37824) 2021-08-15 21:20:37 +02:00