From a2e1a7e2f762c285e0b3aac1dfa2e625917db019 Mon Sep 17 00:00:00 2001 From: Gareth Dawson Date: Mon, 18 Sep 2023 15:02:55 +0100 Subject: [PATCH] MySQL: Update configuration page styling (#74902) * config page update * move SecureSocksProxySettings out of tls/ssl --- .../configuration/ConfigurationEditor.tsx | 277 ++++++++++-------- 1 file changed, 151 insertions(+), 126 deletions(-) diff --git a/public/app/plugins/datasource/mysql/configuration/ConfigurationEditor.tsx b/public/app/plugins/datasource/mysql/configuration/ConfigurationEditor.tsx index a83cd73436f..07cd9e50005 100644 --- a/public/app/plugins/datasource/mysql/configuration/ConfigurationEditor.tsx +++ b/public/app/plugins/datasource/mysql/configuration/ConfigurationEditor.tsx @@ -7,16 +7,19 @@ import { updateDatasourcePluginJsonDataOption, updateDatasourcePluginResetOption, } from '@grafana/data'; +import { ConfigSection, DataSourceDescription, Stack } from '@grafana/experimental'; import { Alert, - FieldSet, - InlineField, - InlineFieldRow, - InlineSwitch, + Divider, + Field, + Icon, Input, + Label, Link, SecretInput, SecureSocksProxySettings, + Switch, + Tooltip, } from '@grafana/ui'; import { config } from 'app/core/config'; import { ConnectionLimits } from 'app/features/plugins/sql/components/configuration/ConnectionLimits'; @@ -48,13 +51,20 @@ export const ConfigurationEditor = (props: DataSourcePluginOptionsEditorProps -
- + + + + + + - - + /> + + + + + + + - - - - - - - - - - - Specify the time zone used in the database session, e.g. Europe/Berlin or - +02:00. This is necessary, if the timezone of the database (or the host of the database) is - set to something other than UTC. The value is set in the session with - SET time_zone='...'. If you leave this field empty, the timezone is not updated. - You can find more information in the MySQL documentation. - - } - label="Session timezone" - labelWidth={WIDTH_MEDIUM} - > + /> + + + - - - - - - - - - - + + + + + + + + + + + + + + + - - - - Allows using the cleartext client side plugin if required by an account, such as one defined with the PAM - authentication plugin. Sending passwords in clear text may be a security problem in some configurations. - To avoid problems if there is any possibility that the password would be intercepted, clients should - connect to MySQL Server using a method that protects the password. Possibilities include TLS / SSL, IPsec, - or a private network. - - } - htmlFor="allowCleartextPasswords" + + + + - - -
+ /> + + {config.secureSocksDSProxyEnabled && ( - + <> + + {config.secureSocksDSProxyEnabled && ( + + )} + )} + {jsonData.tlsAuth || jsonData.tlsAuthWithCACert ? ( -
- -
+ <> + + + + {jsonData.tlsAuth || jsonData.tlsAuthWithCACert ? ( + + ) : null} + + ) : null} - + -
- - A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example - 1m if your data is written every minute. - + + + + Session timezone + + Specify the time zone used in the database session, e.g. Europe/Berlin or + +02:00. This is necessary, if the timezone of the database (or the host of the + database) is set to something other than UTC. The value is set in the session with + SET time_zone='...'. If you leave this field empty, the timezone is not + updated. You can find more information in the MySQL documentation. + + } + > + + + + } - labelWidth={WIDTH_MEDIUM} - label="Min time interval" > + + + + + Min time interval + + A lower limit for the auto group by time interval. Recommended to be set to write frequency, for + example + 1m if your data is written every minute. + + } + > + + + + + } + description="A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example 1m if your data is written every minute." + > + - -
+ /> + + + + + + + + The database user should only be granted SELECT permissions on the specified database & tables you want to