Commit Graph

102 Commits

Author SHA1 Message Date
renovate[bot]
e84a01e870 Update jest monorepo to v29 (#58261)
* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-24 14:00:41 +00:00
Ryan McKinley
d33939da55 DataSourceWithBackend: Add plugin id to the request headers (#58082) 2022-11-14 19:35:50 -05:00
Andres Martinez Gotor
1201170724 GoogleCloudMonitoring: Refactor query type definition (#58512) 2022-11-10 09:30:47 +01:00
Andres Martinez Gotor
0a8fdc4550 GoogleCloudMonitoring: Remove unused code (#58347) 2022-11-07 17:51:49 +01:00
Ashley Harrison
e5c68f40c2 Accessibility: enable rule jsx-a11y/label-has-associated-control (#57964)
* use labels correctly

* fix opentsdb labels

* fix unit tests

* use aria-label instead of data-testid
2022-11-01 14:37:58 +00:00
Andres Martinez Gotor
ce38840f29 Google Cloud Monitoring: Ensure selectors fit in the screen (#57817) 2022-10-31 12:52:25 +01:00
Zoltán Bedi
c0b778134e Revert: Query editor components from grafana-ui (#57436)
* Revert: QueryEditor components from grafana-ui

* Use local version of experimental

* Use experimental for query editor components

* Fix type issues in MSSQL

* point to actual version of experimental package

* point to latest version of experimental

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-10-24 17:12:36 +02:00
Labesse Kévin
c8402b4b50 GoogleCloudMonitoring: fix typo tooltip pre-processing (#57049) 2022-10-17 09:45:35 +02:00
kay delaney
e85917f041 Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
Andres Martinez Gotor
cf2ba7e41c Google Cloud Monitoring: Adapt default crossSeriesReducer (#56693) 2022-10-11 14:51:25 +02:00
Adam Simpson
92857ef331 CloudMonitor: Remove cloudMonitoringExperimentalUI feature flag (#55054)
* CloudMonitor: remove cloudMonitoringExperimentalUI

* fix: address typecheck errors

* fix: fix SLO import and width cleanup

* fix wrong metricType when switching datasources

* fix: remove legacy SLO and fix queryType check
2022-09-15 14:12:26 +00:00
Giordano Ricci
c68d7f1e35 Correlations: Add CorrelationSettings Page (#53821)
* GrafanaUI: add option to close DeleteButton on confirm click

* add datasource readOnly info to frontend settings

* move isTruthy utility type guard

* add generic non-visualization table component

* Add correlations settings page

* add missing readOnly in mock

* Fix typo

* avoid reloading correlations after add/remove

* use DeepPartial from rhf

* validate source data source

* fix validation logic

* fix navmodel test

* add missing readonly property

* remove unused styles

* handle multiple clicks on elements

* better UX for loading states

* fix remove handler

* add glue icon
2022-08-26 11:27:28 +01:00
Ryan McKinley
b483ac322f Chore: replace React.FC<Props> with simple function component (#54123) 2022-08-24 16:54:34 -04:00
Andreas Christou
1f17e9a044 Update effects to avoid retrieving metrics descriptors except on project name update (#54091) 2022-08-23 16:42:59 +01:00
Takuya Kosugiyama
2ff007b266 Cloud Monitoring: Support SLO burn rate (#53710) 2022-08-22 10:11:54 +02:00
Andreas Christou
d6a0a5c9ed Set projectName in componentDidMount to ensure GCE project is set (#53652)
- Update componentDidMount to call ensureGCEDefaultProject to correctly set project name for GCE Service Account auth
- Set state appropriately
- Update test
2022-08-12 14:54:19 +01:00
Andreas Christou
d4f382892d CloudMonitor: Fix to hide queries when used in conjunction with Expressions (#53537)
* Correctly pass all original query parameters on interpolation

* Add datasource tests

- Update props on mock query
- Add mock instance settings
- Add util function to generate template variables
- Add datasource test file
- Correct setting of templateSrv
- Update betterer results

* Simplify test and pass templateSrv appropriately

* Fix lint issue

* Simplify test and add type that supports parital nested objects

* Update test and remove unneeded util function

* Rename to avoid duplicate mock
2022-08-12 11:02:56 +01:00
Adam Simpson
165efcd9cc CloudMonitor: Consolidate editor rows (#52675)
* consolidate project, metric, and service

* CloudMonitor: make AlignmentPeriodLabel a tooltip

alignmentPeriodLabel now returns a string instead of component. This is
because as a <label> it would cause wrapping issues when the screen size
would change. It also isn't essential information _unless_ the user is
using a template variable for the Alignment period.

* refactor: remove any hard-coded widths for auto

* chore: use newly moved experimental comps in UI
2022-07-28 17:47:01 +00: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
Adam Simpson
c8be92e827 CloudMonitoring: add tests around experimental UI (#52487)
* CloudMonitoring: add tests around experimental UI

I also reworked the annotation query editor UI a little bit to bring it
inline with how AzureMonitor's query editor looks.

Closes #44431
2022-07-20 13:40:55 +00:00
Kevin Yu
689639cdb0 CloudMonitoring: Update AnnotationQueryEditor to use experimental UI components (#51841) 2022-07-07 10:29:32 +02:00
Kevin Yu
401ce2b2f9 CloudMonitoring: Update Selector to use experimental UI components (#51840) 2022-07-07 10:27:20 +02:00
Kevin Yu
6d2d99e804 CloudMonitoring: Update SLO to use experimental UI components (#51839) 2022-07-07 10:26:24 +02:00
Kevin Yu
19fa4ef9af CloudMonitoring: Update Service to use experimental UI components (#51838) 2022-07-07 10:25:53 +02:00
Kevin Yu
5bd58be334 CloudMonitoring: Update Project to use experimental UI components (#51837) 2022-07-07 10:25:08 +02:00
Kevin Yu
396278a6e5 add experimental slo query editor (#51351) 2022-07-06 11:48:43 -04: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
Kevin Yu
f9becc2d4f Cloud Monitoring: Update Metrics to use experimental UI components (#51134)
* update metrics component

* separate state variables

* add additonal tests
2022-06-22 05:39:08 -07:00
Kevin Yu
d8d1ca8151 add query header (#51072) 2022-06-20 07:06:14 -07:00
Kevin Yu
e889dfdc5c Cloud Monitoring: Update GroupBy fields to use experimental UI components (#50541)
* Cloud Monitoring: Update GroupBy fields to use experimental UI components

* let group by field grow horizontally

* remove fixed width constants from inputs

* add test

* Cloud Monitoring: Update GraphPeriod to use experimental UI components (#50545)

* Cloud Monitoring: Update GraphPeriod to use experimental UI components

* Cloud Monitoring: Update Preprocessing to use experimental UI components (#50548)

* Cloud Monitoring: Update Preprocessing to use experimental UI components

* add tests

* make overrides optional

* move preprocessor back into its own row
2022-06-20 06:28:29 -07:00
Kevin Yu
d88108a3b7 Cloud Monitoring: Update Alignment fields to use experimental UI components (#50536)
* Cloud Monitoring: Update Alignment fields to use experimental UI components

* remove unreachable code

* remove alias

* remove custom label style

* add tests
2022-06-15 18:03:47 -07:00
Kevin Yu
e046f14f36 Cloud Monitoring: Update AliasBy to use experimental UI components (#50461) 2022-06-09 09:22:44 -07:00
Kevin Yu
8bd56b8226 Chore: convert Cloud Monitoring Aggregation enzyme tests to RTL (#50326) 2022-06-08 10:03:58 +02:00
Kevin Yu
0a95d493e3 Cloud Monitoring: Use new annotation API (#49026)
* remove angular code

* format annotation on backend

* format time with time type instead of string

* update annotation query tests

* update get alignment data function

* update annotation query editor

* add annotation query editor test

* update struct

* add tests

* remove extracted function

* remove non-null assertion

* remove stray commented out console.log

* fix jest haste map warning

* add alignment period

* add AnnotationMetricQuery type
2022-05-19 13:52:52 -07:00
Andres Martinez Gotor
b1bde7667f CloudMonitoring: Allow to set a custom value or disable graph_period (#48646) 2022-05-09 13:43:10 +02:00
Ashley Harrison
06d3c27bc1 Select: Portal menu by default (#48176)
* Remove menuShouldPortal from all <Select /> components

* fix unit tests

* leave menuShouldPortal as an escape hatch

* Fix import order
2022-05-04 15:12:59 +01:00
Josh Hunt
3c6e0e8ef8 Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
Andres Martinez Gotor
987afeee38 Chore: Cover CloudMonitoring function utils with tests (#46878) 2022-03-24 09:47:59 +01:00
renovate[bot]
d87cd6f26c Update dependency prettier to v2.5.1 (#43473)
* Update dependency prettier to v2.5.1

* prettier fixes

* chore(toolkit): bump prettier to 2.5.1

* style(eslint): bump grafana config to 2.5.2 in core and toolkit

* style(mssql-datasource): fix no-inferrable-types eslint errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-02-02 12:02:32 +00:00
Isabella Siu
d3b8fc53aa CloudMonitoring: Fix resource labels in query editor (#44550) 2022-01-27 11:35:13 -05:00
Mitsuhiro Tanda
d1083b9597 Cloud Monitoring: Reduce request size when listing labels (#44365) 2022-01-26 12:02:42 +01:00
Isabella Siu
50e7ac8d65 CloudMonitoring: use @grafana/google-sdk (#44398) 2022-01-25 13:10:14 -05:00
Andres Martinez Gotor
af0ece12f9 CloudMonitoring: Fix fastpass issues (#44277) 2022-01-25 17:28:59 +01:00
Erik Sundell
715166baf3 CloudMonitoring: Fixes broken variable queries that use group bys (#43914) 2022-01-17 15:51:24 +01:00
Calle Gustafsson
c3eb1ffe85 Cloud Monitoring: Adds metric type to Metric drop down options (#43268)
* Fixes Google Cloud Monitoring Deduplication

Bug: #42931

* Use useStyles instead of stylesFactory
2021-12-27 08:59:04 +01:00
Marcus Efraimsson
7d3bdb6d1b Plugins: Set backend metadata property for core plugins (#43349)
Ref #42648
Ref #42781
2021-12-22 17:59:26 +01:00
Shirley
acb1f54128 Chore: Update and replace redundant wording (#43138)
* Replace redundant wording

* Add term key

* Reduce wording and move down tooltip

* Reduce margin between tooltip and button

* Correct manual margin to same as button's
2021-12-17 13:45:24 +01:00
Andres Martinez Gotor
9cbc872f22 CloudMonitoring: Avoid to escape regexps in filters (#41961) 2021-11-29 10:04:36 +01:00
Erik Sundell
fa3261eaf2 ignore empty tags (#41529) 2021-11-11 13:38:04 +01:00
Isabella Siu
fc3d3ff003 CloudMonitoring: Move data manipulation to backend (#41379) 2021-11-10 08:58:04 -05:00