Commit Graph

14 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
Andrej Ocenas 18d72ab327
Add some typings for react events (#20038) 2019-10-29 09:38:59 +01:00
Tobias Skarhed 0b9de3f761 noImplicitAny: Lower count to about 3450 (#17799) 2019-06-27 15:56:02 +02:00
Hugo Häggmark 7eabc282e9
Chore: Adds typings to lodash (#16590) 2019-04-15 12:11:52 +02:00
Dominik Prokop 88a46e6dd4 Bump Prettier version (#15532)
* Fix prettier version to 1.16.4
2019-02-19 15:41:35 +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 19d1d7f35a stackdriver: add query keyword style to query fields 2018-11-19 16:26:06 +01:00
Erik Sundell 0ec4491a52 stackdriver: reimplementing service variable query type 2018-11-19 16:06:30 +01:00
Erik Sundell 0aeaec1ac6 stackdriver: add support for template variables 2018-11-19 14:44:40 +01:00
Erik Sundell 26b1cc5dcf stackdriver: join resource and metric labels. split them in values and keys 2018-11-19 11:34:40 +01:00
Erik Sundell 2e0cbe75ee stackdriver: use arrow functions 2018-11-13 11:06:08 +01:00
Erik Sundell e698202fae stackdriver: use new naming convention for query editor all over 2018-11-13 10:57:10 +01:00