Commit Graph

463 Commits

Author SHA1 Message Date
Matias Chomicki
c0b3cd3da0
refactor(loki-derived-fields): migrate test to testing library (#54729) 2022-09-07 08:54:28 +00:00
Adela Almasan
3864de9425
Geomap: Cleanup GeomapPanel component (#54538) 2022-09-06 21:22:34 -04:00
kay delaney
a70aba1384
Chore: Update slate and related packages (#54566)
* Chore: Update slate and related packages
2022-09-06 15:23:48 +01:00
Matias Chomicki
5767c01a79
Elasticsearch: fix types in test and add mock factory (#54582)
* refactor(elastic-test): add datasource mock factory

* refactor(elastic-test): use new factory and attempt to fix some type issues

* refactor(elastic-test): type fixes

* refactor(elastic-test): update test with mock changes

* refactor(elastic-test): remove commented code

Git history should be more than enough to go back to previous revisions instead of keeping commented code.

* refactor(elastic-test): use mock factory and fix type issues in language provider test

* Chore: rename mock parameter

* Chore: remove unnecessary conditional

* Chore: remove ts-expect-error
2022-09-06 14:35:54 +02:00
Josh Hunt
139705611a
Chore: Remove remaining IconName type assertions (#54658)
* Chore: Remove remaining IconName type assertions

* fix lints
2022-09-06 09:15:36 +01:00
Ryan McKinley
ac93cf1db2
Playlists: Migrate to UIDs and load dashboards in the frontend (#54125) 2022-09-05 20:40:01 -07:00
ismail simsek
3ea9ece16e
Update graphite datasource testing query (#54635)
* Provide from and to parameters when testing the datasource

* Strongly typed test datasource query
2022-09-05 20:59:44 +02:00
GitStart
d5d7e920a0
Loki: Remove any from public/app/plugins/datasource/loki/components/LokiOptionFields.test.tsx (#54239) 2022-09-05 18:25:12 +02:00
Torkel Ödegaard
11de1dfe40
TopNav: Plugin page layouts / information architecture (#53174)
* Change nav structure when topnav is enable to do initial tests with new information architecture

* Support for nested sections

* Updated

* sentance case

* Progress on plugin challange

* Rewrite to functional component

* Progress

* Updates

* Progress

* Progress on things

* missing file

* Fixing issue with runtime, need to use setter way to set component exposed via runtime

* Move PageLayoutType to grafana/data

* Fixing breadcrumb issue, adding more tests

* reverted backend change

* fix recursive issue with cleanup
2022-09-05 14:56:08 +02:00
Victor Marin
6d2352735d
XYPanel: Improvements (#54220)
* Fix panel option bugs and make tooltip options work

* Support multiple series in explicit mode. Rename XY/Explicit to Auto/Manual

* Fixes

* Fix

* Legend improvements

* Rewrite Pure Component to Function Component

* Add datalinks support

* Legend fixes and CR modifications

* Fix bugs that crash panel
2022-09-05 11:03:17 +03:00
Ashley Harrison
0ab548a8b5
Chore: fixing some anys/type assertions (#54661)
* fixing some anys/type assertions

* make types consistent
2022-09-02 16:39:09 +00:00
Leon Sorokin
28426219ce
TimeSeries: fix padding, force 0-100% y range when % stacked (#54197) 2022-09-02 09:26:04 -05:00
Ashley Harrison
3e8d178fc1
convert LokiQueryEditor test to RTL (#54639) 2022-09-02 15:11:13 +01:00
Ashley Harrison
22e5ee3b52
update LokiExploreQueryEditor test to RTL (#54644) 2022-09-02 14:46:14 +01:00
Ashley Harrison
11689c0385
convert ConfigEditor test to RTL (#54636) 2022-09-02 12:48:37 +01:00
Josh Hunt
3cf8e9c72e
Chore: Remove grafana-ui IconName type assertions (#54623) 2022-09-02 11:31:16 +01:00
Dominik Prokop
4ec03bad64
Revert 54400 (#54570)
* Revert "Add FocusScope to PanelEditor when open in the Dashboard Page so that a11y focus never catches invisible content. (#54400)"

This reverts commit ef32050508.

* Betterer <3
2022-09-01 05:42:06 -07:00
Josh Hunt
c3633feea8
Chore: Remove Dashboard IconName type assertions (#54573)
* Chore: Remove Dashboard IconName type assertions

* fix lint
2022-09-01 13:26:28 +01:00
Josh Hunt
caa0c91b1c
Chore: Remove Nav + story IconName type assertions (#54572)
* Chore: Remove some IconName type assertions

* fix actually importing the function

* fix lint

* fix lint
2022-09-01 13:23:41 +01:00
Josh Hunt
f15ce633c9
Navigation: Don't round app plugin icon images (#54543)
* Navigation: Don't round app plugin icon images

* round icon
2022-09-01 10:28:50 +01:00
Ashley Harrison
db4a2d58a1
convert DerivedField test to RTL (#54334) 2022-08-30 10:28:06 +01:00
Ashley Harrison
5e394c0385
Convert influxdb ConfigEditor test to RTL (#54332) 2022-08-30 09:30:10 +01:00
Adela Almasan
89236cf418
Geomap: Cleanup (#54415) 2022-08-29 17:34:42 -04:00
Ezequiel Victorero
722aca5c53
Public Dashboards: use intervalMs and maxDataPoints from request (#53613) 2022-08-29 18:13:06 -03:00
Nathan Marrs
3be3b02f59
Geomap: cleanup (#54328) 2022-08-26 16:03:20 -05:00
Brendan O'Handley
20d0aa9904
OpenTsdb: migrate annotations from angular to react (#53856)
* remove annotation angular dependency and migrate annotations

* add nullish coalescing operator

* remove annotations angular partial

* make annotation queries code and errors more readable

* handle the betterer issue with '^ Unexpected any. Specify a different type' at top of file

* run precommits

* run prettier
2022-08-26 13:44:10 -04:00
Ryan McKinley
2db6a199b8
Preferences: Support setting any dashboard as home, not just the starred ones (#54258) 2022-08-26 12:40:40 -04:00
Giordano Ricci
26524e3ff1
GrafanaUI: Fix styles for invalid selects & DataSourcePicker (#53476)
* GrafanaUI: fix styles for invalid select & DataSourcePicker

* Apply suggestions from code review

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

* fix focus issues & tests

* remove unused import

* TypeScript work in progress

* Move react select props to types.ts

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
2022-08-26 13:48:51 +01:00
Ashley Harrison
91948ce554
Convert elasticsearch ConfigEditor.test.tsx to RTL (#54301) 2022-08-26 13:29:31 +01:00
Matias Chomicki
cd617b6520
Loki: refactor mock instance creation and clean up datasource test (#54176)
* refactor(loki-test): move mock creation to mock module

* refactor(loki-test): allow to pass custom settings to the mock constructor

* refactor(loki-test): refactor mock factory in datasource test

* refactor(loki-test): revert change in undefined test case for dsMaxLines

* refactor(loki-test): move type assertion to mock definition

* refactor(loki-test): fix more type issues

* refactor(loki-explore-query-editor): refactor test to use createLokiDatasource() and fix type issues

* refactor(loki-test): replace makeMockLokiDatasource with metadataRequest factory

* fix: remove any

* fix(loki-test): fix remaining usages of any

* Fix: add missing exported type
2022-08-26 09:26:48 +02:00
GitStart
468597b687
Elasticsearch: Remove any from public/app/plugins/datasource/elasticsearch/components/AddRemove.test.tsx (#54232)
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>
Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: juliopiubello <juliopiubellow@gmail.com>
2022-08-25 17:33:16 +02:00
Dominik Prokop
8eac5706fd
AdHoc variable: Correctly preselect datasource when provisioning (#54088)
* Adhoc variable: Correctly preselect datasource when provisioning

* Fix test

* Remove data sources from ad hoc variable state in favor of DataSourcePicker
2022-08-25 00:56:45 -07:00
Torkel Ödegaard
264645eecd
TopNav: Dashboard settings (#52682)
* Scenes: Support new top nav

* Page: Make Page component support new and old dashboard page layouts

* Pass scrollbar props

* Fixing flex layout for dashboard

* Progress on dashboard settings working with topnav

* Updated

* Annotations working

* Starting to work fully

* Fix merge issue

* Fixed tests

* Added buttons to annotations editor

* Updating tests

* Move Page component to each page

* fixed general settings page

* Fixed versions

* Fixed annotation item page

* Variables section working

* Fixed tests

* Minor fixes to versions

* Update

* Fixing unit tests

* Adding add variable button

* Restore annotations edit form so it's the same as before

* Fixed semicolon in dashboard permissions

* Fixing unit tests

* Fixing tests

* Minor test update

* Fixing unit test

* Fixing e2e tests

* fix for e2e test

* fix a11y issues

* Changing places Settings -> General

* Trying to fix a11y

* I hope this fixes the e2e test

* Fixing merge issue

* tweak
2022-08-24 18:05:12 +02:00
Ashley Harrison
211c9991c5
Navigation: Add responsive behaviour to ToolbarButtonRow (#53739)
* hacky first attempt

* slightly cleaner...

* behaviour mostly working...

* remove unnecessary wrapper

* css tweaks

* much cleaner implementation with intersectionobserver

* set style props directly on children

* separate story, integrate when toggle is off

* improve story, integrate when toggle is on

* remove styles from DashNavTimeControls

* mock IntersectionObserver for all unit tests

* prettier

* don't use dropdown anymore

* add some basic documentation

* add right alignment to scenes toolbarbuttonrow

* just use the react children api to prevent duplicating children
2022-08-24 11:19:36 +01:00
Matias Chomicki
1642716978
Chore(loki): remove any from DerivedFields test (#53547) 2022-08-24 10:06:28 +02:00
Leon Sorokin
530dd63ac6
TimeSeries: Fix crash when min >= max in config (#54069)
* TimeSeries: fix crash when min === max in config

* stat sparkline, too

* better types
2022-08-23 01:00:42 -07:00
Ashley Harrison
3cf95d7eee
Chore: fix some anys pt.2 (#53928)
* correctly type some more any's

* undo this change for now...
2022-08-22 16:51:33 +01:00
Josh Hunt
2b17e5354a
Chore: Remove needless eslint ignore comment from variable utils (#54050) 2022-08-22 16:50:24 +01:00
Gábor Farkas
35253a909d
Elasticsearch: remove already-disabled code (#52932)
* elastic: removed unused code from go-part

* elastic: removed unused code from js-part
2022-08-22 16:25:20 +02:00
Josh Hunt
9db9ebce02
Typed variables pt6: Clean up and test variable type guards (take 2) (#54025)
* Add fixture-factories for all variable types

* clean up variable guards

* add tests for isMulti, hasCurrent, and hasOptions variable type guards

* create VariableSupport type to try and work around ts wonkiness
2022-08-22 14:45:40 +01:00
Ashley Harrison
0f4b8c5e54
convert AzureCredentialsForm test to RTL (#53959) 2022-08-22 13:22:19 +01:00
Ashley Harrison
f91f05f32c
Chore: convert DebugSection test to RTL (#53965)
* convert DebugSection test to RTL

* remove unused import
2022-08-22 13:19:46 +01:00
Victor Marin
cbe4fb4dab
TablePanel: Fix vertical scrollbar (#53457)
* TablePanel: Fix vertical scroll

* Fix vertical scrollbar with virtualized rendering

* betterer

* Refactor prop
2022-08-22 13:41:05 +03:00
Ashley Harrison
0b322a0f5d
fix some anys (#53789) 2022-08-19 16:46:58 +01:00
Ashley Harrison
b6835ef87d
convert TestRuleResult to RTL (#53953) 2022-08-19 15:00:53 +01:00
Oscar Kilhed
eedc7f1831
Update betterer results because of #53806 (#53884) 2022-08-18 06:36:12 -04:00
Brendan O'Handley
085258c035
Influxdb Datasource: Remove angular dependencies for Influxdb influxql annotations (#52546)
* migrate influxQL annotations to react and build new annotation editor

* use es-lint ignore for any type in migration

* changes for PR comments

* handle annotation editor on load error without query

* correct label for ann editor query

* add null coalesce operator and remove comment

* fix tooltip
2022-08-17 13:20:46 -04:00
Andrej Ocenas
f30795b088
Prometheus: Throw error on direct access (#50162)
* Disable direct access

* Hide access select if Server mode is already selected

* Update docs

* Add more tests

Co-authored-by: Beto Muniz <contato@betomuniz.com>
2022-08-17 09:37:29 -03:00
Matias Chomicki
8d69acb9f8
Chore(loki): remove any from LokiQueryField test (#53548) 2022-08-11 18:08:23 +02:00
Matias Chomicki
df8d1de94f
Chore(loki): remove any from config editor test (#53475) 2022-08-11 18:08:05 +02:00
Ashley Harrison
6cdeeeda3c
remove UseState from last 2 stories (#53596) 2022-08-11 16:28:22 +01:00
Josh Hunt
44ea98b24f
Chore: Ignore type assertions in __mocks__ (#53593) 2022-08-11 14:06:15 +00:00
Ivan Ortega Alba
6423485061
Preferences: Use search endpoint to get missing dashboard (#53540) 2022-08-11 10:34:01 +02:00
Josh Hunt
081d6e9d3e
Typed variables pt5: Remove generics from getInstanceState (#53018)
* 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

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* use typescript/no-redeclare for compatibility with ts overloads

* remove generics from getVariable() and overload it to only return undefined based on arguments

* update usages of getVariable()

* Remove generic from getInstanceState

* update usages of getInstanceState

* fix lint
2022-08-10 16:06:49 +01:00
Ashley Harrison
f32c0058a1
remove UseState from legacy Select story (#53519) 2022-08-10 15:30:02 +01:00
Ashley Harrison
e51c80f8dd
Storybook: remove UseState from ButtonSelect story (#53509)
* remove UseState from ButtonSelect story

* leave this type assertion for now
2022-08-10 07:00:19 -04:00
Ashley Harrison
aaccb592cc
remove UseState from Drawer story (#53503) 2022-08-10 11:40:33 +01:00
Kian Eliasi
e3c50f0cd6
Chore: Remove any from public/app/plugins/datasource/elasticsearch/hooks/useNextId.test.tsx (#53427)
* Remove any from public/app/plugins/datasource/elasticsearch/hooks/useNextId.test.tsx

* Fix lint and update betterer results
2022-08-10 09:25:35 +02:00
eledobleefe
9930fd522d
Chore: convert DashboardGrid test to RTL (#53405) 2022-08-08 17:43:35 +02:00
Ivana Huckova
84b2498150
Loki: Fix showing of unusable labels field in detected fields (#53319)
* Loki: Fix showing of labels field in detected fields

* Create reusable createlogRow mock
2022-08-08 14:27:33 +02:00
Matias Chomicki
6f01930e9d
Chore: remove any from test (#53260) 2022-08-08 11:26:12 +02:00
Leo
64967325b2
Search: Migrated impressions to use dashboardUID (#53090)
* used dashboarduid in impressions

* handle scenario to convert all ids saved in storage to uids
2022-08-08 11:13:19 +02:00
Josh Hunt
4b4d546e32
Typed variables pt4: Remove generics from getVariable (#53017)
* 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

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* use typescript/no-redeclare for compatibility with ts overloads

* remove generics from getVariable() and overload it to only return undefined based on arguments

* update usages of getVariable()

* Fix Interval variable options picker not working
2022-08-05 13:44:52 +01:00
eledobleefe
c65b4c732f
Chore: Convert FolderSettingsPage.test.tsx to RTL (#53307) 2022-08-04 16:00:04 +02:00
Drew Slobodnjak
fe0f193189
Geomap: Add measuring tools (#51608)
* Geomap: add measuring tools

* Add measure type selection

* Add controls and state to measure overlay

* Override tooltip mouse events when menu active

* Move measure tools to top right

* Lay groundwork for units and consolidate measuring

* Create measure vector layer class

* Improve styling to match other overlay controls

* Consolidate styling and use theme2

* Update unit language and add km2

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-03 16:19:30 -07:00
Matias Chomicki
97ce40577b
Loki: Fix types in querybuilder state test (#53223)
* Chore: add missing refId property to LokiQuery type

* Chore: fix types in Loki querybuilder state test

* Chore: remove unnecessary added property to LokiQuery
2022-08-03 15:59:33 +02:00
Ivana Huckova
3877964470
Loki: Remove some of any assertions from tests (#53114)
* Loki: Remove some of any assertions from tests

* Remove unnecessary as assertions
2022-08-03 15:57:38 +02:00
ismail simsek
87af08129c
Prometheus: Add tests for new explain section (#53182)
* Prometheus: Add tests for new explain section

* Update public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryBuilder.test.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Mock MonacoQueryFieldWrapper

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-03 15:48:16 +02: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
Josh Hunt
c7d3fec515
Typed variables pt3: Type VariableState with TypedVariableModel (#53015)
* 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

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* undo whatever changes i did to swagger spec
2022-08-03 12:38:59 +01:00
user10x
fb00a11b5f
rename table_model.ts => TableModel.ts (#51659)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-03 10:33:13 +00:00
Scott Lepper
fe7add0bc6
ref experimental query editor (#53061)
* ref experimental query editor
2022-08-02 11:44:06 -04:00
Ivana Huckova
5009c330ca
Loki: Add tests for explain section in builder and code editor (#53113)
* Loki: Add tests for new explain section

* Update any assertions
2022-08-02 17:20:22 +02:00
Ashley Harrison
9c6aab3bc9
Chore: remove UseState + add support for controls in TimeOfDayPicker/TimeRangeInput story (#53040)
* remove UseState + add support for controls in TimeOfDayPicker story

* remove UseState + add controls support in TimeRangeInput story

* Add documentation + fix error when clearing

* properly type range
2022-08-02 13:33:59 +01: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
Adela Almasan
5797fbc0b2
Canvas: Cleanup default elements (#52958) 2022-08-01 15:34:05 -05:00
Nathan Marrs
7b249d19b2
Canvas: Inline element settings (#52771) 2022-08-01 12:22:13 -05:00
Konrad Lalik
54f2c056f5
Alerting: Configure alert manager data source as an external AM (#52081)
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-08-01 10:20:43 +02:00
Ryan McKinley
197acd73c0
Storage: support git + github backed roots (#52192) 2022-07-28 23:26:44 -07:00
ismail simsek
2f9636e698
InfluxDB: move datasource health check to backend (#52668)
* Move datasource health check to backend

* Introduce healthcheck unit tests

* Remove unused method
2022-07-28 12:06:09 +02:00
Leon Sorokin
8ee0555bac
TimeSeries: Implement auto decimals for y axes (#52912) 2022-07-28 02:58:42 -04:00
Ryan McKinley
8a2d40c2bc
Canvas: Add all options to inline editor (#52834)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-07-27 19:20:39 -04:00
Brendan O'Handley
6c3efb0c88
Graphite Plugin: Remove angular dependencies for graphite annotations (#52261)
* fix merge conflict

* fix betterer

* handle new creating annotations

* add h5 'or' tag to annotation editor

* fix annotation regression looking for tags before target

* remove angular annotation partial

* change ann tags type to string[] and use TagsInput to create ann

* remove GraphiteEventsType, return annotations targets setting 'textEditor': true

* fix yarn typecheck errors

* add dateTime for yarn fix to tests

* fix incorrect merge conflict resolution

* fix betterer

* making changes for PR approval resolutions

* fix prettier issue

* fix prettier
2022-07-27 16:27:42 -04:00
Adela Almasan
a5410063c6
Canvas: Merge tree view and layer element list UX (#52701)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-07-26 19:51:20 -04: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
238d761450
Geomap: refactor and cleanup structures (#52760)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2022-07-25 20:12:20 -04:00
Joey Tawadrous
cb35729553
Traces: Align APM table names (#52591)
* Order col values according to rate names order

* Tests
2022-07-25 18:59:43 +01:00
Torkel Ödegaard
b782d9aa12
GrafanaContext: Exploring a way to get rid of global scope singletons (#52128)
* Context start

* More progress on more generic react context for services

* Update

* Update Page test

* Fixing tests

* Moving to core app
2022-07-23 17:09:03 +02:00
Ryan McKinley
2fa10dc903
TimeSeries: Support multiple timezones in x axis (#52424)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-07-22 22:18:27 -05:00
Ashley Harrison
2b46138202
improve meta and story typings (#52659) 2022-07-22 17:19:16 +01:00
kay delaney
0c89743759
Variables: Optimize "timeRangeUpdated" path (#52047) 2022-07-22 16:10:10 +01:00
Konrad Lalik
0507b3564f
Alerting: Fix alert panel instance-based rules filtering (#52583) 2022-07-22 12:52:56 +02:00
Ivan Ortega Alba
2ec01c8d08
Preferences: Use dashboardUID to set the home dashboard (#51919) 2022-07-22 10:44:22 +02:00
Ashley Harrison
27542445ce
Chore: remove UseState from ColorPicker story (#52611)
* remove UseState from ColorPicker story

* remove story meta type assertion
2022-07-21 16:15:55 +01:00
Ashley Harrison
f25c609105
Convert MultiModeGraphTooltip test to RTL (#52595)
* Convert MultiModeGraphTooltip test to RTL

* don't export these styles

* use theme instead of hardcoded style values
2022-07-21 15:54:18 +01:00
Scott Lepper
de956fc3d8
Core code editor/builder components (#52421)
* migrate experimental to core grafana - update refs

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-07-20 12:50:08 -04:00
Torkel Ödegaard
77f7e8dafc
PageLayouts: Updates dashboard section routes with navId (#52175)
* 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

* Moving user profile routes to navId

* PageLayouts: Updates dashboards routes with navId

* added missing navId

* AppChrome outside route

* Renaming folder

* Minor fix

* Updated

* Fixing StoragePage

* Updated

* Updating translation ids

* Updated snapshot

* update nav translation ids (yes this is confusing)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
2022-07-20 17:26:52 +02:00
Sven Grossmann
6cab909132
Loki: Fix show context not working in some occasions (#52458)
* added missing `languageProvider.start` call

* moved `languageProvider.start`
2022-07-20 12:28:11 +02:00
Levente Balogh
d6d49d8ba3
DataSources: refactor datasource pages to be reusable (#51874)
* refactor: move utility functions out of the redux actions

* refactor: move password handlers to the feature root

* refactor: move API related functions to an api.ts

* refactor: move components under a /components folder

* refactor: move page containers under a /pages folder and extract components

* refactor: update mocks to be easier to reuse

* refactor: move tests into a state/tests/ subfolder

* refactor: expose 'initialState' for plugins

* refactor: move generic types to the root folder of the feature

* refactor: import path fixe

* refactor: update import paths for app routes

* chore: update betterer

* refactor: fix type errors due to changed mock functions

* chore: fix mocking context_srv in tests

* refactor: udpate imports to be more concise

* fix: update failing test because of mocks

* refactor: use the new `navId` prop where we can

* fix: use UID instead ID in datasource edit links

* fix:clean up Redux state when unmounting the edit page

* refactor: use `uid` instead of `id`

* refactor: always fetch the plugin details when editing a datasource

The deleted lines could provide performance benefits, although they also make the
implementation more prone to errors. (Mostly because we are storing the information
about the currently loaded plugin in a single field, and it was not validating if it
is for the latest one).

We are planning to introduce some kind of caching, but first we would like to clean up
the underlying state a bit (plugins & datasources.

* fix: add missing dispatch() wrapper for update datasource callback

* refactor: prefer using absolute import paths

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

* fix: ESLINT import order issue

* refactor: put test files next to their files

* refactor: use implicit return types for components

* fix: remove caching from datasource fetching

I have introduced a cache to only fetch data-sources once, however as we
are missing a good logic for updating the instances in the Redux store
when they change (create, update, delete), this approach is not keeping the UI in sync.
Due to this reason I have removed the caching for now, and will reintroduce it once we have a
more robust client-side state logic.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-07-20 09:25:09 +02:00
Torkel Ödegaard
8d92417a16
Scenes: Improve typing of scene state to avoid type guards and casting (#52422)
* Trying to get rid of type guard but failing

* Improve typing of scene object state

* Fixed wrongly renamed event

* Tweaks
2022-07-19 17:46:49 +02:00
kay delaney
0142c8ccd1
Dashboard Links: Fix styles for very long dashboard titles (#52443) 2022-07-19 16:15:59 +01:00
Leo
c60487fdbf
Plugins: Convert BarGaugePanel to RTL (#52423)
* Plugins: Convert bargaugepanel tests to RTL

* Chore: Improved test methods used in BarGaugePanel
2022-07-19 14:17:22 +02:00
Torkel Ödegaard
4aae9d1567
Scene: Support for collapsable rows via a nested scene object (#52367)
* initial row test

* Updated

* Row is more of a nested collapsable scene

* Updated

* Added test for nested scene

* Added test for nested scene
2022-07-18 20:26:10 +02: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
Artur Wierzbicki
b2736ac1fe
Storage: limit the number of uploaded files (#50796)
* #50608: sql file upload quotas

* rename `files_in_sql` to `file`

* merge conflict
2022-07-18 15:24:39 +04:00
Scott Lepper
53933972b6
mysql query editor - angular to react (#50343)
mysql conversion to react

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-07-15 16:49:24 -04:00
Zoltán Bedi
35d98104ad
MSSQL: Migrate to React (#51765)
* Fix: sql plugins feature

* SQLDS: Use builtin annotation editor

Plus strict rule fixes

* MSSQL: Migrate query editor to React

* Make code editor work

* Make SQLOptions and SQLQuery in SQLDatasource and in Editor generic

* MSSQL: Fix ts issues

* Fix SQLDatasource refID

* Remove comment

* Revert "Make SQLOptions and SQLQuery in SQLDatasource and in Editor generic"

This reverts commit 1d15b4061a.

* Fix ts issues without generic

* TS
2022-07-15 19:51:28 +02:00
Ryan McKinley
da1701ce57
Dashboards: load from storage (#51949) 2022-07-14 15:36:17 -07: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
Ivana Huckova
1d077e84ce
Loki: Add hint for pipeline error to query builder (#52134)
* WIP

* Update

* Add tests

* Fix lint/betterer errors

* Update public/app/plugins/datasource/loki/addToQuery.ts

* Update copy
2022-07-14 10:48:27 +02:00
Konrad Lalik
169a1c5b0f
Use non-blocking way of fetching ruler api availability (#52102)
Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-07-13 11:50:20 +02:00
Ryan McKinley
ededf1dd6f
Graph: move time region calculation to a utility function (#51413) 2022-07-12 12:09:49 -07:00
Adela Almasan
c73d78eaac
Canvas: Tree View Navigation (#51855)
* tree navigation using rc-tree library
2022-07-12 08:31:02 -05:00
Zoltán Bedi
4155dc8eca
SQL: Fix couple of issues in SQLDatasource (#52080)
* Fix: sql plugins feature

(cherry picked from commit 035862bade)

* SQLDS: Use builtin annotation editor

Plus strict rule fixes

(cherry picked from commit fee2eb3716)
2022-07-12 14:11:54 +02:00
Torkel Ödegaard
4d4ab87bb6
Page: Update profile page components to use new navId (#51664) 2022-07-11 14:35:30 +02:00
Joey Tawadrous
5aacc7cc2a
Traces: More feature tracking (#51686)
* Added tracing for json upload, service graph, loki queries

* Tracking for node graph expand/collapse

* Tracking for traceID expand/collapse

* Updated betterer.results

* Update tests

* Updated betterer.results

* Fixed?

* Fix for test

* Update report interaction key for loki expr

* Change grafana_traces_search_queried limit to resultLimit as limit is reserved keyword
2022-07-11 10:21:24 +01:00
Leon Sorokin
fda7f064ad
GraphNG: uPlot 1.6.22 (#51945) 2022-07-08 09:45:16 -04:00
Josh Hunt
0c88850070
Chore: Sync betterer results (#51963) 2022-07-08 14:19:17 +01:00
Ieva
0c33b9f211
Access control: Allow organisation admins to add existing users to org (#51668)
* check users with user add permission to access the invite endpoint

* undo unneeded changes

* tests and cleanup

* linting

* linting

* betterer

* betterer again

* fix prettier issue

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-07-08 12:07:00 +01:00
Isabella Siu
8dd8c50dc4
CloudWatch: Add default log groups to config page (#49286)
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
2022-07-07 13:03:02 -04:00
ismail simsek
885c517983
Plugins: InfluxDB variable interpolation fix (#51917)
* Don't use regex on flux mode while applying template variables
2022-07-07 17:16:35 +02:00
Torkel Ödegaard
849134b5dd
Scene: Small refactorings and name changes (#51866)
* Rename onMount and onUnmount and some other small refactorings

* More refactorings fixing typescript issues
2022-07-07 16:49:05 +02:00
Ivana Huckova
10cb84e401
Loki: Implement hints for query builder (#51795)
* Loki: Implement hints for query builder

* Update name of file

* Update imports

* Refactor

* Remove unused import

* Unify

* Revert "Unify"

This reverts commit 78da0e27e3.

* Unify

* Fix types

* Fix tests

* Fix type error

* Simplify

* Update test

* Add documentation

* Update comment

* Add tests for addParserToQuery

* Smaller updates
2022-07-07 15:49:31 +02:00
Levente Balogh
99de3313f7
Datasources: Refactor the list page (#51438)
* refactor(Data Sources): rename file to follow naming convention

* refactor: use react-redux hooks for interacting with the store

* tests: update data-sources list related test files

* refactor: extract datasource list page contents

* refactor: pass dataSources to the DataSourcesList as a prop

* refactor: use proper typing for navIndex mocks
2022-07-07 11:15:34 +02: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
Torkel Ödegaard
4f931afe29
Betterer: Rebuild better results file as it was corrupt (#51861) 2022-07-07 08:32:56 +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
Kevin Yu
b5eef488ce
Cloud Monitoring: Update LabelFilter to use experimental UI components (#51342)
* add label filter

* add tests

* define labels once

* update betterer results
2022-07-06 11:28:54 -04: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
Joey Tawadrous
45a00bdc94
Traces: Move towards using OTEL naming conventions (#51379)
* Updates names

* Update tests

* Update betterer results

* Updated betterer.results

* Updated tests
2022-07-06 11:12:53 +01:00
Joey Tawadrous
01130f22b7
Traces: Span bar label (#50931)
* Add SpanBarSettings

* Add SpanBarSettings to Jaeger

* Add SpanBarSettings to Zipkin

* Updated title

* Add dropdown to select identifer and make duration a default option

* Show duration by default

* Add option to hide

* Move identifers into constants

* Add process

* Update text

* Update placeholders

* Text/meta data updates

* Added tests

* Added docs

* Update find

* Merge tag and prcoess options

* Update docs

* Updated tests

* Update betterer results and trace view to match

* Updated docs
2022-07-06 08:14:03 +01:00
Alexander Zobnin
21591be469
Geomap: Support shared crosshair for route layer (#51495) 2022-07-06 10:08:55 +03:00
Josh Hunt
ffd9d9d0c5
Chore: Refactor logs_model to clean up types (#51201)
* Chore: Minor refector of logs_model to clean up types

* undo a change i didn't commit to

* use isObservable instead

* fix type
2022-07-06 08:49:45 +02:00
Ryan McKinley
4a00c7ebde
Storage: Add basic file upload management (#50638) 2022-07-05 10:53:41 -07:00
eledobleefe
13fbe6ed28
Storybook: Add documentation to PluginSignatureBadge story (#51645)
* Import the mdx documentation file to PluginSignatureBadge.story.tsx and add to its export defaul

* Create the mdx file of PluginSignatureBadge with its information

* Fix signed PluginSignatureBadge status

* Modify text according to reviewer suggestions

* betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-05 09:38:26 -04:00
Seyaji
500010e0b6
Chore: Convert QueryOperationRow test to RTL (#51290)
* Convert QueryOperationRow test to RTL

* Convert QueryOperationRow test to RTL

* Convert QueryOperationRow test to RTL

* Convert QueryOperationRow test to RTL

* Update QueryOperationRow.test.tsx

* update betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-05 08:10:20 -04:00
kay delaney
d4eef3bd76
TimeSrv: Don't modify refresh interval when editing panel (#51718) 2022-07-05 05:25:07 -04:00
Pawan Verma
920bd1e88d
Chore: Improve SecretInput story (#51665)
* Added mdx file for secret input

* Chore: Improve SecretInput story

* review related changes in docs

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-05 09:32:51 +01:00
Sriram
f78b7f1f17
TestDataDB: update CSV wave scenario ui (#51719)
* update testdb csv wave

* support enter key

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-07-05 04:57:32 +01:00
Ashley Harrison
986b766ca0
Chore: Make betterer tests more stable (#51703)
* rewrite eslint test to not care about position of errors

* changing file contents shouldn't require a betterer.results update

* fix up eslint test

* fix the undocumented stories test

* ignore .test.ts files as well
2022-07-04 12:13:20 +01:00
Ivan Ortega Alba
f8ac160545
DashboardRow: collapse shortcut doesn't allow to move the row (#51589) 2022-07-04 12:32:21 +02:00
Zoltán Bedi
ebb9025669
StateTimeline: Try to sort time field (#51569)
* StateTimeline: Try to sort time field

* Sort frame earlier
2022-07-04 10:11:33 +02:00
Seyaji
e88514beea
Chore: Convert SpanDetailsRow test to RTL (#51345)
* Convert SpanDetailsRow test to RTL

* Convert SpanDetailsRow test to RTL
2022-07-04 10:30:03 +03:00
Alexander Emelin
a2478c3a32
Search: Sort by updated at and created at (#50416)
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-30 16:33:30 -07:00
Scott Lepper
fa560d96b6
sql plugins - angular to react - base sql datasource (#51655)
* base sql datasource and components
2022-06-30 16:38:48 -04:00
Ryan McKinley
281ed419a8
Chore: add generics to backendSrv (#51606) 2022-06-30 14:34:23 -04:00
Ryan McKinley
c0f10af545
SearchV2: Use the same components for both SQL and bluge backends (#50125) 2022-06-30 12:45:45 -04:00
Gilles De Mey
d63ffa314e
Alerting: Fix normalization of alert states for panel annotations (#51637)
A bug introduced by #49259 would crash the annotations view of a panel with a linked alert rule. States are now normalized so crashes won't occur and the base state is used instead.
2022-06-30 10:46:54 -04:00
Ivana Huckova
66b4a9e6a1
Loki: Remove unused prop from query builder (#51504) 2022-06-30 16:02:27 +02:00
Gilles De Mey
a1fb73c503
Alerting: Adds contact point template syntax highlighting (#51559) 2022-06-30 14:01:02 +02:00
Konrad Lalik
117bac71f5
Alerting: Use folders' RBAC permission to control rules actions (#51434)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-30 13:00:29 +02:00
Ashley Harrison
2a6b32598d
Chore: some low-hanging type assertion fruit (#51618)
* some low-hanging type assertion fruit

* results
2022-06-30 10:40:00 +01:00
Leon Sorokin
3bd2bdcebb
DataFrame: more thorough detection of unsorted values (#51602) 2022-06-29 18:08:42 -05:00
user10x
39bd3e2fe3
rename logs_model.ts->logsModel.ts; update references (#51468) 2022-06-29 21:04:30 +02:00
Leon Sorokin
1f939f64e9
ColorScale: prevent vertical scrollbar in container during hover (#51591) 2022-06-29 14:34:12 -04:00
Nathan Marrs
b0f1d35708
Search: Refine clear tags UI #51590 2022-06-29 14:16:49 -04:00
Nathan Marrs
35240f6d5a
Annotations: Fix custom tag functionality (#51537) 2022-06-29 13:37:50 -04:00
Nathan Marrs
66c911f263
Canvas: Stop selecto box from triggering when programmatically selecting elements (#51579)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-29 13:19:48 -04:00
Nathan Marrs
5d9ffe54ee
Canvas: Enable multi-select via shift key 2022-06-29 10:00:58 -07:00
Seyaji
2473dc68f6
Chore: Convert KeyValuesTable to RTL (#51278)
* Convert KeyValuesTable to RTL

* Update data-testid

* Update data-testid

* Convert KeyValuesTable to RTL

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 16:44:48 +01:00
kay delaney
8053f770c1
Export: Fix export/import of dash with library panels (#49319) 2022-06-29 16:18:27 +01:00
Ashley Harrison
67802e64e6
keep the betterer message generic (#51563) 2022-06-29 15:57:49 +01:00
ismail simsek
0de544f3a2
Handle scalar and string resultType separately (#51411) 2022-06-29 16:43:33 +02: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
Polina Boneva
f83f05d6b3
Variables: variables in Markdown links are not interpolated (#51392)
* on a text panel first interpolate, then markdown, then sanitize;

* update devenv dashboard + e2e tests

* fix typo and undo changes in grafana/data

* handling of config option disableSanitizeHtml more readable when preparing markdown in text panel

* betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 15:26:31 +03:00
Ashley Harrison
688164bbd6
Chore: add a betterer test for undocumented stories (#51444)
* add a betterer test for undocumented stories

* update results

* Update .betterer.ts

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

* update results

* prettier

* slightly nicer regexp

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 12:25:31 +01:00
Ivana Huckova
60454192b7
Loki: Add e2e test for query builder (#51314)
* Loki: Add e2e test for query builder

* Update

* Update test

* Update test

* Update test

* Update test

* Add more checks in test

* Update betterer

* Update betterer
2022-06-29 11:04:27 +02:00
Ashley Harrison
683bbc7373
Templating: Changing between variables with the same name now correctly triggers a dashboard refresh (#51490)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.ts

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.test.ts

* linting

* update betterer

Co-authored-by: kay delaney <kay@grafana.com>
2022-06-29 09:10:55 +01:00
Leon Sorokin
d32ec75661
HeatmapNG: expand log y axis min/max config to full powers (#51472)
also fix x bucket count setting for calculate (regressed in #51089)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-28 19:13:13 -05:00
Dominik Prokop
daf0e3cb4e
Bar chart: Fix stacking bug when data produces 0 accumulators (#51450)
* Don't divide by 0 ...

* Add test panel to gdev dashboard
2022-06-28 07:21:18 -07:00
Torkel Ödegaard
f047f7dcf6
TopNav: A possible approach having a TopNav that lives outside route (#51301)
* Add topnav in Route

* TopBar: Good progress on a approach that looks promising

* Added some elements to top level

* Get page nav from route

* Progress

* Making breadcrumbs slightly more real

* Updates

* Memoize selector

* Removed some console.log

* correctly type iconName

* betterer updates

* Change setting to hideNav

* Rename again

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-28 09:47:12 -04:00
Seyaji
37c6a0b3cb
Chore: Convert AccordianReferences test to RTL (#51274)
* Convert AccordianReferences test to RTL

* Convert AccordianReferences test to RTL

* Convert AccordianReferences test to RTL

* Convert AccordianReferences tests to RTL

* Convert AccordianReferences test to RTL

* fix betterer

* Convert AccordianReferences test to RTL

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-28 11:20:37 +01:00
Gilles De Mey
97c9b25d44
Alerting: Skip the default data source if incompatible (#51452) 2022-06-28 10:05:53 +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
Ryan McKinley
b6a9b9804d
Plugin admin: Add a page to show where panel plugins are used in dashboards (#50909) 2022-06-27 20:23:43 -04:00
Leon Sorokin
fd6c7d518d
TimeSeries: Improved constantY rendering parity with Graph (old) (#51401)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-27 19:02:05 -05:00
Leon Sorokin
89b150ab58
HeatmapNG: pre-allocate arrays during calc (#51465) 2022-06-27 18:43:59 -05:00
Ryan McKinley
cfbfacb152
Heatmap: migrate old zero gap to one (#51467) 2022-06-27 19:13:09 -04:00
Ezequiel Victorero
99f921cf32
Public Dashboards: adding telemetry for Sharing Modal options and Public Dashboards events (#50834)
* Public Dashboards: adding telemetry for Sharing Modal options and Public Dashboards events
2022-06-27 12:33:30 -03: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
Daniel Lee
292b24e30d
Piechart: Implements series override -> hide in area for the legend or tooltip (#51297)
* piechart: support series override for hiding legend item

* piechart: add support for hiding values in multi tooltip

* tidy up variable names

* piechart: typing for hideFrom variable

* betterer fixes
2022-06-27 15:13:19 +02:00
Dominik Prokop
b2b0be7b93
Table panel: Add multiple data links support to Default, Image and JSONView cells (#51162)
* Table panel: Support multiple data links in default cell

* Table panel: Show data links for Image and JSONView cells

* Simplify DataLinksContextMenu api

* Betterer
2022-06-27 05:23:29 -07:00
Dominik Prokop
4a397c9c24
Time series panel: Hide axis when series is hidden from the visualization (#51432)
* Time series panel: Hide axis when series is hidden from the visualization

* Fix snap
2022-06-27 08:17:46 -04:00
Joao Silva
f2d8b1ceee
Dashboards: Fixes issue with the initial panel layout counting as an unsaved change (#51315) 2022-06-27 12:30:59 +01:00
Nathaniel Saxe
683f31f2c6
Variables: improve performance of transformMetricFindResponse (#49360)
* improve performance of transformMetricFindResponse

* use lodash uniqBy for postgres

* use lodash uniqBy for mysql

* use lodash uniqBy for mssql

* hopefully conform to import linting rules

* Added .betterer.results

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
2022-06-27 14:26:46 +03:00
Ashley Harrison
0124dc8e6b
Chore: reintroduce type assertion test + change emitted metric names (#51375)
* reintroduce type assertion test + change emitted metric names

* rename test to better eslint to be more generic
2022-06-25 07:45:38 -04:00
Ryan McKinley
c8f814196a
CommandPalette: Populate dashboard search when the palette is opened (#51293)
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-06-24 23:08:29 +02:00
Ivana Huckova
d3dd3042d6
Loki: Fix support of ad-hoc filters for specific queries (#51232)
* Loki: Refactor ad-hoc filters to use parser

* Remove renaming of files for easier review

* Update

* Update

* Add previously buggy test

* Fix tests

* Fix typos

* Update, improve typing

* Move reused code up

* Update order

* Update betterer statss
2022-06-24 22:29:22 +02:00
Artur Wierzbicki
c496b3e712
Search: Fix pagination in the new search page (#51366)
* Fix pagination in the new search

* update betterer betterer betterer betterer betterer betterer

* revert packagejson
2022-06-24 21:21:59 +04:00
Todd Treece
342344bb03
Variables: Selectively reload panels on URL update (#51003) 2022-06-24 13:06:36 -04:00
Leon Sorokin
7e1667ce87
HeatmapNG: explicitly pass scales for cursor sync config (#51389) 2022-06-24 11:42:39 -05:00
Connor Lindsey
620309ced5
Explore: Sort trace process attributes alphabetically (#51261)
* Explore: Sort trace process attributes alphabetically

* Update betterer?
2022-06-24 08:20:23 -06:00
Jguer
9a82ed7105
Remove LDAP specific example from team sync (#51368)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-24 15:29:50 +02:00
ismail simsek
c804639b53
Hide datalink button when datasource for exemplar is undefined (#51236) 2022-06-24 15:26:52 +02:00
Ashley Harrison
fa466e2134
Chore: comment out type assertions check due to bug (#51371)
* comment out type assertions check due to bug

* forgot to push the merge 🤦
2022-06-24 11:56:31 +01:00
Joey Tawadrous
adfe4ef564
Update betterer tests (#51370) 2022-06-24 11:21:03 +01:00
Ryan McKinley
588bd43e49
Chore: update betterer.results for heatmap rename (#51361) 2022-06-24 00:10:03 -07:00
Isabella Siu
497310a9cb
CloudWatch: Factor LogGroupSelector into a separate component (#50829) 2022-06-23 14:40:43 -04:00
Isabella Siu
8ba8e1df83
CloudWatch: fix variable query migration with json template variables (#51207)
* CloudWatch: fix variable query migration with json template variables

* fix error messages

* changes for reviews

* fix lint

* fix betterer
2022-06-23 14:23:56 -04:00
Ryan McKinley
a093250dd5
Chore: avoid implicit any by using inline functions (#51338) 2022-06-23 11:19:08 -07:00