mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-29 03:16:05 +00:00
UI : Fix alignment and spacing issue (#9379)
* Fix alignment and spacing issue * fix spacing issue while adding and editing ingestion * added center support in PageLayoutV1
This commit is contained in:
parent
a3495c67f0
commit
cfcddf13c8
@ -11,6 +11,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { Col, Row } from 'antd';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { isEqual, isNil, isUndefined } from 'lodash';
|
import { isEqual, isNil, isUndefined } from 'lodash';
|
||||||
@ -665,10 +666,9 @@ const DatasetDetails: React.FC<DatasetDetailsProps> = ({
|
|||||||
/>
|
/>
|
||||||
<div className="tw-flex-grow tw-flex tw-flex-col tw-py-4">
|
<div className="tw-flex-grow tw-flex tw-flex-col tw-py-4">
|
||||||
{activeTab === 1 && (
|
{activeTab === 1 && (
|
||||||
<div
|
<div className="tab-details-container">
|
||||||
className="tab-details-container tw-grid tw-grid-cols-4 tw-gap-4 tw-w-full"
|
<Row id="schemaDetails">
|
||||||
id="schemaDetails">
|
<Col span={17}>
|
||||||
<div className="tw-col-span-3">
|
|
||||||
<Description
|
<Description
|
||||||
description={description}
|
description={description}
|
||||||
entityFieldTasks={getEntityFieldThreadCounts(
|
entityFieldTasks={getEntityFieldThreadCounts(
|
||||||
@ -695,14 +695,16 @@ const DatasetDetails: React.FC<DatasetDetailsProps> = ({
|
|||||||
onEntityFieldSelect={onEntityFieldSelect}
|
onEntityFieldSelect={onEntityFieldSelect}
|
||||||
onThreadLinkSelect={onThreadLinkSelect}
|
onThreadLinkSelect={onThreadLinkSelect}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Col>
|
||||||
<div className="tw-col-span-1 tw-border tw-border-main tw-rounded-md">
|
<Col offset={1} span={6}>
|
||||||
|
<div className="border-1 border-main rounded-6">
|
||||||
<FrequentlyJoinedTables
|
<FrequentlyJoinedTables
|
||||||
header="Frequently Joined Tables"
|
header="Frequently Joined Tables"
|
||||||
tableList={getFrequentlyJoinedWithTables()}
|
tableList={getFrequentlyJoinedWithTables()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="tw-col-span-full">
|
</Col>
|
||||||
|
<Col className="m-t-md" span={24}>
|
||||||
<SchemaTab
|
<SchemaTab
|
||||||
columnName={getPartialNameFromTableFQN(
|
columnName={getPartialNameFromTableFQN(
|
||||||
datasetFQN,
|
datasetFQN,
|
||||||
@ -733,7 +735,8 @@ const DatasetDetails: React.FC<DatasetDetailsProps> = ({
|
|||||||
onThreadLinkSelect={onThreadLinkSelect}
|
onThreadLinkSelect={onThreadLinkSelect}
|
||||||
onUpdate={onColumnsUpdate}
|
onUpdate={onColumnsUpdate}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Col>
|
||||||
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{activeTab === 2 && (
|
{activeTab === 2 && (
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Col, Row } from 'antd';
|
import { Col, Row } from 'antd';
|
||||||
|
import classNames from 'classnames';
|
||||||
import React, { FC, HTMLAttributes, ReactNode } from 'react';
|
import React, { FC, HTMLAttributes, ReactNode } from 'react';
|
||||||
import './../../styles/layout/page-layout.less';
|
import './../../styles/layout/page-layout.less';
|
||||||
|
|
||||||
@ -19,6 +20,7 @@ interface PageLayoutProp extends HTMLAttributes<HTMLDivElement> {
|
|||||||
leftPanel?: ReactNode;
|
leftPanel?: ReactNode;
|
||||||
header?: ReactNode;
|
header?: ReactNode;
|
||||||
rightPanel?: ReactNode;
|
rightPanel?: ReactNode;
|
||||||
|
center?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const pageContainerStyles = {
|
export const pageContainerStyles = {
|
||||||
@ -33,6 +35,7 @@ const PageLayoutV1: FC<PageLayoutProp> = ({
|
|||||||
children,
|
children,
|
||||||
rightPanel,
|
rightPanel,
|
||||||
className,
|
className,
|
||||||
|
center = false,
|
||||||
}: PageLayoutProp) => {
|
}: PageLayoutProp) => {
|
||||||
return (
|
return (
|
||||||
<Row className={className} gutter={[16, 16]} style={pageContainerStyles}>
|
<Row className={className} gutter={[16, 16]} style={pageContainerStyles}>
|
||||||
@ -45,14 +48,21 @@ const PageLayoutV1: FC<PageLayoutProp> = ({
|
|||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
<Col
|
<Col
|
||||||
className="page-layout-v1-center page-layout-v1-vertical-scroll"
|
className={classNames(
|
||||||
|
'page-layout-v1-center page-layout-v1-vertical-scroll',
|
||||||
|
{
|
||||||
|
'flex justify-center': center,
|
||||||
|
}
|
||||||
|
)}
|
||||||
flex={
|
flex={
|
||||||
leftPanel && rightPanel
|
leftPanel && rightPanel
|
||||||
? 'calc(100% - 568px)'
|
? 'calc(100% - 568px)'
|
||||||
: leftPanel || rightPanel
|
: leftPanel || rightPanel
|
||||||
? 'calc(100% - 284px)'
|
? 'calc(100% - 284px)'
|
||||||
: '100%'
|
: '100%'
|
||||||
}>
|
}
|
||||||
|
offset={center ? 3 : 0}
|
||||||
|
span={center ? 18 : 24}>
|
||||||
{children}
|
{children}
|
||||||
</Col>
|
</Col>
|
||||||
{rightPanel && (
|
{rightPanel && (
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { Space } from 'antd';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { capitalize, startCase } from 'lodash';
|
import { capitalize, startCase } from 'lodash';
|
||||||
import { ServiceTypes } from 'Models';
|
import { ServiceTypes } from 'Models';
|
||||||
@ -29,7 +30,7 @@ import ErrorPlaceHolder from '../../components/common/error-with-placeholder/Err
|
|||||||
import TitleBreadcrumb from '../../components/common/title-breadcrumb/title-breadcrumb.component';
|
import TitleBreadcrumb from '../../components/common/title-breadcrumb/title-breadcrumb.component';
|
||||||
import { TitleBreadcrumbProps } from '../../components/common/title-breadcrumb/title-breadcrumb.interface';
|
import { TitleBreadcrumbProps } from '../../components/common/title-breadcrumb/title-breadcrumb.interface';
|
||||||
import PageContainerV1 from '../../components/containers/PageContainerV1';
|
import PageContainerV1 from '../../components/containers/PageContainerV1';
|
||||||
import PageLayout from '../../components/containers/PageLayout';
|
import PageLayoutV1 from '../../components/containers/PageLayoutV1';
|
||||||
import Loader from '../../components/Loader/Loader';
|
import Loader from '../../components/Loader/Loader';
|
||||||
import {
|
import {
|
||||||
DEPLOYED_PROGRESS_VAL,
|
DEPLOYED_PROGRESS_VAL,
|
||||||
@ -40,7 +41,6 @@ import {
|
|||||||
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
||||||
import { FormSubmitType } from '../../enums/form.enum';
|
import { FormSubmitType } from '../../enums/form.enum';
|
||||||
import { IngestionActionMessage } from '../../enums/ingestion.enum';
|
import { IngestionActionMessage } from '../../enums/ingestion.enum';
|
||||||
import { PageLayoutType } from '../../enums/layout.enum';
|
|
||||||
import { ServiceCategory } from '../../enums/service.enum';
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { CreateIngestionPipeline } from '../../generated/api/services/ingestionPipelines/createIngestionPipeline';
|
import { CreateIngestionPipeline } from '../../generated/api/services/ingestionPipelines/createIngestionPipeline';
|
||||||
import { PipelineType } from '../../generated/entity/services/ingestionPipelines/ingestionPipeline';
|
import { PipelineType } from '../../generated/entity/services/ingestionPipelines/ingestionPipeline';
|
||||||
@ -258,20 +258,9 @@ const AddIngestionPage = () => {
|
|||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<div className="self-center">
|
<div className="self-center">
|
||||||
<PageLayout
|
<PageLayoutV1 center>
|
||||||
classes="w-max-1080 h-full p-t-md"
|
<Space direction="vertical" size="middle">
|
||||||
header={<TitleBreadcrumb titleLinks={slashedBreadcrumb} />}
|
<TitleBreadcrumb titleLinks={slashedBreadcrumb} />
|
||||||
layout={PageLayoutType['2ColRTL']}
|
|
||||||
rightPanel={getServiceIngestionStepGuide(
|
|
||||||
activeIngestionStep,
|
|
||||||
true,
|
|
||||||
`${serviceData?.name || ''}_${ingestionType}`,
|
|
||||||
'',
|
|
||||||
ingestionType as PipelineType,
|
|
||||||
isDeployed(),
|
|
||||||
false,
|
|
||||||
isAirflowRunning
|
|
||||||
)}>
|
|
||||||
<div className="form-container">
|
<div className="form-container">
|
||||||
<AddIngestion
|
<AddIngestion
|
||||||
activeIngestionStep={activeIngestionStep}
|
activeIngestionStep={activeIngestionStep}
|
||||||
@ -286,7 +275,9 @@ const AddIngestionPage = () => {
|
|||||||
pipelineType={ingestionType as PipelineType}
|
pipelineType={ingestionType as PipelineType}
|
||||||
serviceCategory={serviceCategory as ServiceCategory}
|
serviceCategory={serviceCategory as ServiceCategory}
|
||||||
serviceData={serviceData as DataObj}
|
serviceData={serviceData as DataObj}
|
||||||
setActiveIngestionStep={(step) => setActiveIngestionStep(step)}
|
setActiveIngestionStep={(step) =>
|
||||||
|
setActiveIngestionStep(step)
|
||||||
|
}
|
||||||
showDeployButton={showIngestionButton}
|
showDeployButton={showIngestionButton}
|
||||||
status={FormSubmitType.ADD}
|
status={FormSubmitType.ADD}
|
||||||
onAddIngestionSave={onAddIngestionSave}
|
onAddIngestionSave={onAddIngestionSave}
|
||||||
@ -294,7 +285,20 @@ const AddIngestionPage = () => {
|
|||||||
onIngestionDeploy={onIngestionDeploy}
|
onIngestionDeploy={onIngestionDeploy}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</PageLayout>
|
</Space>
|
||||||
|
<div className="m-t-xlg p-x-lg w-800" data-testid="right-panel">
|
||||||
|
{getServiceIngestionStepGuide(
|
||||||
|
activeIngestionStep,
|
||||||
|
true,
|
||||||
|
`${serviceData?.name || ''}_${ingestionType}`,
|
||||||
|
'',
|
||||||
|
ingestionType as PipelineType,
|
||||||
|
isDeployed(),
|
||||||
|
false,
|
||||||
|
isAirflowRunning
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</PageLayoutV1>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Typography } from 'antd';
|
import { Space, Typography } from 'antd';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { startCase } from 'lodash';
|
import { startCase } from 'lodash';
|
||||||
import { ServiceOption, ServicesData, ServiceTypes } from 'Models';
|
import { ServiceOption, ServicesData, ServiceTypes } from 'Models';
|
||||||
@ -22,13 +22,12 @@ import ErrorPlaceHolder from '../../components/common/error-with-placeholder/Err
|
|||||||
import TitleBreadcrumb from '../../components/common/title-breadcrumb/title-breadcrumb.component';
|
import TitleBreadcrumb from '../../components/common/title-breadcrumb/title-breadcrumb.component';
|
||||||
import { TitleBreadcrumbProps } from '../../components/common/title-breadcrumb/title-breadcrumb.interface';
|
import { TitleBreadcrumbProps } from '../../components/common/title-breadcrumb/title-breadcrumb.interface';
|
||||||
import PageContainerV1 from '../../components/containers/PageContainerV1';
|
import PageContainerV1 from '../../components/containers/PageContainerV1';
|
||||||
import PageLayout from '../../components/containers/PageLayout';
|
import PageLayoutV1 from '../../components/containers/PageLayoutV1';
|
||||||
import Loader from '../../components/Loader/Loader';
|
import Loader from '../../components/Loader/Loader';
|
||||||
import ServiceConfig from '../../components/ServiceConfig/ServiceConfig';
|
import ServiceConfig from '../../components/ServiceConfig/ServiceConfig';
|
||||||
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
||||||
import { addServiceGuide } from '../../constants/service-guide.constant';
|
import { addServiceGuide } from '../../constants/service-guide.constant';
|
||||||
import { OPENMETADATA } from '../../constants/Services.constant';
|
import { OPENMETADATA } from '../../constants/Services.constant';
|
||||||
import { PageLayoutType } from '../../enums/layout.enum';
|
|
||||||
import { ServiceCategory } from '../../enums/service.enum';
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { ConfigData, ServicesType } from '../../interface/service.interface';
|
import { ConfigData, ServicesType } from '../../interface/service.interface';
|
||||||
import jsonData from '../../jsons/en';
|
import jsonData from '../../jsons/en';
|
||||||
@ -150,11 +149,9 @@ function EditConnectionFormPage() {
|
|||||||
{getEntityMissingError(serviceCategory, serviceFQN)}
|
{getEntityMissingError(serviceCategory, serviceFQN)}
|
||||||
</ErrorPlaceHolder>
|
</ErrorPlaceHolder>
|
||||||
) : (
|
) : (
|
||||||
<PageLayout
|
<PageLayoutV1 center>
|
||||||
classes="w-max-1080 h-full p-t-xss"
|
<Space direction="vertical" size="middle">
|
||||||
header={<TitleBreadcrumb titleLinks={slashedBreadcrumb} />}
|
<TitleBreadcrumb titleLinks={slashedBreadcrumb} />
|
||||||
layout={PageLayoutType['2ColRTL']}
|
|
||||||
rightPanel={fetchRightPanel()}>
|
|
||||||
<div className="form-container">
|
<div className="form-container">
|
||||||
<Typography.Title level={5}>
|
<Typography.Title level={5}>
|
||||||
{`Edit ${serviceFQN} Service Connection`}
|
{`Edit ${serviceFQN} Service Connection`}
|
||||||
@ -171,7 +168,9 @@ function EditConnectionFormPage() {
|
|||||||
serviceType={serviceDetails?.serviceType || ''}
|
serviceType={serviceDetails?.serviceType || ''}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</PageLayout>
|
</Space>
|
||||||
|
<div className="m-t-xlg p-x-lg w-800">{fetchRightPanel()}</div>
|
||||||
|
</PageLayoutV1>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { Space } from 'antd';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { capitalize, startCase } from 'lodash';
|
import { capitalize, startCase } from 'lodash';
|
||||||
import { ServiceTypes } from 'Models';
|
import { ServiceTypes } from 'Models';
|
||||||
@ -28,7 +29,7 @@ import ErrorPlaceHolder from '../../components/common/error-with-placeholder/Err
|
|||||||
import TitleBreadcrumb from '../../components/common/title-breadcrumb/title-breadcrumb.component';
|
import TitleBreadcrumb from '../../components/common/title-breadcrumb/title-breadcrumb.component';
|
||||||
import { TitleBreadcrumbProps } from '../../components/common/title-breadcrumb/title-breadcrumb.interface';
|
import { TitleBreadcrumbProps } from '../../components/common/title-breadcrumb/title-breadcrumb.interface';
|
||||||
import PageContainerV1 from '../../components/containers/PageContainerV1';
|
import PageContainerV1 from '../../components/containers/PageContainerV1';
|
||||||
import PageLayout from '../../components/containers/PageLayout';
|
import PageLayoutV1 from '../../components/containers/PageLayoutV1';
|
||||||
import Loader from '../../components/Loader/Loader';
|
import Loader from '../../components/Loader/Loader';
|
||||||
import {
|
import {
|
||||||
DEPLOYED_PROGRESS_VAL,
|
DEPLOYED_PROGRESS_VAL,
|
||||||
@ -39,7 +40,6 @@ import {
|
|||||||
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
||||||
import { FormSubmitType } from '../../enums/form.enum';
|
import { FormSubmitType } from '../../enums/form.enum';
|
||||||
import { IngestionActionMessage } from '../../enums/ingestion.enum';
|
import { IngestionActionMessage } from '../../enums/ingestion.enum';
|
||||||
import { PageLayoutType } from '../../enums/layout.enum';
|
|
||||||
import { ServiceCategory } from '../../enums/service.enum';
|
import { ServiceCategory } from '../../enums/service.enum';
|
||||||
import { CreateIngestionPipeline } from '../../generated/api/services/ingestionPipelines/createIngestionPipeline';
|
import { CreateIngestionPipeline } from '../../generated/api/services/ingestionPipelines/createIngestionPipeline';
|
||||||
import {
|
import {
|
||||||
@ -288,20 +288,9 @@ const EditIngestionPage = () => {
|
|||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<div className="self-center">
|
<div className="self-center">
|
||||||
<PageLayout
|
<PageLayoutV1 center>
|
||||||
classes="w-max-1080 h-full p-t-xss"
|
<Space direction="vertical" size="middle">
|
||||||
header={<TitleBreadcrumb titleLinks={slashedBreadcrumb} />}
|
<TitleBreadcrumb titleLinks={slashedBreadcrumb} />
|
||||||
layout={PageLayoutType['2ColRTL']}
|
|
||||||
rightPanel={getServiceIngestionStepGuide(
|
|
||||||
activeIngestionStep,
|
|
||||||
true,
|
|
||||||
ingestionData?.name || '',
|
|
||||||
'',
|
|
||||||
ingestionType as PipelineType,
|
|
||||||
isDeployed(),
|
|
||||||
true,
|
|
||||||
isAirflowRunning
|
|
||||||
)}>
|
|
||||||
<div className="form-container">
|
<div className="form-container">
|
||||||
<AddIngestion
|
<AddIngestion
|
||||||
activeIngestionStep={activeIngestionStep}
|
activeIngestionStep={activeIngestionStep}
|
||||||
@ -317,7 +306,9 @@ const EditIngestionPage = () => {
|
|||||||
pipelineType={ingestionType as PipelineType}
|
pipelineType={ingestionType as PipelineType}
|
||||||
serviceCategory={serviceCategory as ServiceCategory}
|
serviceCategory={serviceCategory as ServiceCategory}
|
||||||
serviceData={serviceData as DataObj}
|
serviceData={serviceData as DataObj}
|
||||||
setActiveIngestionStep={(step) => setActiveIngestionStep(step)}
|
setActiveIngestionStep={(step) =>
|
||||||
|
setActiveIngestionStep(step)
|
||||||
|
}
|
||||||
showDeployButton={showIngestionButton}
|
showDeployButton={showIngestionButton}
|
||||||
status={FormSubmitType.EDIT}
|
status={FormSubmitType.EDIT}
|
||||||
onAirflowStatusCheck={onAirflowStatusCheck}
|
onAirflowStatusCheck={onAirflowStatusCheck}
|
||||||
@ -326,7 +317,20 @@ const EditIngestionPage = () => {
|
|||||||
onUpdateIngestion={onEditIngestionSave}
|
onUpdateIngestion={onEditIngestionSave}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</PageLayout>
|
</Space>
|
||||||
|
<div className="m-t-xlg p-x-lg w-800" data-testid="right-panel">
|
||||||
|
{getServiceIngestionStepGuide(
|
||||||
|
activeIngestionStep,
|
||||||
|
true,
|
||||||
|
ingestionData?.name || '',
|
||||||
|
'',
|
||||||
|
ingestionType as PipelineType,
|
||||||
|
isDeployed(),
|
||||||
|
true,
|
||||||
|
isAirflowRunning
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</PageLayoutV1>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,9 @@
|
|||||||
.w-48 {
|
.w-48 {
|
||||||
width: 12rem;
|
width: 12rem;
|
||||||
}
|
}
|
||||||
|
.w-800 {
|
||||||
|
width: 800px;
|
||||||
|
}
|
||||||
.w-11-12 {
|
.w-11-12 {
|
||||||
width: 91.666667%;
|
width: 91.666667%;
|
||||||
}
|
}
|
||||||
|
@ -140,6 +140,10 @@
|
|||||||
.m-t-lg {
|
.m-t-lg {
|
||||||
margin-top: @margin-lg;
|
margin-top: @margin-lg;
|
||||||
}
|
}
|
||||||
|
.m-t-xlg {
|
||||||
|
margin-top: @margin-xlg;
|
||||||
|
}
|
||||||
|
|
||||||
.mt-44 {
|
.mt-44 {
|
||||||
margin-top: 11rem /* 176px */;
|
margin-top: 11rem /* 176px */;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user