Commit Graph

66 Commits

Author SHA1 Message Date
Josh Hunt
5218497a3e
Chore: report eslint no-explicit-any errors to metrics (#31182)
* Chore: report eslint no-explicit-any errors to metrics

* double quote
2021-02-15 10:15:34 +00:00
Torkel Ödegaard
a7afab4b8a
Typescript: Fixing typescript strict error, and separate check from publishing (#29679)
* Typescript: Fixing typescript string error, and seperate check from publishing

* now should pass
2020-12-08 12:56:37 +01:00
Arve Knudsen
e71eb13386
scripts/ci-frontend-metrics.sh: Fix execution (#27434)
* scripts/ci-frontend-metrics.sh: Fix execution

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-07 18:39:47 +02:00
Arve Knudsen
58af541321
Drone: Report front-end test metrics (#27395)
* Drone: Report front-end test metrics

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* ci-frontend-metrics.sh: Fix collection bugs; print JSON

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add Yarn script ci:test-frontend
2020-09-07 13:17:03 +02:00
Torkel Ödegaard
fd44c01675
Chore: Fix typescript strict null fixes now at 298 (#26125)
* Chore: Fix typescript strict null errors

* Added new limit

* Fixed ts issue

* fixed tests

* trying to fix type inference

* Fixing more ts errors

* Revert tsconfig option

* Fix

* Fixed code

* More fixes

* fix tests

* Updated snapshot

* Chore: More ts strict null fixes

* More fixes in some really messed up azure config components

* More fixes, current count: 441

* 419

* More fixes

* Fixed invalid initial state in explore

* Fixing tests

* Fixed tests

* Explore fix

* More fixes

* Progress

* Sub 300

* Fixed incorrect type

* removed unused import
2020-07-08 11:05:20 +02:00
Torkel Ödegaard
7e8bd0c1b7
Chore: Fix typescript strict null errors from 674 -> 565 (#26057)
* Chore: Fix typescript strict null errors

* Added new limit

* Fixed ts issue

* fixed tests

* trying to fix type inference

* Fixing more ts errors

* Revert tsconfig option

* Fix

* Fixed code

* More fixes

* fix tests

* Updated snapshot
2020-07-06 21:16:27 +02:00
Ryan McKinley
d1b230f84a
Chore: upgrade to Typescript 3.9.3 (#25154)
* upgrade to typescript 3.9.3

* Fix errors that surfaced with update

* Null check fixs

* FIx null checks

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-06-17 12:26:01 +02:00
Lukas Siatka
7b7000c5bc
Explore: updates ExploreItemState type, reduces strict null errors count to 702 (#25250)
* Chore: changes null values to undefined in explore reducer

* Chore: changes sortLogsResult param type from null to undefined

* Chore: changes null values to undefined in explore reducer

* Chore: updates strict null errors count

* Revert "Chore: changes null values to undefined in explore reducer"

This reverts commit b82d841611.

* Revert "Chore: changes sortLogsResult param type from null to undefined"

This reverts commit 21073b5d30.

* Revert "Chore: changes null values to undefined in explore reducer"

This reverts commit 798559688c.

* Chore: updates ExploreItemState type

* Chore: updates initial ExploreItemState in Explore reducer

* Chore: updates strict null errors count to 699

* Chore: changed ExploreMode and Emitter type in ExploreStateItem

* Revert "Chore: changed ExploreMode and Emitter type in ExploreStateItem"

This reverts commit 7e0e2027fc.
2020-06-17 10:08:19 +02:00
Marcus Andersson
fb7d036fa4
Typescript: Fixed strict null errors. (#25609) 2020-06-16 07:34:27 +02:00
Andrej Ocenas
a50cb6aa1f
Loki: Allow multiple derived fields with the same name (#24437) 2020-05-12 17:20:00 +02:00
Lukas Siatka
2c9eed360d
Chore: fixes few strict-null errors (#23775)
* Chore: fixes strict-null-error in Login > ChangePassword component

* Chore: fixes strict-null-error in Login > LoginForm component

* Chore: fixes strict-null-errors in OrgActionBar component and components that render it

* Chore: fixes strict-null-errors in PageHeader component

* Chore: fixes strict-null-errors in PermissionList components

* Chore: fixes strict-null-errors in loki language provider

* Chore: fixes strict-null-errors in loki datasource

* Chore: fixes strict-null-errors in panel_editor > EditorTabBody component

* Chore: fixes strict-null-errors in flatten utility

* Chore: fixes strict-null-errors in search component

* Chore: fixes strict-null-errors in SharedPreferences component

* Chore: fixes strict-null-errors in MetricSelect component

* Chore: updates type on a param to type on argument

* Chore: updates strict-null errors count from 791 to 757

* Chore: updates PageHeader - adds null checks

* Chore: updates PageHeader - updates null checks

* Chore: updates PageHeader null checks to longer format

* Chore: updates strict-null fixes

* Chore: updates error count limit in ci-frontend-metrics
2020-05-07 13:53:05 +02:00
Torkel Ödegaard
2c0a1d8428
Search: Adds search to main nav and removes open search click on dashboard name (#23943)
* Search: Adds search to main nav and removes open search click on dashboard name

* Updated snapshots

* Fixed strict null errors

* Fixed type issue
2020-04-27 16:38:04 +02:00
Andrej Ocenas
58b566a252
Tracing: Zipkin datasource (#23829) 2020-04-24 17:02:25 +02:00
Andrej Ocenas
e5dd7efdee
Provisioning: Allows specifying uid for datasource and use that in derived fields (#23585)
* Add uid to datasource

* Fix uid passing when provisioning

* Better error handling and Uid column type change

* Fix test and strict null error counts

* Add backend tests

* Add tests

* Fix strict null checks

* Update test

* Improve tests

* Update pkg/services/sqlstore/datasource.go

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>

* Variable rename

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-20 15:48:38 +02:00
Andrej Ocenas
263dcb1452
Chore: Fix bunch of strict null error to fix master CI (#23443)
* Fix bunch of null error

* Fix failing test

* Another test fix
2020-04-08 23:44:10 +02:00
Tobias Skarhed
703476b3ae
Forms migration: Input namespace (#23286)
* Update exports

* Add LegacyForms namespace

* Update ci grep
2020-04-02 16:18:06 +02:00
Torkel Ödegaard
e8efd17ea9
Buttons: Improves vertical alignment in buttons (#23030)
* Buttons: Improves vertical alignment in buttons

* Updated snapshot

* Fixed strict null errors
2020-03-25 09:21:44 +01:00
Torkel Ödegaard
441e87d4d4
NewPanelEdit: Adding repeating options (#22984)
* NewPanelEdit: Adding repeating options

* Added all repeat options

* reduce strict null errors
2020-03-24 15:44:13 +01:00
Marcus Andersson
41bc1aa3ae
DataLinks: make sure we use the correct datapoint when dataset contains null value. (#22981)
* Fix to make sure we have the correct dataIndex when using data links.

* fixed strict null errors.

* decreased number of errors.
2020-03-24 08:19:19 +01:00
Dominik Prokop
bdb5659977
NewPanelEdit: Organise sidebar in tabs (#22870)
* Refactor value mappings UI to work better with new panel edit

* TS fix

* Experimenting with tabs in the sidebar

* Small refactor and added Panel general settings

* Merge fixes

* fix fieldOptions being used instead of fieldConfig

* Added icons to tabs (testing)

* Only 3 tabs i think, panel specific options need ot exist in first tab, some style tweaks

* Moved title and no value up

* Updated

* Render panel options in Options tab and add old options styles hack to display those vertically

* Basic settings to Panel settings

* Make nullcheck pass

* Snaps bump

* Fix standard configs not update

* Organise sidebar better, add tmp NewPanelEditorContext to hide duplicate legacy options

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-20 15:15:04 +01:00
Dominik Prokop
0a2dda35fc
Metrics: Storybook documented components (#22854) 2020-03-18 08:22:46 +01:00
Dominik Prokop
642c1a16dd
FieldOverrides: Apply field overrides in PanelQueryRunner (#22439)
* Apply field overrides in PanelChrome

* Move applyFieldOverrides to panel query runner

* Review updates

* Make sure overrides are applied back on souce panel when exiting the new edit mode

* TS ignores in est

* Make field display work in viz repeater

* Review updates

* Review and test updates

* Change the way overrides and trransformations are retrieved in PQR

* Minor updates after review

* Fix null checks
2020-03-16 14:26:03 +01:00
Hugo Häggmark
b51e28bc15
Chore: reduces strict null errors to 824 (#22744)
* Chore: reduces strict null errors with 100+

* Chore: lowers the build error number
2020-03-12 10:22:33 +01:00
Torkel Ödegaard
4ca3967091
Chore: Fixed strict null errors (#22238) 2020-02-17 07:25:27 +01:00
Torkel Ödegaard
49407987fe
Dashboard: Move some plugin & panel state to redux (#22052)
* WIP: dashboard panel redux

* Progress

* Progress

* Changing plugin type

* Progress

* Updated

* Progess

* Fixed timing issue

* Updated

* Fixed unit tests

* Fixed issue in dashboard page

* Updated test
2020-02-10 14:23:54 +01:00
Hugo Häggmark
ea18779781
Chore: Lowers strict error limit (#21781) 2020-01-28 10:44:48 +01:00
Torkel Ödegaard
fa209f21c3 CI: Update frontend ci metrics for strict null checks 2019-09-19 09:38:07 +02:00
Hugo Häggmark
c82a26e2b2 Chore: Update strictNullChecks error limit (#18387) 2019-08-05 15:06:51 +02:00
Torkel Ödegaard
35954d7b6f
CI: Added metric to track strict null erros (#18379)
* CI: Added metric to track strict null errros

* Update scripts/ci-frontend-metrics.sh

Co-Authored-By: Hugo Häggmark <hugo.haggmark@grafana.com>
2019-08-05 09:19:31 +02:00
Tobias Skarhed
83da3660da
Chore: noImplictAny no errors left (#18303)
* Add types and rewrite datasourceChanged to async/await
2019-08-01 14:38:34 +02:00
Tobias Skarhed
7891233812
Chore: noImplicitAny Sub 500 errors (#18287) 2019-07-30 15:49:32 +02:00
Oleg Gaidarenko
4b16cd6cc8
Build: Introduce shellcheck (#18081)
* Build: introduce shellcheck

Fixes #16198
2019-07-23 13:12:33 +03:00
Tobias Skarhed
e1cec1069c noImplicitAny: 1670 errors (#18035)
* Sub 2000 errors

* Down to 1670 errors

* Minor fixes
2019-07-11 17:05:45 +02:00
Tobias Skarhed
baed5d7bd9 noImplicitAny: Azure Monitor (#17966) 2019-07-06 07:01:22 +02:00
Daniel Lee
7e95ded164
AzureMonitor: remove duplicate query logic on the frontend (#17198)
* feat: AzureMonitor implements legend key on backend

To be able to remove the duplicated query logic on the
frontend, the backend code needs to implement alias
patterns for legend keys as well as allowing the default
list of allowed time grains to be overridden. Some metrics
do not support all the time grains and the auto timegrain
calculation can be incorrect if the list is not overridden.

* feat: AzureMonitor - removes duplicate query logic on frontend

* AzureMonitor small refactoring

Extracted method and tidied up the auto time grain
code.

* azuremonitor: support for auto time grains for alerting

Converts allowed timegrains into ms and saves in dashboard json.
This makes queries for alerting with an auto time grain work in
the same way as the frontend.

* chore: typings -> implicitAny count down to 3413

* azuremonitor: add more typings
2019-07-04 22:47:24 +02:00
Tobias Skarhed
4e27ba9646 noImplicitAny: Sub 3000 errors (#17821)
* noImplicitAny Stackdriver

* Sub 3000 noImplicitAny

* Update error count limit

* Add DataQueryRequest type
2019-07-01 11:11:57 +02:00
Tobias Skarhed
0b9de3f761 noImplicitAny: Lower count to about 3450 (#17799) 2019-06-27 15:56:02 +02:00
Tobias Skarhed
3045daedbd noImplicitAny: Reduce errors to 3800-ish (#17781)
* Reduce noImplicitAny errors to 3900-ish

* Fix lots of errors

* Add interface
2019-06-27 13:21:04 +02:00
Tobias Skarhed
c9ad411d8e noImplicitAny: Fix basic errors (#17668)
* Fix basic noImplicitAny errors

* noImplicitAny HeatmapCtrl

* Update error limit
2019-06-19 19:59:03 +02:00
Hugo Häggmark
12e417f2df Chore: Lowered implicit anys limit to 4599 (#17631)
Progress: #14714
2019-06-18 11:59:38 +02:00
Tobias Skarhed
8b8f2c4540 noImplicitAny: SingleStat panel (#17616)
* noImplicitAny on Singlestat

* Lower threshold

* Fix fixes
2019-06-18 11:44:17 +02:00
Tobias Skarhed
8ffef57178 Typescript: A batch of implicit any fixes (#17590)
* Reduce noImplicitAny errors

* Lower err count

* Static version

* Fix noImplicitAny

* Table: moved type file
2019-06-15 08:25:33 +02:00
Tobias Skarhed
375dc333f2 Typescript: Reduce implicit any errors (#17550)
* Fix types on linkSrv

* Lower err count, shoot down some errs, add type pkg

* Fix changes and add test

* Update public/app/features/panel/panel_ctrl.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update public/app/features/panel/panel_ctrl.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update public/app/features/panel/panellinks/link_srv.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update public/app/features/panel/panel_ctrl.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>

* Fix last types to compile

* Fix formatting issue

* Update public/app/features/panel/panel_ctrl.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>
2019-06-13 20:04:15 +02:00
Hugo Häggmark
8e1dfd32f9 Chore: Lowered implicit anys limit to 5131 (#17562)
Progress: #14714
2019-06-13 08:12:30 +02:00
Torkel Ödegaard
e0b760e08e
Chore: No implict any fixes (#17020) 2019-05-13 09:38:19 +02:00
Hugo Häggmark
0efb8821f9
Chore: Lowered implicit anys limit to 5386
Progress: #14714
2019-05-13 07:47:07 +02:00
Daniel Lee
befa40ef3a
AzureMonitor: adds support for multiple subscriptions per datasource (#16922)
* chore: AzureMonitor typescript typings

Removes some types and using @grafana/ui types instead.
Adds some typing for the AzureMonitor query.

Also adds a getSubscriptions function that will used in the query
editor.

* fix: AzureMonitor adds back editor for annotation queries

This must have been broken for a month or more. Now possible to
edit annotation queries again.

* feat: Azure Monitor - support for multiple subscriptions

Adds a new dropdown for subscriptions in the query editor.

Defaults to the subscription id in jsonData for queries
that have no subscription id.

* feat: adds Azure Logs multi subscriptions support

The subscription id is needed for fetching the list of
workspaces. Adds support to the Log Analytics datasource
and to the annotations for Log Analytics to be able to
choose between multiple subscriptions.

* feat: AzureMonitor config page with multiple subs

Adds support for multiple subscriptions for the different
variations of configuring Azure Monitor and Azure Logs.

To be able to show a list of subscriptions, the config
has to be saved first - the plugin route fetches the
tenant id, client id and client secret from the database
so a call to get subscriptions requires that those
fields are saved first. If the page has not saved then
the use can manually paste in a subscription id.

* feat: support for multi subs in Azure Monitor variables

Adds an optional subscription parameter to the template
variable macros. Also adds a Subscriptions macro.

* fix: remove some implicit anys from tests
2019-05-07 15:45:15 +02:00
Hugo Häggmark
9a8a6d9dda
Chore: Lowered implicit anys limit to 5617
Progress: #14714
2019-05-06 07:08:24 +02:00
Hugo Häggmark
f3f762065a
Chore: Lowered implicit anys limit to 5623
Progress: #14714
2019-05-03 07:11:23 +02:00
Hugo Häggmark
b803ba2689
Chore: Lowered implicit anys limit to 5668
Progress: #14714
2019-04-29 06:38:48 +02:00