Commit Graph

1364 Commits

Author SHA1 Message Date
Ashley Harrison
f1295e4bd0
Chore: Update version of @grafana/eslint-config (#53403)
* use let/const over var

* use new version of @grafana/eslint-config
2022-08-08 15:19:15 +01:00
Jack Westbrook
d87bf30e9e
Build: Introduce ESM and Treeshaking to NPM package builds (#51517)
* Revert "Chore: Bump terser to fix security vulnerability (#53052)"

This reverts commit 7ae74d2a18.

* feat: use tsc and rollup directly with esbuild and publishConfig, files props

* refactor(grafana-data): fix isolatedModules re-export type error

* refactor(grafana-data): import paths from src not package name

* refactor(rollup): fix dts output.file

* chore(grafana-schema): delete dashboard_experimental.gen.ts - cannot work with isolatedModules

* refactor(grafana-e2e-selectors): fix export types isolatedModules error

* refactor(grafana-runtime): fix isolatedModules re-export type error

* refactor(grafana-ui): fix isolatedModules re-export type error

* feat(grafana-ui): use named imports for treeshaking

* refactor(grafana-ui): use named imports for treeshaking

* feat: react and react-dom as peerDeps for packages

* feat(grafana-ui): emotion packages as peerDeps

* feat(grafana-e2e): use tsc, rollup, esbuild for bundling

* chore(packages): clean up redundant dependencies

* chore(toolkit): deprecate unused package:build task

* chore(schema): put back dashboard_experimental and exclude to prevent isolatedModules error

* docs(packages): update readme

* chore(storybook): disable isolatedModules for builds

* chore: relax peerDeps for emotion and react

* revert(grafana-ui): put @emotion dependencies back

* refactor: replace relative package imports with package name

* build(packages): set emitDeclaration false for typecheck scripts to work

* test(publicdashboarddatasource): move test next to implementation. try to appease the betterer gods

* chore(storybook): override ts-node config for storybook compilation

* refactor(grafana-data): use ternary so babel doesnt complain about expecting flow types

* chore(toolkit): prefer files and publishConfig package.json props over copying

* build(npm): remove --contents dist arg from publishing commands

* chore(packages): introduce sideEffects prop to package.json to hint package can be treeshaken

* chore(packages): remove redundant index.js files

* feat(packages): set publishConfig.access to public

* feat(packages): use yarn berry and npm for packaging and publishing

* refactor(packages): simplify rollup configs

* chore(schema): add comment explaining need to exclude dashboard_experimental

* revert(toolkit): put back clean to prevent cli failures

* ci(packages): run packages:pack before a canary publish

* chore(gitignore): add npm-artifacts directory to ignore list

* test(publicdashboarddatasource): fix module mocking

* chore(packages): delete package.tgz when running clean

* chore(grafana-data): move dependencies from devDeps to prevent build resolution errors
2022-08-03 15:47:09 +02:00
Ieva
67d817ff48
update versions (#53167) 2022-08-02 11:55:46 -04:00
Josh Hunt
eaf6aea98f
Typed variables pt1: Use discriminated union for variable model (#52981)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up
2022-08-02 10:15:25 +01:00
Konrad Lalik
f877f79bbc
Alerting: Show evaluation interval global limit warning (#52942)
Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-08-01 15:01:14 +02:00
Leo
1fc9f6f1c6
Annotations: Migrate dashboardId to dashboardUID (#52588)
* Annotations: replaced dashboardId with dashboardUID when fetching annotations

* Annotations: Replaced dashboardID with dashboardUID when adding and updating annotations

* Annotations: Used dashboardUID for PanelChrome related methods

* Annotations: Used dashboarduid in annolistpanel

* Annotations: Used dashboardUID in graph plugin

* used boolean in canEditDashboard
2022-08-01 09:21:41 +02:00
Andrej Ocenas
d0e548c3e5
Prometheus: Add flag to compare streaming and buffered responses (#51711)
* Add flag to compare streaming and buffered

* Move log

* Fix lint

* Fix tests

* Remove debug logs
2022-07-28 14:26:51 +02:00
Leon Sorokin
8ee0555bac
TimeSeries: Implement auto decimals for y axes (#52912) 2022-07-28 02:58:42 -04:00
Kristina
6ecc420534
Revert "Explore: Add Mixed Datasource (#51605)" (#52889)
This reverts commit e2258120e7.
2022-07-27 10:17:31 -05:00
renovate[bot]
a4355bd6e4
Update Monthly patch updates (#52885)
* Update Monthly patch updates

* ignore updates to lezer-logql and @types/slate

* update lockfile

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-27 16:02:48 +01:00
Kristina
e2258120e7
Explore: Add Mixed Datasource (#51605)
* Toggle on the mixed mode option

* Ensure switching to mixed gives existing query prev datasource

* WIP - Populate datasource when switching between mixed and not

* WIP - handle change from mixed

* Remove preimport filter, refine filter to work for queries

* WIP debugging datasource transition

* Ensure creating a new query gets target data source if switching with no matches between

* Add mixed datasource to rich history display

* Cleanup console logs, add relevant comments

* Add feature toggle for mixed datasource

* Fix Wrapper tests

* Fix tests!

* Fix test types and add feature tracking

* Remove unnecessary default, remove explore/mixed workarounds for D2E

* Move display text logic to mixed datasource file

* Add in the default query parameters to a generated empty query

* Condense some code

* Apply suggestions from code review

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-07-27 09:40:59 -05:00
ismail simsek
0a664faeeb
Graphite: Introduce new query types in annotation editor (#52341)
* Fix comment lines

* Introduce graphite variable editor

* Render results differently based on queryType

* Add comments and fallback values

* Unit tests for different type of graphite queries

* Use metrics/expand endpoint to retrieve metric names
2022-07-26 18:30:23 +02:00
Ryan McKinley
5df6a95045
Transformations: Add standard deviation and variance reducers (#52769)
Co-authored-by: Selva <selvavm@hotmail.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-26 11:25:35 -04:00
renovate[bot]
4d7e26abfd
Update dependency rollup to v2.77.1 (#52786)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-26 11:33:24 +01:00
Ryan McKinley
19ef418edc
Transforms: Add Join by label transformation (#52670) 2022-07-25 19:16:58 -04:00
renovate[bot]
9df9b1b5c3
Update dependency ol to v6.15.1 (#52751)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 13:54:33 -07:00
Kristina
0e13ee345d
Explore: Change datasourceName usage to datasourceUID or datasourceRef where appropriate (#52479)
* First pass at using datasource UID when appropriate

* Fix tests

* be more lenient with lookup to accomodate different URLs

* Make test setup get mock work like real datasource get

* Fix the typing issue and remaining tests

* Fix PR feedback
2022-07-25 13:05:57 -05:00
renovate[bot]
2c78977e97
Update dependency date-fns to v2.29.1 (#52722)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 15:31:39 +01:00
kay delaney
c35c3abaa3
Chore: Bump typescript version to 4.7.4 (#52325)
* Chore: Bump typescript version to 4.7.4

* Bump related packages

* Revert eslint-plugin-react upgrade
2022-07-25 13:47:59 +01:00
renovate[bot]
044d8315de
Update dependency @testing-library/user-event to v14.3.0 (#52690)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 10:11:42 +01:00
Ilya Stoliar
d0db3ab306
TimeZone: Remove political reference (#52689)
* Remove political reference

* Name adjustment

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-07-24 11:41:18 +02:00
renovate[bot]
b4c6efa07b
Update dependency moment to v2.29.4 [SECURITY] (#51886)
* Update dependency moment to v2.29.4 [SECURITY]

* chore(moment): make sure nested moment deps resolve to moment@2.29.4

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-07-22 12:00:54 +02:00
Joey Tawadrous
11b743ecd9
Traces: Remove serviceMap feature flag (#52375)
* Remove serviceMap feature flag

* Remove import

* Add serviceMap to queryTypeOptions
2022-07-19 08:00:58 +01:00
Alex Khomenko
ba543343c4
Grafana/UI: Add ColorPickerInput component (#52222)
* ColorPickerInput: Setup componnet

* ColorPickerInput: Add onChange callback

* ColorPickerInput: Conver ColorInput to functional component

* ColorPickerInput: Extend Input props

* ColorPickerInput: Upate value prop

* ColorPickerInput: Allow customising color format for onChange

* ColorPickerInput: Add docs

* ColorPickerInput: Update docs

* ColorPickerInput: Memoize debounced callback

* ColorPickerInput: Add tests and use theme for spacing

* Apply styles from SpectrumPalette

* Cleanup
2022-07-19 01:09:09 -04:00
Ryan McKinley
824f12a993
Storage: Remove storageLocalUpload flag (#52413) 2022-07-18 10:44:42 -07:00
Ivana Huckova
8ff152f98f
ModifyQuery: Improve typing for modifyQuery and query hints (#52326)
* ModifyQuery: Improve typing

* Elasticsearch: Added `modifyQuery` method to add filters in Explore (#52313)

* fixed elasticsearch `QueryFixAction` type

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-07-18 14:13:34 +02:00
Gábor Farkas
1d3cd0103e
logs: send more info to getLogRowContext (#52130) 2022-07-15 14:02:43 +00:00
Polina Boneva
bec500b69f
Chore: Test grafana/public/app/plugins/panel/text/TextPanel.tsx (#52244)
* move sanitize test to its own test file

* add a test for renderTextPanelMarkdown to always sanitize

* setup TextPanel tests

* add tests to always sanitize Text Panel contents and always convert correctly to html/markdown
2022-07-15 12:06:16 +03:00
Ryan McKinley
da1701ce57
Dashboards: load from storage (#51949) 2022-07-14 15:36:17 -07:00
Torkel Ödegaard
7947629f82
TopNav: Make dashboard toolbar actions work in new top nav (#51950)
* Initial work on new toolbar button

* Minor step

* Small progress

* Minor progress

* Minor fix

* removed console.log

* Removing stuff we don't need yet
2022-07-14 20:34:00 +02:00
Adam Simpson
5d199a40b7
AzureMonitor: Update UI to experimental package (#52123)
* feat: make azure experimental the default

* feat: combine metrics query editor rows

fix: linter errors

* chore: remove test loop for DimensionFields test
2022-07-14 13:07:31 +00:00
Oscar Kilhed
9498ee3d54
SQL: Migrate (MS/My/Postgres)SQL configuration pages from Angular to React (#51891)
* Migrate SQL configuration pages from angular to react

* Move enums to types.ts and remove angular partials

* remove es lint disables and update betterer instead

* Fix automatically added type declarations

* Bump wor.. betterer ;)

* Export SecretInput component from grafana-ui

* Fix A11y issues

* Export SecretTextArea as well

* Fix typo

* Use const instead of var

* Fix typo in doc

* Add autoDetectFeatures to postgres config editor

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-07-14 13:29:08 +02:00
Guilherme Caulada
2d8a91a846
Secrets: Improve unified secrets migration and implement compatibility flag (#50463)
* Implement disableSecretsCompatibility flag

* Allow secret deletion right after migration

* Use dialect.Quote for secure_json_data on secret deletion

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Set secure_json_data to NULL instead of empty json

* Run toggles_gen_test and use generated flag variable

* Add ID to delete data source secrets command on function call

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Remove extra query to get datasource on secret deletion

* Fix linting issues with CHANGELOG.md

* Use empty json string when deleting secure json data

* Implement secret migration as a background process

* Refactor secret migration as a background service

* Refactor migration to be inside secret store

* Re-add secret deletion function removed on merge

* Try using transaction to fix db lock during tests

* Disable migration for pipeline debugging

* Try adding sleep to fix database lock

* Remove unecessary time sleep from migration

* Fix merge issue, replace models with datasources

* Try event listener approach

* Fix merge issue, replace models with datasources

* Fix linting issues with unchecked error

* Remove unecessary trainling new line

* Increase wait interval on background secret migration

* Rename secret store migration folder for consistency

* Convert background migration to blocking

* Fix number of arguments on server tests

* Check error value of secret migration provider

* Fix linting issue with method varaible

* Revert unintended change on background services

* Move secret migration service provider to wire.go

* Remove unecessary else from datasource service

* Move transaction inside loop on secret migration

* Remove unecessary GetServices function

* Remove unecessary interface after method removal

* Rename Run to Migrate on secret migration interface

* Rename secret migrations service variable on server

* Use MustBool on datasource secret migration

* Revert changes to GetDataSources

* Implement GetAllDataSources function

* Remove DeleteDataSourceSecrets function

* Move datasource secret migration to datasource service

* Remove unecessary properties from datasource secret migration

* Make DecryptLegacySecrets a private method

* Remove context canceled check on secret migrator

* Log error when fail to unmarshal datasource secret

* Add necessary fields to update command on migration

* Handle high availability on secret migration

* Use kvstore for datasource secret migration status

* Add error check for migration status set on kvstore

* Remove NewSecretMigrationService from server tests

* Use const for strings on datasource secrets migration

* Test all cases for datasources secret migrations

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-07-12 17:27:37 -03:00
Laura Benz
1d8272c286
URL: Encode certain special characters (#51806)
* refactor: add encoding of certain special characters in url

* refactor: add related test
2022-07-11 09:28:28 +02:00
Leon Sorokin
fda7f064ad
GraphNG: uPlot 1.6.22 (#51945) 2022-07-08 09:45:16 -04:00
Torkel Ödegaard
935334cbda
Scene: POC for a future dashboard model and runtime (#50980)
* Playing around

* This is getting interesting

* Updates

* Updated

* Observable experiments

* This is tricky

* VizPanel panel renderer

* New model progress

* Maybe this could be something

* Updated

* Rename

* updates

* Updated

* Query runners? not sure

* Updated

* updates

* flex box layout starting to work

* Testing

* Tested an action

* Parent context sort of working

* Progress

* Progress

* Updated

* Starting to work

* Things are working

* Scene list, nested scene demo

* Progress on repeats

* Moving things

* Pretty big progress

* More things working

* Great progress

* Progress

* Name changing

* Minor tweaks

* Simplified sizing

* Move toggleDirection to SceneFlexLayout

* add feature flag (#50990)

* removed new useObservable hook

* Rename folder and feature toggle to scenes

* Caching scenes so you can go back to another scene without having to re-query data

* Fix issue with subs on re-mount

* Fixing test

* Added SceneCanvasText to play around with layout elements with size based on content

* Scene: Edit mode and component edit wrapper that handles selection  (#51078)

* First step for scene variables

* Started playing around with a scene edit mode

* Better way to set component

* Progress on edit mode

* Update

* Progress on edit mode

* Progress on editor

* Progress on editor

* Updates

* More working

* Progress

* Minor update

* removed unnessary file

* Moving things around

* Updated

* Making time range separate from time picker

* minor rename of methods

* The most basic variable start

* Minor renames

* Fixed interpolate issue if not found at closest level

* An embryo of event model and url sync handling

* Update url sync types

* Removed unnessary any type arg

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-07-07 08:53:02 +02:00
owensmallwood
0b4af38bfa
Public Dashboards: Query Caching (#51403)
* passes id and uid to PublicDashboardDatasource

* betterer results

* If for a public dashboard, return the PublicDashboardDataSource first or else getDatasourceSrv.get() will fail bc of no authed user.

Added some unit tests for resolving the uid from the many possible datasource types.

* updates betterer

* Exports DashboardService. Adds method to DashboardService to build anonymous user for use with public dashboards where there is no authed user. Adds method on dashboard_queries to get all dashboard uids from a dashboard.

* refactors to get unique datasource uids

* Adds tests for getting all unique datasource uids off a dashboard

* adds test for building anonymous user with read and query actions that are scoped to each datasource uid in the dashboard

* updates casing of DashboardService

* updates test case to have additional panel with a different datasource

* gives default interval to public dashboard data source
2022-07-06 12:42:39 -06:00
Leon Sorokin
173636aa61
Histogram: filter nulls, bucket-adaptive xAxis decimals (#51773) 2022-07-06 10:13:32 -05:00
Torkel Ödegaard
1e85a6f4fd
TopNav: New page layouts (#51510)
* First stab at new page layouts behind feature toggle

* Simplifying PageHeader

* Progress on a new model that can more easily support new and old page layouts

* Progress

* rename folder

* Progress

* Minor change

* fixes

* Fixing tests

* Make breadcrumbs work

* Add tests for old Page component

* Adding tests for new Page component and behavior

* fixing page header test

* Fixed test

* AppChrome outside route

* Renaming folder

* Minor fix

* Updated

* Fixing StoragePage

* Fix for banners

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-06 17:00:56 +02:00
Leon Sorokin
3bd2bdcebb
DataFrame: more thorough detection of unsorted values (#51602) 2022-06-29 18:08:42 -05:00
Michael Mandrus
7ef21662f9
Plugins: Show that Secrets Manager Plugin is active in the UI (#50953)
* add special handling on the plugin gathering side to check whether secrets manager plugins are enabled or not

* show disabled badge in front end if the plugin is not enabled

* Only show error in disabled badge hover if one is present (otherwise it shows "undefined")

* refactor to make use of fields already available in the DTO

* fix typo

* if there is no error returned for the plugin, just show 'disabled'

* fix typo

* Update public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update frontendsettings.go

add clarifying comment

* fix unit test

* rework task to use new frontend property combined with plugin type to determine if the plugin should be disabled

* Update helpers.test.ts

revert test change

* fix unit test

* bogus commit to trigger precommit

* undo commit

* run precommit manually

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 08:48:23 -04:00
Dan Keder
9595fd6b66
Prometheus: Support 1ms resolution intervals (#44707)
* Prometheus: Support 1ms resolution in time ranges

* UI: Support 1ms resolution in time ranges
2022-06-29 07:39:50 +02:00
Timur Olzhabayev
7c886fb6f9
Frontend Logging: Integrate grafana javascript agent (#50801)
Add Grafana Javascript Agent integration to Grafana
2022-06-28 03:25:30 -04:00
Ashley Harrison
ee3f4f1709
Navigation: Display Starred dashboards in the Navbar (#51038)
* remove feature toggle, add empty state and fix bug with initial starring

* Extract empty message into lingui

* remove full stop

* add empty message in the backend

* remove unused import

* translate starred + empty starred states

* betterer changes
2022-06-27 15:41:00 +01:00
Vardan Torosyan
f1661166b2
Service accounts: Grafana service accounts are enabled by default (#51402)
* Remove feature flag for service accounts

* Fix failing tests and remove remaining usage

* Fix failing tests and remove remaining usage
2022-06-27 10:22:49 +02:00
Ryan McKinley
dd5a3b7747
Heatmap: Replace the heatmap panel with new implementation (#50229) 2022-06-23 11:48:28 -07:00
Jeff Levin
d076bedb5e
public dashboards: finalize db schema & v1 feature complete (#50467)
This PR completes public dashboards v1 functionality and simplifies public dashboard conventions. It exists as a large PR so that we are not making constant changes to the database schema.

models.PublicDashboardConfig model replaced with models.PublicDashboard directly
dashboard_public_config table renamed to dashboard_public
models.Dashboard.IsPublic removed from the dashboard and replaced with models.PublicDashboard.isEnabled
Routing now uses a uuid v4 as an access token for viewing a public dashboard anonymously, PublicDashboard.Uid only used as database identifier
Frontend utilizes uuid for auth'd operations and access token for anonymous access
Default to time range defined on dashboard when viewing public dashboard
Add audit fields to public dashboard

Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>, Ezequiel Victorero <ezequiel.victorero@grafana.com>, Jesse Weaver <jesse.weaver@grafana.com>
2022-06-22 13:58:52 -08:00
Ryan McKinley
773c269084
OptionsUI: UnitPicker now supports isClearable setting (#51064) 2022-06-22 13:49:44 -07:00
Tania
405df77e3e
Add a feature toggle for custom branding (#51168) 2022-06-22 17:05:52 +02:00
Josh Hunt
26f6b91fd9
Chore: Type GA and Rudderstack analytics config (#51197)
* Chore: Type GA and Rudderstack analytics config

* rely on implicit unknown
2022-06-22 09:27:55 +01:00
Leon Sorokin
f4f31b40fd
HeatmapNG: consolidate frame types & fix color ranging (#51089)
* rename yZeroDisplay -> yMinDisplay
* remove heatmap-cells-sparse frame type
* parse x bucket size to millis
* take into account hideLE & hideGE filters to auto-range color scale
* extract cell value range scanning to heatmapData
2022-06-20 15:38:13 -05:00
Ryan McKinley
c2aee2b6da
Geomap: Add alpha day/night layer (#50201)
Co-authored-by: drew08t <drew08@gmail.com>
2022-06-20 19:35:03 +02:00
Torkel Ödegaard
3c3293df78
TopNav: Adds new feature toggle for upcoming nav~ (#51115) 2022-06-20 16:25:43 +02:00
Torkel Ödegaard
3a586a6053
PanelRenderer: Improves PanelRenderer performance (#51092)
* PanelRenderer: Improves PanelRenderer performance

* Minor refactor

* remove old func
2022-06-20 14:41:39 +02:00
Erik Sundell
1b51cd2043
DataSource: Allow data source plugins to set query default values (#49581)
* make it possible to set default query

* set default query in cloudwatch ds

* remove cloudwatch example code

* apply feedback

* Update public/app/features/explore/state/query.ts

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

* Update public/app/features/query/components/QueryGroup.tsx

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

* add alpha tag to method definiton

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-06-16 22:22:05 +02:00
Ashley Harrison
d0fa326798
Chore: Remove newNavigation feature toggle and old navbar code (#50872)
* Remove newNavigation feature toggle + old code

* fix unit tests

* remove buildCreateNavLinks
2022-06-16 10:48:38 +01:00
Kristina
dfa538ff92
Revert "Explore: Remove support for legacy, compact format URLs (#49350)" (#50873)
This reverts commit a9cc3225ba.

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-06-15 08:44:36 -05:00
renovate[bot]
dd98107201
Update dependency rollup to v2.75.6 (#50770)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-15 10:09:32 +01:00
Dimitris Sotirakis
443083c7df
Bump version: Update main branch version to 9.1.0-pre (#50803)
* Update main branch version to 9.1.0-pre

* Update yarn.lock
2022-06-14 09:06:14 -07:00
Joao Silva
f9d31d0612
Formatting: Fixes valueFormats for a value of 0 (#50719) 2022-06-14 16:05:59 +01:00
Agnès Toulet
99c8ce5ab9
GrafanaData: Fix week start for non-English browsers (#50582)
* grafana-data: Fix start week for non-English browsers

* apply review suggestion
2022-06-14 15:12:52 +02:00
owensmallwood
1bb2d2599c
Public Dashboards: Pubdash panels get data from pubdash api (#50556)
* Public dashboard query API

* Create new API on service for building metric request

* Flesh out testing, implement BuildPublicDashboardMetricRequest

* Test for errors and missing panels

* WIP: Test for multiple datasources

* Refactor tests, add supporting code for multiple datasources

* Gets the panel data from the pubdash query api

* Adds tests to make sure we get the correct api url from retrieving panel data

* Public dashboard query API

* Create new API on service for building metric request

* Flesh out testing, implement BuildPublicDashboardMetricRequest

* Test for errors and missing panels

* WIP: Test for multiple datasources

* Refactor tests, add supporting code for multiple datasources

* Handle queries from multiple datasources

* Replace dashboard time range with pubdash time range settings

* Fix comments from review, build failure

* removes changes to DataSourceWithBackend.ts regarding getting the pubdash panel query url. Going to do this in a new class, PublicDashboardDataSource.ts

* Include pubdash Uid in dashboard meta

* Creates new PublicDashboardDataSource.ts and adds test

* Passes pubdash uid down to PanelQueryRunner.ts to a PublicDashboardDatasource can be chosen when were looking at a public dashboard

* removes comment

* checks for error when unmarshalling json

* Only replace dashboard time settings with pubdash time settings when pubdash time settings exist

* formatting and added comment

Co-authored-by: Jesse Weaver <jesse.weaver@grafana.com>
Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-06-13 18:03:43 -06:00
Drew Slobodnjak
07aa2bbbba
GeomapPanel: Add base types to data layer options (#50053)
* GeomapPanel: Add base types to data layer options

Removed isBaseMap check from data layer filter, which used to remove
base layer types from data layer options. For layer editor, slider to
control opacity is added.

* GeomapPanel: Reorder data layer options

For data layer selection, present user with data layer types first,
before base map layer types. Refactored to consolidate layer options
into a single exported function in registry with a base map boolean.

* GeomapPanel: Add descriptions to base map types

* GeomapPanel: add hideOpacity and apply to markers

* GeomapPanel: update descriptions for map types

Closes #47812
2022-06-13 14:07:20 -07:00
renovate[bot]
246099c52d
Update dependency @swc/helpers to v0.4.0 (#50730)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-13 19:14:40 +00:00
Ryan McKinley
1902357693
Heatmap: consolidate naming conventions (#50272) 2022-06-13 08:08:33 -07:00
Gábor Farkas
8fd9cb4854
loki: add feature-toggle check to live-mode (#49012) 2022-06-13 08:33:46 +02:00
Ryan McKinley
ae8dd73770
Graph Panel: Add feature toggle that will allow automatic migration to timeseries panel (#50631) 2022-06-10 17:12:56 -07:00
Josh Hunt
9a62849dc3
Add i18n feature flag (#50590) 2022-06-10 13:02:52 +02:00
Levente Balogh
9a85a2e441
Data Connections: Create a new top-level page (#50018)
* Feature Flags: introduce a flag for enabling the Data Connections page

* Feature Flags: generate schemas

* Navigation: add navigation weight for the Data Connections page

* NavLink: add a comment pointing out where icon names can be looked up

* NavTree: add a new page called Data Connections

* fix(Api): prefix the navigation IDs with the parent ("data-connections")

* feat(Frontend): add a basic page with four tabs

* feat(Plugins): add a hook for importing an app plugin

* feat(Plugins): add a component for loading app plugins anywhere

* feat(Data Connections): load the cloud-onboarding app under the "Cloud onboarding" tab

* feat(Data Connections): generate a proper nav model to highlight active tabs

* test(Data Connections): add tests

* refactor(Data Connections): update temporary text content

This is only used as a placeholder until the tabs are under development.

* refactor(Data Cnnnections): move /pages to /tabs

* refactor(Data Connections): remove the `types.ts` file as it is not referenced by any module

* feat(Data Connections): only register routes if feature is enabled
2022-06-10 12:13:31 +02:00
Torkel Ödegaard
c1d405a200
Search: Fixes margins and paddings and left position (#50570) 2022-06-10 11:30:52 +02:00
Carl Bergquist
2d6e69226b
Instrumentation: Add feature toggle for logging requests instrumented as unknown (#50566)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2022-06-10 10:56:55 +02:00
Joey Tawadrous
4ed7ff2ed1
Traces: APM table (#48654)
* APM table

* Remove unnecessary changes in Explore.tsx

* Enhancements

* Show empty table if filter returns no results for table

* Error checking

* Combine extra filter options

* Convert service map query to apm query for apm requests

* Simplify links

* Better query building

* Extract method and clean up

* Upgrade filter

* Self review

* Export method

* Update test

* Switch area-chart to lcd-gauge

* Remove AreaChartCell

* Colors, units and other UI upgrades

* Remove 2 queries and reuse existing queries

* Nested observables

* rate/error rate/duration links: open new pane with range query and exemplars turned on

* Align error rate values to rate values col according to span_name

* Rearrange code

* Several improvements

* Filter by span_name

* align the table col values to the same row name (rateName) across the table

* On click tempo link filter by span_name

* Filtering updates

* Ensure serviceQuery null is ok

* Update link expr

* Update duration p90 unit

* Tempo links case

* Update tests

* Self review

* Tests

* Empty state

* Remove some code

* Test: should build expr correctly

* Test: should build link expr correctly

* Test: should get rate aligned values correctly

* Test: should make apm request correctly

* Test: should make tempo link correctly

* Move apm table tests to its own describe

* Feature toggle

* Added to docs for APM table

* Add screenshot to APM table section in docs

* Add feature toggle to test

* Split queries and make method names clearer

* Doc changes

* Add back in config import removed by merge

* Update tempo link and tests

* Update filter

* Set field filterable: false

* Updated doc

* Remove @end from queries

* Add back in tempo link
2022-06-09 17:56:15 +01:00
Michael Mandrus
1284c596fe
Geomap: Add ability to select a data query filter for each layer (#49966)
* Fix random typo I found

* add 'useDataFrame' boolean to each layer type to determine whether the layer queues off of query data

* Add data frame picker to options layout depending on layer type

* change layer update logic to render features from a specific data frame. Lift data frame selection up a level in order to add some more complex error handling.

* add a todo to the MapLayerRegistryItem interface

* update optional arg in function signature for consistency

* move dataframe filtering to paneldata, revert layers to prior state

* commit refactor, need to clean up still

* pull copy-pasted code into its own function

* clean up comments

* Update layer.ts

* remove unused types

* fix spacing

* improve dropdown

* need to add dependency to this callback function, otherwise it will always use the context of the last layer

* add data query recovery logic to handle query renames

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-09 11:54:57 -04:00
Kevin Yu
6151320020
Cloud Monitoring: add feature toggle for experimental UI (#50460)
* Cloud Monitoring: add feature toggle for experimental UI

* remove RequiresDevMode
2022-06-09 15:56:32 +02:00
Gábor Farkas
50145e1617
Loki: remove frontend mode code (#50185)
* feature-flag removed

* loki: remove frontend-mode
2022-06-08 08:14:34 +02:00
kay delaney
c96fa4c77d
Data: Remove deprecated types and functions from valueMappings (#50035) 2022-06-07 10:48:54 +01:00
kay delaney
a9a276a9da
Formatting: Make SI number formats more robust (#50117)
Closes #49372
2022-06-07 10:48:17 +01:00
renovate[bot]
0c32dec9e2
Update dependency @types/jest to v28 (#49249)
* Update dependency @types/jest to v28

* modern is now default!

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-06 14:45:02 +01:00
Leon Sorokin
e3815111ea
Chore: uPlot 1.6.21 (#50223) 2022-06-06 01:42:48 -05:00
Jean-Philippe Quéméner
4b8a4449ed
Alerting: remove feature toggle for provisioning API (#50167)
* Alerting: remove feature toggle for provisioning API

* remove missed code parts

* remove unused import

* remove empty line

* mark routes as stable
2022-06-05 07:45:36 +02:00
Kyle Cunningham
12ba2d6b8b
State Timeline: Fix Null Value Filling and Value Transformation (#50054) 2022-06-03 16:22:57 -05:00
Marcus Efraimsson
36c3398c6d
Datasource: Remove support for unencrypted passwords (#49987)
* Datasource: Remove support for unencrypted passwords

* regenerate swagger

* [WIP] Remove references to datasource password and basic auth password fields (#50015)

* try delete moar tings

* delete provisioning stuff

* remove from yaml

* update snapshots

* remove lingering snapshot fields

* fix ds http settings

* Re-generate swagger and fix swagger-api-spec make target

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-03 17:38:22 +02:00
owensmallwood
cfdea1ee30
PublicDashboards: Frontend routing for public dashboards (#48834)
* add isPublic to dashboard

* refactor routes to use route group and add placeholder method for sharing apii

* add sharing pane and utils for public dashboard config to sharing modal

* Sharing modal now persists data through the api

* moves ShareDashboard endpoint to new file and starts adding tests

* generates mocks. Adds tests for public dashboard feature flag

* Adds ability to pass in array of features to enable for the test

* test to update public flag on dashboard WIP

* Adds mock for SaveDashboardSharingConfig

* Fixes tests. Had to use FakeDashboardService

* Adds React tests for public dashboards toggle

* removes semicolons

* refactors SharePublic component to use hooks

* rename from `share publicly` to `public dashboard config`

* checkpoint. debugging tests. need to verify name changes

* checkpoint. test bugs fixed. need to finish returning proper response codes

* finish renaming. fix test

* Update pkg/api/api.go

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* update backend url

* rename internal objects and commands. fix configuration modal labels

* add endpoint for retrieving public dashboard configuration and populate the frontend state from it

* add test for dashboardCanBePublic

* adds backend routes

* copy DashboardPage component into component for public dashboards. WIP

* adds react routes, and doesnt render main nav bar when viewing a public route

* removes extra react route from testing

* updates component name

* Wrap the original dashboard component so we can pass props relevant to public dashboards, turn kiosk mode on/off, etc

* Wraps DashboardPage in PublicDashboardPage component. DashboardPage gets rendered in kiosk mode when public prop is passed.

* removes commented out code from exploratory work

* Makes public dashboard routes require no auth

* extracts helper to own util file to check if were viewing a public page

* Hides panel dropdown when its being viewed publicly

* formatting

* use function from utils file for determining if publicly viewed. If public, hides app notifications, searchwrapper, and commandpalette.

* adds unit tests for util function used to see if page is being viewed publicly

* cant added annotations to panel when being publicly viewed

* removes useless comment

* hides backend and frontend pubdash routes behind feature flag

* consider feature flag when checking url path to see if on public dashboard

* renames function

* still render app notifications when in public view

* Extract pubdash route logic into own file

* fixes failing tests

* Determines path using location locationUtils. This covers the case when grafana is being hosted on a subpath. Updates tests.

* renames pubdash web route to be more understandable

* rename route

* fixes failing test

* fixes failing test. Needed to update pubdash urls

* sets flag on grafana boot config for if viewing public dashboard. Removes hacky check that looks at the url

* fixes failing tests. Uses config to determine if viewing public dashboard

* renders the blue panel timeInfo on public dashboard panel

* Extracts conditional logic for rendering components out into their own functions

* removes publicDashboardView check, and uses dashboard meta instead

* the timeInfo is always displayed on the panel

* After fetch of public dashboard dto, the meta isPublic flag gets set and used to determine if viewing public dashboard for child components. Fixes tests for PanelHeader.

* Fixes failing test. Needed to add isPublic flag to dashboard meta.

Co-authored-by: Jeff Levin <jeff@levinology.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-02 14:57:55 -06:00
Connor Lindsey
3fff17af63
Tempo: Consider tempo search out of beta and remove beta badge and feature flags (#50030)
* Tempo: Remove beta notice and feature flag for search

* remove unused imports
2022-06-01 11:32:10 -06:00
Carl Bergquist
9562fb389f
Metrics: Remove support for using summaries instead of histogram for HTTP instrumentation (#49985)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2022-06-01 14:33:59 +02:00
Adela Almasan
e18e8002c4
Canvas: add feature flag for nesting elements (#49958) 2022-05-31 12:03:34 -07:00
Sergey Kostrukov
2b83cf4618
Prometheus: Predefined scopes for Azure authentication (#49557)
* Predefined scopes for Azure Prometheus

* Allow override of audience
2022-05-30 17:43:32 +02:00
Ashley Harrison
216565aa00
Chore: Upgrade to jest 28 (#49679)
* bump packages to jest 28

* changes needed for jest 28

* map react-colorful as well

* use customResolver and fix last test

* don't need react-colorful installed if we're using a custom resolver

* return correct thing in mock

* remove watchPathIgnorePatterns since we don't have node_modules anymore
2022-05-30 14:14:34 +01:00
Jack Westbrook
f4353bbbc4
Toolkit: Bump dependencies (#47826)
* chore(typescript): remove sanitize_url.d.ts in favour of npm package types

* chore(toolkit): bump all webpack related deps inline with grafana core

* refactor(toolkit): prefer webpack types and use from imports for bundling

* feat(toolkit): bundle plugins using webpack 5 and babel

* chore(toolkit): but all eslint deps inline with grafana core

* refactor(toolkit): rewrite linting step to use new eslint node api

* chore(toolkit): bump jest dependencies inline with grafana core

* refactor(toolkit): update jest config for jest 27

* fix(toolkit): resolve toolkit if using yarn berry

* docs(toolkit): update instructions for developing with yarn berry

* chore(toolkit): remove yarnlink code as won't work with yarn berry

* chore(toolkit): bump remaining dependencies

* chore(toolkit): remove unused core.start task

* feat(toolkit): use browserlist when building plugins

* chore(toolkit): add browserslist dependency

* refactor(toolkit): resolve style loaders, update postcss options for webpack5

* chore(toolkit): put back grafana/data and grafana/ui

* docs(toolkit): improve instructions for developing toolkit locally

* chore(toolkit): clean up webpack debug and warnings

* chore(input-datasource): remove pnpwebpack plugin and update browserslist to solve failing build

* chore(renovatebot): remove toolkit package.json from ignorePaths

* revert(renovate): put back toolkit package.json in ignorePaths

* feat(toolkit): introduce babel plugins

* refactor(toolkit): remove runtime automatic from preset-react for earlier versions of react

* refactor(toolkit): add missing fallbacks to webpack config

* fix(toolkit): remove spaces from copy webpack glob so files are copied

* refactor(toolkit): fix up babel typescript support and copy browserlist on build

* chore(yarn): refresh lock file

* revert(toolkit): remove browsers list so plugins compile to ES5

* revert(toolkit): remove copying .browserslistrc
2022-05-26 16:23:27 +02:00
kay delaney
c6ac9410b2
Chore: Remove deprecated TextDisplayOptions export (#49705) 2022-05-26 16:02:11 +02:00
kay delaney
308ceebdd1
Chore: Remove usage of deprecated getColorForTheme function (#49519) 2022-05-26 14:11:44 +01:00
Ashley Harrison
e402b3617b
ValueMapping: Add support for regex replacement over multiple lines (#49607) 2022-05-26 12:19:40 +01:00
Ashley Harrison
8b509eb6dd
Notification history: Enable by default (#49502)
* remove persistNotifications feature flag

* remove unused imports
2022-05-26 12:03:04 +01:00
Todd Treece
94b9c524a8
Prometheus: Streaming JSON parser performance improvements (#48792) 2022-05-24 16:17:11 -04:00
Andrej Ocenas
4124294011
Prometheus: Migrate annotation editor to react (#48814)
* Modify the annotation support api

* Migrate annotation editor component

* Update public/app/features/annotations/standardAnnotationSupport.ts

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

* Move the escape hatches out of the public API

* Fix props transforms

* Break import cycle

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-24 17:43:58 +02:00
Peter Holmberg
7bcc151ae6
Alerting: Add notification policy flow chart (#49405)
* setup component add images

* add name to theme

* add root route info box

* remove unsused

* styling
2022-05-24 10:57:26 +02:00
Joan López de la Franca Beltran
3e4b4dba46
Encryption: Enable envelope encryption by default (#49301)
* Encryption: Enable envelope encryption by default

* Stop relying on feature toggles from settings (deprecated)

* Database encryption docs (envelope encryption)

* Remove deprecated (and no longer used) FT

* Apply suggestions from code review

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-05-24 10:34:47 +02:00
Ashley Harrison
ce86b4ebe7
Navigation: Show starred items in the NavBar (#49219)
* switch saved items to starred items

* hook up redux properly

* Better query + hook up DashList

* update initial state so it's never undefined

* update GetDashboard call

* use new star service

* add scroll + maxwidth to navbar hover menu, sort starred items alphabetically

* increase height, revert changes to CustomScrollbar

* ellipsis!

* update starred dashboard name in navtree

* sort after renaming

* limit to first 50 starred dashboards found
2022-05-23 16:45:46 +01:00
Torkel Ödegaard
c29e6fcb3a
Prometheus/Loki: Improve metric search highlight contrast (#49384)
* Prometheus/Loki: Improve metric search highlight contrast

* Update other places, and add reusable variables
2022-05-23 15:53:45 +02:00
Kristina
a9cc3225ba
Explore: Remove support for legacy, compact format URLs (#49350)
* Remove function, start changing tests

* Fix tests

* Remove deprecated parameter from function
2022-05-23 15:18:49 +02:00
Piotr Jamróz
2d48e75e88
Chore: Remove deprecated DataSourceAPI methods (#49313)
* Remove deprecated metods

* Update docs
2022-05-23 08:26:33 +02:00
sam boyer
a3402641d6
api: Validate dashboards on save via coremodels, behind feature toggle (#48252)
* Add coremodelValidation feature flag

* coremodels: use stubs when feature flag is off

* api: validate dashboards on save

* Need pointer receiver for FeatureManager

* Update dashboard Go model

* Align doc comments

* Include CoremodelRegistry in test

* Wedge coremodel in on all test cases, ugh

* Ugh fix comment again

* Update pkg/framework/coremodel/staticregistry/provide.go

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>

* Update Thema (and its deps) for better errs

* omg whitespace

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-05-22 02:44:12 +02:00
renovate[bot]
be7de1041a
Update Monthly patch updates (#49257)
* Update Monthly patch updates

* remove @types/slate update and run prettier

* fix @types/slate resolution

* lockfile update

* more fixes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-20 13:07:07 +01:00
Gabriel MABILLE
689f51599a
AccessControl: Use RBACBuiltInRoleAssignmentEnabled in the frontend instead of FeatureToggle (#49261)
* AccessControl: Frontend changes to basic role enablement
2022-05-20 06:53:28 +00:00
renovate[bot]
43d924324a
Update dependency sinon to v14 (#49236)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 14:48:30 +01:00
renovate[bot]
258e48678a
Update dependency rollup to v2.74.0 (#49215)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 10:13:16 +01:00
Gabriel MABILLE
5b6d20fbce
Access Control: Remove built-in role assignment by default (#49058)
* Remove FF-bultins

* Add a param to test br-simplifying
2022-05-19 09:29:36 +02:00
renovate[bot]
887adc3d9b
Update dependency @testing-library/react-hooks to v8 (#49180)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 17:02:17 +01:00
renovate[bot]
eecee16b66
Update dependency @rollup/plugin-commonjs to v22 (#49172)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 16:16:55 +01:00
renovate[bot]
7ac9a0a087
Update dependency rollup to v2.73.0 (#49152)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 13:04:21 +01:00
Dominik Prokop
6a5a0e5770
Tooltip: Sort decimals using standard numeric compare (#49084)
* Failing test case

* Compare numeric values not using collator
2022-05-17 16:30:44 +02:00
sam boyer
44956aea66
Incremental improvements to dashboard schema (#48977)
* Change default of style to dark

* Separate cursor into standalone def

* Docs on timepicker and templating fields

Also add what appear to be timepicker-related fields

* Separate out AnnotationQuery definition

* Add memberNames for DashboardCursorSync

* Add sketch of VariableModel for templating field

Also changes label field from frontend from null to optional.

* Use constraints to enforce non-empty panel type

Negation (!="")  was breaking openapi exporter

* Add types and fields for links

* Remove panelVersion fields

These weren't right anyway, and they revealed a bug in the CUE openapi
generator

* Remove null label value from test

* Narrow type and set bounds on month field

* Adapt Go dashboard schema to lineage changes
2022-05-17 12:11:09 +01:00
kay delaney
de3e981985
Chore: Upgrade typescript to 4.6.4 (#49016) 2022-05-17 12:08:10 +01:00
renovate[bot]
d477394d6c
Update dependency @testing-library/user-event to v14.2.0 (#49060)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:25:40 +01:00
Jeff Levin
2691872c7a
remove validatedQueries feature toggle (#48381)
* remove validatedQueries feature toggle
2022-05-16 13:17:05 -08:00
Torkel Ödegaard
a2ebdf2bc2
Revert "Transformation: Added variance and standard deviation (#48844)" (#48997)
This reverts commit 906484b809.
2022-05-16 17:21:23 +02:00
Ieva
f256f625d8
AccessControl: Enable RBAC by default (#48813)
* Add RBAC section to settings

* Default to RBAC enabled settings to true

* Update tests to respect RBAC

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-16 12:45:41 +02:00
Björn Rabenstein
97759c75f4
Prometheus: add support for new _experimental_ sparse histograms/heatmaps (#47801)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-16 02:47:18 +02:00
Todd Treece
87e8521591
Prometheus: Implement Streaming JSON Parser (#48477)
use `prometheusStreamingJSONParser` feature toggle to enable
2022-05-13 20:28:54 +02:00
selvavm
906484b809
Transformation: Added variance and standard deviation (#48844)
* Transformation: Added variance and standard deviation for sample and population. Modified mean calculation approach

* Transformation: Removed existing mean calculation

* Transformation: Added testcases for variance and Standard deviation

* Update docs/sources/panels/calculation-types.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-05-11 17:16:41 -07:00
Connor Lindsey
c1b5ea3e54
Tracing: Add trace to metrics config behind feature toggle (#46298)
* Add trace to metrics behind feature flag
2022-05-05 14:46:18 -06:00
Josh Hunt
1a633812a7
DashboardSettings: Update active tab to use new brand gradient (#48755)
* DashboardSettings: Update active tab to use new brand gradient

* Remove colons from gradients
2022-05-05 17:10:06 +01:00
Josh Hunt
af57804513
Tooltip: Make tooltip use secondary background color for legible links (#48748) 2022-05-05 14:28:45 +01:00
Giordano Ricci
143810bb95
Explore: simplify support for multiple query editors (#48701)
* Explore: simplify support for multiple query editors

* CloudWatch: remove usage of deprecated plugin methods

* Apply suggestions from code review

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

* Update docs/sources/developers/plugins/add-support-for-explore-queries.md

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

* Update docs/sources/developers/plugins/add-support-for-explore-queries.md

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

* run prettier

Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-05 10:36:50 +01:00
Josiah (Jay) Goodson
570ff074f6
Transformations: Add an All Unique Values Reducer (#48653) 2022-05-04 11:58:46 -07:00
Adam Simpson
b2644de6c8
AzureMonitor: add feature toggle azureMonitorExperimentalUI for migrating to experimental UI (#48658)
* feat: add feature toggle azureMonitorExperimentalUI

Add QueryHeader which adds an experimental header to AzureMonitor. This work is documented in #44432.
2022-05-04 13:54:09 +00:00
renovate[bot]
46e53cf42c
Update dependency @rollup/plugin-node-resolve to v13.3.0 (#48645)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 17:17:55 +01:00
Will Browne
4ecd57f49c
Plugins: Introduce HTTP 207 Multi Status response to api/ds/query (#48550)
* feature toggles

* return HTTP 207 from ds/query

* add ft check

* add API test

* add 207 check for qr

* change to OR

* revert check

* add explicit toggle check for cloudwatch

* remove unused import

* remove from defaults.ini

* add status codes to md and update swagger

* new fangled http api tests pattern

* update swagger

* Update docs/sources/http_api/data_source.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* add missing word and reformat

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-05-03 18:02:20 +02:00
Leon Sorokin
a927608cf5
Chore: uPlot 1.6.20 (#48596) 2022-05-03 05:22:14 -06:00
Ryan McKinley
a8f3b17262
SaveDashboard: remove feature flag for save drawer (#48462) 2022-05-02 09:29:22 -07:00
Ivana Huckova
656cd4c8dd
Logs: Fix pagination skipping entries (#48413)
* Logs: Add pagination range to prevent pagination from skipping entries

* Revert "Logs: Add pagination range to prevent pagination from skipping entries"

This reverts commit 2e7a6b3870.

* Refactor

* Update
2022-05-02 16:46:47 +02:00
Shirley
7bb4f5cd9b
CloudWatch: Add dynamic labels feature toggle (#48498) 2022-04-29 11:43:04 +02:00
Josh Hunt
eeaa160ae8
Fix: Prevent automatic parsing of string data types to numbers (#46035)
* Fix: Render unitless strings as strings from displayProcessor

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>

* update tests

* Rename none unit

* rename none unit to Number

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
2022-04-28 16:07:22 +01:00
tomxwang
af8fbc16d6
no value should use decimals (#48155) 2022-04-28 15:04:57 +01:00
kay delaney
3b4d237ade
Notifications: Hide display of trace ID behind feature flag (#48057)
* Notifications: Hide display of trace ID behind feature flag
2022-04-26 14:31:27 +01:00
Ashley Harrison
53fcb7e171
Transformations: Allow more complex regex expressions in Rename by regex (#48179)
* Support proper regex in renameByRegex transformation

* remove unused import
2022-04-26 11:28:04 +01:00
Ashley Harrison
e420252d45
move saved items feature behind separate feature toggle (#48117) 2022-04-26 11:27:01 +01:00
Ivana Huckova
98161be9ad
Query history: Pass config to frontend and add missing documentation (#48204)
* Query history: Pass config to frontend and add missing documentation

* Update
2022-04-26 11:15:08 +02:00
Ryan McKinley
e0aeb83786
Export: introduce export plumbing (behind dev feature flag) (#48091) 2022-04-25 16:59:18 -07:00
Adam Simpson
6c0a5b121e
CloudWatch: prevent log groups from being removed on query change. (#47994)
* CloudWatch: prevent log groups from being removed on query change.

Previously when a query was changed the existing log groups for that query were "dropped". The fix is to combine the
new query with the existing query object in memory to preserve the log groups.

fixes #33626

* CloudWatch: fix typos in runWithRetry documentation

* chore: fix eslint issue
2022-04-25 17:59:52 +00:00
Kristina
b30d9f2732
Explore: Fix height on horizontal drawer and query inspector (#47832)
* Move tab height and horizontal drawer height to themable variables so they can be referred to. Add a default height to tabbed container so it can set an explicit height. Add overflow: scroll to inspector content

* Use height variable that changes on resize

* Use css to set height
2022-04-25 07:48:55 -05:00
Artur Wierzbicki
2e599643f6
Previews: refactor (#47728)
* #44449: return standard thumb service even if auth setup fails

* #44449: remove dashboardPreviewsScheduler feature flag

* #44449: externalize dashboardPreviews config

* #44449: disable previews by default

* #44449: rename logger

* #44449: dashboardPreviewsAdmin feature requires dev mode

* #44449: retrigger CII
2022-04-25 01:55:10 +04:00
Josh Hunt
3c6e0e8ef8
Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
Kristina
3e7db088ac
Command Palette Scaffolding + Explore (#47445)
* Add feature flag and scaffodling

* start adding actions

* WIP

* move action files

* Start adding styles

* Fix implementation based on feedback

* Add more hackathon code back to command palette

* Cleanup

* Cleanup unused service files for simple MVP pass

* Move type def to library

* WIP

* Move provider to proper place to pick up other routes’ actions

* Build actions off navbar, add explore actions

* Work around undefined typescript stuff

* Fix based on feedback

* close palette on ESC

* Fix based on PR feedback pt 1

* Move styles to classes

* Move another inline style to a class

* Enable command palette by default

* change around async hook structure

* Add simple feature tracking

* Code cleanup, and be sure the command is accurate

* Change to only render if there are actions, and only add actions once past login
2022-04-21 16:50:34 -05:00
owensmallwood
9a4bd1f2d4
Usage insights query caching (#47893)
* Updates queryResponse tests to include new cachedResponse bool

* Adds cachedResponse bool to QueryResponse

* Adds tests to assert the correct query counts (totalQueries and cachedQueries) are dispatched for data-requests

* Adds totalQueries and cachedQueries counts to the data-request events

* Adds new metrics and their descriptions to docs

* uses more descriptive variable name

* changes naming

* removes hyphen in docs

* extracts calculations to own lines prior to assignment
2022-04-21 09:16:13 -06:00
renovate[bot]
03cf38e659
Update dependency @testing-library/user-event to v14.1.1 (#47008)
* Update dependency @testing-library/user-event to v14.1.1

* make this test more consistent

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-04-21 13:44:36 +01:00
Vardan Torosyan
a0553de8dd
Rename FGAC to RBAC in the codebase (#48051) 2022-04-21 14:31:02 +02:00
Ashley Harrison
d832bde270
Upgrade @testing-library/user-event to v14 (#47898)
* Update dependency @testing-library/user-event to v14

* everything is async...

* everything is async pt.2

* Fix cascader tests

* hack the yarn.lock file to remove the old version of @testing-library/dom

* some more fixes!

* MOAR FIXES

* more fixes

* remove a bunch of places where we're wrapping in act()

* down to 7 failing tests...

* Fix arrow tests

* Fix rest of NavBarItem tests

* Fix last tests

* Use {Enter} instead of {enter}

* Revert "Use {Enter} instead of {enter}"

This reverts commit e72453bb52.

* remove some unused act imports

* Fix LibraryPanelsSearch tests

* more stable test

* More consistent test...

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-21 13:15:21 +01:00
Eric Leijonmarck
8677552dda
Service accounts: rename feature toggle (#48037)
* refactor: renaming service-accounts to serviceAccounts

* refactor: renaming service-accounts to serviceAccounts in docs

* tests
2022-04-21 10:41:37 +01:00
Alex Khomenko
6c1994cb86
Use trialExpiry for determining if a user is on trial (#47975) 2022-04-20 21:37:54 +03:00
kay delaney
c48d8d1d48
Frontend: Add notification persistence behind feature flag (#47871) 2022-04-20 10:42:32 +01:00
kay delaney
ff60f39e96
Revert "DataLinks: Encode variable params for data link URLs (#46100)" (#47763)
This reverts commit b47f5433d7.
2022-04-20 10:15:36 +01:00
Leon Sorokin
aa98123e72
TimeSeries: always try to detect & fix reverse-sorted time field (#47906) 2022-04-19 23:20:09 -05:00
Torkel Ödegaard
057ff5bcf5
Prometheus: Query builder UX tweaks and feedback link (#47655)
* Prometheus: Query builder UX tweaks and feedback link

* Remove .

* Fixed link

* added option to hide feedback links

* feedback link setting name change

* move config check

* fixed ts issue
2022-04-14 15:18:03 +02:00
Torkel Ödegaard
6f31a69bfd
QueryEditorRow: Show query errors next to query in a consistent way across Grafana (#47613)
* Show query errors under each query row

* Testing a more plain error box

* Font size

* Make it green

* Nit UI

* Slight simplification of condition

* New design

* Update

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-04-14 12:57:56 +02:00
Connor Lindsey
939a778111
NodeGraph: Detect dataframes more accurately based on fields (#47213)
* NodeGraph: Detect dataframes more accurately based on fields

* Make get fields case insensitive

* Update node graph docs
2022-04-13 17:18:40 +02:00
Jack Westbrook
c3db3121b0
Chore: Bump moment to 2.29.2 (#47680)
* chore: bump moment to 2.29.2

* chore(yarn): clean up remaining moment nested deps
2022-04-13 14:46:58 +02:00
Maria Alexandra
85de0d88c7
Navigation: Show only + icons in overlay menu for new NavBar (#47347)
* Nav: Show overlay icons based on allowed list

* user essentials mob! 🔱

* Navigation: clean up and use new backend prop to show plus icons and
improve visual styling

* Nav: Fix top padding

* refactor to not use showIconInNavbar in NavBarMenuItem

* remove a missed bit

* refactor icon into const

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-04-12 14:51:40 +01:00
Jack Westbrook
398f2b3d18
Build: Fix failing recompile of Grafana packages (#47492)
* build(packages): remove incremental as cache fails to recompile

* build(packages): remove tsBuildInfoFile property from tsconfig files
2022-04-11 09:41:03 +02:00
Josh Hunt
416da59c43
Routing: Fix links to different port from being treated as internal links (#45192)
* Add some failing tests that trigger the bug

* start at refactor of stripBaseFromUrl
2022-04-08 10:44:17 +01:00
Gábor Farkas
9574f447bb
grafana-data: removed DataQueryRequest.reverse (#47487) 2022-04-08 12:00:16 +03:00
Jeff Levin
4a4d87dbdc
add public dashboards feature flag (#47364) 2022-04-07 10:30:19 -08:00
renovate[bot]
fba31c2708
Update dependency @testing-library/dom to v8.13.0 (#47423)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 14:25:16 +01:00
Tania
1c13bfdd1b
Chore: Update pre version (#47438) 2022-04-07 14:32:37 +02:00
Giordano Ricci
ca286a238d
Explore: Add explore2Dashboard feature toggle (#47395) 2022-04-07 09:26:01 +01:00
Victor Marin
0639ccbdff
Histogram Panel: Take decimal into consideration (#47330) 2022-04-07 09:56:23 +03:00
Josh Hunt
1b27e55e5a
Analytics: Identify users to Rudderstack by externalUserId where available (#47325)
* wip

* tests

* move util, fix test

* fixes

* Update public/app/core/services/echo/utils.ts

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

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-04-05 17:41:22 +02:00
Derik Evangelista
8428446466
table panel: assume string dates to be on UTC (#47246)
* add tests for display processor relating to datetimes as strings

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-04-04 16:05:06 +01:00
CommanderRoot
d29b8e8858
Chore: Replace deprecated String.prototype.substr() (#46763)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-04-04 11:08:06 +02:00
Alexander Weaver
b8e277ee4c
Alerting: Create feature toggle for provisioning (#47167)
* Create feature flag for alerting provisioning

* Fix tabs for golint compliance
2022-04-01 08:32:00 +02:00
Joe Blubaugh
c5cfc1645a
packages/grafana-data/text: Improve escaping for special characters (#47066)
FilterInput escapes all input strings for special characters that might
be used in a RegExp by calling escapeStringForRegex, and using
unEscapeStringFromRegex for display. Both of these functions used
string.prototype.replace() for escaping. replace() only replaces the
first occurence of a search string unless called with a global RegExp.
The output of these functions was not necessarily safe to compile into a
RegExp literal.

This change creates RegExps for escapeStringForRegex and
unEscapeStringFromRegex to match all occurrences of the special
characters instead of just their first occurrence. This makes a variety
of strings safe for RegExp compilation.
2022-03-31 22:34:34 +08:00
Gabriel MABILLE
0d87de153a
AccessControl: Add a feature flag for the builtin role simplification (#47062)
* AccessControl: Add a feature flag for the builtin role simplification

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Update standardDeatureFlags instead

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-03-31 11:40:57 +02:00
Ashley Harrison
3d23722b30
Update @types/lodash everywhere (#47020)
* Update @types/lodash everywhere

* Update @grafana/e2e as well
2022-03-31 10:19:33 +01:00
Ryan McKinley
abeb08bc98
PanelInspect: show dataframe JSON in JSON view (#47071) 2022-03-30 19:58:49 +02:00
Ryan McKinley
edf384c730
DashboardSave: use a feature flag for drawer behavior (#46972) 2022-03-30 10:07:41 -07:00
Nathan Marrs
4449439a41
Search: Implement basic improved UI (#46758) 2022-03-30 09:50:32 -07:00
kay delaney
f1c3177e79
Chore: Add type info for grafana boot data (#45322)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-03-30 10:48:58 +01:00
renovate[bot]
6c86f26881
Update dependency ol to v6.14.1 (#46982)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-29 08:50:04 -07:00
Cameron Waterman
8426cfe400
Profile/Help: Expose option to disable profile section and help menu (#46308)
* Expose option to disable help menu

* Expose option to disable profile menu

* Add Profile FeatureTogglePage

* Update public/app/features/profile/FeatureTogglePage.tsx

Uptake PR wording suggestion.

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

* Fix front end lint issue

* Fix back end lint issue

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-29 16:27:53 +01:00
Jack Westbrook
30d0219de8
Chore: Remove deprecated @types/braintree__sanitize-url package (#47003) 2022-03-29 14:57:14 +02:00
renovate[bot]
6218ca4725
Update dependency @testing-library/dom to v8.12.0 (#46981)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 17:45:42 +00:00
Ashley Harrison
c13f4542d8
Dashboard: Template variables are now correctly persisted when clicking breadcrumb links (#46790)
* Add history listener to update titleHref/parentHref when location changes

* Convert to functional component and use useLocation

* Wrap component in React.memo

* Add new `getUrlForPartial` method, deprecate `updateSearchParams`
2022-03-24 16:01:43 +00:00
renovate[bot]
7b23c7fe1e
Update Monthly patch updates (#46875)
* Update Monthly patch updates

* Remove 3 packages...

* Fix type error

* undo cypress upgrade

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-03-23 14:56:44 +00:00
Torkel Ödegaard
72b6f64df9
Theme: Increase contrast for overlays and drawers (#46630) 2022-03-23 14:47:33 +01:00
Adela Almasan
576b73ed48
Updated bucket size/offeset settings; Check for negative values in bucket size (#46754) 2022-03-18 18:47:34 -05:00
Tom
ea7d5a6185
Transformers: Add template variable substitution (#44486)
* Transformers: Add template variable replacement to transformer operator

* Transformers: Add template variable replacement to calculateField transformer

* Transformers: Add scopedVars to transformer template replacement

* Transformers: Add calculateField template variable test

* Transformers: Fix 'undefined' is not assignable to type 'string'

* Transformers: Fix lint-frontend bug

* Fix lint check

* Fix lint
2022-03-18 10:25:53 +00:00
Ryan McKinley
1cfb9a4a19
Storage: add basic storage service (#46604) 2022-03-17 10:19:23 -07:00
Sarah Zinger
275f33cf37
Azure Monitor: Add feature gating for new MetricsQueryEditor with resource picker (#46124)
* Azure Monitor: Use feature toggle for dev of new UI for Metrics Queries.

* Fixes after CR
2022-03-14 15:07:45 -04:00
Artur Wierzbicki
ed924b3d0c
Storage: list filtering and root folder support (#46453)
* git the things: FS api internal changes

* remove filestorage/service.go

* remove filestore flag

* remove dummy fs

* readd fileblob import
2022-03-11 22:08:19 +04:00
Andrej Ocenas
b3f8079f4f
Prometheus: Add title to metrics in the metric select with metric help text (#46406)
* Add title to metrics in the select

* Add some comments

* Fix tests
2022-03-10 16:58:25 +01:00
Leon Sorokin
ec911be8ef
Perf: don't re-init plots when changing dashboard timeRange (#46339) 2022-03-09 01:51:07 +01:00
Torkel Ödegaard
79e5e5c024
DataSource: Default data source is no longer a persisted state but just the default data source for new panels (#45132)
* PanelEdit: Change the meaning of default data source to be just that the default for new panels

* Added migration, and also migration for annotation datasource prop to data source refs

* fix

* Fixing tests

* Fixes to annotation

* Fixing unit test
2022-03-08 08:56:12 +01:00
Leon Sorokin
0ee552dd65
LegacyBrowser: fix Safari 13.1 (lacks logical nullish assignent) (#46260) 2022-03-07 09:21:28 -06:00
renovate[bot]
801d751b20
Update dependency rollup to v2.70.0 (#46275)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 08:59:50 +01:00
kay delaney
b47f5433d7
DataLinks: Encode variable params for data link URLs (#46100) 2022-03-04 17:05:56 +00:00
Levente Balogh
c331af93b9
Plugins: allow using both Function and Class components for app plugins (#46148)
* fix: make it possible to use both class and functional components for plugins

* fix: accept both class and functional components as plugin root pages

* refactor: import types by name

* refactor: use `ComponentType`
2022-03-04 09:52:59 +01:00
Jack Westbrook
efe9eed758
Chore: Move Typescript cache file to root (#45964)
* chore(typescript): move TS cache file to root of repo

* chore(typescript): cache packages ts checks to disk for faster yarn typecheck
2022-03-04 09:26:25 +01:00
renovate[bot]
e820275d06
Update dependency @braintree/sanitize-url to v6 (#46052)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-03 11:56:42 +00:00
renovate[bot]
52568c7af1
Update dependency ol to v6.13.0 (#45949)
* Update dependency ol to v6.13.0

* fix types

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-03-03 09:45:33 +01:00
Artur Wierzbicki
a8b90d9a25
FileStore: add basic file storage API (#46051)
* #45498: fs API alpha

* #45498: remove grafanaDS changes for filestorage.go

* #45498: fix lint

* #45498: fix lint

* #45498: remove db file storage migration

* #45498: linting

* #45498: linting

* #45498: linting

* #45498: fix imports

* #45498: add comment

* remove StorageName abstractions

* FileStore: add dummy implementation (#46071)

* #45498: bring back grafanaDs changes, add dummy filestorage

* #45498: rename grafanaDs to public

* #45498: modify join

* #45498: review fix

* #45498:  unnecessary leading newline (whitespace) IMPORTANT FIX

* #45498: fix belongsToStorage

* #45498: fix removeStoragePrefix so that it works with abs paths

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-03-03 10:53:26 +04:00