Commit Graph

37 Commits

Author SHA1 Message Date
Erik Sundell 934a8f08ae
Stackdriver: Project selector (#22447)
* clean PR #17366

* udpate vendor

* [WIP] Implement projects management for stackdriver

* [WIP] Implement projects management for stackdriver

* [WIP] Implement projects management for stackdriver

* Implement projects management for stackdriver

* [WIP][Tests] Fix errors

* clean anonymous struct

* remove await

* don't store project list

* Add default project on query editor

* gofmt

* Fix tests

* Move test data source to backend

* Use segment instead of dropdown. remove ensure default project since it's not being used anymore.

* Fix broken annotation editor

* Load gceDefaultAccount only once when in the config page

* Reset error message on auth type change

* Add metric find query for projects

* Remove debug code

* Fix broken tests

* Fix typings

* Fix lint error

* Slightly different approach - now having a distiction between config page default project, and project that is selectable from the dropdown in the query editor.

* Fix broken tests

* Attempt to fix strict ts errors

* Prevent state from being set multiple times

* Remove noOptionsMessage since it seems to be obosolete in react select

* One more attempt to solve ts strict error

* Interpolate project template variable. Make sure its loaded correctly when opening variable query editor first time

* Implicit any fix

* fix: typescript strict null check fixes

* Return empty array in case project endpoint fails

* Rename project to projectName to prevent clashing with legacy query prop

* Fix broken test

* fix: Stackdriver - template replace on filter label

should have a regex format as that escapes the dots
in the label name which is not valid.

Co-authored-by: Labesse Kévin <kevin@labesse.me>
Co-authored-by: Elias Cédric Laouiti <elias@abtasty.com>
Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
2020-03-02 09:31:09 -05:00
Erik Sundell 260239d98b
Stackdriver: Support meta labels (#21373)
* Rewrite angular segments for filter and group by in react

* wip: refactoring

* Update metric find queries

* Remove old maps used to create labels - use one map for all types instead

* Use value as label (again) for filters ang groupby

* Remove old filter

* Remove not used code

* Fixes after pr feedback

* Fix broken tests and add new metadata tests

* Add index file to make imports cleaner

* Cleanup. Remove old angular filter code

* Fix broken tests

* Use type switching instead of if statements

* Use globals for regex

* Updates after pr feedback

* Make sure it's possible to filter using the same key multiple times

* Replace metric select with segment component

* Pass template vars as props

* Refactor meta labels code

* Reorder template variables

* Fix broken tests

* Reset metric value when changing service

* Fix lint issue.

* Make tests independant of element order

* Include kubernetes.io in regex

* Add instruction in help section
2020-01-17 12:25:47 +01:00
Dominik Prokop 9b7748ec13
Chore: Reorg packages (#20111)
Primarily- moving majority of the types and utils from @grafana/ui to @grafana/data

* Move types from grafana-ui to grafana-data

* Move valueFormats to grafana-data

* Move utils from grafana-ui to grafana-data

* Update imports in grafana-ui

* revert data's tsconfig change

* Update imports in grafana-runtime

* Fix import paths in grafana-ui

* Move rxjs to devDeps

* Core import updates batch 1

* Import updates batch 2

* Imports fix batch 3

* Imports fixes batch i don't know

* Fix imorts in grafana-toolkit

* Fix imports after master merge
2019-10-31 10:48:05 +01:00
kay delaney 99411bf37a
Types: Adds type safety to appEvents (#19418)
* Types: Add type safety to appEvents
2019-10-14 09:27:47 +01:00
Ryan McKinley c194ae1ba5
Registry: add a reusable function registry (#17047) 2019-07-16 11:40:23 -07:00
Ryan McKinley 3f15170914 Refactor: move some files to @grafana/data (#17952)
* moving to data WIP

* more refactoring

* add missing test

* mock full path

* remove sinon from grafana-ui
2019-07-06 08:05:53 +02:00
Tobias Skarhed 0b9de3f761 noImplicitAny: Lower count to about 3450 (#17799) 2019-06-27 15:56:02 +02:00
Dominik Prokop 19e824006a
Refactor: Make SelectOptionItem a generic type to enable select value typing (#16718)
* Make SelectOptionItem a generic type to enable select value typing
* TS ignores added because of optional value on Select items (it's no longer any)
2019-04-23 20:44:16 +02:00
Daniel Lee 0302c7afa7 stackdriver: add some more typings 2019-02-05 15:28:03 +01:00
Daniel Lee 7b1aed6caf stackdriver: converts some variables from any to types 2019-01-14 23:43:31 +01:00
Daniel Lee 18abb87cbb stackdriver: small fixes after reactifying 2019-01-14 18:23:01 +01:00
Erik Sundell b6171fa3c7 add feedback to what interval is being used (calculated in the backend) 2019-01-11 15:14:35 +01:00
Erik Sundell b596550210 use typings for ds and template srv 2019-01-11 13:53:04 +01:00
Erik Sundell d51f91f54b unregister event listener correctly 2019-01-09 13:56:15 +01:00
Erik Sundell b8c2ba3320 add typing for metric descriptor 2019-01-08 14:03:52 +01:00
Erik Sundell 8867d8e99c make templateSrv a prop 2019-01-08 13:52:19 +01:00
Erik Sundell dc7f98de6a use correct event handler name convention. register directive on startup 2019-01-08 13:37:08 +01:00
Erik Sundell f9f51d6819 replace fragment with empty jsx tags 2019-01-08 13:00:31 +01:00
Erik Sundell d23c3d2b64 add tests 2019-01-03 15:12:03 +01:00
Erik Sundell 5ba429387f reactify annotation query editor 2018-12-28 19:45:24 +01:00
Erik Sundell 8a916757d7 remove segment srv prop 2018-12-21 23:28:21 +01:00
Erik Sundell b9cf15786d use ds template srv reference 2018-12-21 23:21:55 +01:00
Erik Sundell 2f342b8917 remove not used stuff 2018-12-21 23:07:46 +01:00
Erik Sundell 31254e1c72 add event handler 2018-12-21 22:04:46 +01:00
Erik Sundell 0515605b9a add help component 2018-12-21 21:38:46 +01:00
Erik Sundell e2ed163779 add project and help component 2018-12-20 16:55:02 +01:00
Erik Sundell 06f771afd3 add alias by component 2018-12-20 15:59:21 +01:00
Erik Sundell 861f911cda add alignment periods component 2018-12-20 13:36:10 +01:00
Erik Sundell 7a31076f09 cleanup aggregation picker 2018-12-20 13:27:47 +01:00
Erik Sundell 1452bc2e8a move alignment population code to parent component. make alignment a stateless component instead. 2018-12-20 11:26:05 +01:00
Erik Sundell ec68c65660 flatten target obj 2018-12-20 11:00:16 +01:00
Erik Sundell 945b0aeb86 add alignment component 2018-12-19 17:12:50 +01:00
Erik Sundell 603ef1c37d refactor aggregation picker 2018-12-19 16:08:18 +01:00
Erik Sundell 9b1b4c09f5 use render props pattern 2018-12-19 15:54:45 +01:00
Erik Sundell 07dc9d06d7 use template variable prop 2018-12-19 14:29:00 +01:00
Erik Sundell a955caa9ac cleanup 2018-12-19 14:19:27 +01:00
Erik Sundell 146aa7abab wip: convert angular directives to react components 2018-12-13 16:40:14 +01:00