diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddService/AddService.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddService/AddService.component.tsx index f7b2d27366b..3b89d4f3dff 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddService/AddService.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddService/AddService.component.tsx @@ -195,6 +195,7 @@ const AddService = ({ {activeStepperStep === 3 && ( void; @@ -46,6 +48,8 @@ interface Props { const ConnectionConfigForm: FunctionComponent = ({ data, + okText = 'Save', + cancelText = 'Discard', serviceCategory, status, onCancel, @@ -103,7 +107,9 @@ const ConnectionConfigForm: FunctionComponent = ({ return ( { + okText: string; + cancelText: string; showFormHeader?: boolean; status?: LoadingState; onCancel?: () => void; @@ -33,15 +35,34 @@ interface Props extends FormProps { function ArrayFieldTemplate(props: ArrayFieldTemplateProps) { return ( - <> - -

{props.schema.description}

+ +
+
+ +

{props.schema.description}

+
+ {props.canAdd && ( + + )} +
{props.items.map((element, index) => ( -
-
{element.children}
+
0, + })} + key={`${element.key}-${index}`}> +
{element.children}
{element.hasRemove && ( )}
))} - {props.canAdd && ( - - )} - + ); } function ObjectFieldTemplate(props: ObjectFieldTemplateProps) { return ( - -

{props.description}

- {props.properties.map((element) => ( -
+
+
+ +

+ {props.description} +

+
+ {props.schema.additionalProperties && ( + + )} +
+ {props.properties.map((element, index) => ( +
{element.content}
))} - {props.schema.additionalProperties && ( - - )} ); } const FormBuilder: FunctionComponent = ({ + okText, + cancelText, showFormHeader = false, status = 'initial', onCancel, @@ -137,7 +164,7 @@ const FormBuilder: FunctionComponent = ({ theme="primary" variant="text" onClick={handleCancel}> - Discard + {cancelText} {status === 'waiting' ? ( )}
diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/tailwind.css b/openmetadata-ui/src/main/resources/ui/src/styles/tailwind.css index 858bc0c6143..b6c7c6241d4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/styles/tailwind.css +++ b/openmetadata-ui/src/main/resources/ui/src/styles/tailwind.css @@ -354,7 +354,9 @@ } .rjsf.no-header #root__title, - .rjsf.no-header #root__description { + .rjsf.no-header #root__description, + .rjsf .form-additional .control-label, + .rjsf .panel.panel-danger.errors .panel-heading { @apply tw-hidden; } @@ -362,6 +364,15 @@ @apply tw-my-3; } + .rjsf .additional-fields .form-group.field, + .rjsf .array-fields .form-group.field { + @apply tw-my-0; + } + + .rjsf .property-wrapper.additional-fields ~ .button-comp { + @apply tw-mt-1.5; + } + .rjsf .control-label { @apply tw-capitalize; } @@ -389,21 +400,37 @@ } .rjsf .btn.array-item-remove { - @apply tw-mt-4 tw-p-4; + @apply tw-p-3.5; background: url(../assets/svg/ic-delete.svg) center center no-repeat; - background-size: 35%; + background-size: 50%; } .rjsf .row { - @apply tw-flex tw-items-center tw-w-full tw--m-1; + @apply tw-flex tw-items-center tw-w-full tw--m-1.5; } .rjsf .col-xs-5 { - @apply tw-flex-1 tw-p-1; + @apply tw-flex-1 tw-p-1.5; } .rjsf .col-xs-2 { - @apply tw-w-1/12 tw-p-1; + @apply tw-w-7 tw-p-1.5; + } + + .rjsf .errors .list-group > .list-group-item { + list-style-type: disc; + } + + .rjsf .panel-danger.errors { + @apply tw-mb-0 tw-mt-2; + } + + .rjsf .list-group { + @apply tw-px-5; + } + + .rjsf .list-group-item { + @apply tw-list-disc; } @keyframes highlight {