Commit Graph

3353 Commits

Author SHA1 Message Date
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
Alex Khomenko
f683a497eb
Add missing select options for controls (#35178) 2021-06-04 10:28:27 +01:00
Leon Sorokin
43d3d97562
Histogram: enable client-side zoom (with bucket snapping) (#35220) 2021-06-03 20:05:47 -05:00
Ryan McKinley
e1af571efd
Timeseries: move join field to index zero (#35217) 2021-06-03 16:05:08 -07:00
Josh Hunt
32d9b04666
Grafana-UI: Fix checkbox vertical alignment (#35124)
* Grafana-UI: Fix Checkbox vertical layout issues

* reorganise css

* revert my 'fix' and just go back to setting a min height :(
2021-06-03 15:37:59 +03:00
Leon Sorokin
433f11a78c
GraphNG: uPlot 1.6.11 (#35146) 2021-06-03 04:47:49 -05:00
Jack Westbrook
9df23b8fff
Chore: Bump sanitize-url to 5.0.2 (#35088) 2021-06-03 10:05:55 +02:00
Dominik Prokop
7359ba44d0
Timeline/Status grid panel: Add tooltip support (#35005)
* Timeline/Status grid tooltip support first pass

* Tooltips workin

* Use getValueFormat to get the duration

* Separate boxes highlight from tooltip interpolation

* Separate state timeline tooltip component, rely on field display color to retrieve color of series

* create an onHover/onLeave API and optimize implementation

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-02 21:43:47 -05:00
Ryan McKinley
f7893ca5cf
Live: fix field filtering and survive reconnect (#35122) 2021-06-02 12:12:48 -07:00
Ryan McKinley
744ca8d439
FieldDisplay: add cache to reuse field value calculations (#35072)
* add timeline value cache

* add timeline value cache

* with console logs

* cleanup

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-02 11:01:23 -07:00
Dominik Prokop
a08ee057eb
VizLegend: add readonly prop (#35096)
* VizLegend: add readonly prop

* Update packages/grafana-ui/src/components/VizLegend/VizLegendTableItem.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-06-02 15:39:20 +02:00
Torkel Ödegaard
e6f2b10a36
ChangeTracker: Unified unsaved changes handling with library panels (#34989)
* UnsavedChanges: Move Change tracker to use Prompt

* Fix a lot of race conditions and stacking of changes in onConfirm and onDismiss

* Listen to save event

* add missing delay argument

* migrated the change tracker unit tests

* Updated snapshot

* Removed unessary action

* removed updateSourcePanel

* Fix hiding save library panel modal prompt when clicking discard

* change saved libray panel title and buttons so they are a bit different as Prompt and when used from save button

* Fixed issue with saving new dashboard

* Now all scenarios work

* increase wait time

* Fixed one more race condition
2021-06-02 12:24:19 +02:00
Giordano Ricci
13cf6a3e00
Docs: Add Volta to Grafana dev setup instructions (#35064)
* Chore: update developer guide to use Volta

* Chore: Fix Volta config

* Chore: Add volta config to each workspace

* Chore: Add volta config to each workspace

* Apply suggestions from code review

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

* Update contribute/developer-guide.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-06-02 09:08:38 +01:00
Giordano Ricci
8afb15296a
Grafana-UI: Allow Card consumers to override disabled prop for action (#34664) 2021-06-02 08:20:35 +01:00
Leon Sorokin
878474a808
Color utils: optimize colorManipulator/alpha() for common cases (#34948) 2021-06-01 12:52:58 -05:00
Uchechukwu Obasi
4d574bb8aa
VizLegendTable: fixes column spacing to span to the right side (#35045)
* VizLegendTable: fixes column spacing to span to the right side

* reverted text alignment to right

* implemented a more readable solution for tabble legend spacing
2021-06-01 17:47:14 +02:00
Torkel Ödegaard
dc5e7695e4
Checkbox: Fixes vertical layout isssue with Checkboxes due to fixed height (#35022) 2021-06-01 16:11:07 +02:00
Uchechukwu Obasi
865eac309c
Table: datalink to have text underline and support for image datalink (#34635)
* Table: datalink to have text underline and support for image datalink

* fixes image oversize issue when using both image and link in a column

* fixes small nit

* extracted the getLink logic to be a standalone utility function

* Updates table tests to suit current structure

* fixes small syntax nit

* fixes bad typing issue

* annotes the getCellLinks logic as an internal utility function

* removes blank whitespace

* Tests: updates test cases to use getByRole

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-06-01 11:03:03 +02:00
Piotr Jamróz
f4a40a4d85
Logs: Use GraphNG to plot log histograms (#34531)
* Switch to GraphNG for Logs Histogram

* Remove redundant timeZone

It was used just to format timestamp in the tooltip but it's not needed anymore.

* Add tests for creating logs histogram data

* Update decoractors tests

* Adjust bar width to be more like in the old graph

* Fix tooltip pointer color

* Test tooltip pointer color

* Decouple graph config from uPlot internals

* Ensure nested properties are not mutated when overrides are applied

* Add legend toggling for Explore graphs

* Remove unused component

ExploreGraphNGPanel is now used in Explore

* Code formatting

* allow multiple bars pathBuilders to be globally cached with different settings

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-01 09:28:25 +02:00
Torkel Ödegaard
ce63da63db
Collapse: Fixes icon (angle down/right) positioning (#34930) 2021-06-01 08:29:52 +02:00
Dominik Prokop
823581add8
Secure from custom config being undefined in PlotLegend (#34975) 2021-05-31 19:37:34 +02:00
Nathan Rodman
7dd5a065ba
Alerting: New alert list panel component (#34614) 2021-05-31 14:08:05 +02:00
Alex Khomenko
e38c6d73a0
Make sure ConfirmButton cannot be clicked when closed (#34818) 2021-05-31 10:39:55 +03:00
Alex Khomenko
10f6638d9e
Add custom icons for layout options (#34890) 2021-05-31 10:38:39 +03:00
Dominik Prokop
573d7b8893
GraphNG: Remove fieldName and hideInLegend properties from UPlotSeriesBuilder (#34901)
* Remove fieldName and hideInLegend properties from UPlotSeriesBuilder

* Fix test
2021-05-31 09:27:57 +02:00
Torkel Ödegaard
d9e9e4744d
StatPanel: Fixes data link tooltip not showing for single value (#34934) 2021-05-31 09:01:47 +02:00
Torkel Ödegaard
ef13f7ece1
ConfirmModal: Auto focus delete button (#34917) 2021-05-31 08:42:59 +02:00
Hugo Häggmark
37ab5ec7f4
Table: Fixes sorting for number fields (#34722)
* Table: Fixes sorting for number fields

* Refactor: changes after PR comments

* Refactor: found a bug
2021-05-31 06:12:56 +02:00
Torkel Ödegaard
d6a9a9b975
Themes: Add border to sidemenu, and reduce border in dark theme a tiny bit (#34737)
* Themes: Add border to sidemenu, and reduce border in dark theme a tiny bit

* Updated
2021-05-29 07:08:05 +02:00
Oscar Kilhed
dfc466052d
BarChart: make sure tooltip closes when user presses E (#34884) 2021-05-28 23:24:03 +02:00
Ivana Huckova
f16b2c40c1
Add key for DataLinkButtons (#34935) 2021-05-28 21:57:51 +02:00
Torkel Ödegaard
179bfecb3e
Color: Remove the default color scale logic (#34913) 2021-05-28 17:50:25 +02:00
Zoltán Bedi
4435895833
Prometheus: exemplars show different symbols (#34763)
* Show different symbols for different queries

* Only run different exemplars

* Address review comment

* Do the same for dashboard + tests
2021-05-28 15:40:15 +02:00
MrSummat
48fe3feae7
Dashboard: Fix multi-value variables in share links (#33216) (#33576) 2021-05-28 08:23:23 +02:00
Torkel Ödegaard
658cc5dd2d
PieChart: Support row data in pie chart (#34755)
* PieChart: Support row data in pie chart

* Make color override work

* removed thing

* Minor refactoring
2021-05-28 07:29:57 +02:00
Ryan McKinley
e1088e9360
Stat: don't show sparkline if y field is not number (#34857) 2021-05-28 00:32:20 +02:00
Alexander Emelin
6d750c000e
Live: max_connections option with strict default (#34634)
this should help Live to be enabled by default but still
do not affect setups with lots of simultenious users. To
properly handle many WS connections Grafana administrators
should tune infrastructure a bit - for example increase a
number of open files for a process. Will be in more details
in documentation.
2021-05-27 22:03:18 +03:00
Torkel Ödegaard
f07366690e
Overrides: Hide from visualization should be available as a manual override option (#34783)
* Visualization: Hide from option should be available as a manual override option

* Fix misaligned type

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-05-27 17:31:01 +02:00
Marcus Andersson
da6236d89a
Alerting: improved error message and change styling of relative button. (#34730)
* improved error message and change styling of relative button.

* minor adjustments.

* adding clock icon.
2021-05-27 15:58:58 +02:00
Andrej Ocenas
fcdab32750
NodeGraph: Fix error when clicking link in a context menu (#34817)
* Add prevent default if onClick exists

* Apply field overrides
2021-05-27 15:33:25 +02:00
Domas
871e476e41
sort alert instance, "datasource" -> "data source" (#34724) 2021-05-27 13:47:26 +03:00
Will Browne
c7b58fe186
Plugins: Enable catalog management link to gcom (#34673)
* click out to gcom when config enabled

* set to false

* fix styling for uninstall

* remove advertising config + simplify callout URL

* add entry to configuration.md

* update config name

* update lingo
2021-05-27 12:45:06 +02:00
Dominik Prokop
1fa755bada
Time series panel: Position tooltip correctly when window scrolled or resized (#34782)
* Position GraphNG tooltip correctly when window scrolled or resized

* Use syncRect uPlot hook instead of polling

* update snap?!
2021-05-27 10:51:06 +02:00
Dominik Prokop
811704fd2e
PanelEdit: Allow standard field config properties extensions without altering order of standard options (#34669)
* Render tooltip options in correct category

* Allow custom field config properties that extend standard categories
2021-05-27 10:36:45 +02:00
Hugo Häggmark
3a68409e5d
Plugins: Adds back getMappedValue to @grafana/data (#34746)
* Plugins: Adds back getMappedValue to @grafana/data

* Chore: fixes doc errors

* Tests: fixes snapshot

* Tests: dummy change to restart Drone

* Tests: tries to fix snapshot
2021-05-27 09:29:22 +02:00
Kevin Minehart
3aba08f708
hide caching settings when its disabled (#34756) 2021-05-26 12:27:28 -05:00
Leon Sorokin
1dd5d6ffb0
GraphNG: uPlot 1.6.10 (#34759) 2021-05-26 11:46:24 -05:00
Andrej Ocenas
9dafd4f863
NodeGraph: Show node graph collapsed by default with trace view (#34491)
* Show node graph collapsed by default with trace view

* Fix rename variable

* Change the message

* Add test

* Fix e2e test

* Remove expect in exemplars test

* Align icon

* review fixes
2021-05-26 15:11:47 +02:00
Jack Westbrook
ad3b0b2272
PageToolbar: add bottom padding (#34602)
* fix(pagetoolbar): pad elements top and bottom to keep vertical align and wrapper padding

* fix(sidemenu): prevent mobile sidemenu squashing dashboard, vertically align mobile sidemenu icon

* fix(dashboardsettings): prevent subheader overlap

* fix(pagetoolbar): center align all toolbar elements vertically

* refactor(pagetoolbar): combine vertical paddings to bring back original padding values

* refactor: update padding values for components that use PageToolbar

* fix(playlists): update Empty cta link route to prevent 404

* test(dashboard): update snapshot
2021-05-26 10:49:39 +02:00
Marcus Andersson
e19b3df1a9
Alerting: added possibility to preview grafana managed alert rules. (#34600)
* starting to add eval logic.

* wip

* first version of test rule.

* reverted file.

* add info colum to result to show error or (with CC evalmatches)

* fix labels in evalmatch

* fix be test

* refactored using observables.

* moved widht/height div to outside panel rendere.

* adding docs api level.

* adding container styles to error div.

* increasing size of preview.

Co-authored-by: kyle <kyle@grafana.com>
2021-05-26 10:06:28 +02:00
Torkel Ödegaard
ec33bae8d4
PanelEdit: Add data source label to data source picker dropdown (#34605)
* PanelEdit: Add data source label to data source picker dropdown

* Updated based on ux feedback
2021-05-26 08:59:49 +02:00
Giordano Ricci
a8fa5f1796
Grafana-UI: Make card figure honor align prop (#34639) 2021-05-25 12:34:52 +01:00
Alex Khomenko
e9e438ee2f
Form: Expose all return values from useForm (#34380) 2021-05-24 15:09:33 +03:00
Ivana Huckova
b5de6e7a1d
Add @public release tag to Spinner component (#34576) 2021-05-24 13:30:02 +02:00
Piotr Jamróz
8d05df83ed
CustomScrollbar: Invoke setScrollTop callback only after scrolling finishes (#34263)
* Invoke setScrollTop callback only after scrolling finishes

When the state is updated while scroll events are being dispatched (like in QueryGroup) it may cause resetting the scroll position to the first emitted event because setting the scroll happens only after render (useEffect).

* Memoize onScrollStop callback
2021-05-24 10:34:37 +02:00
kay delaney
aa14621d29
Chore: Move immutable, is-hotkey, and react-inlinesvg deps to grafana-ui (#34290) 2021-05-20 16:19:24 +01:00
Ryan McKinley
a91edd7267
Plugin Admin App: make the catalog look like internal component (#34341)
* Allow Route component usage in app plugins

* i tried

* fix catalog app

* fix catalog app

* fix catalog app

* cleanup imports

* plugin catalog enabled to plugin admin

* rename plugin catalog to plugin admin

* expose catalog url

* update text

* import from react-router-dom

* fix imports -- add logging

* merge changes

* avoid onNavUpdate

* Fixed onNavChange issues

* fix library imports

* more links

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-05-20 10:42:26 +02:00
Alex Khomenko
ca416df9d1
grafana/ui: Add invalid prop to the TagsInput (#34409)
* Add invalid prop to the tag input

* Enable controls
2021-05-20 10:19:41 +03:00
Ryan McKinley
40139a7ea9
PanelQueryRunner: only skip applyFieldOverrides when streaming (#34438) 2021-05-19 22:00:00 -07:00
Torkel Ödegaard
01a3a3c4c8
DataLinks: Minor tweaks to links suggestions (#34423) 2021-05-20 06:52:37 +02:00
Leon Sorokin
3ecacc9d1d
TimeSeries: fix spanNulls threshold toggle during panel editing (#34452) 2021-05-20 06:47:49 +02:00
Leon Sorokin
9237348076
Timeline: legend (#34340) 2021-05-19 21:38:31 -07:00
Ryan McKinley
8147a65b5e
Histogram: move histogram from alpha to beta panel (#34246)
* add legend

* tooltip off-by-one

* units in x axis

* update function call

* remove tooltip
2021-05-19 17:13:17 -07:00
Andrej Ocenas
da1558e7a2
Explore: UI improvements to trace view (#34276)
* Various ui fixes

* Remove unused classes

* Fix opening of collapsible

* Fix pointer issue

* Update e2e test
2021-05-19 19:41:54 +02:00
sidverma
3f0df997bc
Accessibility: Style now has focus state (#34422) 2021-05-19 19:12:06 +02:00
Dominik Prokop
4cbffae1b4
AppPlugins: Expose react-router to apps (#33775)
* Allow Route component usage in app plugins

* i tried

* fix catalog app

* fix catalog app

* remove catalog changes from this PR

* remove extra files

* feat(plugins): expose react-router to plugins rather than export via grafana-ui

* Bring back query and pathname to AppRootPage and add deprecation notice

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-19 19:10:21 +02:00
Josh Hunt
5dca9fd4d8
AzureMonitor: Support querying any Resource for Logs queries (#33879)
* wip

* wip:

* ui work for resource picker

* disable rows when others are selected

* resource picker open button

* Azure Monitor: Connect to backend with real data (#34024)

* Connect to backend with real data

* Fixes from code review.

* WIP:Begin thinking about how to make queries with scope determined by the resource picker

* More fixes post code review.

* Fixes after rebasing

* Remove outdated todo

* AzureMonitor: Support any resource for Logs queries (#33762)

* Apply button for resource picker

* scroll table body

* secondary cancel button

* loading state for nested rows

* Display resource components in picker button

* fix tests

* fix icons

* move route function

* Migrate from workspace to resource uri for log analytics (#34337)

* reword backwards compat comment

* remove base url suffix

* fix lint error

* move migrations to seperate file

* cleanup

* update regex

* cleanup

* update plugin routes to use new azure auth type

* use AzureDataSourceInstanceSettings alias

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-05-19 17:39:08 +01:00
Domas
eaf964a827
Alerting: misc rule list fixes (#34400)
* misc rule table fixes

* rule stats for all rules

* inactive -> normal

* always show tooltip for rule error
2021-05-19 18:54:03 +03:00
Dominik Prokop
a2cbbe1b8a
BarChart: value label sizing (#34229)
* Bar chart label positioning and sizing

* Dev dashbard

* Improve autosizing

* Remove sync option

* Unify text sizing options between stat-ish visualizations and bar chart

* Add simple categorical data scenario and update dev dashboard

* Remove unused options builder

* Add docs annotations

* Fix go lint
2021-05-19 17:33:56 +02:00
Alex Khomenko
958ebce1e1
Enable adding tags on blur (#34374) 2021-05-19 16:32:14 +02:00
Piotr Jamróz
559ce4db89
QueryField: Do not modify the query field while typing (#34300)
* Do not sanitize the query while typing, but only onBlur or before the query is run

Otherwise sanitized value may cause update Slate component and trigger blur losing focus of the input

* Revert "Do not sanitize the query while typing, but only onBlur or before the query is run"

This reverts commit 00779889

* Avoid changing the input while typing

Cleaning happens on each change and with trimming it changes the value if the user types a space as the last character (may happen quite often while typing a query). In worst cases it's causing losing the focus in Slate if the space is typed before debounced change callback is triggered (500ms).
2021-05-19 16:29:48 +02:00
Torkel Ödegaard
c944a33b95
Switch: Add hover effect for inline switch (#34387) 2021-05-19 16:25:04 +02:00
Marcus Andersson
8ddf6de6e7
Alerting: app specific query editors for Loki and Prometheus (#34365)
* Adding simplified version of query editor based on app flag.

* cleaned up the absolute time range.

* changing placeholder text.

* updated snapshot.

* added some tests.

* adding loki query editor tests.

* updating snapshots.
2021-05-19 16:24:27 +02:00
Zoltán Bedi
97cf00ab33
TraceViewer: fix hard to click to logs icon on long span name (#34303) 2021-05-19 13:38:14 +02:00
Alex Khomenko
0a2054bbe0
Storybook: Fix Button story (#34357) 2021-05-19 11:22:39 +02:00
Peter Holmberg
26638c23c3
Alerting: Lower the default timerange (#34280)
* use a custom default

* use default function
2021-05-19 09:42:40 +02:00
Domas
5721019573
Alerting: various rule form fixes (#34272) 2021-05-18 19:14:57 +03:00
Torkel Ödegaard
7375115a98
Theme: Updating old theme variables to use the new theme higher contrast colors (#34305) 2021-05-18 18:00:30 +02:00
Andrej Ocenas
2e7ccf0e42
NodeGraph: Show gradient fields in legend (#34078)
* Add gradient fields to legend

* Fix test

* Remove unnecessary mapping

* Add tests
2021-05-18 16:30:27 +02:00
Marcus Andersson
2aa1a051f0
Alerting: visualizing data when creating/editing alerting rule. (#34191)
* VizWrapper to handle some state

* alertingqueryrunner first edition

* added so we always set name and uid when changing datasource.

* wip.

* wip

* added support for canceling requests.

* util for getting time ranges for expression queries

* remove logs, store data in state

* merge from run branch

* incremental commit

* viz working

* added structure for marble testing.

* paddings and move viz picker

* less height for viz, less width on rows

* change so the expression buttons doesnt submit form.

* fixed run button.

* replaced mocks with implementation that will set default query + expression.

* merge with run queries

* fixed so we set a datasource name for the default expression rule.

* improving expression guard.

* lots of styling fixes for viz

* adding placeholder for relative time range.

* fixed story.

* added basic structure to handle open/close of time range picker.

* removed section from TimeOptions since it isn't used any where.

* adding mapper and tests

* move relativetimepicker to its own dir

* added some simple tests.

* changed test.

* use relativetimerangeinput

* redo state management

* refactored the tests.

* replace timerange with relativetimerange

* wip

* wip

* did some refactoring.

* refactored time option formatting.

* added proper formatting and display of time range.

* add relative time description, slight refactor of height

* fixed incorrect import.

* added validator and changed formatting.

* removed unused dep.

* reverted back to internal function.

* fixed display of relative time range picker.

* fixed failing tests.

* fixed parsing issue.

* fixed position of time range picker.

* some more refactorings.

* fixed validation of really big values.

* added another test.

* restored the step2 check.

* fixed merge issue.

* Update packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButtonGroup.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* reverted change.

* fixed merge conflict.

* fixed todo.

* sort some paddings

* replace theme with theme2

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-18 16:16:26 +02:00
Alex Khomenko
9f9666415b
grafana/ui: Prevent Select placeholder text from wrapping (#34260) 2021-05-18 15:29:50 +03:00
Domas
098b4fc319
Alerting: wrap top level components in ErrorBoundary (#34040) 2021-05-18 13:56:31 +03:00
Torkel Ödegaard
8ecfad6995
Contrast: Improve automatic contrast text logic to include opacity and background (#34190) 2021-05-18 12:32:27 +02:00
Torkel Ödegaard
c2ee2f10a7
Table: Fix issue with table border not showing with colored background cells (#34231) 2021-05-18 12:23:17 +02:00
Ivana Huckova
a40aef0822
Logs panel: Support details view (#34125)
* Show log details in Logs panel

* Add hide log details as panel option

* Refactor tests to use testing library

* Change hideLogDetails to enableLogsDetails

* Add enableLogDetails to test file
2021-05-18 11:16:29 +02:00
Alex Khomenko
10a19ab790
grafana/ui: update react-hook-form to version 7.5.3 (#34218) 2021-05-18 12:07:13 +03:00
Maria Alexandra
0e207c4133
Dashboard: Fix Editing a panel with auto-refresh enabled auto-refresh in the edit screen (#34128)
* Dashboard: Fix editing panel with auto-refresh

- Add default hidden and disabled auto-refresh option on the editing panel
- Extend unit test for DashboardModel
- Add unit test DashNavTimeControls component
2021-05-18 10:20:11 +02:00
Ryan McKinley
de5cd4a7d3
Timeline: split "periodic" mode into its own panel (#34171) 2021-05-17 13:00:04 -07:00
Ryan McKinley
eba6f66fba
FieldDisplay: remove auto min/max for percent units (#34234) 2021-05-17 10:54:06 -07:00
Ryan McKinley
7b32c5439b
Timeseries: support boolean values out-of-the-box (#34168) 2021-05-17 09:52:47 -07:00
Ryan McKinley
edcefe1c8e
Chore: Rename "marketplace" app to "catalog" (#34149) 2021-05-17 08:27:56 -07:00
Uchechukwu Obasi
85620f65a8
TextArea: updates story from knobs to control (#34195)
* TextArea: updates story from knobs to control

* removed the cols control since it has no effect on component

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-05-17 15:31:09 +02:00
Uchechukwu Obasi
21f0509f8b
Table: updates story from knobs to control (#34193)
* Tables: updates story from knobs to control

* removes the Descending and sortByDisplayName controls since they have no effect on component

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-05-17 14:27:05 +01:00
Jack Westbrook
00253fe359
Dependencies: Remove duplicates from yarn.lock (#34124)
* build(yarn): run yarn-deduplicate on lock file

* chore(npm): clean up moment dependencies

* chore(npm): move dev dependencies out of dependencies

* chore(npm): bump moment-timezone to fix TS errors

* chore(npm): move dev dependencies to devDependencies in package.json
2021-05-17 14:18:54 +02:00
Ivana Huckova
25d42dbedb
QueryField: Remove carriage return character from pasted text (#34076)
* Remove carriage returns

* Clean up
2021-05-17 13:40:08 +02:00
Hugo Häggmark
d721298e03
Table: Makes tooltip scrollable for long JSON values (#34120) 2021-05-17 10:19:41 +02:00
Nathan Rodman
889d3ed76f
Alerting: Add duration field to silence editor (#34029) 2021-05-17 08:59:27 +03:00
Alex Khomenko
65cacd31c2
grafana/ui: Unify disabled styles for input components (#34126)
* Select: Add disabled prop to SingleValue

* TagsInput: Disable remove button with disabled prop

* Checkbox: Add disabled styles
2021-05-15 10:06:42 +02:00
Ryan McKinley
9e1f0e6957
Toolkit: update tslib (#34089) 2021-05-14 08:51:18 -07:00
Torkel Ödegaard
953aadd6e4
Timeline: Adds opacity & line width option (#34118)
* Timeline: Adds opacity & line width option

* Updated devenv dashboards, added back original timeline modes
2021-05-14 17:24:40 +02:00
Torkel Ödegaard
c61a610f72
ValueMappings: Add duplicate action, and disable dismiss on backdrop click (#34100)
* ValueMappings: Add duplicate action, and disable dissmiss on backdrop click

* Updated modal to have property closeOnBackdropClick
2021-05-14 16:53:20 +02:00