From d00ea685e64086ea49284237daa4935d31efba59 Mon Sep 17 00:00:00 2001 From: Andreas Christou Date: Wed, 4 Oct 2023 14:45:26 +0100 Subject: [PATCH] CloudMonitoring: Use `Field` instead of `InlineField` (#75829) * Use Field instead of InlineField * Prettify --- .../cloud-monitoring/components/Fields.tsx | 6 +- .../components/VariableQueryEditor.tsx | 14 +-- .../VariableQueryEditor.test.tsx.snap | 104 +++++++++++++++--- 3 files changed, 99 insertions(+), 25 deletions(-) diff --git a/public/app/plugins/datasource/cloud-monitoring/components/Fields.tsx b/public/app/plugins/datasource/cloud-monitoring/components/Fields.tsx index b04d70dce2e..f6cc8bb34ab 100644 --- a/public/app/plugins/datasource/cloud-monitoring/components/Fields.tsx +++ b/public/app/plugins/datasource/cloud-monitoring/components/Fields.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { SelectableValue } from '@grafana/data'; -import { InlineField, Select } from '@grafana/ui'; +import { Field, Select } from '@grafana/ui'; interface VariableQueryFieldProps { onChange: (value: string) => void; @@ -19,7 +19,7 @@ export const VariableQueryField = ({ allowCustomValue = false, }: VariableQueryFieldProps) => { return ( - + - - - - + null} + label="Query Type" + /> ); } diff --git a/public/app/plugins/datasource/cloud-monitoring/components/__snapshots__/VariableQueryEditor.test.tsx.snap b/public/app/plugins/datasource/cloud-monitoring/components/__snapshots__/VariableQueryEditor.test.tsx.snap index 2d4fdc81ded..8d61351c259 100644 --- a/public/app/plugins/datasource/cloud-monitoring/components/__snapshots__/VariableQueryEditor.test.tsx.snap +++ b/public/app/plugins/datasource/cloud-monitoring/components/__snapshots__/VariableQueryEditor.test.tsx.snap @@ -2,23 +2,99 @@ exports[`VariableQueryEditor renders correctly 1`] = `
- - Query Type -
- + +
+
+
+
+ + +
+
+
+ Loading... +
+
+ +
+
+
+
+
+
+
+
`;