Commit Graph

3353 Commits

Author SHA1 Message Date
Jack Westbrook
e988d9b56d
Piechart: Update @visx dependencies to 2.1.0 and move to root package.json (#38000)
* chore: move visx dependencies to root package.json

* chore(piechart): bump visx dependencies to 2.1.0

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-08-19 14:49:09 +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
An
7b813c81ac
revert: change to events canvas (#38023) 2021-08-18 15:47:25 -04: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
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
Jack Westbrook
552ecfeda3
Chore: Update NPM packages with react peer deps (#36598)
* chore: bump npm packages with react peer deps

* chore: bump rc-cascader to 1.4.3

* chore: bump react-table to 7.7.0

* chore: bump types packages

* refactor(buttoncascader): use CascaderValueType (fixes typescript errors)

* refactor(cascader): use CascaderValueType (fixes typescript errors)

* chore: bump rc-drawer to 4.4.0

* refactor(drawer): update component to match rc-drawer 4.4.0 api changes

* refactor(cascader): provide backwards compatibility for component apis

* chore(react-test-renderer): bump to match react 17.0.1

* fix(drawer): defer opening RcDrawer so animations play correctly

* chore: bump rc-cascader to 1.5.0
2021-08-18 11:23:34 +02:00
Simon Podlipsky
9900f2ed48
Fix url util converting false into true (#37402)
A value of key-value pair is stripped for boolean values. While this is ok for `true`, it kind of inverts `false`
2021-08-18 10:10:29 +02:00
Domas
cb9912ec0a
Alerting: button to test contact point (#37475) 2021-08-18 10:16:35 +03:00
An
b028dbc537
EventsCanvas: Clean up action to avoid memory leak (#37592) 2021-08-17 17:29:24 -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
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
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
Will Browne
697ac937c6
fix with global config state (#37293) 2021-08-17 12:16:34 +02:00
Jack Westbrook
483c597740
Storybook: Fix Graph with Tooltip story (#37937) 2021-08-17 10:14:57 +02: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
Sergey Kostrukov
10cc9bda74
Toolkit: return original stack trace for webpack errors (#37814) 2021-08-14 13:49:56 -07:00
Leon Sorokin
0e3fb55caa
Tooltip: bring back optimized hoverpoint code (#37901) 2021-08-13 15:35:41 -05: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
Ashley Harrison
d4098cf098
Select: Add menuShouldPortal to a couple that got missed (#37847) 2021-08-13 08:35:24 +01:00
ying-jeanne
d18bd03a82
Scuemeta: Fix cue schemas for panels (#37788)
* complete the data model of graph panel

* fix histogram graph

* fix timeseries panel type

* Update cue/ui/gen.cue

Co-authored-by: sam boyer <sam.boyer@grafana.com>

* fix graph/viz and gradientMode enum

* add the changes into cue component and remove fields for graph panel

Co-authored-by: sam boyer <sam.boyer@grafana.com>
2021-08-12 09:52:03 -04:00
Connor Lindsey
4a9fdb8b76
Add span duration to left panel in trace viewer (#37806) 2021-08-12 06:54:55 -06: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
Ryan McKinley
3205450210
Transformations: support a synchronous transformation pattern (#37780) 2021-08-11 01:25:33 -07:00
Ryan McKinley
36c798eb2f
Chore: define base panel type in @grafana/data (#37766) 2021-08-11 00:23:41 -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
nikki-kiga
87b8a74576
Tooltip: display ms within minute time range (#37569)
* Tooltip: add hasMs flag for system dateTime format

* Tooltip: display ms in sub minute time range

* Tooltip: add field check, increase range on tests

* Add diffrentiating test

* minimize parsing to string values

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-08-10 13:54:44 -07:00
Tobias Skarhed
fa731f16bf
DashboardLinks: Screen reader accessibility #37682 2021-08-10 16:55:25 +02:00
Tobias Skarhed
5b575ae91f
TimeRangeOption: Make entire list item clickable #37730 2021-08-10 12:43:50 +02:00
Zoltán Bedi
ad6a4edfeb
UI: FileDropzone component to handle file list overwrite (#37685)
* UI: FileDropzone component to handle file list overwrite

* FileListItem: use type=button everywhere

* Update packages/grafana-ui/src/components/FileDropzone/FileDropzone.story.tsx

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>

* FileListItem: add aria-hidden and change cancel text

* Update packages/grafana-ui/src/components/FileDropzone/FileListItem.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-08-10 10:23:49 +02: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
Alex Khomenko
a6a09add7a
DateTimePicker: Use TZ independent formatter (#37676) 2021-08-09 12:37:53 +03:00
Tobias Skarhed
2d33ddf37f
Dashboard: Accessible text for search links #37593 2021-08-09 09:59:29 +02:00
Zoltán Bedi
7e42bb5df0
Toolkit: rename deprecated tsConfig to tsconfig (#37630) 2021-08-06 14:04:42 +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
Leon Sorokin
cf1c2c374f
Tooltip: fix time label mismatched with cursor & hover points (#37615) 2021-08-05 22:33:26 -05: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
Leon Sorokin
d49ce5ad47
GraphNG: optimize cursor (#37460) 2021-08-04 16:13:11 -05:00
Leon Sorokin
27b94139ed
XYCanvas: useMemo() for className gen (#37513) 2021-08-04 13:47:43 -05:00
Leon Sorokin
1fe3452886
Field: use 0-based field.state.seriesIndex (#37563) 2021-08-04 13:02:27 -05:00
An
968817b151
Geomap: Use set to order labels in reducer (#37509)
* shared location config

* shared locaiton config

* shared locaiton config

* remove file

* add alpha annotations

* chore: set is already ordered

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-04 12:07:59 -04:00
Alex Khomenko
1a46123dbf
TimeRangePicker: fix DOM nesting (#37550) 2021-08-04 17:04:31 +02: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
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
Tobias Skarhed
aba7013ce5
TimeRangePicker: Accessiblity improvements (#36912)
* Add low hanging aria markup

* Add a list of radio buttons

* Add ref to put focus

* Add landmark markup

* Add labels to icon buttons

* Add radio button groupings

* Add keyboard focus styles

* Improve markup

* Update test selector

* Remove testid in favor of text

* Fiddle around with test labels

* Get correct testid selector

* Add aria-expanded to button

* Change order of quick select for keyboard nav

* Create headings for easier heading navigation

* Add another h3

* Add testid

* Use selectors in e2e test

* Add dataid selector for narrow absolute button

* Update e2e test with proper selectors

* Add more verbose aria-label

* Change editor to picker
2021-08-04 09:53:52 +02:00
Oscar Kilhed
e3fe4a2d11
GraphNG: make sure we update when children changes (#37333) 2021-08-04 09:07:00 +02:00
Leon Sorokin
0b7253406b
Portal: optimizations (#37459)
Co-authored-by: An Le <an.le@grafana.com>
2021-08-03 16:27:27 -05:00
Leon Sorokin
0d2cd90150
GraphNG: fix y axis autosizing (#37464) 2021-08-03 08:18:05 -05:00
Ashley Harrison
9934c883cc
Select: Expose menuPortalTarget on SelectBase (#37456)
* Select: Expose Select props for greater flexibility

* Select: only expose menuPortalTarget

* Select: Add deprecation notice for menuPortalTarget prop

* Select: Add deprecation warning to component
2021-08-03 11:55:09 +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
Connor Lindsey
6906a74179
Jaeger: Sync getTraceName improvements from upstream (#37408)
* Improve trace name resolution

* Use getTraceName in transformTraceData

* Improve getTraceName performance

* Change trace-viewer extension back to ts
2021-08-02 08:23:43 -06:00
Connor Lindsey
0699a04dcd
Refactor UNSAFE_component... from SpanGraph and VirtualizedTraceView (#37418) 2021-08-02 08:03:08 -06:00
Connor Lindsey
e4f0d269f4
Connor/jaeger misc sync (#37420)
* Avoid resize on mouse hover (KeyValueTable)

* Add null check for span.logs in filter-spans

* Display references unless it's a single CHILD_OF

* Identify uninstrumented services

* Improve span duration formatting
2021-08-02 06:28:20 -06: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
Leon Sorokin
78f46e28c7
Stat: fix shared y scale range, reduce plot re-inits (#37324) 2021-07-28 22:42:18 -07: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
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
nikki-kiga
01e984c394
ColorPicker: display colors as rgba in input (#37231)
* SpectrumPalette: change input to display rgba string

* fieldOverrides: remove extra hex string check
2021-07-26 15:54:13 -07: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
nikki-kiga
3e35021f7e
ColorPicker: return values as hex strings and update theme (#37173)
* Color: fix alpha calculation < 16/255 and State-timeline threshold alpha

* SpectrumPalette: Update to getColorByName

* ColorValueEditor: Update to theme2

* SpectrumPalette: Update to theme2

* ColorPickerPopover: Format hex color

* SpectrumPalette: Format hex color

* SpectrumPalette: Refactor hex color alpha helper

* SpectrumPalette: Fix import and update helper

* ColorPickerPopover: Fix test to not make lowercase

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-26 11:11:53 -07:00
Alex Khomenko
8c8d2fe08b
Use dateTime vs new Date() (#37210) 2021-07-26 18:18:15 +02:00
Connor Lindsey
b644ea9e6e
Loki: Add fuzzy search to label browser (#36864) 2021-07-26 08:04:03 -06:00
Zoltán Bedi
04a196da4b
UI: Dropzone component (#36646)
* 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

* Change primary text when multiple false

* Review comments addressed

* Extract remove file to constant

* No need to await after await
2021-07-26 13:21:35 +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
Leon Sorokin
4c3e197e26
TimeSeries: make cursor hover the nearest non-null/undefined datapoint (#34552) 2021-07-23 16:05:09 -05:00
nikki-kiga
a1bbe797df
StatPanel: Disable selection on Sparkline (#37125) 2021-07-22 15:12:31 -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
Tobias Skarhed
437424d5d6
Storybook: Add a11y addon (#36790)
* Storybook: Add a11y addon

* Update lockfile

* Bump Storybook addon versions

* Put Icon at top

* addon-knobs 6.3.0
2021-07-22 17:28:38 +02: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
Tobias Skarhed
8af83b8b78
IconButton: Put tooltip text as aria-label (#36760)
* Make tooltip prop aria-label

* Add ariaLabel prop
2021-07-22 13:56:25 +02:00
Ryan McKinley
9cd8e11c30
Geomap: add basic gazetteer support (#37082) 2021-07-21 23:41:27 -07:00
Dominik Prokop
40a87a7851
BarChart: use uPlot's native bars pathbuilder (#36725) 2021-07-22 00:50:59 +02:00
Leon Sorokin
395289f45d
GraphNG: uPlot 1.6.14 (#37045) 2021-07-21 15:27:22 -07:00
Ryan McKinley
e604e69d93
Geomap: default basemap config cleanup (#37069) 2021-07-21 13:48:20 -07:00
Atif Shoukat Ali
f699580b15
fix: utils deps (#36939) 2021-07-21 12:28:35 -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
Eunice Kim
02b5a18da2
Geomaps: Add default base layer (#37043) 2021-07-21 10:20:30 -07:00
Eunice Kim
3b0d7fc00b
Geomap: Base layer server configuration (#37041) 2021-07-21 17:54:05 +02:00
Ryan McKinley
46eac518d3
Geomap: set value default on init (#36960) 2021-07-20 15:52:12 -07:00
Ashley Harrison
4f315bf48f
VizTooltip: Use previous positioning calculation (#36861)
* VizTooltip: Use previous positioning calculation

* VizTooltip: Don't need to check for tooltip width/height here

* VizTooltip: Disable pointer-events in the mixin

* VizTooltipContainer: Move pointerEvents to inline style to prevent breaking AnnotationMarker

* Move comment to correct place

* No need to change this
2021-07-20 14:49:50 +01: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
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
Piotr Jamróz
ef689d0c24
SegmentSelect: Do not call onCloseMenu when a value was selected (#36905)
* Do not call onCloseMenu when a value was selected

Otherwise a wrong value might be picked up from the input in case when part of the value is in the input (used for filtering) and the actual value is selected.

* Add more docs
2021-07-19 19:57:09 +02:00
Ryan McKinley
85a14a0503
Geomap: configure size and color with different fields (#36825) 2021-07-19 19:16:42 +02:00
Ryan McKinley
d4fa2529c8
Geomap: make the geomap panel beta and label alpha layers (#36894) 2021-07-19 08:07:28 -07:00
Tharun Rajendran
ecd2c320ba
GlobalStyle: Add focus style for links (#36533)
* GlobalStyle: Add focus style for links

* GlobalStyle: show focus style only on visible
2021-07-19 16:17:45 +02: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
nikki-kiga
2172920095
Tooltip: Make active series more noticeable (#36824)
* fix: make active series in tooltip more noticeable

* update font and spacing theme values
2021-07-16 11:28:35 -07: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
Piotr Jamróz
3778e9bbbd
SegmentSelect: Fix closing the menu on click out (#36816) 2021-07-16 08:39:06 +02:00
Ryan McKinley
8de218d5f1
Geomap: use a common configuration builder to find location fields (#36768) 2021-07-15 12:00:19 -07:00
Ashley Harrison
8c91b290ba
Select: Block scroll on select instead of trying to hide the menu (#36783) 2021-07-15 10:54:38 +01:00
Ryan McKinley
6d87b26d6c
OptionsUI: add standard field name picker (#36732) 2021-07-14 11:54:58 -07:00
Ashley Harrison
9cfb7d801f
Modal: Force modal content to overflow with scroll (#36754) 2021-07-14 15:35:34 +01: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
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
db5597ab9a
DataLinks: support 'onClick' from table panels (#36682) 2021-07-13 09:43:39 -07:00
Arve Knudsen
2026a1dfb6
grafana-plugin-ci-e2e: Fix README; bump version (#36716)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-07-13 16:59:18 +02:00
Sarah Zinger
0922e8d9f0
Upgrade node version for e2e tests (#36620) 2021-07-13 10:23:29 -04: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
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
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
Ashley Harrison
b1d576c5da
TimeSeries: Improve tooltip positioning when tooltip overflows (#36440)
* TimeSeries: Improve tooltip positioning when tooltip overflows

* VizTooltip: Use react-popper, extract positioning calculation into util function + add unit tests

* VizTooltip: Keep ref as tooltipRef

* Use popper only for VizTooltip positioning

* VizTooltip: Set altAxis to true to prevent overflow on y axis

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-07-12 16:53:53 +01: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
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
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
Torkel Ödegaard
afff7f24fc
Select: Minor style and usability improvements (#36628)
* Select: Minor style & hover improvements

* added testid

* change to aria label
2021-07-11 17:18:37 +02:00
Leon Sorokin
bb1dac3c72
Stat: use shared data min/max for y auto-ranging (#36497) 2021-07-09 11:33:49 -05:00
Ryan McKinley
9ce6e2a664
Geomap: add initial openlayers alpha panel (#36188) 2021-07-09 17:53:07 +02:00
Peter Holmberg
2b22ab6eaf
grafana/ui: Date time picker (#36477)
* styling

* useCallback for onAction

* add flex to accomodate seconds

* fix positioning of the calender

* move input to its own component with state

* wrap callbacks in usecallback

* fix states and add mdx

* add docs

* add tests

* styling fixes for smaller screens

* make date optional

* add test for the changing the input

* more position fixes

* fix an issue with removing the date

* do not show invalid date in input

* more pr feedback
2021-07-09 15:35:48 +02:00
Agnès Toulet
19fbfc8d24
Config: remove unused Enterprise feature toggles (#36527) 2021-07-09 15:12:26 +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
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
Torkel Ödegaard
eed1f36613
Links: Fix links to other apps outside Grafana when under sub path (#36498) 2021-07-07 15:25:59 +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
Alex Khomenko
1655ff1e49
Add aria label (#36468) 2021-07-07 09:06:39 +03:00
Tharun Rajendran
97dca963a9
Table: Fixes color for data links (#36446)
* Table: add styling for anchor tag

* inherit color from parent to anchor tag

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-07-07 07:46:38 +02:00
Alex Shpak
b5cdf5fdd8
Respect hour12 settings when formatting local date (#33679)
* Respect hour12 settings when formatting local date
2021-07-06 13:09:19 +01:00
Ashley Harrison
96a3cc3cd8
TooltipPlugin: Prevent Tooltip render if field is undefined (#36260)
* Tooltip Plugin: Prevent tooltip render if focusedSeriesIdx is out of range

* TooltipPlugin: Also prevent render in multi case

* TooltipPlugin: Return null if field is undefined
2021-07-06 10:48:10 +01:00
Josh Hunt
227c11d37f
Grafana-Toolkit: Improve error messages when tasks fail (#36381) 2021-07-06 10:07:17 +01:00
fabio-silva
d87e086d6f
Dashboard: avoid and correct invalid date ranges (i.e. to < from) (#34543)
* Dashboard: invert invalid date ranges from URL

* Dashboard: discard invalid date ranges from inputs

* Dashboard: move time range reset

* Dashboard: simplify undefined dashboard verification

* Dashboard: show form error on invalid date range

* Dashboard: rename function to isRangeInvalid

* Dashboard: refactor invalid check functions

* Dashboard: different error messages for date picker

* Dashboard: add date tests to TimeRangeForm
2021-07-06 10:46:17 +02:00
Uchechukwu Obasi
808b9a3126
Grafana-ui: disables storybook controls that are irrelevant (#35250)
* Grafana-ui: disables storybook controls that are irrelevant

* excluded unused control in Select story

* made timeRange control visisble in GraphNG story
2021-07-05 10:17:39 +02:00
Dominik Prokop
7ae656ff16
TimeSeries: Do not show series in tooltip if it's hidden in the viz (#36353) 2021-07-05 10:15:34 +02:00
Edgar Poce
7fd2ddfdb4
Transformations: skip merge when not enough dataframes (#36407) 2021-07-05 08:40:02 +02:00
Ikko Ashimine
b13101fd00
Monaco: fix typo in types.ts (#36412)
guarentee -> guarantee
2021-07-04 15:58:33 -07:00
MeetzhDing
63715dcdef
fix: #36322 HistoryWrapper constructor history param not work (#36367) 2021-07-02 17:19:58 +01:00
Torkel Ödegaard
f152180dc3
TimeSeries: Fixes x-axis time format when tick increment is larger than a year (#36335)
* TimeSeries: Fixes x-axis time format when tick increment is larger than a year

* removed modal change

* removed modal change
2021-07-01 13:39:30 +02:00
Tharun Rajendran
738a3a2d89
VariableSettings: fix tool-tip hyperlink color (#36140)
* VariableSettings: fix tool-tip hyperlink color

Fixes #36122

* move inline css styles for anchor tag in Tooltip to Tooltip component styles
2021-07-01 10:24:04 +02:00
Torkel Ödegaard
1caaa784d9
Legend: Updates display name for Last (not null) to just Last* (#35633)
* Legend: Updates display name for Last (not null) to just Last*

* added description

* Removed the asterix

* Added back * suffix
2021-07-01 09:43:40 +02:00
Alex Khomenko
1ab4ffb03d
Fix Graph story (#36259) 2021-06-30 17:08:34 +03:00
Torkel Ödegaard
a690d0f803
FilterPill: Wip updated design & storybook (#35616)
* FilterPill: Wip updated design & storybook

* Added hover states

* Fixes
2021-06-30 15:25:59 +02:00
Leon Sorokin
f9fb5ba637
TimeSeries: Bring back axis label padding (#36281)
* TimeSeries: bring back some axis label padding

* Update snaps

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-06-30 10:02:56 +02:00
Ryan McKinley
ab2f6fe24c
Live: attach stream info to streaming frames (#35465) 2021-06-28 14:57:10 -07:00
Ryan McKinley
429e2d0ab2
StreamingDataFrame: skip empty labels (#36047) 2021-06-28 13:00:32 -07:00
Giordano Ricci
58bbe17d84
Grafana-UI: allow custom validity checks for creatable selects (#36118)
* add actions handling to Select in storybook

* Grafana-UI: allow custom validity checks for creatable selects
2021-06-25 11:05:36 +01:00
kay delaney
aae3b76d84
Chore: Upgrade typescript to version 4.3.4, storybook to 6.3.0 (#35374)
* Chore: Upgrade typescript to version 4.3.4, storybook to 6.3.0
2021-06-24 15:29:03 +02:00
kay delaney
f5bd325354
A11y: Add focus styles to dashboard toolbar links (#35895) 2021-06-23 12:03:44 +01:00
Christopher Lord
8660d0692e
CLI: Add option to skip tests and linting for grafana-toolkit plugin:build (#35068)
* Add option to skip tests and linting for plugin:build

Our plugin has a separate step of CI that tests and lints, so we'd like
to be able to control whether the build step will run it too.

defaults to continuing with lint and tests.

update README for grafana-toolkit

* remove accidental duplicate documentation of coverage
2021-06-23 08:09:23 +02:00
Josh Hunt
fcb4e5a211
Grafana-UI: Remove references to old monaco libraries (#35557) 2021-06-22 11:52:08 +01:00
Piotr Jamróz
e94b82c833
Logs: Support implicit reset codes for ANSI coloring 2021-06-22 09:45:20 +02:00
Ryan McKinley
970481bdec
Matchers: support both name and display name (#35466) 2021-06-22 09:25:21 +02:00
Hugo Häggmark
ffc18ebbcf
Variables: Fix for changing readonly query property (#35992)
* Variables: Fix for changing readonly query property

* Docs: adds release

* Docs: adds release
2021-06-22 08:53:41 +02:00
Domas
bef0f797ab
add duration utils docs (#35995) 2021-06-21 17:41:11 +02:00
Domas
781ab833bd
Alerting: allow any "evaluate for" value >=0 in the alert rule form (#35807) 2021-06-21 15:54:42 +03:00
Dominik Prokop
6f3887ca88
TimeSeries panel: Do not reinitialize plot when thresholds mode change (#35952) 2021-06-21 08:51:39 +02:00
Torkel Ödegaard
9e53b44f35
FieldOverrides: Support changing display name in override and have it be matched by later rule (#35893)
* FieldOverrides: Support changing display name in override that can be matched by later rule

* Fixed test
2021-06-19 07:36:59 +02:00
Torkel Ödegaard
7aaf813751
ButtonGroup: Support nested buttons within button groups (#35884)
* ButtonGroup: Support nested buttons within button groups

* removed files

* Fixes
2021-06-18 09:09:47 +02:00
Leon Sorokin
503c3b8f66
Time series: always show single points if surrounded by nulls (#35845) 2021-06-17 15:44:26 -05:00
Torkel Ödegaard
22203fd4df
Prometheus: Fixes issue where legend name was replaced with name Value in stat & gauge panels (#35863) 2021-06-17 20:59:28 +02:00
Leon Sorokin
e1e2bd545a
GraphNG: more precise axis auto-sizing (#35842) 2021-06-17 13:23:03 -05:00
Leon Sorokin
9eac9aefde
GraphNG: uPlot 1.6.13 (#35844) 2021-06-17 13:20:27 -05:00
Marcus Andersson
b1286ab8d6
TimePicker: will display the correct dates when selecting range in calendar with tz. (#35829)
* fixing calendar issue.

* reset yarn.lock.

* added boilerplate for test.

* added tests to verify bugfix.
2021-06-17 15:45:06 +02:00
Uchechukwu Obasi
dbbcf36026
CodeEditor: refactors story from knobs to controls (#35827)
* fixes storybook crash

* CodeEditor: refactors story from knobs to controls

* refactor codeEditor to work when showLineNumbers is set to false

* fixes non functional controls in story

* fixes arg 'value' formatting

* revert monaco options config
2021-06-17 14:20:23 +02:00
Uchechukwu Obasi
be5d032e8e
withStoryContainer: removes addon-knobs since we've migrated to controls (#35763)
* withStoryContainer: removes addon-knobs since we've migrated to controls

* refactored withStoryContainer utility so that users can be able to resize story

* Layout: added ability to resize story (#35824)

* Layout: added ability to resize story

* removes the knobs-disable config since its already been applied globally

* FieldArray: refactors story to use controls and ability to resize story (#35820)

* FieldArray: refactors story to use controls and ability to resize story

* added much better argTypes changed story name to capital case

* updates the FieldArray.mdx with the new usage examples

* fixes incorrect naming of the args
2021-06-17 12:39:41 +02:00
Vicky Lee
768c190bc0
test: fix e2e dashboard and configure panel flows for Grafana 8 (#35498)
* fix e2e flows

* trigger build

* remove aria-label
2021-06-17 08:31:43 +01:00
Stephanie Closson
16cc91bf33
Chore: update docker images -- revert to debian stable (#33044)
* update docker images -- revert to debian stable

* pinned node version
2021-06-16 12:35:18 -03:00
Tobias Skarhed
a693b2eaef
Table: Set width 100% if the calced width is 0 (#35802) 2021-06-16 16:17:33 +02:00
Alex Khomenko
11335d6f6a
grafana/ui: Add DatePicker (#35742)
* Move DatePicker to grafana/ui

* Export the pickers

* Reuse TimePicker styles

* Fix date formatting

* Remove mockdate

* Add release tags

* Switch to input type='text'

* Move DatePicker to pickers

* Add mdx files

* Update types

* Update tests
2021-06-16 15:57:12 +03:00
Hugo Häggmark
866b2424ac
Chore: Upgrades Cypress to 7.5.0 (#35517)
* Chore: Upgrades Cypress to 7.5.0

* updating e2e test not to use momen.

* Fix trace viewer tests

* Chore: changing to exact version and removing console.logs

* Tests: refactor to handle day diffs

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-06-16 14:34:56 +02:00
Leon Sorokin
d3c1a2bf8e
Time series: fix soft scale limits when all values are 0 (#35596) 2021-06-15 17:39:45 -05:00
Torkel Ödegaard
b3fcad947b
TimeSeries: Reduce tick size from 10 to 4 (#35632) 2021-06-15 17:08:39 -05:00
Uchechukwu Obasi
597c099050
FileUpload: refactor story from knobs to control (#35760) 2021-06-15 16:37:36 +02:00
Alex Khomenko
e5e93134cf
grafana/ui: Do not wrap words inside RadioButton (#35654) 2021-06-15 16:27:14 +03:00
Uchechukwu Obasi
f4cc709d87
PluginSignatureBadge: refactor story from knobs to control (#35662) 2021-06-15 12:40:20 +01:00
Uchechukwu Obasi
3900005bf1
useDelayedSwitch: refactor story from knobs to control (#35669) 2021-06-15 10:26:36 +01:00
kay delaney
0f81703c35
Chore: Fix more strict typescript errors (#35514) 2021-06-14 15:13:48 +01:00
Uchechukwu Obasi
6ee2f1fe3e
Add Panel: fixes No gap between rows in safari (#35570)
* Add Panel: fixes No gap between rows in safari

* removes extra margin from bottom and far right

* fixes frontend test

* make add panel actions accessible and rewrite test using RTL
2021-06-14 15:12:56 +01:00
Dominik Prokop
08bc2b402b
ValueMappings: Improve singlestat value mappings migration (#35578)
* Migrate singlestat value mappings to new value mappings

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

* Update migration to produce single value map
2021-06-14 13:47:34 +02:00
Ryan McKinley
056e17216e
Stat: improve color mode migration from singlestat panels (#35538) 2021-06-11 18:03:30 +02:00
Torkel Ödegaard
a328afd631
PieChart: Fixes legend dimension limits (#35563)
* PieChart: Fixes legend size limits

* Fixing table legend

* remove legend
2021-06-11 17:42:07 +02:00
Torkel Ödegaard
f884381a68
Theme: Change white base in dark theme (#35564)
* Theme: Change white base in dark theme

* Updated

* Updated snapshots
2021-06-11 17:33:56 +02:00
Oscar Kilhed
38734366d1
TimeSeries: Fix fill below for dataframes with name (#35453)
Use original dataframes for matching config.
2021-06-11 13:49:26 +02:00
Vicky Lee
e9a4484daf
test: remove health check request for e2e flow (#35494)
* remove health check request

* add deprecation notice
2021-06-10 16:11:10 +01:00
Uchechukwu Obasi
bea8747405
Graph and GraphNG: make the stories internal (#35491) 2021-06-10 13:02:04 +02:00
Jack Westbrook
8b2ee06f3c
Routing: Remove subPath only at start of href (#35416)
* fix(routing): remove baseUrl only if at start of url

* test(routing): add subdirectory suburl tests for stripBaseFromUrl

* test(routing): add absolute url check to fix tests, add extra tests
2021-06-10 11:08:39 +02:00
Torkel Ödegaard
3c32acb406
StatPanel: Fixes issue with graph look when switching color mode (#35460) 2021-06-10 10:30:46 +02:00
Marcus Efraimsson
d15d87db8a
Datasource: Fix storing timeout option as numeric (#35441)
#31871 introduced support for configuring timeout in seconds
for HTTP data sources. That had a bug where backend expected
a numeric timeout value where it was actually stored as a
string. This should resolve this by requiring input to be
numbers, storing input as numeric and falling back to string
value if there's no numeric value.

Ref #31871
2021-06-10 10:27:14 +02:00
Uchechukwu Obasi
8d9e1d75a5
Grafana-UI: Removes knobs still showing in storybook stories (#35381)
* Grafana-UI: Removes knobs from storybook addons pane

* removed other knobs settings since we are disabling it

* remove the knobs disable config in individual stories
2021-06-09 11:47:01 +02:00
Torkel Ödegaard
c425c30d7e
Visualizations: Fixes Stat/BarGauge/Gauge/PieChart all values mode showing same name if same value (#35368) 2021-06-08 16:47:09 +02:00
Jack Westbrook
044acf727b
Toolkit: Resolve external fonts when Grafana is served from a sub path(#35352) 2021-06-08 16:44:57 +02:00
Alex Khomenko
2cc172db1a
Search: minor UI fixes (#35335)
* Increase margin between search item so it's visible

* Fix manage dashboards height overflow

* Align folder icon

* Increase margin

* Update container height

* Fix className not being passed to CardContainer
2021-06-08 14:41:06 +02:00
Marcus Andersson
da9b5973f9
PanelChrome: title styling changed to be semi bold (#35302) 2021-06-07 08:46:42 +02:00
Leon Sorokin
36925ef521
Histogram: reduce default bucket size, fix rendering (#35294) 2021-06-04 20:15:08 -05:00
Ryan McKinley
99a6337e1f
Histogram: support units on the x axis (#35218) 2021-06-04 10:42:53 -07:00
Uchechukwu Obasi
c39d0fa8c3
Grafana-ui: explicitly set storybook control types (#35265) 2021-06-04 17:51:44 +02:00
Uchechukwu Obasi
70155c7fd0
Graph: fixes storybook crashing when using the story (#35251)
* Graph: fixes storybook crashing when using the story

* fixes the GraphWithLegend story too
2021-06-04 16:22:11 +02:00
Jack Westbrook
c13f247a94
Card: Defend against conditional action buttons (#35204)
* fix(card): defend against invalid elements types passed to BaseActions

* test(card): add test to support conditional buttons being passed in

* fix(playlistpage): remove disabled prop from LinkButton for editors

* chore(playlistpage): remove title from edit button
2021-06-04 14:38:29 +02:00
Agnès Toulet
5f6c172b5a
Renderer: add version information (#34964)
* Renderer: add version information

* fix alerting test
2021-06-04 14:33:49 +03:00