Skip to content

Commit

Permalink
fix: some style for github transformation cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsweet committed Sep 20, 2024
1 parent 2f9f816 commit 648f7f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions config-ui/src/plugins/components/deployments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ import { Space, Select, Input } from 'antd';
import { useRequest } from '@mints/hooks';

import API from '@/api';
import { PageLoading } from '@/components';
import { Loading } from '@/components';

interface Props {
style?: React.CSSProperties;
plugin: string;
connectionId: ID;
transformation: any;
setTransformation: React.Dispatch<React.SetStateAction<any>>;
}

export const Deployments = ({ plugin, connectionId, transformation, setTransformation }: Props) => {
export const Deployments = ({ style, plugin, connectionId, transformation, setTransformation }: Props) => {
const [type, setType] = useState('regex');

const { loading, data } = useRequest(() => API.scopeConfig.deployments(plugin, connectionId), [plugin, connectionId]);
Expand Down Expand Up @@ -77,11 +78,11 @@ export const Deployments = ({ plugin, connectionId, transformation, setTransform
};

if (loading || !data) {
return <PageLoading />;
return <Loading style={style} />;
}

return (
<Space>
<Space style={style}>
<Select value={type} onChange={handleChangeType}>
<Select.Option value="select">is one of</Select.Option>
<Select.Option value="regex">matches</Select.Option>
Expand Down
3 changes: 2 additions & 1 deletion config-ui/src/plugins/register/github/transformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ const renderCollapseItems = ({
Convert a GitHub Deployment to a DevLake Deployment
</Checkbox>
<div style={{ margin: '8px 0', paddingLeft: 28 }}>
<span>If its environment name matches</span>
<span>If its environment name</span>
<Deployments
style={{ margin: '0 4px' }}
plugin={plugin}
connectionId={connectionId}
transformation={transformation}
Expand Down

0 comments on commit 648f7f4

Please sign in to comment.