From 560abcf99234557068e4c16c6ea7b54be8511019 Mon Sep 17 00:00:00 2001 From: Christian Vogt Date: Thu, 7 Nov 2024 16:12:59 -0500 Subject: [PATCH] add env var to field details popover --- .../fields/DataFormFieldGroup.tsx | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/frontend/src/concepts/connectionTypes/fields/DataFormFieldGroup.tsx b/frontend/src/concepts/connectionTypes/fields/DataFormFieldGroup.tsx index 022efaba0f..f575f15152 100644 --- a/frontend/src/concepts/connectionTypes/fields/DataFormFieldGroup.tsx +++ b/frontend/src/concepts/connectionTypes/fields/DataFormFieldGroup.tsx @@ -1,5 +1,13 @@ import * as React from 'react'; -import { FormGroup, GenerateId, Popover } from '@patternfly/react-core'; +import { + DescriptionList, + DescriptionListDescription, + DescriptionListGroup, + DescriptionListTerm, + FormGroup, + GenerateId, + Popover, +} from '@patternfly/react-core'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; import { ConnectionTypeDataField } from '~/concepts/connectionTypes/types'; import DashboardPopupIconButton from '~/concepts/dashboard/DashboardPopupIconButton'; @@ -19,14 +27,28 @@ const DataFormFieldGroup: React.FC = ({ field, children }): React.ReactNo // do not mark read only fields as required isRequired={field.required && !field.properties.defaultReadOnly} labelIcon={ - field.description ? ( - - } - aria-label="More info" - /> - - ) : undefined + + + Environment variable + {field.envVar} + + {field.description ? ( + + Description + {field.description} + + ) : null} + + } + > + } + aria-label="More info" + /> + } > {children(id)}