Commit Graph

29075 Commits

Author SHA1 Message Date
Oscar Kilhed
83d24b5aee
Cleans up piechart options (#33375)
Cuts thresholds
Cuts display all values
2021-04-27 12:20:45 +02:00
Jack Westbrook
45fa5fdf48
Buttons: introduce buttonStyle prop (#33384)
* Wip

* Updates to colors to make secondary outline work

* refactor: prefer buttonStyle="text" over variant="link" for text buttons

* revert(button): put back mdx story page

* fix(button): variant link disabled as text disabled

* docs(button): remove link variant from stories

* feat(grafana-ui): introduce basic deprecation notice for button and linkbutton components

* docs(button): update usage of href with button and buttonlink

* feat(button): add grafana/ui to deprecation warning

* refactor(buttons): use a more descriptive name for prop warning function

* test(buttonrow): update snapshots

* refactor(buttons): change prop name from buttonStyle to fill

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-04-27 12:03:06 +02:00
Carl Bergquist
58a325a4e4
Instrumentation: Add success rate metrics for email notifications (#33359)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2021-04-27 11:15:07 +02:00
Torkel Ödegaard
759a501564
Singlstat: Fixes all the singlestat migration issues by moving it to DashboardMigration (#33349)
* Singlstat: Fixes all the singlestat migration issues by doing during DashboardMigration

* fixes

* Updated snapshot
2021-04-27 10:09:37 +02:00
Hugo Häggmark
ca85012865
Annotations: Adds loading indicators and cancellation (#33404) 2021-04-27 10:03:52 +02:00
Piotr Jamróz
3ee925610a
Use either moment objects (for absolute times in the datepicker) or string (for relative time) (#33315) 2021-04-27 09:55:22 +02:00
Hugo Häggmark
b3642eb18d
e2e: slows down failing test (#33401)
* e2e: slows down failing test

* Update set-options-from-ui.ts
2021-04-27 08:53:43 +02:00
Hugo Häggmark
a3584f21de
Annotations: Turns on annotations in Graph and TimeSeries (#33402)
* Annotations: Turns on annotations in Graph and TimeSeries

* Refactor: moves to notPersistedProperties
2021-04-27 07:39:02 +02:00
Jack Lu
495345c0c2
added overflow wrapping css to solve alert url overflowing (#33400) 2021-04-27 07:30:19 +02:00
achatterjee-grafana
37eee84552
Docs: Removed type from find annotations example. (#33399) 2021-04-27 07:28:13 +02:00
Hugo Häggmark
f73be970d3
Variables: Removes experimental Tags feature (#33361)
* Variables: Removes experimental Tags feature

* Refactor: adds dashboard migration

* Tests: fixes snapshots

* Docs: removes docs for experimental feature

* Refactor: dummy change

* Docs: removes reference
2021-04-27 05:57:25 +02:00
Atif Shoukat Ali
408bc06bab
clear state.calcs on every append (#33245) 2021-04-26 19:53:32 -07:00
Leon Sorokin
69bcaf9253
GraphNG: simplify plotContext (#33347) 2021-04-26 13:36:59 -07:00
Alexander Emelin
2abd9bc3b9
live: rename url param - assume stable schema by default (#33383) 2021-04-26 20:46:26 +03:00
Ikko Ashimine
c41b5d80a3
DataFrameJSON: fix typo in DataFrameJSON.ts (#33380)
absense -> absence
2021-04-26 10:24:58 -07:00
Sarah Zinger
ed2388bfea
Azure Monitor: Fix aggregation reset bug (#33287)
Fix aggregation reset bug
2021-04-26 17:41:02 +01:00
Torkel Ödegaard
4643bfa539
Modals: design update (#33368)
* Modals: Style update draft

* Modal.ButtonRow to control spacing better in a centralised way

* Remove header border if no tabs

* Added border and made buttons right aligned and changed order of buttons

* Updating the overlay

* Tweaks to paddings

* Updated share modals
2021-04-26 18:26:56 +02:00
Uchechukwu Obasi
de65cef850
updates component with the new theme model (#33392) 2021-04-26 17:06:00 +01:00
Giordano Ricci
c88af6e221
Elasticsearch: Add generic support for template variables (#32762)
* Elasticsearch: Add generic support for template variables

* format MovingAverage settings as numbers

* Move formatting logic to query builder & forma serial_diff settings as numbers

* modify presence check

* add todo

* minor fixes

* transform string values to numbers

* Move casting logic

* Slightly cleaner implementation

* Add BE tests

* Leverage elastic validation when string doesn't resolve to a numeric value

* move newly introduced test to testify

* add FE query_builder tests

* check error

* Parse values to float instead of int

* Fix tests & ParseFloat bit size
2021-04-26 16:54:23 +01:00
Dominik Prokop
fffa8ad8de
Docs: add documentation for new stacking option in Time series panel (#33023)
* Docs: add documentation for new stacking option in Time series panel

* Update docs/sources/panels/visualizations/time-series/graph-time-series-stacking.md

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

* Post review update

* review 2

* Update docs/sources/panels/visualizations/time-series/graph-time-series-stacking.md

* Update docs/sources/panels/visualizations/time-series/graph-time-series-stacking.md

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

* Update docs/sources/panels/visualizations/time-series/graph-time-series-stacking.md

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

* Update docs/sources/panels/visualizations/time-series/graph-time-series-stacking.md

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

* Update docs/sources/panels/visualizations/time-series/graph-time-series-stacking.md

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

* Update docs/sources/panels/visualizations/time-series/graph-time-series-stacking.md

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

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-04-26 17:44:28 +02:00
Uchechukwu Obasi
36d3c053a9
DataLinksEditor: updates component with the new theme model (#33389) 2021-04-26 17:44:03 +02:00
Oscar Kilhed
e6a93d32c0
Rename Pie chart v2 -> Pie chart (#33388) 2021-04-26 17:41:15 +02:00
Will Browne
8e6205c107
Plugins: Move plugin installing + uninstalling logic from CLI to plugins package (#33274)
* move guts from cli to server

* renaming + refactoring

* add pluginsDir arg

* arg fixes

* add support for repo URL override

* add funcs to interface

* use pluginID consistently

* swap args

* pass mandatory grafanaVersion field

* introduce logger interface

* create central logger for CLI

* add infra log wrapper

* re-add log initer step

* remove unused logger

* add checks for uninstalling

* improve debug blue

* make sure to close file

* fix linter issues

* remove space

* improve newline usage

* refactor packaging

* improve logger API

* fix interface func names

* close file and reformat zipslip catch

* handle G305 linter warning

* add helpful debug log
2021-04-26 16:13:40 +02:00
Oscar Kilhed
d0239ac958
[grafana/UI] Hoovering over a legend label highlights the corresponding pie slice (#32941)
* Hoovering over a legend label hightlighs that pie slice

* Change to event bus

* Adds EventBusWithSource to help identify the origin of the event

* Add tests and fix bug with incorrect source

* Clean up PieChart and EventBus a bit

* Fix bug when payload.source is undefined

* Add some documentation and adjust naming

* useState instead of useSetState

* Clean up some more documentation

* Move eventbus to state

* add event bus actions to the debug panel

* add event bus actions to the debug panel

* Try to make the naming a bit clearer

* Try passing eventbus as context

* Fix lint issues

* Move event bus context to panel chrome

* Fix event handler functions

* switch to using useCallback for legend item callbacks

* Remove unused parameters

* Add id to panel fixture of PanelChrome test

* Simplify event source

* Place eventBus inside more generic context

* Push handling of context up the tree to VizLegend

only export usePanelContext and PanelContextProvider

implement isOwnEvent on EventBus

some cleanup

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-04-26 16:13:15 +02:00
Uchechukwu Obasi
e21d1ccba4
CollapsableSection: updates component to use the new theme model (#33378)
* updates component to use the new theme model

* fixes small nit
2021-04-26 15:01:59 +01:00
Richard Hartmann
e2a90315bd
Add storybook (#33373)
Signed-off-by: Richard Hartmann <richih@richih.org>
2021-04-26 16:00:45 +02:00
kay delaney
999f139868
DashboardQueryRunner: Implements opt-in subscribe logic (#33370)
* DashboardQueryRunner: Implements opt-in subscribe logic
2021-04-26 13:50:08 +01:00
Dominik Prokop
a54ac510c4
GraphNG: Make the GraphNG / uPlot flow sync (#33215)
* Move data alignment to panel

* Make uPlot plugins sync, bring back alignment to GraphNG

* Update GraphNG-like panels

* Update explore graph ng

* Cleanup unnecessary tests

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-04-26 13:30:04 +02:00
Alexander Emelin
7501a2deb6
Live: pure websocket push endpoint (#33339) 2021-04-26 13:17:49 +03:00
Arve Knudsen
7f53dfad88
CSP: Set nonce attribute on Webpack injected bundles (#33298)
* CSP: Set __webpack_nonce__

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-04-26 11:38:24 +02:00
Uchechukwu Obasi
34910521a6
updated component to use new theme model (#33306) 2021-04-26 09:12:39 +01:00
Hugo Häggmark
ba2fa3434e
Annotations: fixes reversed switch (#33362) 2021-04-26 09:05:22 +02:00
Torkel Ödegaard
cf2d557974
Alerts/InfoBox: Replaces all uses of InfoBox & FeatureInfoBox with Alert (#33352)
* Alerts/InfoBox: Replaces all uses of InfoBox & FeatureInfoBox with Alert

* Fixes some more stuff

* fixed border radius
2021-04-26 07:18:46 +02:00
Hugo Häggmark
19739f4af2
Annotations: Adds DashboardQueryRunner (#32834)
* WIP: initial commit

* Fix: Fixed $timeout call when testing snapshots

* Chore: reverts changes to metrics_panel_ctrl.ts

* Chore: reverts changes to annotations_srv

* Refactor: adds DashboardQueryRunner.run to initdashboard

* Refactor: adds run to dashboard model start refresh

* Refactor: move to own folder and split up into smaller files

* Tests: adds tests for LegacyAnnotationQueryRunner

* Tests: adds tests for AnnotationsQueryRunner

* Tests: adds tests for SnapshotWorker

* Refactor: renames from canRun|run to canWork|work

* Tests: adds tests for AlertStatesWorker

* Tests: adds tests for AnnotationsWorker

* Refactor: renames operators

* Refactor: renames operators

* Tests: adds tests for DashboardQueryRunner

* Refactor: adds mergePanelAndDashboardData function

* Tests: fixes broken tests

* Chore: Fixes errors after merge with master

* Chore: Removes usage of AnnotationSrv from event_editor and initDashboard

* WIP: getting annotations and alerts working in graph (snapshot not working)

* Refactor: fixes snapshot data for React panels

* Refactor: Fixes so snapshots work for Graph

* Refactor: moves alert types to grafana-data

* Refactor: changes to some for readability

* Tests: skipping tests for now, needs rewrite

* Refactor: refactors out common static functions to utils

* Refactor: fixes resolving annotations from dataframes

* Refactor: removes getRunners/Workers functions

* Docs: fixes docs errors

* Docs: trying to fix doc error

* Refactor: changes after PR comments

* Refactor: hides everything behind a factory instead

* Refactor: adds cancellation between runs and explicitly
2021-04-26 06:13:03 +02:00
Ryan McKinley
cdc6f4c2ac
Chore: update icons with a json index (#33354) 2021-04-25 15:24:29 -07:00
Torkel Ödegaard
424925c3fb
Icons: Fixes iconCache not having same iconRoot as what Icon component used making the pre-cached items not match (#33356) 2021-04-25 11:17:35 -07:00
Torkel Ödegaard
a1b7793959
LoginPage: Fixes minor spacing issue on login page (#33353) 2021-04-25 06:08:56 +02:00
Torkel Ödegaard
9fe113b016
Emotion: useStyles removed the memoized styles making it worse than stylesFactory (#33263)
* Emotion: useStyles removed the memoized styles making it worse than stylesFactory

* Updated tests
2021-04-24 15:18:09 +02:00
Torkel Ödegaard
ad63f871ce
Stat/Table: Fixes contrast color, was flipped in theme refactoring (#33345)
* Stat/Table: Fixes contrast color, was flipped in theme refactoring

* Updated snapshot
2021-04-24 14:27:27 +02:00
Torkel Ödegaard
50018f37f2
SegmentSelect: Migration from legacy select to default Select component (#33344) 2021-04-24 14:26:58 +02:00
Leon Sorokin
47e68580a6
DataFrame: also filter fields in single frame case in outerJoinDataFrames() (#33343) 2021-04-23 21:28:18 -05:00
Ryan McKinley
693915de35
Live: Simplify live interface (#33196) 2021-04-23 23:21:38 +02:00
Ryan McKinley
1dd9e9b184
Live: support a dashboard gitops channel (#33291) 2021-04-23 21:55:31 +02:00
David Parrott
788bc2a793
Alerting: refactor state tracker (#33292)
* set processing time

* merge labels and set on response

* use state cache for adding alerts to rules

* minor cleanup

* add support for NoData and Error results

* rename test

* bring in changes from other PRs tha have been merged

* pr feedback

* add integration test

* close state tracker cleanup on context.Done

* fixup test

* rename state tracker

* set EvaluationDuration on Result

* default labels set as constants

* separate cache and state from manager

* use RWMutex in cache
2021-04-23 21:32:25 +02:00
David Parrott
ca79206498
Alerting: Handle NoData and Error evaluation results (#33194)
* set processing time

* merge labels and set on response

* use state cache for adding alerts to rules

* minor cleanup

* add support for NoData and Error results

* rename test

* bring in changes from other PRs tha have been merged

* pr feedback

* add integration test

* close state tracker cleanup on context.Done

* fixup test

* not those annotations
2021-04-23 20:47:52 +02:00
Leon Sorokin
948cba199b
GraphNG: don't scan data for min/max when both hard limits are pre-configured (#33295) 2021-04-23 11:35:28 -05:00
Kyle Brandt
5e818146de
Alerting/Expr: New SSE Request/QueryType, alerting move data source UID (#33282) 2021-04-23 16:52:32 +02:00
Ganesh Vernekar
659ea20c3c
NGAlert: Run the maintenance cycle for the silences (#33301)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-04-23 16:19:03 +02:00
Giordano Ricci
ec1c85acca
Grafana-UI: replace react-color with react-colorful (#33267)
* Grafana-UI: replace react-color with react-colorful

* Throttle onChange from SpectrumPalette
2021-04-23 16:03:48 +02:00
Dominik Prokop
d76c056656
Revert "LegendIcon: only render color picker when the props change (#33141)" (#33313)
This reverts commit af46bbf654.
2021-04-23 15:50:34 +02:00