From cebc180e5b2a1e8e633d18481b4d35100f58b535 Mon Sep 17 00:00:00 2001 From: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com> Date: Fri, 23 Jun 2023 19:07:28 +0900 Subject: [PATCH] Forms: Remove usage of gf-form textarea and help icons (#70561) --- .../DataSourceSettings/TLSAuthSettings.tsx | 4 +-- .../components/Forms/Legacy/Switch/Switch.tsx | 4 +-- .../features/admin/ldap/LdapUserGroups.tsx | 16 +++------- .../app/features/admin/ldap/LdapUserTeams.tsx | 12 +++---- .../loki/configuration/DebugSection.tsx | 32 ++++++------------- 5 files changed, 21 insertions(+), 47 deletions(-) diff --git a/packages/grafana-ui/src/components/DataSourceSettings/TLSAuthSettings.tsx b/packages/grafana-ui/src/components/DataSourceSettings/TLSAuthSettings.tsx index 8b06ab0ef70..af6ab6d716a 100644 --- a/packages/grafana-ui/src/components/DataSourceSettings/TLSAuthSettings.tsx +++ b/packages/grafana-ui/src/components/DataSourceSettings/TLSAuthSettings.tsx @@ -64,9 +64,7 @@ export const TLSAuthSettings = ({ dataSourceConfig, onChange }: HttpSettingsBase content="TLS/SSL Certs are encrypted and stored in the Grafana database." theme="info" > -
- -
+
diff --git a/packages/grafana-ui/src/components/Forms/Legacy/Switch/Switch.tsx b/packages/grafana-ui/src/components/Forms/Legacy/Switch/Switch.tsx index c03bc684332..c54a0ef44c0 100644 --- a/packages/grafana-ui/src/components/Forms/Legacy/Switch/Switch.tsx +++ b/packages/grafana-ui/src/components/Forms/Legacy/Switch/Switch.tsx @@ -57,9 +57,7 @@ export class Switch extends PureComponent { {label} {tooltip && ( -
- -
+
)}
diff --git a/public/app/features/admin/ldap/LdapUserGroups.tsx b/public/app/features/admin/ldap/LdapUserGroups.tsx index 44c4361d7e6..0c8c1a4f83e 100644 --- a/public/app/features/admin/ldap/LdapUserGroups.tsx +++ b/public/app/features/admin/ldap/LdapUserGroups.tsx @@ -21,9 +21,7 @@ export const LdapUserGroups = ({ groups, showAttributeMapping }: Props) => { Organization - - - + Role @@ -39,14 +37,10 @@ export const LdapUserGroups = ({ groups, showAttributeMapping }: Props) => { {group.orgRole} ) : ( - - No match - - - - - - + No match + + + )} diff --git a/public/app/features/admin/ldap/LdapUserTeams.tsx b/public/app/features/admin/ldap/LdapUserTeams.tsx index 1a29aad6e13..b6edc7089dc 100644 --- a/public/app/features/admin/ldap/LdapUserTeams.tsx +++ b/public/app/features/admin/ldap/LdapUserTeams.tsx @@ -33,14 +33,10 @@ export const LdapUserTeams = ({ teams, showAttributeMapping }: Props) => { <> -
- No match - - - - - -
+ No match + + + )} diff --git a/public/app/plugins/datasource/loki/configuration/DebugSection.tsx b/public/app/plugins/datasource/loki/configuration/DebugSection.tsx index fba01027639..c4a63a2ef2f 100644 --- a/public/app/plugins/datasource/loki/configuration/DebugSection.tsx +++ b/public/app/plugins/datasource/loki/configuration/DebugSection.tsx @@ -1,15 +1,11 @@ -import { css } from '@emotion/css'; -import cx from 'classnames'; import React, { ReactNode, useState } from 'react'; import { Field, FieldType, LinkModel } from '@grafana/data'; -import { LegacyForms } from '@grafana/ui'; +import { InlineField, TextArea } from '@grafana/ui'; import { getFieldLinksForExplore } from '../../../../features/explore/utils/links'; import { DerivedFieldConfig } from '../types'; -const { FormField } = LegacyForms; - type Props = { derivedFields?: DerivedFieldConfig[]; className?: string; @@ -25,23 +21,15 @@ export const DebugSection = (props: Props) => { return (
- setDebugText(event.currentTarget.value)} - /> - } - /> + +