Commit Graph

778 Commits

Author SHA1 Message Date
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
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
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
Ryan McKinley
e1af571efd
Timeseries: move join field to index zero (#35217) 2021-06-03 16:05:08 -07:00
Jack Westbrook
9df23b8fff
Chore: Bump sanitize-url to 5.0.2 (#35088) 2021-06-03 10:05:55 +02: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
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
Leon Sorokin
878474a808
Color utils: optimize colorManipulator/alpha() for common cases (#34948) 2021-06-01 12:52:58 -05: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
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
Torkel Ödegaard
179bfecb3e
Color: Remove the default color scale logic (#34913) 2021-05-28 17:50:25 +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
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
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
Leon Sorokin
1dd5d6ffb0
GraphNG: uPlot 1.6.10 (#34759) 2021-05-26 11:46:24 -05: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
Ryan McKinley
40139a7ea9
PanelQueryRunner: only skip applyFieldOverrides when streaming (#34438) 2021-05-19 22:00:00 -07: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
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
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
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
Peter Holmberg
26638c23c3
Alerting: Lower the default timerange (#34280)
* use a custom default

* use default function
2021-05-19 09:42:40 +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
Torkel Ödegaard
8ecfad6995
Contrast: Improve automatic contrast text logic to include opacity and background (#34190) 2021-05-18 12:32:27 +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
Nathan Rodman
889d3ed76f
Alerting: Add duration field to silence editor (#34029) 2021-05-17 08:59:27 +03: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
Kevin Minehart
27d11e3702
DataSourceSettings: Hide caching settings for non-backend datasources (#34083)
* add  field to plugin meta

* only show cache settings if pluginMeta has "isBackend"

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-05-14 09:50:49 -05:00
Torkel Ödegaard
917a9ace57
Timeline: Use theme getContrastText to calculate value color based on background color (#34072)
* Timeline: Use theme getContrastText to calculate value color based on background color

* Changed back to using the old functions fill, and stroke
2021-05-13 21:41:40 +02:00
Dominik Prokop
5e0e91cd9a
Update packages version (#34064)
* Update packages version

* update root package.json
2021-05-13 16:02:18 +02:00
Torkel Ödegaard
fffff70d46
MinMax: Highlight issues with skipping field overrides (#33672)
* MinMax: Highlight issues with skipping field overrides

* check global range

* more selective

* basic test

* moved into getFieldDisplayValues

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-13 10:06:54 +02:00
Leon Sorokin
4aaf141ddb
Live: streaming labels field (#34031)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-13 09:33:11 +02:00
Torkel Ödegaard
567bbdf6e6
Theme: New visualization colors model (#33973)
* Initial design for new viz colors

* added unit tests

* Progress

* Updated selected color

* Use old named color names and colors to begin with

* Updates

* Fixing tests

* Progress

* Updates

* updating

* fixing tests

* Using some named colors

* renames && fixes

* remove plural

* fixed tests
2021-05-13 07:32:13 +02:00
Ryan McKinley
17750d3cdb
Chore: support empty/missing strings (#34027) 2021-05-12 16:51:20 -07:00
Marcus Andersson
07ef4060a3
Alerting: adding a time picker for selecting relative time. (#33689)
* 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.

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2021-05-12 17:51:31 +02:00
Ryan McKinley
ca8f6addab
Colors: default colors for strings and boolean (#33965) 2021-05-12 08:40:43 -07:00
Andrej Ocenas
fdd6620d0a
NodeGraph: Exploration mode (#33623)
* Add exploration option to node layout

* Add hidden node count

* Add grid layout option

* Fix panning bounds calculation

* Add legend with sorting

* Allow sorting on any stats or arc value

* Fix merge

* Make sorting better

* Reset focused node on layout change

* Refactor limit hook a bit

* Disable selected layout button

* Don't show markers if only 1 node is hidden

* Move legend to the bottom

* Fix text backgrounds

* Add show in graph layout action in grid layout

* Center view on the focused node, fix perf issue when expanding big graph

* Limit the node counting

* Comment and linting fixes

* Bit of code cleanup and comments

* Add state for computing layout

* Prevent computing map with partial data

* Add rollup plugin for worker

* Add rollup plugin for worker

* Enhance data from worker

* Fix perf issues with reduce and object creation

* Improve comment

* Fix tests

* Css fixes

* Remove worker plugin

* Add comments

* Fix test

* Add test for exploration

* Add test switching to grid layout

* Apply suggestions from code review

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

* Remove unused plugin

* Fix function name

* Remove unused rollup plugin

* Review fixes

* Fix context menu shown on layout change

* Make buttons bigger

* Moved NodeGraph to core grafana

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-05-12 16:04:21 +02:00
Dominik Prokop
baa5ceb4c0
Do not crash timeseries panel if there is no time series data in the response (#33993) 2021-05-12 14:14:39 +02:00
Hugo Häggmark
7a55a6385c
Urls: Parsing key values will not convert to numbers (#33982)
* Urls: Parsing key values will not convert to numbers

* Tests: fixes broken tests

* Tests: fixes broken test

* Tests: fixes broken test

* Chore: forcing drone to rebuild
2021-05-12 13:40:30 +02:00
Ivana Huckova
73335ebbcb
Logs: Store queries that were run to get log results (#33971)
* Store queries that were run to get log results

* Fix typing

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

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Add changes based on feedback

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-05-12 12:54:15 +02:00
Hugo Häggmark
69d9f427e1
LibraryPanels: removes feature toggle (#33839)
* WIP: intial structure

* Refactor: adds create library element endpoint

* Feature: adds delete library element

* wip

* Refactor: adds get api

* Refactor: adds get all api

* Refactor: adds patch api

* Refactor: changes to library_element_connection

* Refactor: add get connections api

* wip: in the middle of refactor

* wip

* Refactor: consolidating both api:s

* Refactor: points front end to library elements api

* Tests: Fixes broken test

* LibraryPanels: removes feature toggle

* Fix: fixes delete library elements in folder and adds tests

* Tests: fixes snapshot

* Refactor: adds service interfaces so they can be easily mocked

* Refactor: changes order of tabs in manage folder

* Refactor: fixes so link does not cover whole card

* Refactor: fixes index string name

* Update pkg/services/libraryelements/libraryelements.go

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

* Update pkg/services/libraryelements/libraryelements_permissions_test.go

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

* Update pkg/services/libraryelements/database.go

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

* Chore: changes after PR comments

* Update libraryelements.go

* Update libraryelements.go

* Chore: updates after PR comments

* Chore: trying to fix build error

* Refactor: fixed stupid mistake

* Update libraryelements.go

* Chore: tries to fix build errors

* Refactor: trying to fix MySQL key length

* Update libraryelements.go

* Update pkg/services/libraryelements/libraryelements.go

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

* Update pkg/services/librarypanels/librarypanels.go

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

* Refactor: changes after PR comments

* Refactor: changes after PR comments

* Tests: fixes tests

* Refactor: renames connections to connectedDashboards

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-05-12 08:48:17 +02:00
Jack Westbrook
e13f15f646
Docs: reduce number of API Extractor warnings 2021-05-11 18:47:34 +02:00
Torkel Ödegaard
6d4376c16d
ValueMapping: Support for mapping text to color, boolean values, NaN and Null. Improved UI for value mapping. (#33820)
* alternative mapping editor

* alternative mapping editor

* values updating

* UI updates

* remove empty operators

* fix types

* horizontal

* New value mapping model and migration

* DataSource: show the uid in edit url, not the local id (#33818)

* update mapping model object

* Update to UI

* fixing ts issues

* Editing starting to work

* adding missing thing

* Update display processor to use color from value mapping

* Range maps now work

* Working on unit tests for modal editor

* Updated

* Adding new NullToText mapping type

* Added null to text UI

* add color from old threshold config

* Added migration for overrides, added Type column

* Added compact view model with color edit capability

* [Alerting]: store encrypted receiver secure settings (#33832)

* [Alerting]: Store secure settings encrypted

* Move encryption to the API handler

* CloudMonitoring: Migrate config editor from angular to react (#33645)

* fix broken config ctrl

* replace angular config with react config editor

* remove not used code

* add extra linebreak

* add noopener to link

* only test jwt props that we actually need

* Elasticsearch: automatically set date_histogram field based on data source configuration (#33840)

* Docs: delete from high availability docs references to removed configurations related to session storage (#33827)

* docs: delete from high availability docs references to removed configurations related to session storage

* docs: remove session storage mention and focus on the auth token implementation

* fix postgres to have precision of ms (#33853)

* Use ids for enterprise nav model items (#33854)

* Alerting: Disable dash alerting if NG enabled (#33794)

* Scuemata: Add grafana-cli cue schema validation to CI (#33798)

* Add scuemata validation in CI

* Fixes according to reviewer's comments

* Ensure http client has no timeout (#33856)

* Redact sensitive values before logging them (#33829)

* use a common way to redact sensitive values before logging them

* fix panic on missing testCase.err, simplify require checks

* fix a silly typo

* combine readConfig and buildConnectionString methods, as they are closely related

* Tempo: Search for Traces by querying Loki directly from Tempo (#33308)

* Loki query from Tempo UI

- add query type selector to tempo
- introduce linkedDatasource concept that runs queries on behalf of another datasource
- Tempo uses Loki's query field and Loki's derived fields to find a trace matcher
- Tempo uses the trace-to-logs mechanism to determine which dataource is linked

Loki data loads successfully via tempo

Extracted result transformers

Skip null values

Show trace on list id click

Query type selector

Use linked field trace regexp

* Review feedback

* Add isolation level db configuration parameter (#33830)

* add isolation level db configuration parameter

* add isolation_level to default.ini and sample.ini

* add note that only mysql supports isolation levels for now

* mention isolation_level in the documentation

* Update docs/sources/administration/configuration.md

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

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

* Drawer: fixes title overflowing its container (#33857)

* Timeline: move grafana/ui elements to the panel folder (#33803)

* revendor loki with new Tripperware (#33858)

* live: move connection endpoint to api scope, fixes #33861 (#33863)

* OAuth: Add support for empty scopes (#32129)

* add parameter empty_scopes to override scope parameter with empty value and thus be able to authenticate against IdPs without scopes. Issue #27503

Update docs/sources/auth/generic-oauth.md

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

* updated check according to feedback

* Update generic-oauth.md

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

* Prometheus: Fix exemplars hover disappearing and broken link (#33866)

* Revert "Tooltip: eliminate flickering when repaint can't keep up (#33609)"

This reverts commit e159985aa2.

* Fix exemplar linking

Co-authored-by: David Kaltschmidt <david.kaltschmidt@gmail.com>

* Removed content as per MarcusE's suggestion in https://github.com/grafana/grafana/issues/33822. (#33870)

* Fixed grammar usage. (#33871)

* Explore: Wrap each panel in separate error boundary (#33868)

* New Panel: Histogram (#33752)

* Sanitize PromLink button (#33874)

* Refactor and unify option creation between new visualizations (#33867)

* Refactor and unify option creation between new visualizations

* move to grafana/ui

* move to grafana/ui

* resolve duplicate scale config

* more imports

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

* Live: do not show connection warning when on the login page (#33865)

* enforce receivers align with backend type when posting AM config (#33877)

* special values

* merge fix

* Document `hide_version` flag (#33670)

Unauthenticated users can be barred from being shown the current Grafana server version since https://github.com/grafana/grafana/pull/24919

* GraphNG: always use "x" as scaleKey for x axis (#33884)

* Timeline: add support for strings & booleans (#33882)

* Chore(deps): Bump hosted-git-info from 2.8.5 to 2.8.9 (#33886)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.5 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* merge with torkel

* add empty special character

* Fixed centered text in special value match select

* fixed unit tests

* Updated snapshot

* Update dashboard page

* updated snapshot

* Fix more unit tests

* Fixed test

* Updates

* Added back tests

* Fixed doc issue

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
Co-authored-by: Daniel dos Santos Pereira <danield1591998@gmail.com>
Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
Co-authored-by: David <david.kaltschmidt@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
Co-authored-by: jvoeller <48791711+jvoeller@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Tristan Deloche <tde@hey.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 17:10:23 +02:00
Josh Hunt
72c9d806fd
AzureMonitor: Kusto language support (#33528)
* Add Kusto custom language to Monaco

* Load Kusto schema into monaco

* cleanup + tests

* cleanup + tests

* cleanup :)

* move monaco languages to a registry
2021-05-11 16:48:59 +02:00
Torkel Ödegaard
70d7b3fc55
FrameCompare: Name or label change is a structure change (#33911) 2021-05-11 15:41:53 +02:00
Leon Sorokin
5fd7c34420
New Panel: Histogram (#33752) 2021-05-10 14:00:59 -05:00
Dominik Prokop
9f8fa4212f
GraphNG - shared cursor (#33433)
* Initial work

* WIP add cursor in debug panel

* shared cursor.sync filter

* explicit uplot events

* explicit uplot events

* uplot events

* uplot events

* depend on master uplot

* sync sync sync

* Fix merge

* Get rid of PlotSyncContext and sync tooltip positions

* make sync optional

* Improve shared tooltip positioning

* Plugins: add level and signature badges to plugin details page (#33553)

* feat(grafana-ui): badge can accept react node for text, add shield-exclamation to icons

* feat(plugins): add PluginSignatureType type

* feat(pluginpage): introduce PluginSignatureDetailsBadge. Fix sidebar icon margin

* feat(pluginlistpage): update filterinput placeholder, introduce filter by plugin type

* Variables: Removes the never refresh option (#33533)

* Variables: Removes the never refresh option

* Tests: fixes DashboardModel repeat tests

* Tests: fixs snapshots

* Tests: fixes processVariable test

* Tests: fixes DashboardModel tests

* PageLayout: Fixes max-width breakpoint so that it triggers only when there is room for margin+ (#33558)

* Alerting: Remove datasource (name) from migration (#33544)

no longer needed as of https://github.com/grafana/grafana/pull/33416
for https://github.com/grafana/alerting-squad/issues/126

* Library panels: Adds description to library panels tab (#33428)

* CodeOwners: Set owners of unified alerting migration (#33571)

* ButtonSelect: updates component with the new theme model (#33565)

* EmptySearchResult: updates component with the new theme model (#33573)

* DashboardSettings: Slight design tweak to fix page toolbar padding and align design (#33575)

* DashboardSettings: Slight design tweak to fix page toolbar padding and align design

* Fixed font weight

* Removed comment

* Update

* gitignore: Ignore files for accesscontrol provisioning (#33577)

* Alerting/metrics (#33547)

* moves alerting metrics to their own pkg

* adds grafana_alerting_alerts (by state) metric

* alerts_received_{total,invalid}

* embed alertmanager alerting struct in ng metrics & remove duplicated notification metrics (already embed alertmanager notifier metrics)

* use silence metrics from alertmanager lib

* fix - manager has metrics

* updates ngalert tests

* comment lint
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>

* cleaner prom registry code

* removes ngalert global metrics

* new registry use in all tests

* ngalert metrics impl service, hack testinfra code to prevent duplicate metric registrations

* nilmetrics unexported

* Add note to Snapshot API doc to specify that user has to provide the entire dashboard model  (#33572)

* Added note as suggested by Macus E.

* Update docs/sources/http_api/snapshot.md

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

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

* Alerting: backend "ng" code cleanup (#33578)

* AlertMigration: remove alert_rule UID db check (#33568)

do not believe this is needed due to uniqueness promised by shortid lib
since there is no provisioning yet. https://github.com/teris-io/shortid

* Live: persisting last message in cache for broadcast scope (#32938)

* Alerting: Load annotations from rule into State cache (#33542)

for https://github.com/grafana/alerting-squad/issues/127

* add template for dashboard url parameters  (#33549)

* Update dashboard-links.md

parameters with plain text like `var-something=value` can make confusion. 
template it to clarify .

* describe way for template link.

* AlertingMigration: Create alert_rule_version entry (#33585)

Create the alert rule version entry during the migration so it is consistent with rules created via api.
for https://github.com/grafana/alerting-squad/issues/123

* Build: Fix with cleanup call maybe? (#33590)

* add selector for code editor (#33554)

* broadcast over eventBus

* broadcasting to eventbus (but not useing it yet)

* merge master

* moved to context

* fix yarn.lock

* update snapshot

* Fix direct state mutation

* Persist location state on partial updates

* GraphNG- use getStream rather than subscribe

* Sync LegacyGraphHoverEvent with GraphNG

* Chenge plotRef signature

* use subscription

* subscription

* one fewer file

* Update types

* Remove unnecessary filtering

* Disable cursor sync when in edit mode

* GraphNG - bring back logging

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
Co-authored-by: gamab <gamab@users.noreply.github.com>
Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
Co-authored-by: Nagle Zhang <nagle.zhang@sap.com>
Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-05-10 14:24:23 +02:00
Ryan McKinley
ccc0f7fc22
DataSource: show the uid in edit url, not the local id (#33818) 2021-05-08 18:13:26 +02:00
Torkel Ödegaard
724cbcd745
PanelEdit: Adds a table view toggle to quickly view data in table form (#33753)
* PanelEdit: Adds raw data toggle to quickly be able to view data in table form

* With transforms

* Updated name for toggle

* refactoring and added e2e test

* Support options

* fixing e2e
2021-05-07 17:09:06 +02:00
Piotr Jamróz
04a85b1a2a
Explore: Map Graphite queries to Loki (#33405)
* Create basic prototype for Loki integration

* Simplify importing queries

* Code clean-up

* Add test coverage and info box

* Remove test data script

* Update help

* Use less space for mappings info

* Make help screen dismissable

* Make mappings help more generic

* Convert learn more to a link

* Remove unused param

* Use a link Button for help section

* Add an extra line for better formatting

* Update public/app/plugins/datasource/graphite/configuration/MappingsHelp.tsx

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

* Update public/app/plugins/datasource/graphite/configuration/MappingsHelp.tsx

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

* Re-arrange lines

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-05-06 09:26:26 +02:00
Torkel Ödegaard
1e810b3d59
PanelEdit: Highlight matched words when searching options (#33717) 2021-05-05 09:12:06 +02:00
Ryan McKinley
33e4f8d7ac
Live: remove feature toggle and enable by default (#33654) 2021-05-04 08:44:55 -07:00
Uchechukwu Obasi
9315152d4f
FieldValidationMessage: updates component with the new theme model (#33647)
* FieldValidationMessage: updates component with the new theme model

* used correct theme value
2021-05-04 17:43:47 +02:00
Peter Holmberg
0006765a40
Alerting: Run queries (#33423)
* 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

* added structure for marble testing.

* change so the expression buttons doesnt submit form.

* fixed run button.

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

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

* improving expression guard.

* Update public/app/features/alerting/components/AlertingQueryEditor.tsx

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

* fixed some nits.

* some refactoring after feedback.

* use grafanthemev2

* rename grafanatheme

* fixing so we convert to correct relative time range.

* added some more tests.

* fixing so duplicating query works.

* added some more tests without marbles.

* small refactoring to share code between runRequest and alerting query runner.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-04 16:31:25 +02:00
Torkel Ödegaard
a62bfba63b
Alerting: Updates the new alerting rule table to use new theme (#33684) 2021-05-04 13:38:01 +02:00
Torkel Ödegaard
b62e87f753
TimeSeries: Render thresholds as lines and areas (#33357)
* TimeSeries: First take on uplot thresholds rendering

* Updating theme for color picker and fixing issues

* Updating theme for color picker and fixing issues

* Minor progress

* Added test dashboard

* Adding transparent and text colors to color picker and making them visible

* Good progress on migrations

* Fixed selected issue in color picker

* Fixes

* migration fix

* Fixed test

* Fixing line rendering and refactoring

* Minor ordering fix

* fixed test

* Draw thresholds before axes & series and other tweaks

* Update packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-05-04 13:03:35 +02:00
ying-jeanne
22b2d3c38a
frontend for trim/apply defaults and some bug fixing (#33561)
* remove empty object and workaround on list

* frontend

* add toggle on frontend
2021-05-04 15:03:42 +08:00
Torkel Ödegaard
578283078b
PanelEdit: Improves viz picker ux, auto close on click (#33633)
* PanelEdit: Improves viz picker ux, auto close on click

* Fixing strict ts error

* Updated e2e
2021-05-03 16:49:09 +02:00
Torkel Ödegaard
7ee994f843
Theme: Renames new theme model from GrafanaThemeV2 to just GrafanaTheme (#33619) 2021-05-03 09:45:54 +02:00
Torkel Ödegaard
f2e4f41f69
Alerting: Support for alerting for react panels, and lots of fixes to alert annotations for both react and angular (#33608)
* Alerting: Support for alerting for react panels, and lots of fixes to alert annotations for both react and angular

* Fix showing annotations in panel edit
2021-05-03 08:52:05 +02:00
Ryan McKinley
69f2a43063
EventBus: add origin to all events and support nested EventBus (#33548) 2021-04-30 22:33:29 +02:00
Torkel Ödegaard
c0d28d9ed7
PageLayout: Fixes max-width breakpoint so that it triggers only when there is room for margin+ (#33558) 2021-04-30 12:08:02 +02:00
Jack Westbrook
8f62e42554
Plugins: add level and signature badges to plugin details page (#33553)
* feat(grafana-ui): badge can accept react node for text, add shield-exclamation to icons

* feat(plugins): add PluginSignatureType type

* feat(pluginpage): introduce PluginSignatureDetailsBadge. Fix sidebar icon margin

* feat(pluginlistpage): update filterinput placeholder, introduce filter by plugin type
2021-04-30 11:00:41 +02:00
Hugo Häggmark
492227fa0a
Chore: Upgrades @braintree/sanitize-url (#33551) 2021-04-30 10:13:41 +02:00
Torkel Ödegaard
33cfc3d9c2
Theme: Fixing storybook theme (#33541) 2021-04-29 21:12:50 +02:00
Torkel Ödegaard
017bcc73ba
Theme: Move displayProcessor & fieldOverrides & visualizations to use new theme model (#33502)
* WIP updating getColorForTheme

* Progress

* More fixes

* Updating more parts

* Fixing unit tests

* Fixing more tests

* Fixing storybook issues

* More refactoring

* Fixed test
2021-04-29 12:44:06 +02:00
Jack Westbrook
249004ebef
Pages: update react components to use v2 theme (#33413)
* chore: expose theme types / functions

* fix(grafana-ui): withTheme2 extends themeable2

* feat: migrate page components to use new theme

* refactor(pages): replace legacy form components with latest form components

* refactor(dashboardimport): update page component to use theme spacing

* refactor(alerting-ng): update page component to use v2 theme

* test(dashboardpage): update test for v2 theme

* test(apikeyspage): update test to select InlineSwitch component

* test(createteam): update snapshot

* refactor(playlist): update page components to use v2 theme

* refactor(page): put back classes on page-container and background colors
2021-04-28 16:05:00 +02:00
Alex Khomenko
6d95f2f1db
Chore: Update typescript to v4.2.4 (#33297)
* Update typescript to v4.2.4

* Update @types/slate

* Fix QueryVariableEditor.test.tsx

* Fix search-related type errors

* Fix Plugin pages type errors

* Fix missing initializer errors

* Update snapshot

* Revert tsconfig changes
2021-04-28 15:40:01 +03:00
Torkel Ödegaard
5d855dbf33
Theme: Fixes to time picker calendar & variable dropdowns & more (#33407)
* More theme fixes

* more updates

* Fixed alerts in explore
2021-04-27 15:13:08 +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
Atif Shoukat Ali
408bc06bab
clear state.calcs on every append (#33245) 2021-04-26 19:53:32 -07:00
Ikko Ashimine
c41b5d80a3
DataFrameJSON: fix typo in DataFrameJSON.ts (#33380)
absense -> absence
2021-04-26 10:24:58 -07: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
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
kay delaney
999f139868
DashboardQueryRunner: Implements opt-in subscribe logic (#33370)
* DashboardQueryRunner: Implements opt-in subscribe logic
2021-04-26 13:50:08 +01: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
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
Torkel Ödegaard
e6a9654d0e
Checkbox: Updates to look and feel and using new theme (#33310)
* Checkbox: Updates to look and feel and using new theme

* A few more theme fixes

* Removed comments

* Updated snapshot
2021-04-23 14:40:06 +02:00
kay delaney
57e9b11fda
DashboardQueryRunner: Add dataSupport to PanelModel & PanelPlugin (#33253)
* DashboardQueryRunner: Add dataSupport to PanelModel & PanelPlugin
Relates to #32834
2021-04-22 11:56:32 +01:00
Torkel Ödegaard
0027097772
Overlays: Style tweaks to modal & drawer overlays (#33251)
* Overlays: Style tweaks to modal & drawer overlays

* style fix
2021-04-22 10:57:10 +02:00
Torkel Ödegaard
44cf2f8efe
Theme: Update theme layering (#33217)
* Theme: Update theme layering

* More updates

* Updates to shadows and dropdowns

* Moved panel option group to emotion global styles

* more minor fixes
2021-04-22 09:18:32 +02:00
Uchechukwu Obasi
438b403acc
Migrates old Card sass file to GlobalStyles (#33183)
* Card: migrates styles from sass to emotion

* removed LayoutSelector component since it's not used in the codebase

* updates card styles with new color name
2021-04-21 16:39:56 +02:00
Torkel Ödegaard
b929822d72
Theme: Renames theme.palette to theme.colors (#33214)
* Theme: Rename theme.palette to theme.colors

* renaming files
2021-04-21 15:34:08 +02:00
Torkel Ödegaard
7e2bf4f6c3
Theming: Make new theme exposed by ThemeContext and make new theme include v1 for compatability (to pass to useTheme) (#33207)
* WIP: Making new theme the default

* Progress

* Updates, lots of updates

* Things are working

* Fixed issues with storybook

* Fixed tests
2021-04-21 14:25:43 +02:00
Peter Holmberg
569fb3f112
Alerting: adding query editor when creating threshold rule. (#33123)
* fix viz

* add datasource picker on query rows in mixed mode

* add timerange, handle add/remove queryrunners

* multiqueryrunner test

* trying things out.

* adding another test to verify running a induvidual query runner will update multirunner.

* cleaned up tests a bit.

* draft version working ok.

* fixing so we base the refId from request targets.

* reenable adding expression

* layout fixes for alerting page

* some cleanup

* cleaning up code that we won't use

* changed so we don't display the time range if params not passed.

* remove unused things in querygroup

* changed button to type button.

* removed timerange from dataQuery and removed multiquery runner.

* minor refactoring.

* renamed callback function to make it more clear what it does.

* renamed droppable area.

* changed so we only display the query editor when selecting threshold.

* removed the refresh picker.

* revert

* wip

* extending with data query.

* timerange fixes

* it is now possible to add grafana queries.

* removed unused type.

* removed expect import.

* added docs.

* moved range converting methods to rangeUtil.

* clean up some typings, remove file

* making sure we don't blow up on component being unmounted.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-04-21 13:57:17 +02:00
Ivana Huckova
1c838f5872
Explore: Add more meta information when line limit is hit (#33069)
* WIP: Add more info ro log line limit, remove redundant info

* Refactor

* Clean up

* Adjust tests

* Adjust spacing

* Add test for new functionality

* Update snapshot

* Change solution, simplify

* Remove redundant variables, makees it more clear

* Update public/app/core/logs_model.ts

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

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-04-21 12:02:34 +02:00
kay delaney
bad048b7ba
Performance: Standardize lodash imports to use destructured members (#33040)
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.

* Remove unnecessary _ import from Graph component

* Enforce lodash import style

* Fix remaining lodash imports
2021-04-21 09:38:00 +02:00
Torkel Ödegaard
8db3eb90ae
Re-license Grafana to AGPLv3 (#33184)
For a rationale as to why this was done, please see

* https://grafana.com/blog/2021/04/20/grafana-loki-tempo-relicensing-to-agplv3/
* https://grafana.com/blog/2021/04/20/qa-with-our-ceo-on-relicensing/

Signed-off-by: Richard Hartmann <richih@richih.org>
Signed-off-by: Torkel Ödegaard <torkel@grafana.com>
Signed-off-by: Carl Bergquist <carl.bergquist@gmail.com>
Signed-off-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-04-20 19:03:30 +02:00
Ryan McKinley
dff78561bc
PanelData: include structure revision info and only apply overrides once (#33098)
* calculate schemaRevision in panel query runner

* schema > structureRev

* calculate revision after apply field overrides

* this.state

* don't apply field overrides if the shape is already the same

* check schema revision

* update snapshots
2021-04-20 11:05:50 +02:00
Nicolai Hemdrup
04781bfcc6
Theme: Update to dark blues (#33148)
darkBluePrimary = less purple and bit more aligned with the theme
darkBlueSecondary (text) = bit less saturated, meaning a bit brighter.
2021-04-20 10:48:55 +02:00