Commit Graph

302 Commits

Author SHA1 Message Date
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