Commit Graph

13829 Commits

Author SHA1 Message Date
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
Ikko Ashimine
1a5529d244
Annotations: Fix typo in types.ts (#37910) 2021-08-15 09:22:38 -07:00
Leon Sorokin
6a77cd43ae
GraphNG: refactor by-value color schemes (#37670)
* GraphNG: account for top canvas padding in gradient gen for color scheme/thresholds-by-value

* Updated test dashboard

* Added fix for issue when scaleMin was same as threshold

* fixed firefox issue

* revert docs changes

* update gdev dash for easier comparisons & regression spotting

* refactor

* optimize gradient re-gen/re-use and color more tinycolor.setAlpha() -> alpha(). update uPlot to dev build.

* fix percentage steps

* implement % threshold region rendering

* crisp threshold line rendering

* simplify

* WIP: hoverpoint dynamic color interpolation

* fix hover point color interp

* re-use gradient gen to draw threshold areas

* re-implement by-value color scales

* tweak comment

* mimic tinycolor behavior in colorManipulator.alpha() for empty colors

* explicitly disable hover points for BarChart and Histogram

* reduce test failures and required changes to tests

* fix barchart tests

* uPlot 1.6.15

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-13 09:38:04 -05:00
Uchechukwu Obasi
4e98ade2af
Annotations: fixes variable values not displaying in annotations. (#37883)
* Fixes wrong annotation when opening dashboard with URL encoded variable
Co-authored-by: Ashley Harrison, Hugo Haggmark, and Tobias Skarhed.

* added a more descriptive comment
2021-08-13 14:38:57 +01:00
Josh Hunt
81cfc2c347
AzureMonitor: Use React QueryEditor for annotations editor (#37633) 2021-08-13 11:05:57 +01:00
Hugo Häggmark
5449f1c1e6
Variables: Fix issue with empty dropdowns on navigation (#37776) 2021-08-13 09:10:37 +02:00
Olof Bourghardt
13a91f791d
Explore: use GrafanaTheme2 (Explore component) (#37445)
* Explore: use GrafanaTheme2

* Explore: change width and paneel padding

* Explore: remove the use of stylyesFactory

* Explore: fix failing tests

* Simpify calculation of width for ExploreGraphNGPanel

* Update public/app/features/explore/Explore.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Update public/app/features/explore/Explore.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Prettified code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-08-13 08:02:49 +02:00
Kyle Brandt
aef67994a1
Annotations: Fix alerting annotation coloring (#37412)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-12 09:37:54 -07:00
Tobias Skarhed
b6ede8d96d
Chore: Low hanging a11y fruits (#37783)
* aria-label disallowed on header element

* A11y issues for Getting Started and panel header

* Add unique identifier to search navigation

* Add dashboard header markup

* Fix news panel low hanging fruits
2021-08-12 11:13:03 +02:00
Alex Khomenko
059ef4ee9a
PasswordField: Fix button role (#37816)
* Fix button role

* Fix tests
2021-08-12 10:46:33 +02:00
Domas
e76848acee
Alerting: improve rule list error message (#37734) 2021-08-12 09:57:52 +02:00
Ryan McKinley
3205450210
Transformations: support a synchronous transformation pattern (#37780) 2021-08-11 01:25:33 -07:00
Ashley Harrison
181d6a78ed
Chore: Fix some more typescript strict errors (#37750) 2021-08-11 09:10:41 +01:00
Ivana Huckova
4cf097c4e5
Small UX updates (#37694) 2021-08-11 09:56:23 +02:00
Ryan McKinley
36c798eb2f
Chore: define base panel type in @grafana/data (#37766) 2021-08-11 00:23:41 -07:00
Ryan McKinley
7a8e861c1f
Timeseries: migrate log scale (#37771) 2021-08-11 00:23:12 -07:00
Piotr Jamróz
31bb3522c8
Graphite: Migrate to React (part 3: migrate segments) (#37309)
* 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

* 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

* Use block docs for better doc generation

* Handle undefined values provided for autocomplete

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-08-11 09:13:55 +02:00
Olof Bourghardt
2a1363f175
Explore: use GrafanaTheme2 (MetaInfoText component) (#37539)
* Explore: use GrafanaTheme2 in MetaInfoText component

* Explore: change font-size to h6 size

* Explore: add correct font weight

* Use correct style value for font-size

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

* Use error color style

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

* Use bodySmall font-size instead of h6 font-size

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-08-11 08:25:54 +02:00
Tobias Skarhed
fa731f16bf
DashboardLinks: Screen reader accessibility #37682 2021-08-10 16:55:25 +02:00
Gábor Farkas
476a227505
influxdb: check for invalid program-flow (#37474) 2021-08-10 14:18:29 +02:00
Domas
3e124c854e
Alerting: interpolate variables when creating alert rule from dashboard panel (#37201) 2021-08-10 10:59:48 +03:00
Ivana Huckova
a02f9be0c6
Explore: Fix showing of full log context (#37442)
* Fix log context

* Update to auto values insted of unset

* Update comment

* Fix redundant left margin for non-wrapped logs

* Remove unused css styling

* Adjust width and height
2021-08-10 09:01:57 +02:00
Zoltán Bedi
33aeee60ff
Toolkit: Fix matchMedia not found error (#37643) 2021-08-10 07:34:35 +02:00
sam boyer
6ae5db5608
Adapt dashboard schema to validate on some devenv dashboards (#37594)
* Remove null values from JSON

* Specify the color field

* Add note about openness of custom field's struct

* Update schemaVersion

* Specify thresholds

* Add panel id

* Add maxDataPoints and interval

* Add mappings, albeit very under-specified

* Allow empty string for timezone field

This is probably not a good idea - same as allowing nulls.

* Allow false for refresh - otherwise, string

* Make threshold value optional

* Make interval optional

* Fix broken and changed decls in ui models

* Add models.cue for timeseries panel

* Fixups for home dashboard

* Add timeShift, timeFrom

* Abstract out #Target, rejigger comments
2021-08-10 00:49:58 +08:00
Ivana Huckova
c5eea16cfe
Logs panel: Set default scrolling for ascending order to bottom (#37634)
* LogsPanel: When ascending order, scroll to bottom

* Add tests

* Refactor style

* Update scroll position when logs change
2021-08-09 15:19:46 +02:00
Olof Bourghardt
e300696792
Epxplore: use GrafanaTheme (SecondaryActions component) (#37543) 2021-08-09 08:47:47 +02:00
Andrej Ocenas
e9c032f10f
CloudWatch Logs: Fix crash when no region is configured (#37639) 2021-08-06 15:47:27 +02:00
Jack Westbrook
6ff599e25a
Plugins: Fix plugin signature status (#37583) 2021-08-06 09:49:29 +02:00
Ivana Huckova
ba76877d28
Datasource: Pass access type to data source instance settings (#37577)
* Pass Access info to datasourceInstance

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

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

* Type access as direct | proxy

* Fix tests where mocking datasourceInstance, include access

* Pass access to data source instance mocks

* Update comment

* Pass access to data source instance mocks

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-08-06 09:24:35 +02:00
Ivana Huckova
8e7c4af366
Prometheus: Add browser access mode deprecation warning (#37578)
* Add browser deprecation info

* Update copy

* Add info to documentation

* Update copy
2021-08-06 09:22:39 +02:00
Giordano Ricci
2f21bf5cfd
Chore: Reduce Elasticsearch data source plugin strict errors (#37399) 2021-08-05 16:03:38 +01:00
Zoltán Bedi
e0010860bd
Tempo: add ability to upload trace json (#37407)
* Tempo: upload json

* Add test for upload

* Minor changes

* Add docs

* Update docs/sources/datasources/tempo.md

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

* Add graphframes as well to upload

* Add comments to code

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-05 15:13:44 +02:00
Gábor Farkas
9417e86316
Updated "react-use" package to newest version (#37579)
* package.json: updated react-use to newest version

* fixes (typescript and other)
2021-08-05 14:32:51 +02:00
Olof Bourghardt
8073be2e4e
Explore: use GrafanaTheme2 in LogsNavigation component (#37518) 2021-08-05 13:31:39 +02:00
Olof Bourghardt
ba2dfe5ec4
Explore: use GrafanaTheme (LogsNavigationPages component) (#37523)
* Explore: use GrafanaTheme in LogsNavigationPages

* Explore: remove comment
2021-08-05 13:31:21 +02:00
Olof Bourghardt
0bbfe3f7b4
Explore: use GrafanaTheme2 (NoDataSourceCallToAction component) (#37542)
* Explore: use GrafanaTheme2 in NoDataSourceCallToAction component

* Explore: add px to the end of styling
2021-08-05 13:30:31 +02:00
Josh Hunt
f41f45f6bf
AzureMonitor: Remove Angular query editor (#37532)
* Remove angular query editor

* call debounced onRunQuery, and set some default query values
2021-08-05 10:12:25 +01:00
Zoltán Bedi
44c7e65fac
Zipkin: add ability to upload trace json (#37483)
* Zipkin: upload json

* Change back mock json
2021-08-05 10:55:15 +02:00
Ivana Huckova
1083bef030
Prometheus: Implement stepMode for alerting queries (#36796)
* Add select component for choosing step option

* Add onStepChange

* Add functionality for max step

* Rename minInterval to stepInterval to describe min, max and exact step interval

* Change select option from standard to exact

* Add new type StepType for better type safety

* Add tests for adjustInterval

* Add functionality and tests for exact step option

* Prometheus: Spell out min and max in select component

* Prometheus: Change width of step select component and add placeholder

* Prometheus: Adjust for the factor in exact step

* Prometheus: Update tooltip of step lable to include max and exact options and add padding to select component to give it some breathing room from other components

* Update snapshot for step tooltip

* Prometheus: make tooltip more informative

* Prometheus: add tooltip to interval input element

* Prometheus: extract default step option

* Prometheus: update snapshot for PromQueryEditor

* Prometheus: change step labels to uppercase

* Prometheus: define a default step option

* Prometheus: use default step option in both ui component and logic

* Prometheus: update snapshot for PromQueryEditor

* Prometheus: refactor datasource.ts for better readability

* Prometheus: change tool tip for step

* Prometheus: update snapshots

* Prometheus: add correct styling

* Prometheus: update snapshots

* Prometheus change variable name to something less superfluous

* Prometheus: refactor

* Prometheus: add new test for adjustInterval

* Docs: Update docummentation on the step parameter for prometheus

* Prometheus: make step input field smaller and change placeholder text to 15s

* Prometheus: update snapshots

* Prometheus: Make stepMode uniform in all places in the code

* Adjust step based on stepMode

* Adjust comment

* Check if we have queryInterval

* Refactor, add safe interval

* Fix merge resolutions

* Fix tests and add tests

* Update snapshot

* Update docs/sources/datasources/prometheus.md

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

* Update docs/sources/datasources/prometheus.md

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

* Update docs/sources/datasources/prometheus.md

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

* Update docs/sources/datasources/prometheus.md

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

* Update docs/sources/datasources/prometheus.md

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

* Update docs/sources/datasources/prometheus.md

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

* Update docs/sources/datasources/prometheus.md

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

* Implement calculation with intervalMode in calculator.go

* Update tests, add calculate safe interval method

* Replace panic with error

* Update pkg/tsdb/interval/interval_test.go

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>

* Update pkg/tsdb/calculator_test.go

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>

* Impotrt require

* Remove lint errors

Co-authored-by: Olof Bourghardt <ob655088@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-08-05 09:09:49 +02:00
Leon Sorokin
d49ce5ad47
GraphNG: optimize cursor (#37460) 2021-08-04 16:13:11 -05:00
Jack Westbrook
e21ecf237b
Catalog: Update enterprise license messaging in PluginDetails (#37547)
* feat(catalog): change messaging if enterprise license is missing and add link

* test(catalog): fix failing PluginDetails test
2021-08-04 17:55:03 +02:00
Sriram
800967a413
Docs: Added missing enterprise plugins (#36786)
* Added missing enterprise plugins

* Update tests
2021-08-04 16:08:43 +01:00
Ashley Harrison
8aa3845f70
Select: Make portalling the menu opt-in, but opt-in *everywhere* (#37501)
* Select: Don't portal by default

* Select: Portal all the Selects

* Fix indendentation in this comment

* Select: Remove @example docs until formatting is correct

* Docs: Add some documentation for the Select changes

* Update docs/sources/whatsnew/whats-new-in-v8-1.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-1.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update packages/grafana-ui/src/components/Select/types.ts

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update public/app/core/components/TransformersUI/configFromQuery/ConfigFromQueryTransformerEditor.tsx

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update public/app/core/components/TransformersUI/configFromQuery/ConfigFromQueryTransformerEditor.tsx

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update public/app/core/components/TransformersUI/configFromQuery/ConfigFromQueryTransformerEditor.tsx

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update public/app/core/components/TransformersUI/prepareTimeSeries/PrepareTimeSeriesEditor.tsx

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Docs: Variants instead of varients

* Update public/app/core/components/TransformersUI/configFromQuery/ConfigFromQueryTransformerEditor.tsx

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-08-04 15:47:53 +01:00
Ivana Huckova
a0f94866b4
Update dashboard loki query editor (#37541) 2021-08-04 16:23:16 +02:00
Jack Westbrook
cc7c54be0e
Plugins: Update Catalog Card UI (#37350)
* feat(catalog): lazy load and add alt text to plugin logos

* refactor(catalog): use plugin types, make sure data is available for new ui

* test(catalog): fix up tests after types refactor

* feat(catalog): introduce Tile and PluginBadge components for ui updates

* refactor(catalog): update PluginList to use new components, lazy load images, add creditcard icon

* test(catalog): update Browse.test types

* fix(catalog): if local and remote make sure to get the correct local plugin from array

* refactor(catalog): prefer grafana/ui components over custom Tile component

* chore(catalog): delete redundant components

* feat(catalog): introduce ascending descending name sort for Browse

* refactor(catalog): prefer theme spacing over hardcoded values

* refactor(catalog): update Local and Remote plugin types to match api responses

* fix(catalog): prefer local.hasUpdate and local.signature so updateable plugin signature is valid

* test(catalog): update test plugin mocks

* test(catalog): add tests for sorting and categorise

* test(catalog): add tests for plugin cards, remove grid component

* test(catalog): add tests for PluginBadges component

* refactor(catalog): change enterprise learn more link to open plugin page on website
2021-08-04 15:09:57 +02:00
Ivana Huckova
7fd94e69c3
Loki: Update labels in log browser when time range changes (#37520)
* Refresh label when time range changes

* Refactor solution

* Add tests

* Update tests comments

* Update test

* Update public/app/plugins/datasource/loki/components/LokiQueryField.tsx

* Update public/app/plugins/datasource/loki/components/LokiQueryField.tsx
2021-08-04 14:37:19 +02:00
Jack Westbrook
224b062cac
Catalog: Fix InstallControls for externally managed users (#37531) 2021-08-04 13:52:01 +02:00
Maria Alexandra
d48febee75
Fix: Wrong annotations show on a given dashboard. Correct annotations show on page refresh. #37160 (#37496) 2021-08-04 11:57:27 +02:00
Jack Westbrook
cdcccfcc53
Plugins: Fix catalog permissions for org and server admins (#37504)
* simplify toggle + add link to server admin

* feat(catalog): org admins can configure plugin apps, cannot install/uninstall plugins

* fix(catalog): dont show buttons if user doesn't have install permissions

* feat(catalog): cater for accessing catalog via /plugins and /admin/plugins

* feat(catalog): use location for list links and match.url to define breadcrumb links

* test(catalog): mock isGrafanaAdmin for PluginDetails tests

* test(catalog): preserve default bootdata in PluginDetails mock

* refactor(catalog): move orgAdmin check out of state and make easier to reason with

Co-authored-by: Will Browne <will.browne@grafana.com>
2021-08-04 11:49:05 +02:00
Ashley Harrison
81cf09af9e
DashboardPrompt: Implement beforeunload handler (#37490) 2021-08-04 10:08:13 +01:00
Gábor Farkas
4da398014f
influxdb: more robust query-has-variables check (#37493)
* influxdb: moved queryUtils file to better place

* influxdb: more robust query-has-variables check
2021-08-04 10:45:37 +02:00
Olof Bourghardt
0b376522ac
Explore: use GrafanaTheme2 (AdHocFilter component) (#37434)
* Explore: use GrafanaTheme2 and useStyles2 instead of the old ones

* Explore: delete files and components that were'nt being used
2021-08-04 09:24:25 +02:00
Olof Bourghardt
2e476167eb
Explore: use GrafanaTheme2 (ExploreGraphNGPanel component) (#37450)
* Explore: use GrafanaTheme2

* Explore: add correct style values

* Update public/app/features/explore/ExploreGraphNGPanel.tsx

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

* Explore: change margin-right to xs

* Explore: change margin-right to new theme xs

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-08-04 08:47:37 +02:00
Maria Alexandra
d48e65bf74
Annotations: Fix Datasource as template variable not available for annotations (#37506) 2021-08-03 19:54:49 +02:00
Gábor Farkas
bc0ab3cc7a
influxdb: better query-has-variable check (#37453) 2021-08-03 14:32:48 +02:00
Torkel Ödegaard
0965132bff
Azure: Fixes annotations query editor not working properly (#37476) 2021-08-03 12:43:25 +02:00
MicahChiu
c2247f51e6
Style: Fix for Flex compatibility in lower versions of browsers (#36913) 2021-08-03 11:32:53 +01:00
Josh Hunt
e530d66275
AzureMonitor: Refactor query state and fetching data for Metrics (#37067)
* Split query modifications into seperate file

* seperate setQueryValue for Logs

* wip for centralising api requests

* more wip

* moved data hooks out into seperate module, added post-request cleanup

* metric metadata

* ,

* more cleanup

* update tests, fix hasOption to work with grouped variables

* update ARG subscriptiopns field

* last select stuff

* remove todo comment

* pr feedback

* more pr feedback :) :)

* updated comment
2021-08-03 10:04:04 +01:00
Maria Alexandra
f10c5020f1
Annotation: Fix "Enabled" button disappear after Grafana v8.0.6 upgrade (#37454) 2021-08-03 09:42:13 +02:00
Will Browne
312e78ff0b
fix typo (#37457) 2021-08-03 09:41:31 +02:00
nikki-kiga
9fa8f5cc95
TooltipPlugin: add crosshair exception (#37285)
* TooltipPlugin: add crosshair exception

* TooltipPlugin: set active plot and add class

* Plot: hide cursor pts when not active in crosshair mode

* TooltipPlugin: clean up adding class

* TooltipPlugin: rename crosshair class

* rename class, move up to chart root element

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-02 11:25:51 -07:00
Olof Bourghardt
bc6e7d32e2
Explore: use GrafanaTheme2 (#37305)
* Explore: refactor to use GrafanaTheme2

* Explore: change style values

* Explore: change styles

* Explore: change last style values to the correct ones

* Explore: remove stylesFactory

* Update public/app/features/explore/Logs.tsx

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

* Update public/app/features/explore/Logs.tsx

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

* Update public/app/features/explore/Logs.tsx

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

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-08-02 15:47:41 +02:00
Tobias Skarhed
b0dcbd568a
PasswordField: Don't show password on enter #37444 2021-08-02 12:58:00 +02:00
Alexander Emelin
31903778ae
Live: display stream rate, fix duplicate channels in list response (#37365) 2021-07-30 21:05:39 +03:00
Jack Westbrook
9494c2cd4f
Plugins: Add filter for plugin type and update search, filter and sort ui (#37301)
* feat(catalog): introduce additive filters for plugin type, installed status and search

* feat(catalog): prefer FilterInput over custom styled search field

* feat(catalog): update Browse page to use new search, filter features

* refactor(catalog): keep filters with usePluginsByFilter hook

* test(catalog): update tests to reflect new filtering and searching

* refactor(catalog): rearrange filterByType radio buttons

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

* feat(catalog): ntroduce css for responsive filter layout

* refactor(catalog): introduce pluginfilter type and give filter methods better names

* fix(catalog): default q param to empty string so FiterInput doesn't show clear button on load

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-30 13:23:33 +02:00
Ryan McKinley
d269d901fc
Geomap: fix scale calculations (#37375) 2021-07-29 23:27:52 +02:00
An
c564736c68
Transformers: allow label fields in the reduce processor (#37373)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-29 13:56:07 -07:00
Connor Lindsey
c4c28a5b63
Explore: Support custom display label for derived fields buttons for Loki datasource (#37273) 2021-07-29 12:42:20 -06:00
Zoltán Bedi
e3dde3510e
Jaeger: upload json file (#37205)
* Dropzone component

* Add file list

* Add progress, error and cancelation to filelistitem

* Update Dropzone component to support progress

Cancelation
Retry

* Update file name changes

* Rename to FileDropzone

* FileListItem tests

A11y updates for icon buttons
Use value formatter from grafana/data

* Add tests for FileDropzone

Review comments

* export FileDropzoneDefaultChildren

* Jaeger: Upload trace json

* Change primary text when multiple false

* styling

* Review comments addressed

* Add test for upload trace json

* Add docs for Jaeger upload

* Fix strict type check error

* Update docs/sources/datasources/jaeger.md

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

* Minor changes

Render all the options from one function.
Add graph frames to the result.

* Address review comments

* Update docs/sources/datasources/jaeger.md

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

* docs: move image

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-29 18:07:07 +02:00
Ryan McKinley
ced26bc624
Geomap: implement basic tooltip support (#37318)
Co-authored-by: Bryan Uribe <buribe@hmc.edu>
2021-07-29 03:34:42 +02:00
Leon Sorokin
8b80d2256d
GraphNG: stack by % (#37127) 2021-07-28 20:31:07 -05:00
Zoltán Bedi
9a62db6943
Exemplars: Disable exemplars only on query it failed (#37296) 2021-07-28 16:34:46 +02:00
Jack Westbrook
99891e1a88
Catalog: Add breadcrumb to plugin details page (#37095)
* feat(catalog): introduce a breadcrumb to plugindetails page

* refactor(catalog): use aria-labels and nav element for a11y breadcrumbs
2021-07-28 15:32:14 +02:00
Olof Bourghardt
ddf5b65c51
Prometheus: add functionality to specify desired step interval in dashboards panels (#36422)
* Add select component for choosing step option

* Add onStepChange

* Add functionality for max step

* Rename minInterval to stepInterval to describe min, max and exact step interval

* Change select option from standard to exact

* Add new type StepType for better type safety

* Add tests for adjustInterval

* Add functionality and tests for exact step option

* Prometheus: Spell out min and max in select component

* Prometheus: Change width of step select component and add placeholder

* Prometheus: Adjust for the factor in exact step

* Prometheus: Update tooltip of step lable to include max and exact options and add padding to select component to give it some breathing room from other components

* Update snapshot for step tooltip

* Prometheus: make tooltip more informative

* Prometheus: add tooltip to interval input element

* Prometheus: extract default step option

* Prometheus: update snapshot for PromQueryEditor

* Prometheus: change step labels to uppercase

* Prometheus: define a default step option

* Prometheus: use default step option in both ui component and logic

* Prometheus: update snapshot for PromQueryEditor

* Prometheus: refactor datasource.ts for better readability

* Prometheus: change tool tip for step

* Prometheus: update snapshots

* Prometheus: add correct styling

* Prometheus: update snapshots

* Prometheus change variable name to something less superfluous

* Prometheus: refactor

* Prometheus: add new test for adjustInterval

* Docs: Update docummentation on the step parameter for prometheus

* Prometheus: make step input field smaller and change placeholder text to 15s

* Prometheus: update snapshots

* Prometheus: Make stepMode uniform in all places in the code

* Prometheus: update documentation and tooltip for step

* Prometheus: update snapshots
2021-07-28 08:26:09 +02:00
Domas
69dff96c1b
Alerting: ability to edit alertmanager config as json via UI (#37268) 2021-07-28 09:21:42 +03:00
Ryan McKinley
5f41c2f334
Geomap: fix esri server config (#37283) 2021-07-27 22:26:42 -07:00
Piotr Jamróz
8d7e22e1bb
Graphite: Migrate to React (part 2B: migrate FunctionEditor) (#37070)
* 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

* Rename .tsx -> .ts

* Update types

* Use ?? instead of || + add test for mapping options

* Use const (let is not needed here)

* Revert test name change

* Allow removing only optional params and mark additional params as optional (only the first one is required)

* Use theme.typography.bodySmall.fontSize

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-07-27 13:10:39 +02:00
Piotr Jamróz
e8eb73f271
Graphite: Update text editor state on initial load (#37202)
* Update current query when props change

* Remove managed state in GraphiteTextEditor

* Fix tests
2021-07-27 11:41:11 +02:00
An
154c380c8c
Geomap: configure legend on map (#37077)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-27 00:50:15 +02:00
Nathan Rodman
5f0bc252bc
Alerting: support label matcher syntax in alert rule list filter (#36408)
* 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

* Add tests to rule list for filtering

* add additional test for testing alert instances filtering

* Use tooltip for query syntax example

* refactor to use Matchers for filtering

* Update docs for label filtering on rules list

* style fixes
2021-07-26 12:05:49 -07:00
Ryan McKinley
ffa0ef9b3d
Annotations: fire an event when changing annotations (#37175) 2021-07-26 20:57:52 +02:00
Ryan McKinley
be4b753aa0
Panels: allow interaction in corners when no title exists (#37169) 2021-07-26 19:19:07 +02:00
Connor Lindsey
b644ea9e6e
Loki: Add fuzzy search to label browser (#36864) 2021-07-26 08:04:03 -06:00
Gábor Farkas
b254e4eb31
influxdb: influxql: fix dataframe column-names (#37195) 2021-07-26 12:08:02 +02:00
Luca Fenu
e3622ac1da
Influx: fix typo (#37181) 2021-07-26 08:44:09 +02:00
Leon Sorokin
f78452be30
Color: fix alpha calculation < 16/255 and State-timeline threshold alpha (#35911) 2021-07-23 20:50:47 -05:00
Dmitry
81dce0716b
Change PostgeSQL version selector (#37166) 2021-07-23 16:29:46 -07:00
Ryan McKinley
feb9e528aa
Geomap: zoom full extent (#37174) 2021-07-23 16:23:35 -07:00
Ashley Harrison
26abec2287
Chore: Update slate types to fix more strict TypeScript errors (#37159) 2021-07-23 15:33:53 +01:00
Ashley Harrison
75ff031789
Chore: Fix TypeScript strict errors with components using connect (#37109)
* Chore: Fix TypeScript strict errors with components using connect

* Chore: More TypeScript fixes

* Chore: Update strict check values

* Still need to export these types...

* Declare connector at the top of the file

* Careful with find and replace...
2021-07-23 11:33:26 +02:00
Bryan Uribe
2b51e94537
Gazetteer: Update Countries Json (#37129) 2021-07-23 00:42:34 +02:00
nikki-kiga
1de14ea257
check for bar value visibility never (#37122) 2021-07-22 14:09:43 -07:00
Sergey Kostrukov
4664cba935
Prometheus: Azure authentication in configuration UI (#35860)
* Azure authentication settings

* Persisting credentials

* Azure settings

* Prometheus-specific settings component

* Azure Prometheus Resource ID configuration

* DataSourceHttpSettings with extensibility for Azure

* Feature toggle for Azure auth

* Fix snapshot

* Update format of persisted credentials

* AzureSettings renamed to AzureAuthSettings
2021-07-22 19:53:49 +01:00
Andrej Ocenas
93b4cc7035
Explore: Fix encoding of internal URLs (#36919)
* Encode internal explore url

* Fix tests

* Fix comma
2021-07-22 14:42:20 +02:00
Sofia Papagiannaki
b96dd1877c
Folder API: optionally force deleting Grafana 8 alerts when deleting a folder (or error) (#36427)
* Folder API: Add an optional query parameter for allowing deleting a  folder containing rules

* Update frontend

- Set forceDeleteRules=true when frontend deletes a folder
- Improve modal text

* Update docs

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-22 12:27:13 +03:00
Ashley Harrison
3004a650b5
Chore: Fix more TypeScript strict errors (#37066)
* Chore: Fix more TypeScript strict errors

* whoops
2021-07-22 08:09:55 +01:00
Ryan McKinley
9cd8e11c30
Geomap: add basic gazetteer support (#37082) 2021-07-21 23:41:27 -07:00
Domas
1881de8236
Alerting: add button to deactivate current alertmanager configuration (#36951)
* reset alert manager config button for admins

* "alert manager" -> "Alertmanager"
2021-07-22 09:15:39 +03:00
Ryan McKinley
8d06aaaf09
BarChart: support stacking options (#37083)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-21 23:07:50 -07:00
Dominik Prokop
40a87a7851
BarChart: use uPlot's native bars pathbuilder (#36725) 2021-07-22 00:50:59 +02:00
Ryan McKinley
cd9e94c9b3
Annotation Panel: release annotation panel (#36959)
Co-authored-by: Petros Kolyvas <code@petros.io>
2021-07-21 22:58:30 +02:00
Ryan McKinley
e604e69d93
Geomap: default basemap config cleanup (#37069) 2021-07-21 13:48:20 -07:00
Piotr Jamróz
0bf1a97262
Graphite: Migrate to React (part 2: migrate smaller AngularJS directives) (#36797)
* 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

* Simplify setting Segment Select min width

* Extract view logic to a helper and update types definitions

* Clean up types

* Update FuncDef types and add tests

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-07-21 20:09:00 +02:00
Jack Westbrook
1d37d675d7
Plugins: Render app plugin config pages in catalog (#37063)
* feat(catalog): introduce PluginDetailsBody component and useLoadPluginConfig hook

* feat(catalog): use PluginDetailsBody and useLoadPluginConfig hook in PluginDetails

* feat(catalog): introduce usePluginDetails hook to handle PluginDetails state

* feat(catalog): wire usePluginDetails hook to PluginDetails and InstallControls

* refactor(catalog): fix typescript errors related to usePluginDetails hook

* chore(catalog): update types for PluginDetailsActions
2021-07-21 19:44:43 +02:00
Eunice Kim
02b5a18da2
Geomaps: Add default base layer (#37043) 2021-07-21 10:20:30 -07:00
nikki-kiga
1efa5f51cf
PieChart: Make pie gradient more subtle to match other charts (#36961)
* change pie gradient to from colors

* increase label contrast

* Revert "change pie gradient to from colors"

This reverts commit 70d07d8b8e.

* reduce spin values
2021-07-21 08:50:38 -07:00
Domas
cac4b4b443
Alerting: small rule form ux improvements (#36941)
* dedupe folder option for existing grafana rules

* update test mocks

* change toggle to chevron for expanding error state ui

* fix some strict lint errors
2021-07-21 18:01:05 +03:00
Andres Martinez Gotor
5a0221a8c4
AzureMonitor: Request and concat subsequent resource pages (#36958) 2021-07-21 16:20:07 +02:00
Andres Martinez Gotor
354d3b9abf
Fix test (#37053) 2021-07-21 13:20:46 +02:00
Andres Martinez Gotor
133e292052
AzureMonitor: Fix macro resolution for template variables (#36944) 2021-07-21 11:29:07 +02:00
Andres Martinez Gotor
3b728ed78a
AzureMonitor: remove default workspace from configuration editor (#36910) 2021-07-21 11:28:43 +02:00
Gábor Farkas
14274a960e
influxdb: influxql: handle null-cases in timeseries data (#37047) 2021-07-21 10:44:41 +02:00
Piotr Jamróz
dbe7d3298d
Graphite: Migrate to React (part 1: move state to redux) (#36484)
* 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

* 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

* Load function definitions before parsing the target on initial load

* 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

* Remove redundant awaits

* Use redux Action

* Use more specific type for GraphiteTag

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-07-21 09:24:36 +02:00
An
71a9f7ce3c
Geomap: support alternative marker shapes (#36916)
* set value default on init

* shared location config

* shared locaiton config

* shared locaiton config

* remove file

* add alpha annotations

* feature: icon picker

* features: regular shapes picker

* fix: set circle as default in select

* use a registry for shapes

* remove (unused) picker

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: An Le <anle@Ans-MBP.localdomain>
2021-07-20 21:09:08 -04:00
Ryan McKinley
46eac518d3
Geomap: set value default on init (#36960) 2021-07-20 15:52:12 -07:00
Fabrice
aa3a46272f
Fix: Handle withCredentials option properly for loki datasource (#36914)
The loki datasource was not passing the credentials info to the fetch()
API when loki was in Browser access mode.

This is similar to:
https://github.com/grafana/grafana/pull/23380
2021-07-20 17:05:12 +02:00
Marcus Andersson
ff56ea6ea6
Plugins: Combine local and remote plugins into one structure (#36859)
* adding some structure to combine the local and remote into one type.

* feat(catalog): map local and remote responses to catalog plugin

* feat(catalog): render CatalogPlugins in list

* refactor(catalog): update usePluginsByFilter to work with new data structure

* refactor(catalog): move helper functions into helpers file. delete redundent usePlugins hook

* feat(catalog): create CatalogPluginDetails and pass to PluginDetails

* feat(catalog): update types and components for plugin installation

* chore(catalog): comment so not to forget to move code out of api layer

* fix(catalog): make sure all filter shows gcom and installed

* fix(catalog): fix up getCatalogPlugin logic for only locally available plugins

* refactor(catalog): create getCatalogPluginDetails helper. Move usage to hook

* revert(catalog): put back small logos in PluginList

* revert(catalog): put back small logo for PluginDetails page

* fix(catalog): prevent useDebounce from triggering when SearchField mounts

* chore(catalog): add coment explaining reason for usedebouncewithoutfirstrender

* refactor(catalog): replace reduce with filter to remove duplicate array of all plugins

* refactor(catalog): update types for useDebounceWithoutFirstRender

* chore(catalog): remove commented out import

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-07-20 15:20:24 +02:00
Elan Kugelmass
c7c776c642
Prometheus: Update PromQL typeahead and highlighting (#36730)
* Update PromQL functions

* prettier
2021-07-20 11:19:59 +02:00
Ashley Harrison
220b964de5
Chore: Fix more TypeScript errors (#36918)
* TypeScript: Fix some strict typescript errors

* Fix more strict typescript errors

* Few more fixes

* Better string conversion

* update check script to 195
2021-07-20 09:57:03 +01:00
Gábor Farkas
ea375db8b2
influxdb: influxql: for timeseries-queries, return dataframes (#36850) 2021-07-20 10:52:36 +02:00
Sarah Zinger
f32d200fc0
E2E: Add support for data-test-id over aria labels and add importDashboard flow (#36483)
* E2E: Add support for data-testids and not just aria-labels.
2021-07-19 14:01:31 -04:00
Ryan McKinley
85a14a0503
Geomap: configure size and color with different fields (#36825) 2021-07-19 19:16:42 +02:00
Ryan McKinley
ee3a320540
Geomap: improve the view configuration (#36893) 2021-07-19 17:40:56 +02:00
Andrej Ocenas
001331e2ac
Explore: Fix query cancellation when opening an url with split panes (#36847)
* Add exploreId to requestId

* Fix tests
2021-07-19 17:29:51 +02:00
Ryan McKinley
d4fa2529c8
Geomap: make the geomap panel beta and label alpha layers (#36894) 2021-07-19 08:07:28 -07:00
Ashley Harrison
9c6085ee0b
DashboardSrv/NavModelSrv: Remove legacy angularjs (#36810)
* DashboardSrv: Remove ngInject + promiseToDigest wrapper

* NavModelSrv: Remove ngInject that is doing nothing

* DashboardSrv: Use getBackendSrv instead of just importing the backendSrv directly
2021-07-19 11:38:12 +01:00
Djairho Geuens
4cadbba686
Email: Allow configuration of content types for email notifications (#34530)
* Alerting: Allow configuration of content types for email notifications

* Fix lint error

* Improves email templates

* Improve configuration documentation

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

* Improve code comments

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

* Improve configuration documentation

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

* Improve email template

* Remove unnecessary predeclaration

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

* Adds handling for unrecognized content type

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

* Move utility function outside of util package

* Fixes syntax

* Remove unused package

* Fix lint error

* improve email templates

* Fix test

* Alerting: Allow configuration of content types for email notifications

* Fix lint error

* Improves email templates

* Improve configuration documentation

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

* Improve code comments

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

* Improve configuration documentation

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

* Improve email template

* Remove unnecessary predeclaration

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

* Adds handling for unrecognized content type

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

* Move utility function outside of util package

* Fixes syntax

* Remove unused package

* Fix lint error

* improve email templates

* Fix test

* Fix comment style

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>

* Fix template formatting

* Add test and improve error handling

* Fix test

* Fix formatting

* Fix formatting

* Improve documentation and regenerates txt template

* Update docs/sources/administration/configuration.md

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

Co-authored-by: Djairho Geuens <djairho.geuens@ae.be>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-19 13:31:51 +03:00
Domas
27b7c35ccc
add defaults to alert list migration handler (#36547) 2021-07-19 12:25:53 +03:00
Ashley Harrison
b8a5f38d2a
Angular cleanup: Don't inject in link_srv (#36849)
* Angular cleanup: Don't inject in link_srv

* link_srv: Fix unit tests

* kick drone
2021-07-19 09:16:36 +01:00
Eunice Kim
dd11e232d0
Geomap: Implement Heatmap overlays (#36769) 2021-07-16 14:23:48 -07:00
Tobias Skarhed
cfd06775c0
Dashboard: Add accessible landmark markup (#36753)
* Add landmark markup

* Make panel titles h2

* Descibe panel landmarks

* Add nav elements and heading 1

* Reset line height and remove margin

* Make focus styles visible

* Change nav to section

* Add desc

* Fix focus styles cutoff
2021-07-16 21:48:47 +02:00
Olof Bourghardt
f4f2c197ae
Explore: Add switch to restructure logs for better readability (#36324)
* Add prettifyLogMessage to select components in test file

* Change entry depending on the value of prettifyLogMessage

* Add prettifyLogMessage to state

* Fix merge conflict

* Fixe bug where the log message wasn't parsed as JSON

* Implement function to restructure all logs

* Change elstic image version back to 7.7.1

* Add showCommonLabels that was missing

* Remove comment

* Put import of getParser together with the other imports

* Logs: fix bug where message isn't restructured if it contains ANSI code

* Logs: change label for switch to Restructure

* Remove unnecessary file

* Logs: added divider before switch component

* Add dividers between the different log options

* Remove unintentional changes

* Explore: remove dividers in log settings

* Explore: refactor for LogRowMessage for better readability

* remove unnecessary change

* Logs: fix bug where logs aren't restructured if they have highlights

* Logs: minor refactoring

* Logs: use memoizeOne to prevent parsing on every re-render

* Logs: calculate needsHilight inside renderLogMessage instead of outside

* Logs: fix bug where logs aren't prettified when wrap logs is disabled

* Explore: change name to prettify

* Remove console.log

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Dashboards: add switch to prettify log messages to the Logs fields

* Logs: make prettify only work for JSON logs

* Logs: fix bug with tests for logs

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-07-16 15:08:47 +02:00
Andres Martinez Gotor
96efbbaed1
Azure Monitor: Implement CallResourceHandler in the backend (#35581) 2021-07-16 12:47:26 +02:00
Marcus Andersson
a6872deeb9
Plugins: automatically search plugins when typing in plugin list search box. (#36643)
* will automagically search if typing something in the search field.

* Decreasing the debounced time to 500ms
2021-07-16 12:43:13 +02:00
Jack Westbrook
e2c64ae228
Plugins: Prevent catalog from listing installed embedded plugins (#36675) 2021-07-16 12:33:56 +02:00
Ashley Harrison
a70eafb732
Angular cleanup: Remove unused <panel-links-editor> + controller (#36838) 2021-07-16 11:29:46 +01:00
Ryan McKinley
8de218d5f1
Geomap: use a common configuration builder to find location fields (#36768) 2021-07-15 12:00:19 -07:00
Ivana Huckova
8f31636a98
Fix width or logrows to cover full space up until logs navigation (#36778) 2021-07-15 17:09:20 +02:00
Giordano Ricci
f6b83a4f47
Elasticsearch: Add frozen indices search support (#36018)
* Revert "Revert "Elasticsearch: add frozen indices search support (#27472)" (#27726)"

This reverts commit 4c7131425b.

* Make label width a bit more consistent

* Add documentation for X-Pack & Frozen Indices support in Elasticsearch

* Change UI & docs casing

* create default empty dataframe

* Remove backticks and simplify regex

* small doc improvement
2021-07-15 15:52:02 +02:00
Dominik Prokop
421f5040ec
User analytics: Use user email as Rudderstack id (#36788) 2021-07-15 12:28:13 +02:00
Ryan McKinley
6d87b26d6c
OptionsUI: add standard field name picker (#36732) 2021-07-14 11:54:58 -07:00
Gábor Farkas
815f9a7557
InfluxDB: InfluxQL: adds tags to timeseries data (#36702)
* influxdb: influxql: return tags in timeseries

* influxdb: influxql: added tests
2021-07-14 16:06:53 +02:00
Ashley Harrison
54f8996acf
Select: Portal select menu to document.body (#36398)
* ValueMappings: Force overflowing modal content to scroll

* ValueMappings: Update unit tests

* Select: Portal Select to document.body, close menu on scroll

* Select: Fix tests + apply updates from https://github.com/grafana/grafana/pull/32833

* ValueMappingsEditorModal: Revert to using selectEvent in the tests

* Select: Fix remaining unit tests

* Portal: Rewrite Portal as a functional component so we can use useTheme2

* Modal: Remove modal styles from this PR

* Update E2E tests

* More unit test fixes

* Select: Fix remaining E2E tests

* Select: Create util method to select an option in tests
2021-07-14 14:04:23 +01:00
Ivana Huckova
d9897a457d
Loki: Add autocomplete option for $__range variable (#36717)
* Add autocomplete option for Loki & Promtheus rates

* Update test
2021-07-14 13:44:23 +02:00
Torkel Ödegaard
f29f190e73
Docs: Docs for Rows to fields and Config from query transformations (#36713)
* Docs: Docs for new transformations rows to fields and config from query results

* Added config from query docs

* refinement

* Same lists everywhere

* minor tweak

* Added beta and version notices
2021-07-14 13:16:09 +02:00
Josh Hunt
43ee7acecd
AzureMonitor: Make all query properties optional (#36701)
* start to make all query fields optional

* fix other types

* fix optional types in fields

* Pfeedback!

* Clean up types
2021-07-14 12:36:11 +02:00
Ryan McKinley
92801d5fa1
Transformations: add 'prepare time series' transformer (#36737)
* adding transformer that will stretch a data frame from wide to long.

* added a UI for the stretch frames transformer.

* refactored according to feedback.

* removed unused dep.

* making sure it is being displayed.

* minor adjustments.

* move stretch to prepare

* improved readability of tests.

* refactored to use a function component syntax.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-07-14 11:24:12 +02:00
Ryan McKinley
cbda218a14
Geomap: rename "circles" layer to "markers" layer (#36727) 2021-07-13 13:45:12 -07:00
Ryan McKinley
db5597ab9a
DataLinks: support 'onClick' from table panels (#36682) 2021-07-13 09:43:39 -07:00
Jack Westbrook
dcc6663801
Plugins: Don't show uninstall button for core plugins in catalog (#36671)
* fix(catalog): don't show un/install buttons if core plugin

* test(catalog): add PluginDetails test case for core plugins
2021-07-13 18:22:36 +02:00
Olof Bourghardt
9ea2c601ef
Explore: page title indicates which datasource is being used (#36699)
* Explore: quick fix for page title

* Explore: update page title in componentDidUpdate with info about the current datasources

* Explore: change tests to incorporate the new page title

* Explore: remove updatePageDocumentTitle since the recent changes replace it
2021-07-13 14:21:49 +02:00
Maria Alexandra
da7f5864f5
Annotations: Add custom label for custom values in builtin annotations (#36691) 2021-07-13 13:30:07 +02:00
Torkel Ödegaard
702fd1cad9
Visualizations: Dynamically set any config (min, max, unit, color, thresholds) from query results (#36548)
* initial steps for config from data

* Moving to core and separate transforms

* Progress

* Rows to fields are starting to work

* Config from query transform working

* UI progress

* More scenarios working

* Update public/app/core/components/TransformersUI/rowsToFields/rowsToFields.ts

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

* transform all

* Refactor

* UI starting to work

* Add matcher UI to transform

* Apply to self

* Adding a reducer option

* Value mapping via new all values reducer

* value mappings workg add -A

* Minor changes

* Improving UI and adding test dashboards

* RowsToFieldsTransformerEditor tests

* Added tests for FieldToConfigMapping Editor

* Added test for ConfigFromQueryTransformerEditor

* Minor UI tweaks

* Added missing test

* Added label extraction

* unified mapping

* Progress refactoring

* Updates

* UI tweaks

* Rename

* Updates

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-13 10:51:34 +02:00
Gustaf Lindstedt
81511e34d9
Avoid breaking on fieldConfig without defaults field (#36666)
This would result in a `Dashboard init failed` error when migrating
dashboards with a folded panel that has a `fieldConfig` but has not
defined `fieldConfig.defaults`.
2021-07-13 09:43:09 +02:00
Torkel Ödegaard
beca793008
Transformations: Enable / disable toggle for transformation rows (#36668)
* Disable transform feature

* Change icon

* Added more clear way to show it's disabled
2021-07-13 09:36:51 +02:00
Tharun Rajendran
c26bd6c52f
Password Field Improvements (#36160)
* Password: added show password functionality
added autcomplete props
created password component

Fixes #28721

* addressed review changes and added unit tests

* wrapped passwordField component in forwardRef

* fix validation and tests
2021-07-13 09:32:03 +03:00
Eunice Kim
dc8874cd2e
GeoMap: Implement circle overlays (#36680) 2021-07-12 20:47:39 -07:00
Domas
32a551b4ca
Alerting: add toggle in Loki/Prom datasource config to opt out of alerting ui (#36552)
* wip

* fix useIsRuleEditable

* test for detecting editable-ness of a rules datasource

* tests!

* fix lint errors

* add alerting ui opt-out toggle to loki and prom datasources

* Apply suggestions from code review

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

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-07-12 15:06:09 -07:00
Domas
3ea8880d7f
Alerting: better detect cortex/loki ruler api (#36030)
* wip

* beter detect non existing rules stuff

* fix useIsRuleEditable

* test for detecting editable-ness of a rules datasource

* tests!

* fix lint errors
2021-07-12 14:10:13 -07:00
Marcus Andersson
d4e53a9be4
Plugins: adding possibility to install enterprise plugins if you have a valid license. (#36653) 2021-07-12 22:18:39 +02:00
Ivana Huckova
528fe90536
Explore: Fix running of log queries with shift-enter shortcut (#36600)
* Re-run query if we are running query fromo query row

* Fix imports in tests

* Change solution

* Dispatch clear cache
2021-07-12 17:54:17 +02:00
Torkel Ödegaard
863b412d54
Transformations: State feature (alpha/beta) and more (#36630)
* Adding plugin state feature to transforms

* initial help box

* New HelpBox component

* More progress

* Testing

* Removing HelpBox, simple new design, new active state for OperationRowAction

* Updated tests

* Fixed typing issue

* Removed AlphaNotice

* Made focus and enter key trigger OnClick and sorted transformations

* Fixed e2e tests
2021-07-12 16:42:04 +02:00
Tobias Skarhed
5e62bddd1d
BottomNavLinks: Accessible text for image and icon (#36650) 2021-07-12 16:15:40 +02:00
Ivana Huckova
3c1a9a9eae
Explore: Refactor QueryRow to use ConnectedProps (#36604)
* Refactor QueryRow

* Upddate import in test

* Simplify typing

* Add copy when loading instance
2021-07-12 15:30:24 +02:00
Zoltán Bedi
c02ead9113
Tracing: add way to configure trace to logs start and end time (#34995)
* Tracing: add way to configure trace to logs start and end time

* Use the span's time by default

* Update docs

* Update time inputs to use strings instead of number

* Support negative values as well

* Add info about using negative value

* Don't round up Loki range

* Update docs/sources/datasources/jaeger.md

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

* Wording for doc

* Round adjusted start and end time

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-12 11:25:41 +02:00
Torkel Ödegaard
6c5d0db255
Links: Fixes issue with some links causing full page reload (#36631) 2021-07-12 10:28:49 +02:00
Tobias Skarhed
b8fbe70c14
A11y: ARIA hide image/link duplicate in news panel (#36642)
* fix(a11y): Hide image/link duplicate

* fix: proper heading and time markup
2021-07-12 10:19:00 +02:00
Marcus Andersson
2fb385c192
Plugins: display enterprise plugins in the plugins catalog (#36599)
* displaying enterprise plugins in the list.

* added place holder for tests and removed unused code.

* added test for the browse page.

* added empty test file.

* added some more tests.
2021-07-12 09:49:01 +02:00
pricek
561ccf419c
Table: Add minimum column width field for auto resizing (#35351)
* TablePanel: Adds minimum column width field

The table panel uses virtual rendering of rows, which prevents resizing
based on the contents of a column. A minimum column width field
simulates this ability.

* Fixed indentation issue

* Updates the table panel documentation

Added the "Minimum column width" option to table panel docs and updated
the information for the "Column width" option in the docs.
2021-07-12 09:46:23 +02:00
Gábor Farkas
cc460110b1
influxdb: influxql: better tag-value filtering (#36570) 2021-07-12 07:55:10 +02:00
Torkel Ödegaard
c7d2d70799
DashboardList: Fix issue not re-fetching dashboard list after variable change (#36591) 2021-07-11 07:35:27 +02:00
Ryan McKinley
9ce6e2a664
Geomap: add initial openlayers alpha panel (#36188) 2021-07-09 17:53:07 +02:00
Ryan McKinley
44afe4a597
Testdata: generate data that can link to USA state codes (#36537) 2021-07-09 08:02:57 -07:00
Tobias Skarhed
56903582ce
QueryVariable: Default to first option when none is set (#36521)
* TemplateVariables: Default to first option when none is set

* Add test

* Add tests and rewrite logic
2021-07-09 12:55:56 +02:00
Dominik Prokop
663a8935f7
User analytics: Add Rudderstack integration (#36567)
* Replace analytics service with Echo backend

* Add Rudderstack integration and general pageview and interaction Echo events

* Update conf/defaults.ini

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update packages/grafana-runtime/src/types/analytics.ts

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update conf/defaults.ini

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update tests

* Force cla check

Co-authored-by: Dan Cech <dcech@grafana.com>
2021-07-09 11:45:25 +02:00
Victor Cinaglia
a63c959ae9
Alerting: fix typo in delete dashboard modal prompt (#36270) 2021-07-09 09:58:49 +02:00
Marcus Andersson
52bd1eb1c5
Plugins: converted the plugins admin app to a core feature in grafana (#36026)
* moved the plugins admin to core and used the plugins toggle to decide which version to use.

* reverted change.

* changed so the library tab is the default one.

* fixing navigation.
#

* fixed so we have the proper header.

* including the core plugins

* fixed so we display logos for local plugins.

* fixed so we have a working version of plugin catalog.

* removed console logs.

* reverted changes.

* fixing failed test.
2021-07-08 17:50:42 +02:00
Josh Hunt
a2a1fa51f2
AzureMonitor: Resource Picker alignment/spacing tweaks (#35125) 2021-07-08 16:37:41 +02:00
Piotr Jamróz
9ace8686a1
Datasources: Improve error handling for testing data sources (#35120)
* Improve error handling for error messages

The error message will be read from error object from the following properties in the following order:
- message
- data.message
- statusText

* Convert api/ds/query errors to TestingStatus

SQL datasources (mysql, mssql, postgres) and CloudWatch use api/ds/query to test the data source, but previously didn't handle errors returned by this endpoint. If the error cannot be handled it's re-thrown to be handled in public/app/features/datasources/state/actions.ts

* Use async/await instead of Promises

* Remove incorrect type import

TestingStatus is in app/types. Should be pulled down to grafana/data but it depends on HealthCheckResultDetails that is public and lives in grafana/runtime. Ideally TestingStatus should live in grafana/data but I'm not sure if HealthCheckResultDetails can be move there too (?)

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

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>

* Handle errors with no details in toTestingStatus instead of re-throwing

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

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-07-08 14:32:27 +02:00
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